From b2ffb3c8f0ef8dfe60f12b3e6187c63c2c1c5a02 Mon Sep 17 00:00:00 2001 From: hc-github-team-tf-azure <> Date: Wed, 14 Jan 2026 16:14:30 +0000 Subject: [PATCH] Updating based on 5811f74db --- .../batch/2024-07-01/application/README.md | 111 -- .../2024-07-01/applicationpackage/README.md | 111 -- .../2024-07-01/applicationpackages/README.md | 111 ++ .../client.go | 12 +- .../constants.go | 2 +- .../id_application.go | 2 +- .../id_application_test.go | 2 +- .../id_version.go | 2 +- .../id_version_test.go | 2 +- .../method_applicationpackageactivate.go} | 8 +- .../method_applicationpackagecreate.go} | 8 +- .../method_applicationpackagedelete.go} | 8 +- .../method_applicationpackageget.go} | 8 +- .../method_applicationpackagelist.go} | 42 +- ...el_activateapplicationpackageparameters.go | 2 +- .../model_applicationpackage.go | 7 +- .../model_applicationpackageproperties.go | 2 +- .../predicates.go | 2 +- .../version.go | 4 +- .../batch/2024-07-01/applications/README.md | 111 ++ .../2024-07-01/applications}/client.go | 12 +- .../id_application.go | 2 +- .../id_application_test.go | 2 +- .../id_batchaccount.go | 2 +- .../id_batchaccount_test.go | 2 +- .../method_applicationcreate.go} | 8 +- .../method_applicationdelete.go} | 8 +- .../method_applicationget.go} | 8 +- .../method_applicationlist.go} | 42 +- .../method_applicationupdate.go} | 8 +- .../model_application.go | 7 +- .../model_applicationproperties.go | 2 +- .../predicates.go | 2 +- .../{application => applications}/version.go | 4 +- .../batch/2024-07-01/batchaccount/README.md | 191 ---- ...istoutboundnetworkdependenciesendpoints.go | 105 -- .../model_privateendpointconnection.go | 13 - .../batch/2024-07-01/batchaccounts/README.md | 191 ++++ .../2024-07-01/batchaccounts}/client.go | 12 +- .../constants.go | 2 +- .../id_batchaccount.go | 2 +- .../id_batchaccount_test.go | 2 +- .../method_batchaccountcreate.go} | 18 +- .../method_batchaccountdelete.go} | 18 +- .../method_batchaccountget.go} | 8 +- .../method_batchaccountgetkeys.go} | 8 +- .../method_batchaccountlist.go} | 30 +- ...method_batchaccountlistbyresourcegroup.go} | 30 +- ...istoutboundnetworkdependenciesendpoints.go | 105 ++ .../method_batchaccountregeneratekey.go} | 8 +- ...batchaccountsynchronizeautostoragekeys.go} | 8 +- .../method_batchaccountupdate.go} | 8 +- .../model_autostoragebaseproperties.go | 2 +- .../model_autostorageproperties.go | 2 +- .../model_batchaccount.go | 6 +- .../model_batchaccountcreateparameters.go | 2 +- .../model_batchaccountcreateproperties.go | 2 +- .../model_batchaccountkeys.go | 2 +- .../model_batchaccountproperties.go | 2 +- ...del_batchaccountregeneratekeyparameters.go | 2 +- .../model_batchaccountupdateparameters.go | 2 +- .../model_batchaccountupdateproperties.go | 2 +- .../model_computenodeidentityreference.go | 2 +- .../model_encryptionproperties.go | 2 +- .../model_endpointaccessprofile.go | 2 +- .../model_endpointdependency.go | 2 +- .../model_endpointdetail.go | 2 +- .../model_iprule.go | 2 +- .../model_keyvaultproperties.go | 2 +- .../model_keyvaultreference.go | 2 +- .../model_networkprofile.go | 2 +- .../model_outboundenvironmentendpoint.go | 2 +- .../batchaccounts}/model_privateendpoint.go | 2 +- .../model_privateendpointconnection.go | 4 +- ...del_privateendpointconnectionproperties.go | 2 +- ...model_privatelinkserviceconnectionstate.go | 2 +- .../model_virtualmachinefamilycorequota.go | 2 +- .../predicates.go | 4 +- .../version.go | 4 +- .../2024-07-01/batchmanagements/README.md | 74 -- .../2024-07-01/batchmanagements/client.go | 26 - .../batchmanagements/id_location.go | 121 -- .../batchmanagements/id_location_test.go | 237 ---- .../batch/2024-07-01/certificate/README.md | 123 -- .../batch/2024-07-01/certificate/client.go | 26 - .../batch/2024-07-01/certificates/README.md | 123 ++ .../{batchaccount => certificates}/client.go | 12 +- .../constants.go | 2 +- .../id_batchaccount.go | 2 +- .../id_batchaccount_test.go | 2 +- .../id_certificate.go | 2 +- .../id_certificate_test.go | 2 +- .../method_certificatecanceldeletion.go} | 8 +- .../method_certificatecreate.go} | 20 +- .../method_certificatedelete.go} | 18 +- .../method_certificateget.go} | 8 +- .../method_certificatelistbybatchaccount.go} | 42 +- .../method_certificateupdate.go} | 20 +- .../model_certificate.go | 7 +- ...del_certificatecreateorupdateparameters.go | 2 +- ...del_certificatecreateorupdateproperties.go | 2 +- .../model_certificateproperties.go | 2 +- .../model_deletecertificateerror.go | 2 +- .../predicates.go | 2 +- .../{certificate => certificates}/version.go | 4 +- resource-manager/batch/2024-07-01/client.go | 120 +- .../2024-07-01/detectorresponses/README.md | 53 + .../client.go | 12 +- .../id_batchaccount.go | 2 +- .../id_batchaccount_test.go | 2 +- .../id_detector.go | 2 +- .../id_detector_test.go | 2 +- .../method_batchaccountgetdetector.go | 4 +- .../method_batchaccountlistdetectors.go | 8 +- .../model_detectorresponse.go | 7 +- .../model_detectorresponseproperties.go | 2 +- .../predicates.go | 2 +- .../version.go | 4 +- .../batch/2024-07-01/location/README.md | 53 - .../method_listsupportedvirtualmachineskus.go | 138 --- .../networksecurityperimeter/README.md | 65 -- .../id_batchaccount.go | 130 --- .../id_batchaccount_test.go | 282 ----- .../method_listconfigurations.go | 105 -- .../networksecurityperimeter/version.go | 10 - .../README.md | 65 ++ .../client.go | 12 +- .../constants.go | 2 +- .../id_batchaccount.go | 130 +++ .../id_batchaccount_test.go | 282 +++++ ...d_networksecurityperimeterconfiguration.go | 2 +- ...worksecurityperimeterconfiguration_test.go | 2 +- ...tworksecurityperimetergetconfiguration.go} | 8 +- ...worksecurityperimeterlistconfigurations.go | 105 ++ ...ecurityperimeterreconcileconfiguration.go} | 18 +- .../model_accessrule.go | 2 +- .../model_accessruleproperties.go | 2 +- ...ccessrulepropertiessubscriptionsinlined.go | 2 +- .../model_networksecurityperimeter.go | 2 +- ...l_networksecurityperimeterconfiguration.go | 2 +- ...ecurityperimeterconfigurationproperties.go | 2 +- .../model_networksecurityprofile.go | 2 +- .../model_provisioningissue.go | 2 +- .../model_provisioningissueproperties.go | 2 +- .../model_resourceassociation.go | 2 +- .../predicates.go | 2 +- .../version.go | 10 + .../batch/2024-07-01/openapis/README.md | 74 ++ .../{location => openapis}/client.go | 12 +- .../constants.go | 2 +- .../{location => openapis}/id_location.go | 2 +- .../id_location_test.go | 2 +- .../method_locationchecknameavailability.go | 4 +- .../method_locationgetquotas.go} | 8 +- ...locationlistsupportedvirtualmachineskus.go | 138 +++ .../model_batchlocationquota.go | 2 +- .../model_checknameavailabilityparameters.go | 2 +- .../model_checknameavailabilityresult.go | 2 +- .../model_skucapability.go | 2 +- .../model_supportedsku.go | 2 +- .../{location => openapis}/predicates.go | 2 +- .../{location => openapis}/version.go | 4 +- .../batch/2024-07-01/pool/README.md | 139 --- .../batch/2024-07-01/pool/client.go | 26 - .../batch/2024-07-01/pools/README.md | 139 +++ .../post => batch/2024-07-01/pools}/client.go | 12 +- .../2024-07-01/{pool => pools}/constants.go | 2 +- .../{pool => pools}/id_batchaccount.go | 2 +- .../{pool => pools}/id_batchaccount_test.go | 2 +- .../2024-07-01/{pool => pools}/id_pool.go | 2 +- .../{pool => pools}/id_pool_test.go | 2 +- .../method_poolcreate.go} | 20 +- .../method_pooldelete.go} | 18 +- .../method_pooldisableautoscale.go} | 8 +- .../method_get.go => pools/method_poolget.go} | 8 +- .../method_poollistbybatchaccount.go} | 42 +- .../method_poolstopresize.go} | 8 +- .../method_poolupdate.go} | 20 +- .../model_applicationpackagereference.go | 2 +- .../model_automaticosupgradepolicy.go | 2 +- .../{pool => pools}/model_autoscalerun.go | 2 +- .../model_autoscalerunerror.go | 2 +- .../model_autoscalesettings.go | 2 +- .../model_autouserspecification.go | 2 +- .../model_azureblobfilesystemconfiguration.go | 2 +- .../model_azurefileshareconfiguration.go | 2 +- .../model_certificatereference.go | 2 +- .../model_cifsmountconfiguration.go | 2 +- .../model_computenodeidentityreference.go | 2 +- .../model_containerconfiguration.go | 2 +- .../model_containerhostbatchbindmountentry.go | 2 +- .../model_containerregistry.go | 2 +- .../{pool => pools}/model_datadisk.go | 2 +- .../model_deploymentconfiguration.go | 2 +- .../{pool => pools}/model_diffdisksettings.go | 2 +- .../model_diskencryptionconfiguration.go | 2 +- .../model_environmentsetting.go | 2 +- .../model_fixedscalesettings.go | 2 +- .../{pool => pools}/model_imagereference.go | 2 +- .../{pool => pools}/model_inboundnatpool.go | 2 +- .../model_linuxuserconfiguration.go | 2 +- .../{pool => pools}/model_manageddisk.go | 2 +- .../{pool => pools}/model_metadataitem.go | 2 +- .../model_mountconfiguration.go | 2 +- .../model_networkconfiguration.go | 2 +- .../model_networksecuritygrouprule.go | 2 +- .../model_nfsmountconfiguration.go | 2 +- .../model_nodeplacementconfiguration.go | 2 +- .../{pool => pools}/model_osdisk.go | 2 +- .../2024-07-01/{pool => pools}/model_pool.go | 4 +- .../model_poolendpointconfiguration.go | 2 +- .../{pool => pools}/model_poolproperties.go | 2 +- .../model_publicipaddressconfiguration.go | 2 +- .../{pool => pools}/model_resizeerror.go | 2 +- .../model_resizeoperationstatus.go | 2 +- .../{pool => pools}/model_resourcefile.go | 2 +- .../model_rollingupgradepolicy.go | 2 +- .../{pool => pools}/model_scalesettings.go | 2 +- .../{pool => pools}/model_securityprofile.go | 2 +- .../model_serviceartifactreference.go | 2 +- .../{pool => pools}/model_starttask.go | 2 +- .../model_taskcontainersettings.go | 2 +- .../model_taskschedulingpolicy.go | 2 +- .../{pool => pools}/model_uefisettings.go | 2 +- .../{pool => pools}/model_upgradepolicy.go | 2 +- .../{pool => pools}/model_useraccount.go | 2 +- .../{pool => pools}/model_useridentity.go | 2 +- .../model_virtualmachineconfiguration.go | 2 +- .../model_vmdisksecurityprofile.go | 2 +- .../{pool => pools}/model_vmextension.go | 2 +- .../model_windowsconfiguration.go | 2 +- .../model_windowsuserconfiguration.go | 2 +- .../2024-07-01/{pool => pools}/predicates.go | 2 +- .../2024-07-01/{pool => pools}/version.go | 4 +- .../privateendpointconnection/README.md | 82 -- .../id_batchaccount.go | 130 --- .../id_batchaccount_test.go | 282 ----- .../method_listbybatchaccount.go | 134 --- .../privateendpointconnection/version.go | 10 - .../privateendpointconnections/README.md | 82 ++ .../client.go | 12 +- .../constants.go | 2 +- .../id_batchaccount.go | 130 +++ .../id_batchaccount_test.go | 282 +++++ .../id_privateendpointconnection.go | 2 +- .../id_privateendpointconnection_test.go | 2 +- .../method_privateendpointconnectiondelete.go | 70 ++ .../method_privateendpointconnectionget.go} | 8 +- ...ateendpointconnectionlistbybatchaccount.go | 134 +++ ...method_privateendpointconnectionupdate.go} | 30 +- .../model_privateendpoint.go | 2 +- .../model_privateendpointconnection.go | 7 +- ...del_privateendpointconnectionproperties.go | 2 +- ...model_privatelinkserviceconnectionstate.go | 2 +- .../predicates.go | 2 +- .../privateendpointconnections/version.go | 10 + .../2024-07-01/privatelinkresource/README.md | 53 - .../privatelinkresource/id_batchaccount.go | 130 --- .../id_batchaccount_test.go | 282 ----- .../method_listbybatchaccount.go | 134 --- .../2024-07-01/privatelinkresource/version.go | 10 - .../2024-07-01/privatelinkresources/README.md | 53 + .../client.go | 12 +- .../privatelinkresources/id_batchaccount.go | 130 +++ .../id_batchaccount_test.go | 282 +++++ .../id_privatelinkresource.go | 2 +- .../id_privatelinkresource_test.go | 2 +- .../method_privatelinkresourceget.go} | 8 +- ...d_privatelinkresourcelistbybatchaccount.go | 134 +++ .../model_privatelinkresource.go | 7 +- .../model_privatelinkresourceproperties.go | 2 +- .../predicates.go | 2 +- .../privatelinkresources/version.go | 10 + .../2025-06-30/patch/model_connectioninfo.go | 2 +- .../patch/model_mongodbconnectioninfo.go | 2 +- .../model_connectioninfo.go | 2 +- .../model_mongodbconnectioninfo.go | 2 +- .../checknameavailability/README.md | 6 +- .../checknameavailability/client.go | 0 .../checknameavailability/constants.go | 0 .../method_checknameavailability.go | 0 .../model_checknameavailabilityrequest.go | 0 .../model_checknameavailabilityresult.go | 0 .../checknameavailability/version.go | 0 .../2020-05-01/client.go | 8 +- .../2020-05-01/entities/README.md | 6 +- .../2020-05-01/entities/client.go | 0 .../2020-05-01/entities/constants.go | 0 .../2020-05-01/entities/method_list.go | 0 .../2020-05-01/entities/model_entityinfo.go | 0 .../entities/model_entityinfoproperties.go | 0 .../entities/model_entityparentgroupinfo.go | 0 .../2020-05-01/entities/predicates.go | 0 .../2020-05-01/entities/version.go | 0 .../2020-05-01/managementgroups/README.md | 6 +- .../2020-05-01/managementgroups/client.go | 0 .../2020-05-01/managementgroups/constants.go | 0 .../managementgroups/id_subscription.go | 0 .../managementgroups/id_subscription_test.go | 0 .../managementgroups/method_createorupdate.go | 0 .../managementgroups/method_delete.go | 0 .../2020-05-01/managementgroups/method_get.go | 0 .../managementgroups/method_getdescendants.go | 0 .../method_hierarchysettingscreateorupdate.go | 0 .../method_hierarchysettingsdelete.go | 0 .../method_hierarchysettingsget.go | 0 .../method_hierarchysettingslist.go | 0 .../method_hierarchysettingsupdate.go | 0 .../managementgroups/method_list.go | 0 .../method_subscriptionscreate.go | 0 .../method_subscriptionsdelete.go | 0 .../method_subscriptionsgetsubscription.go | 0 ...onsgetsubscriptionsundermanagementgroup.go | 0 .../managementgroups/method_update.go | 0 .../model_azureasyncoperationresults.go | 0 .../model_createmanagementgroupchildinfo.go | 0 .../model_createmanagementgroupdetails.go | 0 .../model_createmanagementgroupproperties.go | 0 .../model_createmanagementgrouprequest.go | 0 .../model_createorupdatesettingsproperties.go | 0 .../model_createorupdatesettingsrequest.go | 0 .../model_createparentgroupinfo.go | 0 .../managementgroups/model_descendantinfo.go | 0 .../model_descendantinfoproperties.go | 0 .../model_descendantparentgroupinfo.go | 0 .../model_hierarchysettings.go | 0 .../model_hierarchysettingsinfo.go | 0 .../model_hierarchysettingslist.go | 0 .../model_hierarchysettingsproperties.go | 0 .../managementgroups/model_managementgroup.go | 0 .../model_managementgroupchildinfo.go | 0 .../model_managementgroupdetails.go | 0 .../model_managementgroupinfo.go | 0 .../model_managementgroupinfoproperties.go | 0 .../model_managementgrouppathelement.go | 0 .../model_managementgroupproperties.go | 0 .../managementgroups/model_parentgroupinfo.go | 0 .../model_patchmanagementgrouprequest.go | 0 .../model_subscriptionundermanagementgroup.go | 0 ...scriptionundermanagementgroupproperties.go | 0 .../2020-05-01/managementgroups/predicates.go | 0 .../2020-05-01/managementgroups/version.go | 0 .../2020-05-01/tenantbackfill/README.md | 6 +- .../2020-05-01/tenantbackfill/client.go | 0 .../2020-05-01/tenantbackfill/constants.go | 0 .../method_starttenantbackfill.go | 0 .../tenantbackfill/method_status.go | 0 .../model_tenantbackfillstatusresult.go | 0 .../2020-05-01/tenantbackfill/version.go | 0 .../2023-04-01/client.go | 8 +- .../hierarchysettingsoperationgroup/README.md | 6 +- .../hierarchysettingsoperationgroup/client.go | 0 .../method_hierarchysettingscreateorupdate.go | 0 .../method_hierarchysettingsdelete.go | 0 .../method_hierarchysettingsget.go | 0 .../method_hierarchysettingsupdate.go | 0 .../model_createorupdatesettingsproperties.go | 0 .../model_createorupdatesettingsrequest.go | 0 .../model_hierarchysettings.go | 0 .../model_hierarchysettingsproperties.go | 0 .../version.go | 0 .../2023-04-01/managementgroups/README.md | 6 +- .../2023-04-01/managementgroups/client.go | 0 .../2023-04-01/managementgroups/constants.go | 0 .../managementgroups/method_createorupdate.go | 0 .../managementgroups/method_delete.go | 0 .../2023-04-01/managementgroups/method_get.go | 0 .../managementgroups/method_getdescendants.go | 0 .../method_hierarchysettingslist.go | 0 .../managementgroups/method_update.go | 0 .../model_azureasyncoperationresults.go | 0 .../model_createmanagementgroupchildinfo.go | 0 .../model_createmanagementgroupdetails.go | 0 .../model_createmanagementgroupproperties.go | 0 .../model_createmanagementgrouprequest.go | 0 .../model_createparentgroupinfo.go | 0 .../managementgroups/model_descendantinfo.go | 0 .../model_descendantinfoproperties.go | 0 .../model_descendantparentgroupinfo.go | 0 .../model_hierarchysettingsinfo.go | 0 .../model_hierarchysettingslist.go | 0 .../model_hierarchysettingsproperties.go | 0 .../managementgroups/model_managementgroup.go | 0 .../model_managementgroupchildinfo.go | 0 .../model_managementgroupdetails.go | 0 .../model_managementgroupinfoproperties.go | 0 .../model_managementgrouppathelement.go | 0 .../model_managementgroupproperties.go | 0 .../managementgroups/model_parentgroupinfo.go | 0 .../model_patchmanagementgrouprequest.go | 0 .../2023-04-01/managementgroups/predicates.go | 0 .../2023-04-01/managementgroups/version.go | 0 .../2023-04-01/managements/README.md | 6 +- .../2023-04-01/managements/client.go | 0 .../2023-04-01/managements/constants.go | 0 .../method_checknameavailability.go | 0 .../managements/method_entitieslist.go | 0 .../method_managementgroupslist.go | 0 .../managements/method_starttenantbackfill.go | 0 .../method_tenantbackfillstatus.go | 0 .../model_checknameavailabilityrequest.go | 0 .../model_checknameavailabilityresult.go | 0 .../managements/model_entityinfo.go | 0 .../managements/model_entityinfoproperties.go | 0 .../model_entityparentgroupinfo.go | 0 .../managements/model_managementgroupinfo.go | 0 .../model_managementgroupinfoproperties.go | 0 .../model_tenantbackfillstatusresult.go | 0 .../2023-04-01/managements/predicates.go | 0 .../2023-04-01/managements/version.go | 0 .../README.md | 6 +- .../client.go | 0 .../id_subscription.go | 0 .../id_subscription_test.go | 0 ...thod_managementgroupsubscriptionscreate.go | 0 ...thod_managementgroupsubscriptionsdelete.go | 0 ...gementgroupsubscriptionsgetsubscription.go | 0 ...onsgetsubscriptionsundermanagementgroup.go | 0 .../model_descendantparentgroupinfo.go | 0 .../model_subscriptionundermanagementgroup.go | 0 ...scriptionundermanagementgroupproperties.go | 0 .../predicates.go | 0 .../version.go | 0 .../constants.go | 6 + .../constants.go | 6 + .../constants.go | 6 + .../constants.go | 6 + .../constants.go | 6 - .../constants.go | 6 - .../constants.go | 6 + .../constants.go | 6 + .../administratormicrosoftentras/README.md | 82 ++ .../client.go | 12 +- .../constants.go | 2 +- .../id_administrator.go | 2 +- .../id_administrator_test.go | 2 +- .../id_flexibleserver.go | 2 +- .../id_flexibleserver_test.go | 2 +- ...nistratorsmicrosoftentracreateorupdate.go} | 22 +- ...hod_administratorsmicrosoftentradelete.go} | 18 +- ...method_administratorsmicrosoftentraget.go} | 8 +- ...ministratorsmicrosoftentralistbyserver.go} | 30 +- .../model_administratormicrosoftentra.go | 2 +- .../model_administratormicrosoftentraadd.go | 2 +- ...l_administratormicrosoftentraproperties.go | 2 +- ...nistratormicrosoftentrapropertiesforadd.go | 2 +- .../predicates.go | 2 +- .../version.go | 4 +- .../administratorsmicrosoftentra/README.md | 82 -- .../method_delete.go | 70 -- .../README.md | 70 -- .../method_listbyserver.go | 105 -- .../README.md | 70 ++ .../client.go | 12 +- .../constants.go | 2 +- .../id_flexibleserver.go | 2 +- .../id_flexibleserver_test.go | 2 +- ...od_advancedthreatprotectionsettingsget.go} | 8 +- ...cedthreatprotectionsettingslistbyserver.go | 105 ++ ...rthreatprotectionsettingscreateorupdate.go | 6 +- ...l_advancedthreatprotectionsettingsmodel.go | 2 +- ...ancedthreatprotectionsettingsproperties.go | 2 +- .../predicates.go | 2 +- .../version.go | 4 +- .../backupautomaticandondemands/README.md | 77 ++ .../backupautomaticandondemands/client.go | 26 + .../constants.go | 2 +- .../id_backup.go | 2 +- .../id_backup_test.go | 2 +- .../id_flexibleserver.go | 2 +- .../id_flexibleserver_test.go | 2 +- ...thod_backupsautomaticandondemandcreate.go} | 22 +- ...thod_backupsautomaticandondemanddelete.go} | 18 +- .../method_backupsautomaticandondemandget.go} | 8 +- ...ackupsautomaticandondemandlistbyserver.go} | 30 +- .../model_backupautomaticandondemand.go | 2 +- ...el_backupautomaticandondemandproperties.go | 2 +- .../predicates.go | 2 +- .../version.go | 4 +- .../backupsautomaticandondemand/README.md | 77 -- .../backupsautomaticandondemand/client.go | 26 - .../backupslongtermretention/README.md | 91 -- .../id_flexibleserver.go | 130 --- .../id_flexibleserver_test.go | 282 ----- .../README.md | 53 + .../client.go | 12 +- .../constants.go | 2 +- .../id_flexibleserver.go | 2 +- .../id_flexibleserver_test.go | 2 +- .../id_ltrbackupoperation.go | 2 +- .../id_ltrbackupoperation_test.go | 2 +- .../method_backupslongtermretentionget.go} | 8 +- ...d_backupslongtermretentionlistbyserver.go} | 30 +- ...model_backupslongtermretentionoperation.go | 2 +- ...el_ltrbackupoperationresponseproperties.go | 44 + .../predicates.go | 2 +- .../version.go | 4 +- .../capabilitiesbylocation/README.md | 37 - .../capabilitiesbylocation/client.go | 26 - .../capabilitiesbylocation/id_location.go | 121 -- .../id_location_test.go | 237 ---- .../capabilitiesbylocation/predicates.go | 22 - .../capabilitiesbylocation/version.go | 10 - .../2025-08-01/capabilitiesbyserver/README.md | 37 - .../2025-08-01/capabilitiesbyserver/client.go | 26 - .../capabilitiesbyserver/constants.go | 426 ------- .../capabilitiesbyserver/predicates.go | 22 - .../2025-08-01/capturedlogs/README.md | 37 - .../2025-08-01/capturedlogs/predicates.go | 27 - .../2025-08-01/capturedlogs/version.go | 10 - .../postgresql/2025-08-01/client.go | 176 +-- .../2025-08-01/customoperation/README.md | 41 - .../2025-08-01/customoperation/client.go | 26 - .../2025-08-01/customoperation/constants.go | 51 - .../customoperation/id_flexibleserver.go | 130 --- .../customoperation/id_flexibleserver_test.go | 282 ----- .../model_migrationnameavailability.go | 12 - .../2025-08-01/customoperation/version.go | 10 - .../2025-08-01/nameavailability/README.md | 63 - .../2025-08-01/nameavailability/client.go | 26 - .../2025-08-01/nameavailability/constants.go | 51 - .../2025-08-01/nameavailability/version.go | 10 - .../postgresql/2025-08-01/openapis/README.md | 134 +++ .../{replicas => openapis}/client.go | 12 +- .../constants.go | 43 +- .../id_location.go | 2 +- .../id_location_test.go | 2 +- .../method_capabilitiesbylocationlist.go} | 30 +- .../method_nameavailabilitycheckglobally.go} | 8 +- ...thod_nameavailabilitycheckwithlocation.go} | 8 +- .../method_privatednszonesuffixget.go} | 8 +- .../method_quotausageslist.go | 8 +- .../method_virtualnetworksubnetusagelist.go} | 14 +- .../model_capability.go | 2 +- .../model_checknameavailabilityrequest.go | 2 +- .../openapis/model_delegatedsubnetusage.go} | 7 +- ...model_fastprovisioningeditioncapability.go | 2 +- .../model_nameavailabilitymodel.go | 2 +- .../model_nameproperty.go | 2 +- .../model_quotausage.go | 2 +- .../model_servereditioncapability.go | 2 +- .../model_serverskucapability.go | 2 +- .../model_serverversioncapability.go | 2 +- .../model_storageeditioncapability.go | 2 +- .../model_storagembcapability.go | 2 +- .../model_storagetiercapability.go | 2 +- .../model_supportedfeature.go | 2 +- .../model_virtualnetworksubnetusagemodel.go | 10 + ...odel_virtualnetworksubnetusageparameter.go | 8 + .../predicates.go | 20 +- .../2025-08-01/{post => openapis}/version.go | 4 +- .../postgresql/2025-08-01/post/README.md | 41 - .../postgresql/2025-08-01/post/constants.go | 51 - .../2025-08-01/post/id_flexibleserver.go | 130 --- .../2025-08-01/post/id_flexibleserver_test.go | 282 ----- .../2025-08-01/privatednszonesuffix/client.go | 26 - .../privatednszonesuffix/version.go | 10 - .../quotausagesforflexibleservers/README.md | 37 - .../quotausagesforflexibleservers/client.go | 26 - .../id_location.go | 121 -- .../id_location_test.go | 237 ---- .../quotausagesforflexibleservers/version.go | 10 - .../postgresql/2025-08-01/replicas/README.md | 37 - .../2025-08-01/replicas/constants.go | 1012 ----------------- .../2025-08-01/replicas/id_flexibleserver.go | 130 --- .../replicas/id_flexibleserver_test.go | 282 ----- .../2025-08-01/replicas/model_authconfig.go | 10 - .../2025-08-01/replicas/model_backup.go | 28 - .../2025-08-01/replicas/model_cluster.go | 9 - .../replicas/model_dataencryption.go | 14 - .../replicas/model_highavailability.go | 10 - .../replicas/model_maintenancewindow.go | 11 - .../2025-08-01/replicas/model_network.go | 10 - ...del_privateendpointconnectionproperties.go | 11 - ...model_privatelinkserviceconnectionstate.go | 10 - .../2025-08-01/replicas/model_replica.go | 12 - .../2025-08-01/replicas/model_server.go | 21 - .../replicas/model_serverproperties.go | 47 - .../2025-08-01/replicas/model_sku.go | 9 - .../2025-08-01/replicas/model_storage.go | 13 - .../2025-08-01/replicas/predicates.go | 32 - .../postgresql/2025-08-01/replicas/version.go | 10 - .../postgresql/2025-08-01/servers/README.md | 110 ++ .../2025-08-01/servers/constants.go | 510 ++++++++- ...upslongtermretentioncheckprerequisites.go} | 8 +- .../method_backupslongtermretentionstart.go} | 18 +- .../method_capabilitiesbyserverlist.go} | 30 +- .../method_capturedlogslistbyserver.go} | 30 +- .../method_migrationschecknameavailability.go | 4 +- .../method_replicaslistbyserver.go} | 30 +- .../model_backuprequestbase.go | 2 +- .../model_backupsettings.go | 2 +- .../model_backupslongtermretentionrequest.go | 2 +- .../model_backupslongtermretentionresponse.go | 2 +- ...kupslongtermretentionresponseproperties.go | 2 +- .../model_backupstoredetails.go | 2 +- .../model_capability.go | 2 +- .../model_capturedlog.go | 2 +- .../model_capturedlogproperties.go | 2 +- ...model_fastprovisioningeditioncapability.go | 2 +- .../servers/model_highavailability.go | 6 +- .../servers/model_highavailabilityforpatch.go | 6 +- ...el_ltrbackupoperationresponseproperties.go | 2 +- .../model_ltrprebackupresponse.go | 2 +- .../model_migrationnameavailability.go | 2 +- .../model_servereditioncapability.go | 2 +- .../model_serverskucapability.go | 2 +- .../model_serverversioncapability.go | 2 +- .../model_storageeditioncapability.go | 2 +- .../model_storagembcapability.go | 2 +- .../model_storagetiercapability.go | 2 +- .../model_supportedfeature.go | 2 +- .../2025-08-01/servers/predicates.go | 41 + .../2025-08-01/tuningoptions/README.md | 70 -- .../tuningoptions/id_flexibleserver.go | 130 --- .../tuningoptions/id_flexibleserver_test.go | 282 ----- .../method_listrecommendations.go | 134 --- .../2025-08-01/tuningoptions/version.go | 10 - .../tuningoptionsoperationgroup/README.md | 70 ++ .../tuningoptionsoperationgroup/client.go | 26 + .../constants.go | 2 +- .../id_flexibleserver.go | 2 +- .../id_flexibleserver_test.go | 2 +- .../id_tuningoption.go | 2 +- .../id_tuningoption_test.go | 2 +- .../method_tuningoptionsget.go} | 8 +- .../method_tuningoptionslistbyserver.go} | 30 +- ...method_tuningoptionslistrecommendations.go | 134 +++ .../model_impactrecord.go | 2 +- .../model_objectrecommendation.go | 2 +- .../model_objectrecommendationdetails.go | 2 +- .../model_objectrecommendationproperties.go | 2 +- ...ecommendationpropertiesanalyzedworkload.go | 2 +- ...endationpropertiesimplementationdetails.go | 2 +- .../model_resource.go | 2 +- .../predicates.go | 2 +- .../version.go | 4 +- .../model_erroradditionalinfo.go | 9 - .../model_errordetail.go | 8 +- .../model_erroradditionalinfo.go | 9 - .../model_errordetail.go | 8 +- .../protecteditems/model_errordetail.go | 8 +- .../protectioncontainers/model_errordetail.go | 8 +- .../model_errordetail.go | 8 +- .../operation}/model_erroradditionalinfo.go | 2 +- .../2025-08-01/operation/model_errordetail.go | 8 +- .../model_erroradditionalinfo.go | 0 .../protecteditems/model_errordetail.go | 8 +- .../model_erroradditionalinfo.go | 0 .../model_errordetail.go | 8 +- .../model_aaddataconnectorproperties.go | 2 +- .../model_aatpdataconnectorproperties.go | 2 +- .../model_alertsdatatypeofdataconnector.go | 2 +- ...del_awscloudtraildataconnectordatatypes.go | 2 +- ...el_awscloudtraildataconnectorproperties.go | 4 +- .../model_dataconnectordatatypecommon.go | 2 +- .../model_mcasdataconnectordatatypes.go | 2 +- .../model_mcasdataconnectorproperties.go | 4 +- .../model_mdatpdataconnectorproperties.go | 2 +- .../model_mstidataconnectorproperties.go | 2 +- .../model_officedataconnectordatatypes.go | 6 +- .../model_officedataconnectorproperties.go | 4 +- ...odel_premiummdtidataconnectorproperties.go | 2 +- .../model_tidataconnectordatatypes.go | 2 +- .../model_tidataconnectorproperties.go | 6 +- .../metadata/model_metadatapatch.go | 9 + .../model_aaddataconnectorproperties.go | 2 +- .../model_aatpdataconnectorproperties.go | 2 +- .../model_alertsdatatypeofdataconnector.go | 2 +- ...del_awscloudtraildataconnectordatatypes.go | 2 +- ...el_awscloudtraildataconnectorproperties.go | 4 +- .../model_dataconnectordatatypecommon.go | 2 +- .../model_mcasdataconnectordatatypes.go | 2 +- .../model_mcasdataconnectorproperties.go | 4 +- .../model_mdatpdataconnectorproperties.go | 2 +- .../model_mstidataconnectorproperties.go | 2 +- .../model_officedataconnectordatatypes.go | 6 +- .../model_officedataconnectorproperties.go | 4 +- ...odel_premiummdtidataconnectorproperties.go | 2 +- .../model_tidataconnectordatatypes.go | 2 +- .../model_tidataconnectorproperties.go | 6 +- .../metadata/model_metadatapatch.go | 9 + .../model_aaddataconnectorproperties.go | 2 +- .../model_aatpdataconnectorproperties.go | 2 +- .../model_alertsdatatypeofdataconnector.go | 2 +- ...del_awscloudtraildataconnectordatatypes.go | 2 +- ...el_awscloudtraildataconnectorproperties.go | 4 +- .../model_dataconnectordatatypecommon.go | 2 +- .../model_mcasdataconnectordatatypes.go | 2 +- .../model_mcasdataconnectorproperties.go | 4 +- .../model_mdatpdataconnectorproperties.go | 2 +- .../model_mstidataconnectorproperties.go | 2 +- .../model_officedataconnectordatatypes.go | 6 +- .../model_officedataconnectorproperties.go | 4 +- ...odel_premiummdtidataconnectorproperties.go | 2 +- .../model_tidataconnectordatatypes.go | 2 +- .../model_tidataconnectorproperties.go | 6 +- .../metadata/model_metadatapatch.go | 9 + .../synapse/2021-06-01/sqlpools/README.md | 37 - ...method_sqlpoolmetadatasyncconfigscreate.go | 58 - .../method_sqlpoolmetadatasyncconfigsget.go | 54 - .../sqlpools/model_metadatasyncconfig.go | 11 - .../model_metadatasyncconfigproperties.go | 9 - 703 files changed, 5747 insertions(+), 10736 deletions(-) delete mode 100644 resource-manager/batch/2024-07-01/application/README.md delete mode 100644 resource-manager/batch/2024-07-01/applicationpackage/README.md create mode 100644 resource-manager/batch/2024-07-01/applicationpackages/README.md rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/client.go (59%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/constants.go (97%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/id_application.go (99%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/id_application_test.go (99%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/id_version.go (99%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/id_version_test.go (99%) rename resource-manager/batch/2024-07-01/{applicationpackage/method_activate.go => applicationpackages/method_applicationpackageactivate.go} (76%) rename resource-manager/batch/2024-07-01/{applicationpackage/method_create.go => applicationpackages/method_applicationpackagecreate.go} (76%) rename resource-manager/batch/2024-07-01/{application/method_delete.go => applicationpackages/method_applicationpackagedelete.go} (75%) rename resource-manager/batch/2024-07-01/{applicationpackage/method_get.go => applicationpackages/method_applicationpackageget.go} (78%) rename resource-manager/batch/2024-07-01/{applicationpackage/method_list.go => applicationpackages/method_applicationpackagelist.go} (50%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/model_activateapplicationpackageparameters.go (89%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/model_applicationpackage.go (76%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/model_applicationpackageproperties.go (98%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/predicates.go (96%) rename resource-manager/batch/2024-07-01/{applicationpackage => applicationpackages}/version.go (71%) create mode 100644 resource-manager/batch/2024-07-01/applications/README.md rename resource-manager/{postgresql/2025-08-01/capturedlogs => batch/2024-07-01/applications}/client.go (58%) rename resource-manager/batch/2024-07-01/{application => applications}/id_application.go (99%) rename resource-manager/batch/2024-07-01/{application => applications}/id_application_test.go (99%) rename resource-manager/batch/2024-07-01/{application => applications}/id_batchaccount.go (99%) rename resource-manager/batch/2024-07-01/{application => applications}/id_batchaccount_test.go (99%) rename resource-manager/batch/2024-07-01/{application/method_create.go => applications/method_applicationcreate.go} (79%) rename resource-manager/batch/2024-07-01/{applicationpackage/method_delete.go => applications/method_applicationdelete.go} (77%) rename resource-manager/batch/2024-07-01/{application/method_get.go => applications/method_applicationget.go} (80%) rename resource-manager/batch/2024-07-01/{application/method_list.go => applications/method_applicationlist.go} (53%) rename resource-manager/batch/2024-07-01/{application/method_update.go => applications/method_applicationupdate.go} (79%) rename resource-manager/batch/2024-07-01/{application => applications}/model_application.go (76%) rename resource-manager/batch/2024-07-01/{application => applications}/model_applicationproperties.go (94%) rename resource-manager/batch/2024-07-01/{application => applications}/predicates.go (97%) rename resource-manager/batch/2024-07-01/{application => applications}/version.go (74%) delete mode 100644 resource-manager/batch/2024-07-01/batchaccount/README.md delete mode 100644 resource-manager/batch/2024-07-01/batchaccount/method_listoutboundnetworkdependenciesendpoints.go delete mode 100644 resource-manager/batch/2024-07-01/batchaccount/model_privateendpointconnection.go create mode 100644 resource-manager/batch/2024-07-01/batchaccounts/README.md rename resource-manager/{postgresql/2025-08-01/tuningoptions => batch/2024-07-01/batchaccounts}/client.go (57%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/constants.go (99%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/id_batchaccount.go (99%) rename resource-manager/batch/2024-07-01/{certificate => batchaccounts}/id_batchaccount_test.go (99%) rename resource-manager/batch/2024-07-01/{batchaccount/method_create.go => batchaccounts/method_batchaccountcreate.go} (64%) rename resource-manager/batch/2024-07-01/{batchaccount/method_delete.go => batchaccounts/method_batchaccountdelete.go} (66%) rename resource-manager/batch/2024-07-01/{batchaccount/method_get.go => batchaccounts/method_batchaccountget.go} (80%) rename resource-manager/batch/2024-07-01/{batchaccount/method_getkeys.go => batchaccounts/method_batchaccountgetkeys.go} (79%) rename resource-manager/batch/2024-07-01/{batchaccount/method_list.go => batchaccounts/method_batchaccountlist.go} (59%) rename resource-manager/batch/2024-07-01/{batchaccount/method_listbyresourcegroup.go => batchaccounts/method_batchaccountlistbyresourcegroup.go} (54%) create mode 100644 resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlistoutboundnetworkdependenciesendpoints.go rename resource-manager/batch/2024-07-01/{batchaccount/method_regeneratekey.go => batchaccounts/method_batchaccountregeneratekey.go} (76%) rename resource-manager/batch/2024-07-01/{batchaccount/method_synchronizeautostoragekeys.go => batchaccounts/method_batchaccountsynchronizeautostoragekeys.go} (72%) rename resource-manager/batch/2024-07-01/{batchaccount/method_update.go => batchaccounts/method_batchaccountupdate.go} (78%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_autostoragebaseproperties.go (95%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_autostorageproperties.go (97%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_batchaccount.go (75%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_batchaccountcreateparameters.go (96%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_batchaccountcreateproperties.go (97%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_batchaccountkeys.go (93%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_batchaccountproperties.go (98%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_batchaccountregeneratekeyparameters.go (91%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_batchaccountupdateparameters.go (95%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_batchaccountupdateproperties.go (96%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_computenodeidentityreference.go (92%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_encryptionproperties.go (93%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_endpointaccessprofile.go (93%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_endpointdependency.go (94%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_endpointdetail.go (91%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_iprule.go (92%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_keyvaultproperties.go (91%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_keyvaultreference.go (91%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_networkprofile.go (94%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_outboundenvironmentendpoint.go (93%) rename resource-manager/{postgresql/2025-08-01/replicas => batch/2024-07-01/batchaccounts}/model_privateendpoint.go (91%) rename resource-manager/{postgresql/2025-08-01/replicas => batch/2024-07-01/batchaccounts}/model_privateendpointconnection.go (79%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_privateendpointconnectionproperties.go (96%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_privatelinkserviceconnectionstate.go (95%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/model_virtualmachinefamilycorequota.go (93%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/predicates.go (89%) rename resource-manager/batch/2024-07-01/{batchaccount => batchaccounts}/version.go (73%) delete mode 100644 resource-manager/batch/2024-07-01/batchmanagements/README.md delete mode 100644 resource-manager/batch/2024-07-01/batchmanagements/client.go delete mode 100644 resource-manager/batch/2024-07-01/batchmanagements/id_location.go delete mode 100644 resource-manager/batch/2024-07-01/batchmanagements/id_location_test.go delete mode 100644 resource-manager/batch/2024-07-01/certificate/README.md delete mode 100644 resource-manager/batch/2024-07-01/certificate/client.go create mode 100644 resource-manager/batch/2024-07-01/certificates/README.md rename resource-manager/batch/2024-07-01/{batchaccount => certificates}/client.go (58%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/constants.go (99%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/id_batchaccount.go (99%) rename resource-manager/batch/2024-07-01/{batchaccount => certificates}/id_batchaccount_test.go (99%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/id_certificate.go (99%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/id_certificate_test.go (99%) rename resource-manager/batch/2024-07-01/{certificate/method_canceldeletion.go => certificates/method_certificatecanceldeletion.go} (78%) rename resource-manager/batch/2024-07-01/{certificate/method_create.go => certificates/method_certificatecreate.go} (65%) rename resource-manager/batch/2024-07-01/{pool/method_delete.go => certificates/method_certificatedelete.go} (66%) rename resource-manager/batch/2024-07-01/{certificate/method_get.go => certificates/method_certificateget.go} (80%) rename resource-manager/batch/2024-07-01/{certificate/method_listbybatchaccount.go => certificates/method_certificatelistbybatchaccount.go} (50%) rename resource-manager/batch/2024-07-01/{certificate/method_update.go => certificates/method_certificateupdate.go} (63%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/model_certificate.go (76%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/model_certificatecreateorupdateparameters.go (96%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/model_certificatecreateorupdateproperties.go (96%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/model_certificateproperties.go (99%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/model_deletecertificateerror.go (95%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/predicates.go (97%) rename resource-manager/batch/2024-07-01/{certificate => certificates}/version.go (74%) create mode 100644 resource-manager/batch/2024-07-01/detectorresponses/README.md rename resource-manager/batch/2024-07-01/{application => detectorresponses}/client.go (51%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/id_batchaccount.go (99%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/id_batchaccount_test.go (99%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/id_detector.go (99%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/id_detector_test.go (99%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/method_batchaccountgetdetector.go (85%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/method_batchaccountlistdetectors.go (80%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/model_detectorresponse.go (76%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/model_detectorresponseproperties.go (90%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/predicates.go (96%) rename resource-manager/batch/2024-07-01/{batchmanagements => detectorresponses}/version.go (71%) delete mode 100644 resource-manager/batch/2024-07-01/location/README.md delete mode 100644 resource-manager/batch/2024-07-01/location/method_listsupportedvirtualmachineskus.go delete mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeter/README.md delete mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount.go delete mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount_test.go delete mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeter/method_listconfigurations.go delete mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeter/version.go create mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/README.md rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/client.go (57%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/constants.go (99%) create mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_batchaccount.go create mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_batchaccount_test.go rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/id_networksecurityperimeterconfiguration.go (99%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/id_networksecurityperimeterconfiguration_test.go (99%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter/method_getconfiguration.go => networksecurityperimeterconfigurations/method_networksecurityperimetergetconfiguration.go} (70%) create mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimeterlistconfigurations.go rename resource-manager/batch/2024-07-01/{networksecurityperimeter/method_reconcileconfiguration.go => networksecurityperimeterconfigurations/method_networksecurityperimeterreconcileconfiguration.go} (53%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_accessrule.go (86%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_accessruleproperties.go (95%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_accessrulepropertiessubscriptionsinlined.go (84%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_networksecurityperimeter.go (88%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_networksecurityperimeterconfiguration.go (93%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_networksecurityperimeterconfigurationproperties.go (94%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_networksecurityprofile.go (92%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_provisioningissue.go (87%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_provisioningissueproperties.go (92%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/model_resourceassociation.go (87%) rename resource-manager/batch/2024-07-01/{networksecurityperimeter => networksecurityperimeterconfigurations}/predicates.go (93%) create mode 100644 resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/version.go create mode 100644 resource-manager/batch/2024-07-01/openapis/README.md rename resource-manager/batch/2024-07-01/{location => openapis}/client.go (61%) rename resource-manager/batch/2024-07-01/{batchmanagements => openapis}/constants.go (98%) rename resource-manager/batch/2024-07-01/{location => openapis}/id_location.go (99%) rename resource-manager/batch/2024-07-01/{location => openapis}/id_location_test.go (99%) rename resource-manager/batch/2024-07-01/{batchmanagements => openapis}/method_locationchecknameavailability.go (83%) rename resource-manager/batch/2024-07-01/{location/method_getquotas.go => openapis/method_locationgetquotas.go} (81%) create mode 100644 resource-manager/batch/2024-07-01/openapis/method_locationlistsupportedvirtualmachineskus.go rename resource-manager/batch/2024-07-01/{location => openapis}/model_batchlocationquota.go (93%) rename resource-manager/batch/2024-07-01/{batchmanagements => openapis}/model_checknameavailabilityparameters.go (91%) rename resource-manager/batch/2024-07-01/{batchmanagements => openapis}/model_checknameavailabilityresult.go (94%) rename resource-manager/batch/2024-07-01/{location => openapis}/model_skucapability.go (94%) rename resource-manager/batch/2024-07-01/{location => openapis}/model_supportedsku.go (98%) rename resource-manager/batch/2024-07-01/{location => openapis}/predicates.go (97%) rename resource-manager/batch/2024-07-01/{location => openapis}/version.go (76%) delete mode 100644 resource-manager/batch/2024-07-01/pool/README.md delete mode 100644 resource-manager/batch/2024-07-01/pool/client.go create mode 100644 resource-manager/batch/2024-07-01/pools/README.md rename resource-manager/{postgresql/2025-08-01/post => batch/2024-07-01/pools}/client.go (58%) rename resource-manager/batch/2024-07-01/{pool => pools}/constants.go (99%) rename resource-manager/batch/2024-07-01/{pool => pools}/id_batchaccount.go (99%) rename resource-manager/batch/2024-07-01/{pool => pools}/id_batchaccount_test.go (99%) rename resource-manager/batch/2024-07-01/{pool => pools}/id_pool.go (99%) rename resource-manager/batch/2024-07-01/{pool => pools}/id_pool_test.go (99%) rename resource-manager/batch/2024-07-01/{pool/method_create.go => pools/method_poolcreate.go} (70%) rename resource-manager/batch/2024-07-01/{certificate/method_delete.go => pools/method_pooldelete.go} (71%) rename resource-manager/batch/2024-07-01/{pool/method_disableautoscale.go => pools/method_pooldisableautoscale.go} (80%) rename resource-manager/batch/2024-07-01/{pool/method_get.go => pools/method_poolget.go} (83%) rename resource-manager/batch/2024-07-01/{pool/method_listbybatchaccount.go => pools/method_poollistbybatchaccount.go} (53%) rename resource-manager/batch/2024-07-01/{pool/method_stopresize.go => pools/method_poolstopresize.go} (82%) rename resource-manager/batch/2024-07-01/{pool/method_update.go => pools/method_poolupdate.go} (68%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_applicationpackagereference.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_automaticosupgradepolicy.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_autoscalerun.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_autoscalerunerror.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_autoscalesettings.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_autouserspecification.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_azureblobfilesystemconfiguration.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_azurefileshareconfiguration.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_certificatereference.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_cifsmountconfiguration.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_computenodeidentityreference.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_containerconfiguration.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_containerhostbatchbindmountentry.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_containerregistry.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_datadisk.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_deploymentconfiguration.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_diffdisksettings.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_diskencryptionconfiguration.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_environmentsetting.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_fixedscalesettings.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_imagereference.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_inboundnatpool.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_linuxuserconfiguration.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_manageddisk.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_metadataitem.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_mountconfiguration.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_networkconfiguration.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_networksecuritygrouprule.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_nfsmountconfiguration.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_nodeplacementconfiguration.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_osdisk.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_pool.go (82%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_poolendpointconfiguration.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_poolproperties.go (99%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_publicipaddressconfiguration.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_resizeerror.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_resizeoperationstatus.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_resourcefile.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_rollingupgradepolicy.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_scalesettings.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_securityprofile.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_serviceartifactreference.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_starttask.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_taskcontainersettings.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_taskschedulingpolicy.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_uefisettings.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_upgradepolicy.go (96%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_useraccount.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_useridentity.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_virtualmachineconfiguration.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_vmdisksecurityprofile.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_vmextension.go (98%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_windowsconfiguration.go (95%) rename resource-manager/batch/2024-07-01/{pool => pools}/model_windowsuserconfiguration.go (94%) rename resource-manager/batch/2024-07-01/{pool => pools}/predicates.go (97%) rename resource-manager/batch/2024-07-01/{pool => pools}/version.go (77%) delete mode 100644 resource-manager/batch/2024-07-01/privateendpointconnection/README.md delete mode 100644 resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount.go delete mode 100644 resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount_test.go delete mode 100644 resource-manager/batch/2024-07-01/privateendpointconnection/method_listbybatchaccount.go delete mode 100644 resource-manager/batch/2024-07-01/privateendpointconnection/version.go create mode 100644 resource-manager/batch/2024-07-01/privateendpointconnections/README.md rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/client.go (63%) rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/constants.go (99%) create mode 100644 resource-manager/batch/2024-07-01/privateendpointconnections/id_batchaccount.go create mode 100644 resource-manager/batch/2024-07-01/privateendpointconnections/id_batchaccount_test.go rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/id_privateendpointconnection.go (99%) rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/id_privateendpointconnection_test.go (99%) create mode 100644 resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectiondelete.go rename resource-manager/batch/2024-07-01/{privateendpointconnection/method_get.go => privateendpointconnections/method_privateendpointconnectionget.go} (74%) create mode 100644 resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionlistbybatchaccount.go rename resource-manager/batch/2024-07-01/{privateendpointconnection/method_update.go => privateendpointconnections/method_privateendpointconnectionupdate.go} (50%) rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/model_privateendpoint.go (86%) rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/model_privateendpointconnection.go (76%) rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/model_privateendpointconnectionproperties.go (95%) rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/model_privatelinkserviceconnectionstate.go (92%) rename resource-manager/batch/2024-07-01/{privateendpointconnection => privateendpointconnections}/predicates.go (95%) create mode 100644 resource-manager/batch/2024-07-01/privateendpointconnections/version.go delete mode 100644 resource-manager/batch/2024-07-01/privatelinkresource/README.md delete mode 100644 resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount.go delete mode 100644 resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount_test.go delete mode 100644 resource-manager/batch/2024-07-01/privatelinkresource/method_listbybatchaccount.go delete mode 100644 resource-manager/batch/2024-07-01/privatelinkresource/version.go create mode 100644 resource-manager/batch/2024-07-01/privatelinkresources/README.md rename resource-manager/batch/2024-07-01/{privatelinkresource => privatelinkresources}/client.go (58%) create mode 100644 resource-manager/batch/2024-07-01/privatelinkresources/id_batchaccount.go create mode 100644 resource-manager/batch/2024-07-01/privatelinkresources/id_batchaccount_test.go rename resource-manager/batch/2024-07-01/{privatelinkresource => privatelinkresources}/id_privatelinkresource.go (99%) rename resource-manager/batch/2024-07-01/{privatelinkresource => privatelinkresources}/id_privatelinkresource_test.go (99%) rename resource-manager/batch/2024-07-01/{privatelinkresource/method_get.go => privatelinkresources/method_privatelinkresourceget.go} (77%) create mode 100644 resource-manager/batch/2024-07-01/privatelinkresources/method_privatelinkresourcelistbybatchaccount.go rename resource-manager/batch/2024-07-01/{privatelinkresource => privatelinkresources}/model_privatelinkresource.go (76%) rename resource-manager/batch/2024-07-01/{privatelinkresource => privatelinkresources}/model_privatelinkresourceproperties.go (93%) rename resource-manager/batch/2024-07-01/{privatelinkresource => privatelinkresources}/predicates.go (96%) create mode 100644 resource-manager/batch/2024-07-01/privatelinkresources/version.go rename resource-manager/{managementgroups => management}/2020-05-01/checknameavailability/README.md (84%) rename resource-manager/{managementgroups => management}/2020-05-01/checknameavailability/client.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/checknameavailability/constants.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/checknameavailability/method_checknameavailability.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/checknameavailability/model_checknameavailabilityrequest.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/checknameavailability/model_checknameavailabilityresult.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/checknameavailability/version.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/client.go (82%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/README.md (87%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/client.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/constants.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/method_list.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/model_entityinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/model_entityinfoproperties.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/model_entityparentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/predicates.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/entities/version.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/README.md (97%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/client.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/constants.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/id_subscription.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/id_subscription_test.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_createorupdate.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_delete.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_get.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_getdescendants.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_hierarchysettingsdelete.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_hierarchysettingsget.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_hierarchysettingslist.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_hierarchysettingsupdate.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_list.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_subscriptionscreate.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_subscriptionsdelete.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_subscriptionsgetsubscriptionsundermanagementgroup.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/method_update.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_azureasyncoperationresults.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_createmanagementgroupdetails.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_createmanagementgroupproperties.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_createmanagementgrouprequest.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_createorupdatesettingsproperties.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_createorupdatesettingsrequest.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_createparentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_descendantinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_descendantinfoproperties.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_descendantparentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_hierarchysettings.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_hierarchysettingsinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_hierarchysettingslist.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_hierarchysettingsproperties.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_managementgroup.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_managementgroupchildinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_managementgroupdetails.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_managementgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_managementgroupinfoproperties.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_managementgrouppathelement.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_managementgroupproperties.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_parentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_patchmanagementgrouprequest.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_subscriptionundermanagementgroup.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/model_subscriptionundermanagementgroupproperties.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/predicates.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/managementgroups/version.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/tenantbackfill/README.md (88%) rename resource-manager/{managementgroups => management}/2020-05-01/tenantbackfill/client.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/tenantbackfill/constants.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/tenantbackfill/method_starttenantbackfill.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/tenantbackfill/method_status.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/tenantbackfill/model_tenantbackfillstatusresult.go (100%) rename resource-manager/{managementgroups => management}/2020-05-01/tenantbackfill/version.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/client.go (83%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/README.md (91%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/client.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingscreateorupdate.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsdelete.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsget.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsupdate.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsrequest.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettings.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettingsproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/hierarchysettingsoperationgroup/version.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/README.md (94%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/client.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/constants.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/method_createorupdate.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/method_delete.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/method_get.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/method_getdescendants.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/method_hierarchysettingslist.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/method_update.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_azureasyncoperationresults.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_createmanagementgroupchildinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_createmanagementgroupdetails.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_createmanagementgroupproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_createmanagementgrouprequest.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_createparentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_descendantinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_descendantinfoproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_descendantparentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_hierarchysettingsinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_hierarchysettingslist.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_hierarchysettingsproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_managementgroup.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_managementgroupchildinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_managementgroupdetails.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_managementgroupinfoproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_managementgrouppathelement.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_managementgroupproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_parentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/model_patchmanagementgrouprequest.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/predicates.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managementgroups/version.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/README.md (94%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/client.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/constants.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/method_checknameavailability.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/method_entitieslist.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/method_managementgroupslist.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/method_starttenantbackfill.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/method_tenantbackfillstatus.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/model_checknameavailabilityrequest.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/model_checknameavailabilityresult.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/model_entityinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/model_entityinfoproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/model_entityparentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/model_managementgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/model_managementgroupinfoproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/model_tenantbackfillstatusresult.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/predicates.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/managements/version.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/README.md (93%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/client.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/id_subscription.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/id_subscription_test.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionscreate.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsdelete.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscription.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscriptionsundermanagementgroup.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/model_descendantparentgroupinfo.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroup.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroupproperties.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/predicates.go (100%) rename resource-manager/{managementgroups => management}/2023-04-01/subscriptionundermanagementgroups/version.go (100%) create mode 100644 resource-manager/postgresql/2025-08-01/administratormicrosoftentras/README.md rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/client.go (54%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/constants.go (97%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/id_administrator.go (99%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/id_administrator_test.go (99%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/id_flexibleserver.go (99%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/id_flexibleserver_test.go (99%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand/method_create.go => administratormicrosoftentras/method_administratorsmicrosoftentracreateorupdate.go} (52%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand/method_delete.go => administratormicrosoftentras/method_administratorsmicrosoftentradelete.go} (59%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra/method_get.go => administratormicrosoftentras/method_administratorsmicrosoftentraget.go} (74%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra/method_listbyserver.go => administratormicrosoftentras/method_administratorsmicrosoftentralistbyserver.go} (50%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/model_administratormicrosoftentra.go (94%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/model_administratormicrosoftentraadd.go (88%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/model_administratormicrosoftentraproperties.go (92%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/model_administratormicrosoftentrapropertiesforadd.go (91%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/predicates.go (94%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra => administratormicrosoftentras}/version.go (69%) delete mode 100644 resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_delete.go delete mode 100644 resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_listbyserver.go create mode 100644 resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/README.md rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => advancedthreatprotectionsettingsmodels}/client.go (57%) rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => advancedthreatprotectionsettingsmodels}/constants.go (96%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => advancedthreatprotectionsettingsmodels}/id_flexibleserver.go (98%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => advancedthreatprotectionsettingsmodels}/id_flexibleserver_test.go (99%) rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings/method_get.go => advancedthreatprotectionsettingsmodels/method_advancedthreatprotectionsettingsget.go} (74%) create mode 100644 resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_advancedthreatprotectionsettingslistbyserver.go rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => advancedthreatprotectionsettingsmodels}/method_serverthreatprotectionsettingscreateorupdate.go (77%) rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => advancedthreatprotectionsettingsmodels}/model_advancedthreatprotectionsettingsmodel.go (93%) rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => advancedthreatprotectionsettingsmodels}/model_advancedthreatprotectionsettingsproperties.go (94%) rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => advancedthreatprotectionsettingsmodels}/predicates.go (93%) rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => advancedthreatprotectionsettingsmodels}/version.go (81%) create mode 100644 resource-manager/postgresql/2025-08-01/backupautomaticandondemands/README.md create mode 100644 resource-manager/postgresql/2025-08-01/backupautomaticandondemands/client.go rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => backupautomaticandondemands}/constants.go (97%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => backupautomaticandondemands}/id_backup.go (99%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => backupautomaticandondemands}/id_backup_test.go (99%) rename resource-manager/postgresql/2025-08-01/{capturedlogs => backupautomaticandondemands}/id_flexibleserver.go (99%) rename resource-manager/postgresql/2025-08-01/{capturedlogs => backupautomaticandondemands}/id_flexibleserver_test.go (99%) rename resource-manager/postgresql/2025-08-01/{administratorsmicrosoftentra/method_createorupdate.go => backupautomaticandondemands/method_backupsautomaticandondemandcreate.go} (59%) rename resource-manager/{batch/2024-07-01/privateendpointconnection/method_delete.go => postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemanddelete.go} (59%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand/method_get.go => backupautomaticandondemands/method_backupsautomaticandondemandget.go} (75%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand/method_listbyserver.go => backupautomaticandondemands/method_backupsautomaticandondemandlistbyserver.go} (50%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => backupautomaticandondemands}/model_backupautomaticandondemand.go (94%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => backupautomaticandondemands}/model_backupautomaticandondemandproperties.go (95%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => backupautomaticandondemands}/predicates.go (94%) rename resource-manager/postgresql/2025-08-01/{backupsautomaticandondemand => backupautomaticandondemands}/version.go (70%) delete mode 100644 resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/client.go delete mode 100644 resource-manager/postgresql/2025-08-01/backupslongtermretention/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/backupslongtermretention/id_flexibleserver.go delete mode 100644 resource-manager/postgresql/2025-08-01/backupslongtermretention/id_flexibleserver_test.go create mode 100644 resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/README.md rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => backupslongtermretentionoperations}/client.go (59%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => backupslongtermretentionoperations}/constants.go (97%) rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => backupslongtermretentionoperations}/id_flexibleserver.go (99%) rename resource-manager/postgresql/2025-08-01/{advancedthreatprotectionsettings => backupslongtermretentionoperations}/id_flexibleserver_test.go (99%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => backupslongtermretentionoperations}/id_ltrbackupoperation.go (99%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => backupslongtermretentionoperations}/id_ltrbackupoperation_test.go (99%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention/method_get.go => backupslongtermretentionoperations/method_backupslongtermretentionget.go} (74%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention/method_listbyserver.go => backupslongtermretentionoperations/method_backupslongtermretentionlistbyserver.go} (51%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => backupslongtermretentionoperations}/model_backupslongtermretentionoperation.go (93%) create mode 100644 resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/model_ltrbackupoperationresponseproperties.go rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => backupslongtermretentionoperations}/predicates.go (93%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => backupslongtermretentionoperations}/version.go (64%) delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbylocation/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbylocation/client.go delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbylocation/id_location.go delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbylocation/id_location_test.go delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbylocation/predicates.go delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbylocation/version.go delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbyserver/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbyserver/client.go delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbyserver/constants.go delete mode 100644 resource-manager/postgresql/2025-08-01/capabilitiesbyserver/predicates.go delete mode 100644 resource-manager/postgresql/2025-08-01/capturedlogs/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/capturedlogs/predicates.go delete mode 100644 resource-manager/postgresql/2025-08-01/capturedlogs/version.go delete mode 100644 resource-manager/postgresql/2025-08-01/customoperation/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/customoperation/client.go delete mode 100644 resource-manager/postgresql/2025-08-01/customoperation/constants.go delete mode 100644 resource-manager/postgresql/2025-08-01/customoperation/id_flexibleserver.go delete mode 100644 resource-manager/postgresql/2025-08-01/customoperation/id_flexibleserver_test.go delete mode 100644 resource-manager/postgresql/2025-08-01/customoperation/model_migrationnameavailability.go delete mode 100644 resource-manager/postgresql/2025-08-01/customoperation/version.go delete mode 100644 resource-manager/postgresql/2025-08-01/nameavailability/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/nameavailability/client.go delete mode 100644 resource-manager/postgresql/2025-08-01/nameavailability/constants.go delete mode 100644 resource-manager/postgresql/2025-08-01/nameavailability/version.go create mode 100644 resource-manager/postgresql/2025-08-01/openapis/README.md rename resource-manager/postgresql/2025-08-01/{replicas => openapis}/client.go (61%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => openapis}/constants.go (91%) rename resource-manager/postgresql/2025-08-01/{nameavailability => openapis}/id_location.go (99%) rename resource-manager/postgresql/2025-08-01/{nameavailability => openapis}/id_location_test.go (99%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation/method_list.go => openapis/method_capabilitiesbylocationlist.go} (55%) rename resource-manager/postgresql/2025-08-01/{nameavailability/method_checkglobally.go => openapis/method_nameavailabilitycheckglobally.go} (78%) rename resource-manager/postgresql/2025-08-01/{nameavailability/method_checkwithlocation.go => openapis/method_nameavailabilitycheckwithlocation.go} (76%) rename resource-manager/postgresql/2025-08-01/{privatednszonesuffix/method_get.go => openapis/method_privatednszonesuffixget.go} (80%) rename resource-manager/postgresql/2025-08-01/{quotausagesforflexibleservers => openapis}/method_quotausageslist.go (80%) rename resource-manager/postgresql/2025-08-01/{customoperation/method_migrationschecknameavailability.go => openapis/method_virtualnetworksubnetusagelist.go} (66%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_capability.go (98%) rename resource-manager/postgresql/2025-08-01/{nameavailability => openapis}/model_checknameavailabilityrequest.go (91%) rename resource-manager/{batch/2024-07-01/batchaccount/model_privateendpoint.go => postgresql/2025-08-01/openapis/model_delegatedsubnetusage.go} (52%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_fastprovisioningeditioncapability.go (96%) rename resource-manager/postgresql/2025-08-01/{nameavailability => openapis}/model_nameavailabilitymodel.go (95%) rename resource-manager/postgresql/2025-08-01/{quotausagesforflexibleservers => openapis}/model_nameproperty.go (88%) rename resource-manager/postgresql/2025-08-01/{quotausagesforflexibleservers => openapis}/model_quotausage.go (92%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_servereditioncapability.go (96%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_serverskucapability.go (97%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_serverversioncapability.go (95%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_storageeditioncapability.go (95%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_storagembcapability.go (97%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_storagetiercapability.go (93%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => openapis}/model_supportedfeature.go (90%) create mode 100644 resource-manager/postgresql/2025-08-01/openapis/model_virtualnetworksubnetusagemodel.go create mode 100644 resource-manager/postgresql/2025-08-01/openapis/model_virtualnetworksubnetusageparameter.go rename resource-manager/postgresql/2025-08-01/{quotausagesforflexibleservers => openapis}/predicates.go (67%) rename resource-manager/postgresql/2025-08-01/{post => openapis}/version.go (76%) delete mode 100644 resource-manager/postgresql/2025-08-01/post/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/post/constants.go delete mode 100644 resource-manager/postgresql/2025-08-01/post/id_flexibleserver.go delete mode 100644 resource-manager/postgresql/2025-08-01/post/id_flexibleserver_test.go delete mode 100644 resource-manager/postgresql/2025-08-01/privatednszonesuffix/client.go delete mode 100644 resource-manager/postgresql/2025-08-01/privatednszonesuffix/version.go delete mode 100644 resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/client.go delete mode 100644 resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/id_location.go delete mode 100644 resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/id_location_test.go delete mode 100644 resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/version.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/constants.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/id_flexibleserver.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/id_flexibleserver_test.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_authconfig.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_backup.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_cluster.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_dataencryption.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_highavailability.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_maintenancewindow.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_network.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_replica.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_server.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_serverproperties.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_sku.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/model_storage.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/predicates.go delete mode 100644 resource-manager/postgresql/2025-08-01/replicas/version.go rename resource-manager/postgresql/2025-08-01/{backupslongtermretention/method_checkprerequisites.go => servers/method_backupslongtermretentioncheckprerequisites.go} (74%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention/method_start.go => servers/method_backupslongtermretentionstart.go} (62%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver/method_list.go => servers/method_capabilitiesbyserverlist.go} (55%) rename resource-manager/postgresql/2025-08-01/{capturedlogs/method_listbyserver.go => servers/method_capturedlogslistbyserver.go} (55%) rename resource-manager/postgresql/2025-08-01/{post => servers}/method_migrationschecknameavailability.go (84%) rename resource-manager/postgresql/2025-08-01/{replicas/method_listbyserver.go => servers/method_replicaslistbyserver.go} (57%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => servers}/model_backuprequestbase.go (88%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => servers}/model_backupsettings.go (87%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => servers}/model_backupslongtermretentionrequest.go (90%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => servers}/model_backupslongtermretentionresponse.go (89%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => servers}/model_backupslongtermretentionresponseproperties.go (89%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => servers}/model_backupstoredetails.go (87%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_capability.go (98%) rename resource-manager/postgresql/2025-08-01/{capturedlogs => servers}/model_capturedlog.go (96%) rename resource-manager/postgresql/2025-08-01/{capturedlogs => servers}/model_capturedlogproperties.go (98%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_fastprovisioningeditioncapability.go (95%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => servers}/model_ltrbackupoperationresponseproperties.go (98%) rename resource-manager/postgresql/2025-08-01/{backupslongtermretention => servers}/model_ltrprebackupresponse.go (89%) rename resource-manager/postgresql/2025-08-01/{post => servers}/model_migrationnameavailability.go (97%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_servereditioncapability.go (95%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_serverskucapability.go (97%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_serverversioncapability.go (95%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_storageeditioncapability.go (94%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_storagembcapability.go (97%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_storagetiercapability.go (92%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbylocation => servers}/model_supportedfeature.go (90%) delete mode 100644 resource-manager/postgresql/2025-08-01/tuningoptions/README.md delete mode 100644 resource-manager/postgresql/2025-08-01/tuningoptions/id_flexibleserver.go delete mode 100644 resource-manager/postgresql/2025-08-01/tuningoptions/id_flexibleserver_test.go delete mode 100644 resource-manager/postgresql/2025-08-01/tuningoptions/method_listrecommendations.go delete mode 100644 resource-manager/postgresql/2025-08-01/tuningoptions/version.go create mode 100644 resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/README.md create mode 100644 resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/client.go rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/constants.go (99%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => tuningoptionsoperationgroup}/id_flexibleserver.go (99%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => tuningoptionsoperationgroup}/id_flexibleserver_test.go (99%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/id_tuningoption.go (99%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/id_tuningoption_test.go (99%) rename resource-manager/postgresql/2025-08-01/{tuningoptions/method_get.go => tuningoptionsoperationgroup/method_tuningoptionsget.go} (77%) rename resource-manager/postgresql/2025-08-01/{tuningoptions/method_listbyserver.go => tuningoptionsoperationgroup/method_tuningoptionslistbyserver.go} (53%) create mode 100644 resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionslistrecommendations.go rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/model_impactrecord.go (91%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/model_objectrecommendation.go (95%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/model_objectrecommendationdetails.go (94%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/model_objectrecommendationproperties.go (98%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/model_objectrecommendationpropertiesanalyzedworkload.go (97%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/model_objectrecommendationpropertiesimplementationdetails.go (89%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/model_resource.go (93%) rename resource-manager/postgresql/2025-08-01/{tuningoptions => tuningoptionsoperationgroup}/predicates.go (96%) rename resource-manager/postgresql/2025-08-01/{capabilitiesbyserver => tuningoptionsoperationgroup}/version.go (67%) delete mode 100644 resource-manager/recoveryservicesbackup/2025-02-01/backupprotectableitems/model_erroradditionalinfo.go delete mode 100644 resource-manager/recoveryservicesbackup/2025-02-01/backupprotectioncontainers/model_erroradditionalinfo.go rename resource-manager/recoveryservicesbackup/{2025-02-01/protectioncontainers => 2025-08-01/operation}/model_erroradditionalinfo.go (90%) rename resource-manager/recoveryservicesbackup/{2025-02-01 => 2025-08-01}/protecteditems/model_erroradditionalinfo.go (100%) rename resource-manager/recoveryservicesbackup/{2025-02-01 => 2025-08-01}/softdeletedcontainers/model_erroradditionalinfo.go (100%) delete mode 100644 resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigscreate.go delete mode 100644 resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigsget.go delete mode 100644 resource-manager/synapse/2021-06-01/sqlpools/model_metadatasyncconfig.go delete mode 100644 resource-manager/synapse/2021-06-01/sqlpools/model_metadatasyncconfigproperties.go diff --git a/resource-manager/batch/2024-07-01/application/README.md b/resource-manager/batch/2024-07-01/application/README.md deleted file mode 100644 index 10d77d1dc07..00000000000 --- a/resource-manager/batch/2024-07-01/application/README.md +++ /dev/null @@ -1,111 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/application` Documentation - -The `application` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/application" -``` - - -### Client Initialization - -```go -client := application.NewApplicationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationClient.Create` - -```go -ctx := context.TODO() -id := application.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") - -payload := application.Application{ - // ... -} - - -read, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationClient.Delete` - -```go -ctx := context.TODO() -id := application.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") - -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: `ApplicationClient.Get` - -```go -ctx := context.TODO() -id := application.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") - -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: `ApplicationClient.List` - -```go -ctx := context.TODO() -id := application.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -// alternatively `client.List(ctx, id, application.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, application.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationClient.Update` - -```go -ctx := context.TODO() -id := application.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") - -payload := application.Application{ - // ... -} - - -read, err := client.Update(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/batch/2024-07-01/applicationpackage/README.md b/resource-manager/batch/2024-07-01/applicationpackage/README.md deleted file mode 100644 index 74ae173c84c..00000000000 --- a/resource-manager/batch/2024-07-01/applicationpackage/README.md +++ /dev/null @@ -1,111 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/applicationpackage` Documentation - -The `applicationpackage` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/applicationpackage" -``` - - -### Client Initialization - -```go -client := applicationpackage.NewApplicationPackageClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationPackageClient.Activate` - -```go -ctx := context.TODO() -id := applicationpackage.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName") - -payload := applicationpackage.ActivateApplicationPackageParameters{ - // ... -} - - -read, err := client.Activate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationPackageClient.Create` - -```go -ctx := context.TODO() -id := applicationpackage.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName") - -payload := applicationpackage.ApplicationPackage{ - // ... -} - - -read, err := client.Create(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationPackageClient.Delete` - -```go -ctx := context.TODO() -id := applicationpackage.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName") - -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: `ApplicationPackageClient.Get` - -```go -ctx := context.TODO() -id := applicationpackage.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName") - -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: `ApplicationPackageClient.List` - -```go -ctx := context.TODO() -id := applicationpackage.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") - -// alternatively `client.List(ctx, id, applicationpackage.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, applicationpackage.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/batch/2024-07-01/applicationpackages/README.md b/resource-manager/batch/2024-07-01/applicationpackages/README.md new file mode 100644 index 00000000000..b46eebb8de2 --- /dev/null +++ b/resource-manager/batch/2024-07-01/applicationpackages/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/applicationpackages` Documentation + +The `applicationpackages` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/applicationpackages" +``` + + +### Client Initialization + +```go +client := applicationpackages.NewApplicationPackagesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ApplicationPackagesClient.ApplicationPackageActivate` + +```go +ctx := context.TODO() +id := applicationpackages.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName") + +payload := applicationpackages.ActivateApplicationPackageParameters{ + // ... +} + + +read, err := client.ApplicationPackageActivate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ApplicationPackagesClient.ApplicationPackageCreate` + +```go +ctx := context.TODO() +id := applicationpackages.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName") + +payload := applicationpackages.ApplicationPackage{ + // ... +} + + +read, err := client.ApplicationPackageCreate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ApplicationPackagesClient.ApplicationPackageDelete` + +```go +ctx := context.TODO() +id := applicationpackages.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName") + +read, err := client.ApplicationPackageDelete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ApplicationPackagesClient.ApplicationPackageGet` + +```go +ctx := context.TODO() +id := applicationpackages.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName") + +read, err := client.ApplicationPackageGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ApplicationPackagesClient.ApplicationPackageList` + +```go +ctx := context.TODO() +id := applicationpackages.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") + +// alternatively `client.ApplicationPackageList(ctx, id, applicationpackages.DefaultApplicationPackageListOperationOptions())` can be used to do batched pagination +items, err := client.ApplicationPackageListComplete(ctx, id, applicationpackages.DefaultApplicationPackageListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/batch/2024-07-01/applicationpackage/client.go b/resource-manager/batch/2024-07-01/applicationpackages/client.go similarity index 59% rename from resource-manager/batch/2024-07-01/applicationpackage/client.go rename to resource-manager/batch/2024-07-01/applicationpackages/client.go index 33a4c25eb85..0db7a90f89b 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/client.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/client.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ApplicationPackageClient struct { +type ApplicationPackagesClient struct { Client *resourcemanager.Client } -func NewApplicationPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationPackageClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "applicationpackage", defaultApiVersion) +func NewApplicationPackagesClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationPackagesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "applicationpackages", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating ApplicationPackageClient: %+v", err) + return nil, fmt.Errorf("instantiating ApplicationPackagesClient: %+v", err) } - return &ApplicationPackageClient{ + return &ApplicationPackagesClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/constants.go b/resource-manager/batch/2024-07-01/applicationpackages/constants.go similarity index 97% rename from resource-manager/batch/2024-07-01/applicationpackage/constants.go rename to resource-manager/batch/2024-07-01/applicationpackages/constants.go index f994c2729ac..f9e483aff74 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/constants.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/constants.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "encoding/json" diff --git a/resource-manager/batch/2024-07-01/applicationpackage/id_application.go b/resource-manager/batch/2024-07-01/applicationpackages/id_application.go similarity index 99% rename from resource-manager/batch/2024-07-01/applicationpackage/id_application.go rename to resource-manager/batch/2024-07-01/applicationpackages/id_application.go index a27df437364..9cf45231c12 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/id_application.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/id_application.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/applicationpackage/id_application_test.go b/resource-manager/batch/2024-07-01/applicationpackages/id_application_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/applicationpackage/id_application_test.go rename to resource-manager/batch/2024-07-01/applicationpackages/id_application_test.go index f18c35b6d96..b617d513076 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/id_application_test.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/id_application_test.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "testing" diff --git a/resource-manager/batch/2024-07-01/applicationpackage/id_version.go b/resource-manager/batch/2024-07-01/applicationpackages/id_version.go similarity index 99% rename from resource-manager/batch/2024-07-01/applicationpackage/id_version.go rename to resource-manager/batch/2024-07-01/applicationpackages/id_version.go index 6c50c4461cd..36e5d9d3798 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/id_version.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/id_version.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/applicationpackage/id_version_test.go b/resource-manager/batch/2024-07-01/applicationpackages/id_version_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/applicationpackage/id_version_test.go rename to resource-manager/batch/2024-07-01/applicationpackages/id_version_test.go index ad8a1a26cb6..dcaf260a2ec 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/id_version_test.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/id_version_test.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "testing" diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_activate.go b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackageactivate.go similarity index 76% rename from resource-manager/batch/2024-07-01/applicationpackage/method_activate.go rename to resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackageactivate.go index 212091afa47..4d7f31a845e 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_activate.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackageactivate.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ActivateOperationResponse struct { +type ApplicationPackageActivateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *ApplicationPackage } -// Activate ... -func (c ApplicationPackageClient) Activate(ctx context.Context, id VersionId, input ActivateApplicationPackageParameters) (result ActivateOperationResponse, err error) { +// ApplicationPackageActivate ... +func (c ApplicationPackagesClient) ApplicationPackageActivate(ctx context.Context, id VersionId, input ActivateApplicationPackageParameters) (result ApplicationPackageActivateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_create.go b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagecreate.go similarity index 76% rename from resource-manager/batch/2024-07-01/applicationpackage/method_create.go rename to resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagecreate.go index e9ce2d4d908..26942896824 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_create.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagecreate.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type ApplicationPackageCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *ApplicationPackage } -// Create ... -func (c ApplicationPackageClient) Create(ctx context.Context, id VersionId, input ApplicationPackage) (result CreateOperationResponse, err error) { +// ApplicationPackageCreate ... +func (c ApplicationPackagesClient) ApplicationPackageCreate(ctx context.Context, id VersionId, input ApplicationPackage) (result ApplicationPackageCreateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/application/method_delete.go b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagedelete.go similarity index 75% rename from resource-manager/batch/2024-07-01/application/method_delete.go rename to resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagedelete.go index 37bef666ec7..fbc11650468 100644 --- a/resource-manager/batch/2024-07-01/application/method_delete.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagedelete.go @@ -1,4 +1,4 @@ -package application +package applicationpackages import ( "context" @@ -11,13 +11,13 @@ import ( // 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 { +type ApplicationPackageDeleteOperationResponse struct { HttpResponse *http.Response OData *odata.OData } -// Delete ... -func (c ApplicationClient) Delete(ctx context.Context, id ApplicationId) (result DeleteOperationResponse, err error) { +// ApplicationPackageDelete ... +func (c ApplicationPackagesClient) ApplicationPackageDelete(ctx context.Context, id VersionId) (result ApplicationPackageDeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_get.go b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackageget.go similarity index 78% rename from resource-manager/batch/2024-07-01/applicationpackage/method_get.go rename to resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackageget.go index a0372e1e739..a72f1fd0360 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_get.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackageget.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type ApplicationPackageGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *ApplicationPackage } -// Get ... -func (c ApplicationPackageClient) Get(ctx context.Context, id VersionId) (result GetOperationResponse, err error) { +// ApplicationPackageGet ... +func (c ApplicationPackagesClient) ApplicationPackageGet(ctx context.Context, id VersionId) (result ApplicationPackageGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_list.go b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagelist.go similarity index 50% rename from resource-manager/batch/2024-07-01/applicationpackage/method_list.go rename to resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagelist.go index d99214edc4d..d9ee6303854 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_list.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/method_applicationpackagelist.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "context" @@ -12,38 +12,38 @@ import ( // 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 { +type ApplicationPackageListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]ApplicationPackage } -type ListCompleteResult struct { +type ApplicationPackageListCompleteResult struct { LatestHttpResponse *http.Response Items []ApplicationPackage } -type ListOperationOptions struct { +type ApplicationPackageListOperationOptions struct { Maxresults *int64 } -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} +func DefaultApplicationPackageListOperationOptions() ApplicationPackageListOperationOptions { + return ApplicationPackageListOperationOptions{} } -func (o ListOperationOptions) ToHeaders() *client.Headers { +func (o ApplicationPackageListOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} return &out } -func (o ListOperationOptions) ToOData() *odata.Query { +func (o ApplicationPackageListOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o ListOperationOptions) ToQuery() *client.QueryParams { +func (o ApplicationPackageListOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} if o.Maxresults != nil { out.Append("maxresults", fmt.Sprintf("%v", *o.Maxresults)) @@ -51,11 +51,11 @@ func (o ListOperationOptions) ToQuery() *client.QueryParams { return &out } -type ListCustomPager struct { +type ApplicationPackageListCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListCustomPager) NextPageLink() *odata.Link { +func (p *ApplicationPackageListCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -63,8 +63,8 @@ func (p *ListCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// List ... -func (c ApplicationPackageClient) List(ctx context.Context, id ApplicationId, options ListOperationOptions) (result ListOperationResponse, err error) { +// ApplicationPackageList ... +func (c ApplicationPackagesClient) ApplicationPackageList(ctx context.Context, id ApplicationId, options ApplicationPackageListOperationOptions) (result ApplicationPackageListOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -72,7 +72,7 @@ func (c ApplicationPackageClient) List(ctx context.Context, id ApplicationId, op }, HttpMethod: http.MethodGet, OptionsObject: options, - Pager: &ListCustomPager{}, + Pager: &ApplicationPackageListCustomPager{}, Path: fmt.Sprintf("%s/versions", id.ID()), } @@ -103,16 +103,16 @@ func (c ApplicationPackageClient) List(ctx context.Context, id ApplicationId, op return } -// ListComplete retrieves all the results into a single object -func (c ApplicationPackageClient) ListComplete(ctx context.Context, id ApplicationId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, ApplicationPackageOperationPredicate{}) +// ApplicationPackageListComplete retrieves all the results into a single object +func (c ApplicationPackagesClient) ApplicationPackageListComplete(ctx context.Context, id ApplicationId, options ApplicationPackageListOperationOptions) (ApplicationPackageListCompleteResult, error) { + return c.ApplicationPackageListCompleteMatchingPredicate(ctx, id, options, ApplicationPackageOperationPredicate{}) } -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationPackageClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationId, options ListOperationOptions, predicate ApplicationPackageOperationPredicate) (result ListCompleteResult, err error) { +// ApplicationPackageListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ApplicationPackagesClient) ApplicationPackageListCompleteMatchingPredicate(ctx context.Context, id ApplicationId, options ApplicationPackageListOperationOptions, predicate ApplicationPackageOperationPredicate) (result ApplicationPackageListCompleteResult, err error) { items := make([]ApplicationPackage, 0) - resp, err := c.List(ctx, id, options) + resp, err := c.ApplicationPackageList(ctx, id, options) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -126,7 +126,7 @@ func (c ApplicationPackageClient) ListCompleteMatchingPredicate(ctx context.Cont } } - result = ListCompleteResult{ + result = ApplicationPackageListCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/batch/2024-07-01/applicationpackage/model_activateapplicationpackageparameters.go b/resource-manager/batch/2024-07-01/applicationpackages/model_activateapplicationpackageparameters.go similarity index 89% rename from resource-manager/batch/2024-07-01/applicationpackage/model_activateapplicationpackageparameters.go rename to resource-manager/batch/2024-07-01/applicationpackages/model_activateapplicationpackageparameters.go index 9b2f15b1238..82d0d26034b 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/model_activateapplicationpackageparameters.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/model_activateapplicationpackageparameters.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/applicationpackage/model_applicationpackage.go b/resource-manager/batch/2024-07-01/applicationpackages/model_applicationpackage.go similarity index 76% rename from resource-manager/batch/2024-07-01/applicationpackage/model_applicationpackage.go rename to resource-manager/batch/2024-07-01/applicationpackages/model_applicationpackage.go index 2ade6905b7e..b1e18dc9e87 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/model_applicationpackage.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/model_applicationpackage.go @@ -1,4 +1,8 @@ -package applicationpackage +package applicationpackages + +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. @@ -8,6 +12,7 @@ type ApplicationPackage struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *ApplicationPackageProperties `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/batch/2024-07-01/applicationpackage/model_applicationpackageproperties.go b/resource-manager/batch/2024-07-01/applicationpackages/model_applicationpackageproperties.go similarity index 98% rename from resource-manager/batch/2024-07-01/applicationpackage/model_applicationpackageproperties.go rename to resource-manager/batch/2024-07-01/applicationpackages/model_applicationpackageproperties.go index a3e08bb9c00..7427b217bc2 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/model_applicationpackageproperties.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/model_applicationpackageproperties.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages import ( "time" diff --git a/resource-manager/batch/2024-07-01/applicationpackage/predicates.go b/resource-manager/batch/2024-07-01/applicationpackages/predicates.go similarity index 96% rename from resource-manager/batch/2024-07-01/applicationpackage/predicates.go rename to resource-manager/batch/2024-07-01/applicationpackages/predicates.go index 8841aed23a6..172b860f3ac 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/predicates.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/predicates.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/applicationpackage/version.go b/resource-manager/batch/2024-07-01/applicationpackages/version.go similarity index 71% rename from resource-manager/batch/2024-07-01/applicationpackage/version.go rename to resource-manager/batch/2024-07-01/applicationpackages/version.go index 7b11b7a7d4f..12197bbe0fe 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/version.go +++ b/resource-manager/batch/2024-07-01/applicationpackages/version.go @@ -1,4 +1,4 @@ -package applicationpackage +package applicationpackages // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package applicationpackage const defaultApiVersion = "2024-07-01" func userAgent() string { - return "hashicorp/go-azure-sdk/applicationpackage/2024-07-01" + return "hashicorp/go-azure-sdk/applicationpackages/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/applications/README.md b/resource-manager/batch/2024-07-01/applications/README.md new file mode 100644 index 00000000000..4231edc362e --- /dev/null +++ b/resource-manager/batch/2024-07-01/applications/README.md @@ -0,0 +1,111 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/applications` Documentation + +The `applications` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/applications" +``` + + +### Client Initialization + +```go +client := applications.NewApplicationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ApplicationsClient.ApplicationCreate` + +```go +ctx := context.TODO() +id := applications.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") + +payload := applications.Application{ + // ... +} + + +read, err := client.ApplicationCreate(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ApplicationsClient.ApplicationDelete` + +```go +ctx := context.TODO() +id := applications.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") + +read, err := client.ApplicationDelete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ApplicationsClient.ApplicationGet` + +```go +ctx := context.TODO() +id := applications.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") + +read, err := client.ApplicationGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ApplicationsClient.ApplicationList` + +```go +ctx := context.TODO() +id := applications.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +// alternatively `client.ApplicationList(ctx, id, applications.DefaultApplicationListOperationOptions())` can be used to do batched pagination +items, err := client.ApplicationListComplete(ctx, id, applications.DefaultApplicationListOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ApplicationsClient.ApplicationUpdate` + +```go +ctx := context.TODO() +id := applications.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName") + +payload := applications.Application{ + // ... +} + + +read, err := client.ApplicationUpdate(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/postgresql/2025-08-01/capturedlogs/client.go b/resource-manager/batch/2024-07-01/applications/client.go similarity index 58% rename from resource-manager/postgresql/2025-08-01/capturedlogs/client.go rename to resource-manager/batch/2024-07-01/applications/client.go index 6159fb01a8b..01d1c5a1e05 100644 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/client.go +++ b/resource-manager/batch/2024-07-01/applications/client.go @@ -1,4 +1,4 @@ -package capturedlogs +package applications import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type CapturedLogsClient struct { +type ApplicationsClient struct { Client *resourcemanager.Client } -func NewCapturedLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*CapturedLogsClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "capturedlogs", defaultApiVersion) +func NewApplicationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "applications", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating CapturedLogsClient: %+v", err) + return nil, fmt.Errorf("instantiating ApplicationsClient: %+v", err) } - return &CapturedLogsClient{ + return &ApplicationsClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/application/id_application.go b/resource-manager/batch/2024-07-01/applications/id_application.go similarity index 99% rename from resource-manager/batch/2024-07-01/application/id_application.go rename to resource-manager/batch/2024-07-01/applications/id_application.go index 7d86ef6c958..f6484a35191 100644 --- a/resource-manager/batch/2024-07-01/application/id_application.go +++ b/resource-manager/batch/2024-07-01/applications/id_application.go @@ -1,4 +1,4 @@ -package application +package applications import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/application/id_application_test.go b/resource-manager/batch/2024-07-01/applications/id_application_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/application/id_application_test.go rename to resource-manager/batch/2024-07-01/applications/id_application_test.go index 256e73ef3a7..307b8fc0dd4 100644 --- a/resource-manager/batch/2024-07-01/application/id_application_test.go +++ b/resource-manager/batch/2024-07-01/applications/id_application_test.go @@ -1,4 +1,4 @@ -package application +package applications import ( "testing" diff --git a/resource-manager/batch/2024-07-01/application/id_batchaccount.go b/resource-manager/batch/2024-07-01/applications/id_batchaccount.go similarity index 99% rename from resource-manager/batch/2024-07-01/application/id_batchaccount.go rename to resource-manager/batch/2024-07-01/applications/id_batchaccount.go index e33350fba90..329a411c3bf 100644 --- a/resource-manager/batch/2024-07-01/application/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/applications/id_batchaccount.go @@ -1,4 +1,4 @@ -package application +package applications import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/application/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/applications/id_batchaccount_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/application/id_batchaccount_test.go rename to resource-manager/batch/2024-07-01/applications/id_batchaccount_test.go index 767dc437740..c393dd6485a 100644 --- a/resource-manager/batch/2024-07-01/application/id_batchaccount_test.go +++ b/resource-manager/batch/2024-07-01/applications/id_batchaccount_test.go @@ -1,4 +1,4 @@ -package application +package applications import ( "testing" diff --git a/resource-manager/batch/2024-07-01/application/method_create.go b/resource-manager/batch/2024-07-01/applications/method_applicationcreate.go similarity index 79% rename from resource-manager/batch/2024-07-01/application/method_create.go rename to resource-manager/batch/2024-07-01/applications/method_applicationcreate.go index f82824b74a2..616e14abb4d 100644 --- a/resource-manager/batch/2024-07-01/application/method_create.go +++ b/resource-manager/batch/2024-07-01/applications/method_applicationcreate.go @@ -1,4 +1,4 @@ -package application +package applications import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type ApplicationCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Application } -// Create ... -func (c ApplicationClient) Create(ctx context.Context, id ApplicationId, input Application) (result CreateOperationResponse, err error) { +// ApplicationCreate ... +func (c ApplicationsClient) ApplicationCreate(ctx context.Context, id ApplicationId, input Application) (result ApplicationCreateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/applicationpackage/method_delete.go b/resource-manager/batch/2024-07-01/applications/method_applicationdelete.go similarity index 77% rename from resource-manager/batch/2024-07-01/applicationpackage/method_delete.go rename to resource-manager/batch/2024-07-01/applications/method_applicationdelete.go index 577f63a0a6f..ec94466b3ed 100644 --- a/resource-manager/batch/2024-07-01/applicationpackage/method_delete.go +++ b/resource-manager/batch/2024-07-01/applications/method_applicationdelete.go @@ -1,4 +1,4 @@ -package applicationpackage +package applications import ( "context" @@ -11,13 +11,13 @@ import ( // 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 { +type ApplicationDeleteOperationResponse struct { HttpResponse *http.Response OData *odata.OData } -// Delete ... -func (c ApplicationPackageClient) Delete(ctx context.Context, id VersionId) (result DeleteOperationResponse, err error) { +// ApplicationDelete ... +func (c ApplicationsClient) ApplicationDelete(ctx context.Context, id ApplicationId) (result ApplicationDeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/application/method_get.go b/resource-manager/batch/2024-07-01/applications/method_applicationget.go similarity index 80% rename from resource-manager/batch/2024-07-01/application/method_get.go rename to resource-manager/batch/2024-07-01/applications/method_applicationget.go index 288a250a410..2a9b461c586 100644 --- a/resource-manager/batch/2024-07-01/application/method_get.go +++ b/resource-manager/batch/2024-07-01/applications/method_applicationget.go @@ -1,4 +1,4 @@ -package application +package applications import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type ApplicationGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Application } -// Get ... -func (c ApplicationClient) Get(ctx context.Context, id ApplicationId) (result GetOperationResponse, err error) { +// ApplicationGet ... +func (c ApplicationsClient) ApplicationGet(ctx context.Context, id ApplicationId) (result ApplicationGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/application/method_list.go b/resource-manager/batch/2024-07-01/applications/method_applicationlist.go similarity index 53% rename from resource-manager/batch/2024-07-01/application/method_list.go rename to resource-manager/batch/2024-07-01/applications/method_applicationlist.go index c17155dc171..f9ce67743a7 100644 --- a/resource-manager/batch/2024-07-01/application/method_list.go +++ b/resource-manager/batch/2024-07-01/applications/method_applicationlist.go @@ -1,4 +1,4 @@ -package application +package applications import ( "context" @@ -12,38 +12,38 @@ import ( // 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 { +type ApplicationListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Application } -type ListCompleteResult struct { +type ApplicationListCompleteResult struct { LatestHttpResponse *http.Response Items []Application } -type ListOperationOptions struct { +type ApplicationListOperationOptions struct { Maxresults *int64 } -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} +func DefaultApplicationListOperationOptions() ApplicationListOperationOptions { + return ApplicationListOperationOptions{} } -func (o ListOperationOptions) ToHeaders() *client.Headers { +func (o ApplicationListOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} return &out } -func (o ListOperationOptions) ToOData() *odata.Query { +func (o ApplicationListOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o ListOperationOptions) ToQuery() *client.QueryParams { +func (o ApplicationListOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} if o.Maxresults != nil { out.Append("maxresults", fmt.Sprintf("%v", *o.Maxresults)) @@ -51,11 +51,11 @@ func (o ListOperationOptions) ToQuery() *client.QueryParams { return &out } -type ListCustomPager struct { +type ApplicationListCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListCustomPager) NextPageLink() *odata.Link { +func (p *ApplicationListCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -63,8 +63,8 @@ func (p *ListCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// List ... -func (c ApplicationClient) List(ctx context.Context, id BatchAccountId, options ListOperationOptions) (result ListOperationResponse, err error) { +// ApplicationList ... +func (c ApplicationsClient) ApplicationList(ctx context.Context, id BatchAccountId, options ApplicationListOperationOptions) (result ApplicationListOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -72,7 +72,7 @@ func (c ApplicationClient) List(ctx context.Context, id BatchAccountId, options }, HttpMethod: http.MethodGet, OptionsObject: options, - Pager: &ListCustomPager{}, + Pager: &ApplicationListCustomPager{}, Path: fmt.Sprintf("%s/applications", id.ID()), } @@ -103,16 +103,16 @@ func (c ApplicationClient) List(ctx context.Context, id BatchAccountId, options return } -// ListComplete retrieves all the results into a single object -func (c ApplicationClient) ListComplete(ctx context.Context, id BatchAccountId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, ApplicationOperationPredicate{}) +// ApplicationListComplete retrieves all the results into a single object +func (c ApplicationsClient) ApplicationListComplete(ctx context.Context, id BatchAccountId, options ApplicationListOperationOptions) (ApplicationListCompleteResult, error) { + return c.ApplicationListCompleteMatchingPredicate(ctx, id, options, ApplicationOperationPredicate{}) } -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationClient) ListCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options ListOperationOptions, predicate ApplicationOperationPredicate) (result ListCompleteResult, err error) { +// ApplicationListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ApplicationsClient) ApplicationListCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options ApplicationListOperationOptions, predicate ApplicationOperationPredicate) (result ApplicationListCompleteResult, err error) { items := make([]Application, 0) - resp, err := c.List(ctx, id, options) + resp, err := c.ApplicationList(ctx, id, options) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -126,7 +126,7 @@ func (c ApplicationClient) ListCompleteMatchingPredicate(ctx context.Context, id } } - result = ListCompleteResult{ + result = ApplicationListCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/batch/2024-07-01/application/method_update.go b/resource-manager/batch/2024-07-01/applications/method_applicationupdate.go similarity index 79% rename from resource-manager/batch/2024-07-01/application/method_update.go rename to resource-manager/batch/2024-07-01/applications/method_applicationupdate.go index d3d06a031c2..742d01bbb0c 100644 --- a/resource-manager/batch/2024-07-01/application/method_update.go +++ b/resource-manager/batch/2024-07-01/applications/method_applicationupdate.go @@ -1,4 +1,4 @@ -package application +package applications import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type ApplicationUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Application } -// Update ... -func (c ApplicationClient) Update(ctx context.Context, id ApplicationId, input Application) (result UpdateOperationResponse, err error) { +// ApplicationUpdate ... +func (c ApplicationsClient) ApplicationUpdate(ctx context.Context, id ApplicationId, input Application) (result ApplicationUpdateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/application/model_application.go b/resource-manager/batch/2024-07-01/applications/model_application.go similarity index 76% rename from resource-manager/batch/2024-07-01/application/model_application.go rename to resource-manager/batch/2024-07-01/applications/model_application.go index 73440909217..166ec8020c2 100644 --- a/resource-manager/batch/2024-07-01/application/model_application.go +++ b/resource-manager/batch/2024-07-01/applications/model_application.go @@ -1,4 +1,8 @@ -package application +package applications + +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. @@ -8,6 +12,7 @@ type Application struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *ApplicationProperties `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/batch/2024-07-01/application/model_applicationproperties.go b/resource-manager/batch/2024-07-01/applications/model_applicationproperties.go similarity index 94% rename from resource-manager/batch/2024-07-01/application/model_applicationproperties.go rename to resource-manager/batch/2024-07-01/applications/model_applicationproperties.go index 976af8379d8..5eb8cc3146f 100644 --- a/resource-manager/batch/2024-07-01/application/model_applicationproperties.go +++ b/resource-manager/batch/2024-07-01/applications/model_applicationproperties.go @@ -1,4 +1,4 @@ -package application +package applications // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/application/predicates.go b/resource-manager/batch/2024-07-01/applications/predicates.go similarity index 97% rename from resource-manager/batch/2024-07-01/application/predicates.go rename to resource-manager/batch/2024-07-01/applications/predicates.go index 07f37439788..05ce0f966d3 100644 --- a/resource-manager/batch/2024-07-01/application/predicates.go +++ b/resource-manager/batch/2024-07-01/applications/predicates.go @@ -1,4 +1,4 @@ -package application +package applications // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/application/version.go b/resource-manager/batch/2024-07-01/applications/version.go similarity index 74% rename from resource-manager/batch/2024-07-01/application/version.go rename to resource-manager/batch/2024-07-01/applications/version.go index f8ca37f98e2..54e8bbb9c8c 100644 --- a/resource-manager/batch/2024-07-01/application/version.go +++ b/resource-manager/batch/2024-07-01/applications/version.go @@ -1,4 +1,4 @@ -package application +package applications // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package application const defaultApiVersion = "2024-07-01" func userAgent() string { - return "hashicorp/go-azure-sdk/application/2024-07-01" + return "hashicorp/go-azure-sdk/applications/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/batchaccount/README.md b/resource-manager/batch/2024-07-01/batchaccount/README.md deleted file mode 100644 index 151c29d0f5d..00000000000 --- a/resource-manager/batch/2024-07-01/batchaccount/README.md +++ /dev/null @@ -1,191 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchaccount` Documentation - -The `batchaccount` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchaccount" -``` - - -### Client Initialization - -```go -client := batchaccount.NewBatchAccountClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BatchAccountClient.Create` - -```go -ctx := context.TODO() -id := batchaccount.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -payload := batchaccount.BatchAccountCreateParameters{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `BatchAccountClient.Delete` - -```go -ctx := context.TODO() -id := batchaccount.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `BatchAccountClient.Get` - -```go -ctx := context.TODO() -id := batchaccount.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -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: `BatchAccountClient.GetKeys` - -```go -ctx := context.TODO() -id := batchaccount.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -read, err := client.GetKeys(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BatchAccountClient.List` - -```go -ctx := context.TODO() -id := commonids.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: `BatchAccountClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.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: `BatchAccountClient.ListOutboundNetworkDependenciesEndpoints` - -```go -ctx := context.TODO() -id := batchaccount.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -// alternatively `client.ListOutboundNetworkDependenciesEndpoints(ctx, id)` can be used to do batched pagination -items, err := client.ListOutboundNetworkDependenciesEndpointsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BatchAccountClient.RegenerateKey` - -```go -ctx := context.TODO() -id := batchaccount.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -payload := batchaccount.BatchAccountRegenerateKeyParameters{ - // ... -} - - -read, err := client.RegenerateKey(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BatchAccountClient.SynchronizeAutoStorageKeys` - -```go -ctx := context.TODO() -id := batchaccount.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -read, err := client.SynchronizeAutoStorageKeys(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BatchAccountClient.Update` - -```go -ctx := context.TODO() -id := batchaccount.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -payload := batchaccount.BatchAccountUpdateParameters{ - // ... -} - - -read, err := client.Update(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/batch/2024-07-01/batchaccount/method_listoutboundnetworkdependenciesendpoints.go b/resource-manager/batch/2024-07-01/batchaccount/method_listoutboundnetworkdependenciesendpoints.go deleted file mode 100644 index 5fc750bff53..00000000000 --- a/resource-manager/batch/2024-07-01/batchaccount/method_listoutboundnetworkdependenciesendpoints.go +++ /dev/null @@ -1,105 +0,0 @@ -package batchaccount - -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 ListOutboundNetworkDependenciesEndpointsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]OutboundEnvironmentEndpoint -} - -type ListOutboundNetworkDependenciesEndpointsCompleteResult struct { - LatestHttpResponse *http.Response - Items []OutboundEnvironmentEndpoint -} - -type ListOutboundNetworkDependenciesEndpointsCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListOutboundNetworkDependenciesEndpointsCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListOutboundNetworkDependenciesEndpoints ... -func (c BatchAccountClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, id BatchAccountId) (result ListOutboundNetworkDependenciesEndpointsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListOutboundNetworkDependenciesEndpointsCustomPager{}, - Path: fmt.Sprintf("%s/outboundNetworkDependenciesEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]OutboundEnvironmentEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListOutboundNetworkDependenciesEndpointsComplete retrieves all the results into a single object -func (c BatchAccountClient) ListOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, id BatchAccountId) (ListOutboundNetworkDependenciesEndpointsCompleteResult, error) { - return c.ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx, id, OutboundEnvironmentEndpointOperationPredicate{}) -} - -// ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BatchAccountClient) ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, predicate OutboundEnvironmentEndpointOperationPredicate) (result ListOutboundNetworkDependenciesEndpointsCompleteResult, err error) { - items := make([]OutboundEnvironmentEndpoint, 0) - - resp, err := c.ListOutboundNetworkDependenciesEndpoints(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListOutboundNetworkDependenciesEndpointsCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_privateendpointconnection.go b/resource-manager/batch/2024-07-01/batchaccount/model_privateendpointconnection.go deleted file mode 100644 index 994c4cace5c..00000000000 --- a/resource-manager/batch/2024-07-01/batchaccount/model_privateendpointconnection.go +++ /dev/null @@ -1,13 +0,0 @@ -package batchaccount - -// 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"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/batch/2024-07-01/batchaccounts/README.md b/resource-manager/batch/2024-07-01/batchaccounts/README.md new file mode 100644 index 00000000000..12500bf91c8 --- /dev/null +++ b/resource-manager/batch/2024-07-01/batchaccounts/README.md @@ -0,0 +1,191 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchaccounts` Documentation + +The `batchaccounts` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchaccounts" +``` + + +### Client Initialization + +```go +client := batchaccounts.NewBatchAccountsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountCreate` + +```go +ctx := context.TODO() +id := batchaccounts.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +payload := batchaccounts.BatchAccountCreateParameters{ + // ... +} + + +if err := client.BatchAccountCreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountDelete` + +```go +ctx := context.TODO() +id := batchaccounts.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +if err := client.BatchAccountDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountGet` + +```go +ctx := context.TODO() +id := batchaccounts.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +read, err := client.BatchAccountGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountGetKeys` + +```go +ctx := context.TODO() +id := batchaccounts.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +read, err := client.BatchAccountGetKeys(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountList` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +// alternatively `client.BatchAccountList(ctx, id)` can be used to do batched pagination +items, err := client.BatchAccountListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountListByResourceGroup` + +```go +ctx := context.TODO() +id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") + +// alternatively `client.BatchAccountListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.BatchAccountListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountListOutboundNetworkDependenciesEndpoints` + +```go +ctx := context.TODO() +id := batchaccounts.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +// alternatively `client.BatchAccountListOutboundNetworkDependenciesEndpoints(ctx, id)` can be used to do batched pagination +items, err := client.BatchAccountListOutboundNetworkDependenciesEndpointsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountRegenerateKey` + +```go +ctx := context.TODO() +id := batchaccounts.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +payload := batchaccounts.BatchAccountRegenerateKeyParameters{ + // ... +} + + +read, err := client.BatchAccountRegenerateKey(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountSynchronizeAutoStorageKeys` + +```go +ctx := context.TODO() +id := batchaccounts.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +read, err := client.BatchAccountSynchronizeAutoStorageKeys(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BatchAccountsClient.BatchAccountUpdate` + +```go +ctx := context.TODO() +id := batchaccounts.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +payload := batchaccounts.BatchAccountUpdateParameters{ + // ... +} + + +read, err := client.BatchAccountUpdate(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/postgresql/2025-08-01/tuningoptions/client.go b/resource-manager/batch/2024-07-01/batchaccounts/client.go similarity index 57% rename from resource-manager/postgresql/2025-08-01/tuningoptions/client.go rename to resource-manager/batch/2024-07-01/batchaccounts/client.go index 2f3c17a0563..ec5b4f7b86d 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/client.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/client.go @@ -1,4 +1,4 @@ -package tuningoptions +package batchaccounts import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type TuningOptionsClient struct { +type BatchAccountsClient struct { Client *resourcemanager.Client } -func NewTuningOptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*TuningOptionsClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "tuningoptions", defaultApiVersion) +func NewBatchAccountsClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchAccountsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "batchaccounts", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating TuningOptionsClient: %+v", err) + return nil, fmt.Errorf("instantiating BatchAccountsClient: %+v", err) } - return &TuningOptionsClient{ + return &BatchAccountsClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/batchaccount/constants.go b/resource-manager/batch/2024-07-01/batchaccounts/constants.go similarity index 99% rename from resource-manager/batch/2024-07-01/batchaccount/constants.go rename to resource-manager/batch/2024-07-01/batchaccounts/constants.go index ec62934bc93..8d37c7ef7c2 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/constants.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/constants.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "encoding/json" diff --git a/resource-manager/batch/2024-07-01/batchaccount/id_batchaccount.go b/resource-manager/batch/2024-07-01/batchaccounts/id_batchaccount.go similarity index 99% rename from resource-manager/batch/2024-07-01/batchaccount/id_batchaccount.go rename to resource-manager/batch/2024-07-01/batchaccounts/id_batchaccount.go index 40f8fee2fa0..84209844f9d 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/id_batchaccount.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/certificate/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/batchaccounts/id_batchaccount_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/certificate/id_batchaccount_test.go rename to resource-manager/batch/2024-07-01/batchaccounts/id_batchaccount_test.go index ec23edd8872..6d08e78df88 100644 --- a/resource-manager/batch/2024-07-01/certificate/id_batchaccount_test.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/id_batchaccount_test.go @@ -1,4 +1,4 @@ -package certificate +package batchaccounts import ( "testing" diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_create.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountcreate.go similarity index 64% rename from resource-manager/batch/2024-07-01/batchaccount/method_create.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountcreate.go index 49dab1c2481..3d373de6022 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_create.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountcreate.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -14,15 +14,15 @@ import ( // 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 { +type BatchAccountCreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData Model *BatchAccount } -// Create ... -func (c BatchAccountClient) Create(ctx context.Context, id BatchAccountId, input BatchAccountCreateParameters) (result CreateOperationResponse, err error) { +// BatchAccountCreate ... +func (c BatchAccountsClient) BatchAccountCreate(ctx context.Context, id BatchAccountId, input BatchAccountCreateParameters) (result BatchAccountCreateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -60,15 +60,15 @@ func (c BatchAccountClient) Create(ctx context.Context, id BatchAccountId, input return } -// CreateThenPoll performs Create then polls until it's completed -func (c BatchAccountClient) CreateThenPoll(ctx context.Context, id BatchAccountId, input BatchAccountCreateParameters) error { - result, err := c.Create(ctx, id, input) +// BatchAccountCreateThenPoll performs BatchAccountCreate then polls until it's completed +func (c BatchAccountsClient) BatchAccountCreateThenPoll(ctx context.Context, id BatchAccountId, input BatchAccountCreateParameters) error { + result, err := c.BatchAccountCreate(ctx, id, input) if err != nil { - return fmt.Errorf("performing Create: %+v", err) + return fmt.Errorf("performing BatchAccountCreate: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) + return fmt.Errorf("polling after BatchAccountCreate: %+v", err) } return nil diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_delete.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountdelete.go similarity index 66% rename from resource-manager/batch/2024-07-01/batchaccount/method_delete.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountdelete.go index 5d89af89b99..cdf7549cac4 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_delete.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountdelete.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -14,14 +14,14 @@ import ( // 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 { +type BatchAccountDeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// Delete ... -func (c BatchAccountClient) Delete(ctx context.Context, id BatchAccountId) (result DeleteOperationResponse, err error) { +// BatchAccountDelete ... +func (c BatchAccountsClient) BatchAccountDelete(ctx context.Context, id BatchAccountId) (result BatchAccountDeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -56,15 +56,15 @@ func (c BatchAccountClient) Delete(ctx context.Context, id BatchAccountId) (resu return } -// DeleteThenPoll performs Delete then polls until it's completed -func (c BatchAccountClient) DeleteThenPoll(ctx context.Context, id BatchAccountId) error { - result, err := c.Delete(ctx, id) +// BatchAccountDeleteThenPoll performs BatchAccountDelete then polls until it's completed +func (c BatchAccountsClient) BatchAccountDeleteThenPoll(ctx context.Context, id BatchAccountId) error { + result, err := c.BatchAccountDelete(ctx, id) if err != nil { - return fmt.Errorf("performing Delete: %+v", err) + return fmt.Errorf("performing BatchAccountDelete: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) + return fmt.Errorf("polling after BatchAccountDelete: %+v", err) } return nil diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_get.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountget.go similarity index 80% rename from resource-manager/batch/2024-07-01/batchaccount/method_get.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountget.go index 5a247338315..962641fd8bc 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_get.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountget.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type BatchAccountGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *BatchAccount } -// Get ... -func (c BatchAccountClient) Get(ctx context.Context, id BatchAccountId) (result GetOperationResponse, err error) { +// BatchAccountGet ... +func (c BatchAccountsClient) BatchAccountGet(ctx context.Context, id BatchAccountId) (result BatchAccountGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_getkeys.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountgetkeys.go similarity index 79% rename from resource-manager/batch/2024-07-01/batchaccount/method_getkeys.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountgetkeys.go index 6ceeb11ddf0..b043da3861e 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_getkeys.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountgetkeys.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type GetKeysOperationResponse struct { +type BatchAccountGetKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *BatchAccountKeys } -// GetKeys ... -func (c BatchAccountClient) GetKeys(ctx context.Context, id BatchAccountId) (result GetKeysOperationResponse, err error) { +// BatchAccountGetKeys ... +func (c BatchAccountsClient) BatchAccountGetKeys(ctx context.Context, id BatchAccountId) (result BatchAccountGetKeysOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_list.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlist.go similarity index 59% rename from resource-manager/batch/2024-07-01/batchaccount/method_list.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlist.go index 943c7136da5..fecc1e326c3 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_list.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlist.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -13,22 +13,22 @@ import ( // 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 { +type BatchAccountListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]BatchAccount } -type ListCompleteResult struct { +type BatchAccountListCompleteResult struct { LatestHttpResponse *http.Response Items []BatchAccount } -type ListCustomPager struct { +type BatchAccountListCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListCustomPager) NextPageLink() *odata.Link { +func (p *BatchAccountListCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -36,15 +36,15 @@ func (p *ListCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// List ... -func (c BatchAccountClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { +// BatchAccountList ... +func (c BatchAccountsClient) BatchAccountList(ctx context.Context, id commonids.SubscriptionId) (result BatchAccountListOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, + Pager: &BatchAccountListCustomPager{}, Path: fmt.Sprintf("%s/providers/Microsoft.Batch/batchAccounts", id.ID()), } @@ -75,16 +75,16 @@ func (c BatchAccountClient) List(ctx context.Context, id commonids.SubscriptionI return } -// ListComplete retrieves all the results into a single object -func (c BatchAccountClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, BatchAccountOperationPredicate{}) +// BatchAccountListComplete retrieves all the results into a single object +func (c BatchAccountsClient) BatchAccountListComplete(ctx context.Context, id commonids.SubscriptionId) (BatchAccountListCompleteResult, error) { + return c.BatchAccountListCompleteMatchingPredicate(ctx, id, BatchAccountOperationPredicate{}) } -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BatchAccountClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate BatchAccountOperationPredicate) (result ListCompleteResult, err error) { +// BatchAccountListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BatchAccountsClient) BatchAccountListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate BatchAccountOperationPredicate) (result BatchAccountListCompleteResult, err error) { items := make([]BatchAccount, 0) - resp, err := c.List(ctx, id) + resp, err := c.BatchAccountList(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -98,7 +98,7 @@ func (c BatchAccountClient) ListCompleteMatchingPredicate(ctx context.Context, i } } - result = ListCompleteResult{ + result = BatchAccountListCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_listbyresourcegroup.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlistbyresourcegroup.go similarity index 54% rename from resource-manager/batch/2024-07-01/batchaccount/method_listbyresourcegroup.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlistbyresourcegroup.go index 7fd56b0a473..234e819734d 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_listbyresourcegroup.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlistbyresourcegroup.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -13,22 +13,22 @@ import ( // 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 { +type BatchAccountListByResourceGroupOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]BatchAccount } -type ListByResourceGroupCompleteResult struct { +type BatchAccountListByResourceGroupCompleteResult struct { LatestHttpResponse *http.Response Items []BatchAccount } -type ListByResourceGroupCustomPager struct { +type BatchAccountListByResourceGroupCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { +func (p *BatchAccountListByResourceGroupCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -36,15 +36,15 @@ func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByResourceGroup ... -func (c BatchAccountClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { +// BatchAccountListByResourceGroup ... +func (c BatchAccountsClient) BatchAccountListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result BatchAccountListByResourceGroupOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListByResourceGroupCustomPager{}, + Pager: &BatchAccountListByResourceGroupCustomPager{}, Path: fmt.Sprintf("%s/providers/Microsoft.Batch/batchAccounts", id.ID()), } @@ -75,16 +75,16 @@ func (c BatchAccountClient) ListByResourceGroup(ctx context.Context, id commonid return } -// ListByResourceGroupComplete retrieves all the results into a single object -func (c BatchAccountClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, BatchAccountOperationPredicate{}) +// BatchAccountListByResourceGroupComplete retrieves all the results into a single object +func (c BatchAccountsClient) BatchAccountListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (BatchAccountListByResourceGroupCompleteResult, error) { + return c.BatchAccountListByResourceGroupCompleteMatchingPredicate(ctx, id, BatchAccountOperationPredicate{}) } -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BatchAccountClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate BatchAccountOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { +// BatchAccountListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BatchAccountsClient) BatchAccountListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate BatchAccountOperationPredicate) (result BatchAccountListByResourceGroupCompleteResult, err error) { items := make([]BatchAccount, 0) - resp, err := c.ListByResourceGroup(ctx, id) + resp, err := c.BatchAccountListByResourceGroup(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -98,7 +98,7 @@ func (c BatchAccountClient) ListByResourceGroupCompleteMatchingPredicate(ctx con } } - result = ListByResourceGroupCompleteResult{ + result = BatchAccountListByResourceGroupCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlistoutboundnetworkdependenciesendpoints.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlistoutboundnetworkdependenciesendpoints.go new file mode 100644 index 00000000000..f388eb6fc40 --- /dev/null +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountlistoutboundnetworkdependenciesendpoints.go @@ -0,0 +1,105 @@ +package batchaccounts + +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 BatchAccountListOutboundNetworkDependenciesEndpointsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]OutboundEnvironmentEndpoint +} + +type BatchAccountListOutboundNetworkDependenciesEndpointsCompleteResult struct { + LatestHttpResponse *http.Response + Items []OutboundEnvironmentEndpoint +} + +type BatchAccountListOutboundNetworkDependenciesEndpointsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *BatchAccountListOutboundNetworkDependenciesEndpointsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// BatchAccountListOutboundNetworkDependenciesEndpoints ... +func (c BatchAccountsClient) BatchAccountListOutboundNetworkDependenciesEndpoints(ctx context.Context, id BatchAccountId) (result BatchAccountListOutboundNetworkDependenciesEndpointsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &BatchAccountListOutboundNetworkDependenciesEndpointsCustomPager{}, + Path: fmt.Sprintf("%s/outboundNetworkDependenciesEndpoints", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]OutboundEnvironmentEndpoint `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// BatchAccountListOutboundNetworkDependenciesEndpointsComplete retrieves all the results into a single object +func (c BatchAccountsClient) BatchAccountListOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, id BatchAccountId) (BatchAccountListOutboundNetworkDependenciesEndpointsCompleteResult, error) { + return c.BatchAccountListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx, id, OutboundEnvironmentEndpointOperationPredicate{}) +} + +// BatchAccountListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BatchAccountsClient) BatchAccountListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, predicate OutboundEnvironmentEndpointOperationPredicate) (result BatchAccountListOutboundNetworkDependenciesEndpointsCompleteResult, err error) { + items := make([]OutboundEnvironmentEndpoint, 0) + + resp, err := c.BatchAccountListOutboundNetworkDependenciesEndpoints(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = BatchAccountListOutboundNetworkDependenciesEndpointsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_regeneratekey.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountregeneratekey.go similarity index 76% rename from resource-manager/batch/2024-07-01/batchaccount/method_regeneratekey.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountregeneratekey.go index 385f7216999..521df99093d 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_regeneratekey.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountregeneratekey.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type RegenerateKeyOperationResponse struct { +type BatchAccountRegenerateKeyOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *BatchAccountKeys } -// RegenerateKey ... -func (c BatchAccountClient) RegenerateKey(ctx context.Context, id BatchAccountId, input BatchAccountRegenerateKeyParameters) (result RegenerateKeyOperationResponse, err error) { +// BatchAccountRegenerateKey ... +func (c BatchAccountsClient) BatchAccountRegenerateKey(ctx context.Context, id BatchAccountId, input BatchAccountRegenerateKeyParameters) (result BatchAccountRegenerateKeyOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_synchronizeautostoragekeys.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountsynchronizeautostoragekeys.go similarity index 72% rename from resource-manager/batch/2024-07-01/batchaccount/method_synchronizeautostoragekeys.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountsynchronizeautostoragekeys.go index 7afe29d9c93..860aabbe151 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_synchronizeautostoragekeys.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountsynchronizeautostoragekeys.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -12,13 +12,13 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type SynchronizeAutoStorageKeysOperationResponse struct { +type BatchAccountSynchronizeAutoStorageKeysOperationResponse struct { HttpResponse *http.Response OData *odata.OData } -// SynchronizeAutoStorageKeys ... -func (c BatchAccountClient) SynchronizeAutoStorageKeys(ctx context.Context, id BatchAccountId) (result SynchronizeAutoStorageKeysOperationResponse, err error) { +// BatchAccountSynchronizeAutoStorageKeys ... +func (c BatchAccountsClient) BatchAccountSynchronizeAutoStorageKeys(ctx context.Context, id BatchAccountId) (result BatchAccountSynchronizeAutoStorageKeysOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/batchaccount/method_update.go b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountupdate.go similarity index 78% rename from resource-manager/batch/2024-07-01/batchaccount/method_update.go rename to resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountupdate.go index 8a68a40f903..1ec404875bd 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/method_update.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/method_batchaccountupdate.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type BatchAccountUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *BatchAccount } -// Update ... -func (c BatchAccountClient) Update(ctx context.Context, id BatchAccountId, input BatchAccountUpdateParameters) (result UpdateOperationResponse, err error) { +// BatchAccountUpdate ... +func (c BatchAccountsClient) BatchAccountUpdate(ctx context.Context, id BatchAccountId, input BatchAccountUpdateParameters) (result BatchAccountUpdateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_autostoragebaseproperties.go b/resource-manager/batch/2024-07-01/batchaccounts/model_autostoragebaseproperties.go similarity index 95% rename from resource-manager/batch/2024-07-01/batchaccount/model_autostoragebaseproperties.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_autostoragebaseproperties.go index 00c73ad2996..4f432877f48 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_autostoragebaseproperties.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_autostoragebaseproperties.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_autostorageproperties.go b/resource-manager/batch/2024-07-01/batchaccounts/model_autostorageproperties.go similarity index 97% rename from resource-manager/batch/2024-07-01/batchaccount/model_autostorageproperties.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_autostorageproperties.go index a0da8c8ba39..5725611c785 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_autostorageproperties.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_autostorageproperties.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "time" diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccount.go b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccount.go similarity index 75% rename from resource-manager/batch/2024-07-01/batchaccount/model_batchaccount.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_batchaccount.go index aa017d4a243..653687dd250 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccount.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccount.go @@ -1,7 +1,8 @@ -package batchaccount +package batchaccounts import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,9 +11,10 @@ import ( type BatchAccount struct { Id *string `json:"id,omitempty"` Identity *identity.SystemOrUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` + Location string `json:"location"` Name *string `json:"name,omitempty"` Properties *BatchAccountProperties `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/batch/2024-07-01/batchaccount/model_batchaccountcreateparameters.go b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountcreateparameters.go similarity index 96% rename from resource-manager/batch/2024-07-01/batchaccount/model_batchaccountcreateparameters.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountcreateparameters.go index d4f973e727a..24e63074596 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountcreateparameters.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountcreateparameters.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountcreateproperties.go b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountcreateproperties.go similarity index 97% rename from resource-manager/batch/2024-07-01/batchaccount/model_batchaccountcreateproperties.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountcreateproperties.go index 7d9f8b7c00d..0178d93d3e4 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountcreateproperties.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountcreateproperties.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountkeys.go b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountkeys.go similarity index 93% rename from resource-manager/batch/2024-07-01/batchaccount/model_batchaccountkeys.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountkeys.go index 791eda711d8..db0abb592a8 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountkeys.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountkeys.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountproperties.go b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountproperties.go similarity index 98% rename from resource-manager/batch/2024-07-01/batchaccount/model_batchaccountproperties.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountproperties.go index b488c2767cc..91c101a2f91 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountproperties.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountproperties.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountregeneratekeyparameters.go b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountregeneratekeyparameters.go similarity index 91% rename from resource-manager/batch/2024-07-01/batchaccount/model_batchaccountregeneratekeyparameters.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountregeneratekeyparameters.go index 1eea03ff5f2..cdcc0cbddee 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountregeneratekeyparameters.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountregeneratekeyparameters.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountupdateparameters.go b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountupdateparameters.go similarity index 95% rename from resource-manager/batch/2024-07-01/batchaccount/model_batchaccountupdateparameters.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountupdateparameters.go index 90422490141..97ea8b71141 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountupdateparameters.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountupdateparameters.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountupdateproperties.go b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountupdateproperties.go similarity index 96% rename from resource-manager/batch/2024-07-01/batchaccount/model_batchaccountupdateproperties.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountupdateproperties.go index e664f06d6a4..4ae587c3a41 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_batchaccountupdateproperties.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_batchaccountupdateproperties.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_computenodeidentityreference.go b/resource-manager/batch/2024-07-01/batchaccounts/model_computenodeidentityreference.go similarity index 92% rename from resource-manager/batch/2024-07-01/batchaccount/model_computenodeidentityreference.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_computenodeidentityreference.go index 99f063c16b7..5309895798e 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_computenodeidentityreference.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_computenodeidentityreference.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_encryptionproperties.go b/resource-manager/batch/2024-07-01/batchaccounts/model_encryptionproperties.go similarity index 93% rename from resource-manager/batch/2024-07-01/batchaccount/model_encryptionproperties.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_encryptionproperties.go index 018f83c27e5..19c552d4c80 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_encryptionproperties.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_encryptionproperties.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_endpointaccessprofile.go b/resource-manager/batch/2024-07-01/batchaccounts/model_endpointaccessprofile.go similarity index 93% rename from resource-manager/batch/2024-07-01/batchaccount/model_endpointaccessprofile.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_endpointaccessprofile.go index 756fe99665b..1857793a55d 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_endpointaccessprofile.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_endpointaccessprofile.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_endpointdependency.go b/resource-manager/batch/2024-07-01/batchaccounts/model_endpointdependency.go similarity index 94% rename from resource-manager/batch/2024-07-01/batchaccount/model_endpointdependency.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_endpointdependency.go index 2b0ee92ad27..bfa1d7c9d94 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_endpointdependency.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_endpointdependency.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_endpointdetail.go b/resource-manager/batch/2024-07-01/batchaccounts/model_endpointdetail.go similarity index 91% rename from resource-manager/batch/2024-07-01/batchaccount/model_endpointdetail.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_endpointdetail.go index 521a439d6be..801918a7391 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_endpointdetail.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_endpointdetail.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_iprule.go b/resource-manager/batch/2024-07-01/batchaccounts/model_iprule.go similarity index 92% rename from resource-manager/batch/2024-07-01/batchaccount/model_iprule.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_iprule.go index b6c1c8c381f..c3004f38268 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_iprule.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_iprule.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_keyvaultproperties.go b/resource-manager/batch/2024-07-01/batchaccounts/model_keyvaultproperties.go similarity index 91% rename from resource-manager/batch/2024-07-01/batchaccount/model_keyvaultproperties.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_keyvaultproperties.go index b11e9e9ec8c..c6328132f9a 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_keyvaultproperties.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_keyvaultproperties.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_keyvaultreference.go b/resource-manager/batch/2024-07-01/batchaccounts/model_keyvaultreference.go similarity index 91% rename from resource-manager/batch/2024-07-01/batchaccount/model_keyvaultreference.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_keyvaultreference.go index e3d275bac71..6b9a1f5c704 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_keyvaultreference.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_keyvaultreference.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_networkprofile.go b/resource-manager/batch/2024-07-01/batchaccounts/model_networkprofile.go similarity index 94% rename from resource-manager/batch/2024-07-01/batchaccount/model_networkprofile.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_networkprofile.go index 7c3c4792e91..81ed5fb424b 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_networkprofile.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_networkprofile.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_outboundenvironmentendpoint.go b/resource-manager/batch/2024-07-01/batchaccounts/model_outboundenvironmentendpoint.go similarity index 93% rename from resource-manager/batch/2024-07-01/batchaccount/model_outboundenvironmentendpoint.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_outboundenvironmentendpoint.go index b0d7c922f54..d94bccb740e 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_outboundenvironmentendpoint.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_outboundenvironmentendpoint.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_privateendpoint.go b/resource-manager/batch/2024-07-01/batchaccounts/model_privateendpoint.go similarity index 91% rename from resource-manager/postgresql/2025-08-01/replicas/model_privateendpoint.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_privateendpoint.go index 48ed00f3333..cdf4851000c 100644 --- a/resource-manager/postgresql/2025-08-01/replicas/model_privateendpoint.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_privateendpoint.go @@ -1,4 +1,4 @@ -package replicas +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_privateendpointconnection.go b/resource-manager/batch/2024-07-01/batchaccounts/model_privateendpointconnection.go similarity index 79% rename from resource-manager/postgresql/2025-08-01/replicas/model_privateendpointconnection.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_privateendpointconnection.go index 2ff0aaed8d4..30b7a34cbf0 100644 --- a/resource-manager/postgresql/2025-08-01/replicas/model_privateendpointconnection.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_privateendpointconnection.go @@ -1,4 +1,4 @@ -package replicas +package batchaccounts import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" @@ -8,9 +8,11 @@ import ( // 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"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` } diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_privateendpointconnectionproperties.go b/resource-manager/batch/2024-07-01/batchaccounts/model_privateendpointconnectionproperties.go similarity index 96% rename from resource-manager/batch/2024-07-01/batchaccount/model_privateendpointconnectionproperties.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_privateendpointconnectionproperties.go index dea3e1094fb..c56375c16c4 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_privateendpointconnectionproperties.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_privateendpointconnectionproperties.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_privatelinkserviceconnectionstate.go b/resource-manager/batch/2024-07-01/batchaccounts/model_privatelinkserviceconnectionstate.go similarity index 95% rename from resource-manager/batch/2024-07-01/batchaccount/model_privatelinkserviceconnectionstate.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_privatelinkserviceconnectionstate.go index 54d4125bcc3..356baa00dcd 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_privatelinkserviceconnectionstate.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_privatelinkserviceconnectionstate.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_virtualmachinefamilycorequota.go b/resource-manager/batch/2024-07-01/batchaccounts/model_virtualmachinefamilycorequota.go similarity index 93% rename from resource-manager/batch/2024-07-01/batchaccount/model_virtualmachinefamilycorequota.go rename to resource-manager/batch/2024-07-01/batchaccounts/model_virtualmachinefamilycorequota.go index f1812c2636e..20f8f1957d1 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_virtualmachinefamilycorequota.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/model_virtualmachinefamilycorequota.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/predicates.go b/resource-manager/batch/2024-07-01/batchaccounts/predicates.go similarity index 89% rename from resource-manager/batch/2024-07-01/batchaccount/predicates.go rename to resource-manager/batch/2024-07-01/batchaccounts/predicates.go index 30739ec3997..fc59dbeed72 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/predicates.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/predicates.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -16,7 +16,7 @@ func (p BatchAccountOperationPredicate) Matches(input BatchAccount) bool { return false } - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + if p.Location != nil && *p.Location != input.Location { return false } diff --git a/resource-manager/batch/2024-07-01/batchaccount/version.go b/resource-manager/batch/2024-07-01/batchaccounts/version.go similarity index 73% rename from resource-manager/batch/2024-07-01/batchaccount/version.go rename to resource-manager/batch/2024-07-01/batchaccounts/version.go index a7371e21dd6..a2273707f02 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/version.go +++ b/resource-manager/batch/2024-07-01/batchaccounts/version.go @@ -1,4 +1,4 @@ -package batchaccount +package batchaccounts // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package batchaccount const defaultApiVersion = "2024-07-01" func userAgent() string { - return "hashicorp/go-azure-sdk/batchaccount/2024-07-01" + return "hashicorp/go-azure-sdk/batchaccounts/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/README.md b/resource-manager/batch/2024-07-01/batchmanagements/README.md deleted file mode 100644 index 32556253871..00000000000 --- a/resource-manager/batch/2024-07-01/batchmanagements/README.md +++ /dev/null @@ -1,74 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchmanagements` Documentation - -The `batchmanagements` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/batchmanagements" -``` - - -### Client Initialization - -```go -client := batchmanagements.NewBatchManagementsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BatchManagementsClient.BatchAccountGetDetector` - -```go -ctx := context.TODO() -id := batchmanagements.NewDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "detectorId") - -read, err := client.BatchAccountGetDetector(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BatchManagementsClient.BatchAccountListDetectors` - -```go -ctx := context.TODO() -id := batchmanagements.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -// alternatively `client.BatchAccountListDetectors(ctx, id)` can be used to do batched pagination -items, err := client.BatchAccountListDetectorsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BatchManagementsClient.LocationCheckNameAvailability` - -```go -ctx := context.TODO() -id := batchmanagements.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") - -payload := batchmanagements.CheckNameAvailabilityParameters{ - // ... -} - - -read, err := client.LocationCheckNameAvailability(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/batch/2024-07-01/batchmanagements/client.go b/resource-manager/batch/2024-07-01/batchmanagements/client.go deleted file mode 100644 index f6073366437..00000000000 --- a/resource-manager/batch/2024-07-01/batchmanagements/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package batchmanagements - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 BatchManagementsClient struct { - Client *resourcemanager.Client -} - -func NewBatchManagementsClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchManagementsClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "batchmanagements", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating BatchManagementsClient: %+v", err) - } - - return &BatchManagementsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/batch/2024-07-01/batchmanagements/id_location.go b/resource-manager/batch/2024-07-01/batchmanagements/id_location.go deleted file mode 100644 index 5f71173e1da..00000000000 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_location.go +++ /dev/null @@ -1,121 +0,0 @@ -package batchmanagements - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LocationId{}) -} - -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) - } - - id := LocationId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - 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) - } - - id := LocationId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.LocationName, ok = input.Parsed["locationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) - } - - return 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.Batch/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("staticMicrosoftBatch", "Microsoft.Batch", "Microsoft.Batch"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationName"), - } -} - -// 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/batch/2024-07-01/batchmanagements/id_location_test.go b/resource-manager/batch/2024-07-01/batchmanagements/id_location_test.go deleted file mode 100644 index 26b15bcaf79..00000000000 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package batchmanagements - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (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", "locationName") - - if id.SubscriptionId != "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 != "locationName" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationName") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Batch/locations/locationName" - 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.Batch", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Batch/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Batch/locations/locationName", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Batch/locations/locationName/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.Batch", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.bAtCh", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Batch/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.bAtCh/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Batch/locations/locationName", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Batch/locations/locationName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.bAtCh/lOcAtIoNs/lOcAtIoNnAmE", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.bAtCh/lOcAtIoNs/lOcAtIoNnAmE/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/batch/2024-07-01/certificate/README.md b/resource-manager/batch/2024-07-01/certificate/README.md deleted file mode 100644 index 1516a1744b0..00000000000 --- a/resource-manager/batch/2024-07-01/certificate/README.md +++ /dev/null @@ -1,123 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/certificate` Documentation - -The `certificate` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/certificate" -``` - - -### Client Initialization - -```go -client := certificate.NewCertificateClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CertificateClient.CancelDeletion` - -```go -ctx := context.TODO() -id := certificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") - -read, err := client.CancelDeletion(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `CertificateClient.Create` - -```go -ctx := context.TODO() -id := certificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") - -payload := certificate.CertificateCreateOrUpdateParameters{ - // ... -} - - -read, err := client.Create(ctx, id, payload, certificate.DefaultCreateOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `CertificateClient.Delete` - -```go -ctx := context.TODO() -id := certificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `CertificateClient.Get` - -```go -ctx := context.TODO() -id := certificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") - -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: `CertificateClient.ListByBatchAccount` - -```go -ctx := context.TODO() -id := certificate.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -// alternatively `client.ListByBatchAccount(ctx, id, certificate.DefaultListByBatchAccountOperationOptions())` can be used to do batched pagination -items, err := client.ListByBatchAccountComplete(ctx, id, certificate.DefaultListByBatchAccountOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `CertificateClient.Update` - -```go -ctx := context.TODO() -id := certificate.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") - -payload := certificate.CertificateCreateOrUpdateParameters{ - // ... -} - - -read, err := client.Update(ctx, id, payload, certificate.DefaultUpdateOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/batch/2024-07-01/certificate/client.go b/resource-manager/batch/2024-07-01/certificate/client.go deleted file mode 100644 index 723362e2b0f..00000000000 --- a/resource-manager/batch/2024-07-01/certificate/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package certificate - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 CertificateClient struct { - Client *resourcemanager.Client -} - -func NewCertificateClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificateClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "certificate", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CertificateClient: %+v", err) - } - - return &CertificateClient{ - Client: client, - }, nil -} diff --git a/resource-manager/batch/2024-07-01/certificates/README.md b/resource-manager/batch/2024-07-01/certificates/README.md new file mode 100644 index 00000000000..c96e1402bfb --- /dev/null +++ b/resource-manager/batch/2024-07-01/certificates/README.md @@ -0,0 +1,123 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/certificates` Documentation + +The `certificates` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/certificates" +``` + + +### Client Initialization + +```go +client := certificates.NewCertificatesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `CertificatesClient.CertificateCancelDeletion` + +```go +ctx := context.TODO() +id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") + +read, err := client.CertificateCancelDeletion(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `CertificatesClient.CertificateCreate` + +```go +ctx := context.TODO() +id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") + +payload := certificates.CertificateCreateOrUpdateParameters{ + // ... +} + + +read, err := client.CertificateCreate(ctx, id, payload, certificates.DefaultCertificateCreateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `CertificatesClient.CertificateDelete` + +```go +ctx := context.TODO() +id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") + +if err := client.CertificateDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `CertificatesClient.CertificateGet` + +```go +ctx := context.TODO() +id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") + +read, err := client.CertificateGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `CertificatesClient.CertificateListByBatchAccount` + +```go +ctx := context.TODO() +id := certificates.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +// alternatively `client.CertificateListByBatchAccount(ctx, id, certificates.DefaultCertificateListByBatchAccountOperationOptions())` can be used to do batched pagination +items, err := client.CertificateListByBatchAccountComplete(ctx, id, certificates.DefaultCertificateListByBatchAccountOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `CertificatesClient.CertificateUpdate` + +```go +ctx := context.TODO() +id := certificates.NewCertificateID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "certificateName") + +payload := certificates.CertificateCreateOrUpdateParameters{ + // ... +} + + +read, err := client.CertificateUpdate(ctx, id, payload, certificates.DefaultCertificateUpdateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/batch/2024-07-01/batchaccount/client.go b/resource-manager/batch/2024-07-01/certificates/client.go similarity index 58% rename from resource-manager/batch/2024-07-01/batchaccount/client.go rename to resource-manager/batch/2024-07-01/certificates/client.go index 2779ef55d04..f045f1b9265 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/client.go +++ b/resource-manager/batch/2024-07-01/certificates/client.go @@ -1,4 +1,4 @@ -package batchaccount +package certificates import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BatchAccountClient struct { +type CertificatesClient struct { Client *resourcemanager.Client } -func NewBatchAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*BatchAccountClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "batchaccount", defaultApiVersion) +func NewCertificatesClientWithBaseURI(sdkApi sdkEnv.Api) (*CertificatesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "certificates", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating BatchAccountClient: %+v", err) + return nil, fmt.Errorf("instantiating CertificatesClient: %+v", err) } - return &BatchAccountClient{ + return &CertificatesClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/certificate/constants.go b/resource-manager/batch/2024-07-01/certificates/constants.go similarity index 99% rename from resource-manager/batch/2024-07-01/certificate/constants.go rename to resource-manager/batch/2024-07-01/certificates/constants.go index d92e157ed61..7db71ac2f4d 100644 --- a/resource-manager/batch/2024-07-01/certificate/constants.go +++ b/resource-manager/batch/2024-07-01/certificates/constants.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "encoding/json" diff --git a/resource-manager/batch/2024-07-01/certificate/id_batchaccount.go b/resource-manager/batch/2024-07-01/certificates/id_batchaccount.go similarity index 99% rename from resource-manager/batch/2024-07-01/certificate/id_batchaccount.go rename to resource-manager/batch/2024-07-01/certificates/id_batchaccount.go index 4acb2c09d7a..8c182f43af8 100644 --- a/resource-manager/batch/2024-07-01/certificate/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/certificates/id_batchaccount.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/batchaccount/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/certificates/id_batchaccount_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/batchaccount/id_batchaccount_test.go rename to resource-manager/batch/2024-07-01/certificates/id_batchaccount_test.go index e279a3b5cbf..1ef1e159442 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/id_batchaccount_test.go +++ b/resource-manager/batch/2024-07-01/certificates/id_batchaccount_test.go @@ -1,4 +1,4 @@ -package batchaccount +package certificates import ( "testing" diff --git a/resource-manager/batch/2024-07-01/certificate/id_certificate.go b/resource-manager/batch/2024-07-01/certificates/id_certificate.go similarity index 99% rename from resource-manager/batch/2024-07-01/certificate/id_certificate.go rename to resource-manager/batch/2024-07-01/certificates/id_certificate.go index 8c16320b58b..dc0d40bd044 100644 --- a/resource-manager/batch/2024-07-01/certificate/id_certificate.go +++ b/resource-manager/batch/2024-07-01/certificates/id_certificate.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/certificate/id_certificate_test.go b/resource-manager/batch/2024-07-01/certificates/id_certificate_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/certificate/id_certificate_test.go rename to resource-manager/batch/2024-07-01/certificates/id_certificate_test.go index 60f6258d46a..905c07d4c3b 100644 --- a/resource-manager/batch/2024-07-01/certificate/id_certificate_test.go +++ b/resource-manager/batch/2024-07-01/certificates/id_certificate_test.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "testing" diff --git a/resource-manager/batch/2024-07-01/certificate/method_canceldeletion.go b/resource-manager/batch/2024-07-01/certificates/method_certificatecanceldeletion.go similarity index 78% rename from resource-manager/batch/2024-07-01/certificate/method_canceldeletion.go rename to resource-manager/batch/2024-07-01/certificates/method_certificatecanceldeletion.go index 4c70006b21d..4531dfbf72f 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_canceldeletion.go +++ b/resource-manager/batch/2024-07-01/certificates/method_certificatecanceldeletion.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type CancelDeletionOperationResponse struct { +type CertificateCancelDeletionOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Certificate } -// CancelDeletion ... -func (c CertificateClient) CancelDeletion(ctx context.Context, id CertificateId) (result CancelDeletionOperationResponse, err error) { +// CertificateCancelDeletion ... +func (c CertificatesClient) CertificateCancelDeletion(ctx context.Context, id CertificateId) (result CertificateCancelDeletionOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/certificate/method_create.go b/resource-manager/batch/2024-07-01/certificates/method_certificatecreate.go similarity index 65% rename from resource-manager/batch/2024-07-01/certificate/method_create.go rename to resource-manager/batch/2024-07-01/certificates/method_certificatecreate.go index b9da5041801..a827b8b4c7b 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_create.go +++ b/resource-manager/batch/2024-07-01/certificates/method_certificatecreate.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "context" @@ -12,22 +12,22 @@ import ( // 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 { +type CertificateCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Certificate } -type CreateOperationOptions struct { +type CertificateCreateOperationOptions struct { IfMatch *string IfNoneMatch *string } -func DefaultCreateOperationOptions() CreateOperationOptions { - return CreateOperationOptions{} +func DefaultCertificateCreateOperationOptions() CertificateCreateOperationOptions { + return CertificateCreateOperationOptions{} } -func (o CreateOperationOptions) ToHeaders() *client.Headers { +func (o CertificateCreateOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} if o.IfMatch != nil { out.Append("If-Match", fmt.Sprintf("%v", *o.IfMatch)) @@ -38,20 +38,20 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { return &out } -func (o CreateOperationOptions) ToOData() *odata.Query { +func (o CertificateCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o CreateOperationOptions) ToQuery() *client.QueryParams { +func (o CertificateCreateOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} return &out } -// Create ... -func (c CertificateClient) Create(ctx context.Context, id CertificateId, input CertificateCreateOrUpdateParameters, options CreateOperationOptions) (result CreateOperationResponse, err error) { +// CertificateCreate ... +func (c CertificatesClient) CertificateCreate(ctx context.Context, id CertificateId, input CertificateCreateOrUpdateParameters, options CertificateCreateOperationOptions) (result CertificateCreateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/pool/method_delete.go b/resource-manager/batch/2024-07-01/certificates/method_certificatedelete.go similarity index 66% rename from resource-manager/batch/2024-07-01/pool/method_delete.go rename to resource-manager/batch/2024-07-01/certificates/method_certificatedelete.go index 3dbc00e7780..28c4151ab13 100644 --- a/resource-manager/batch/2024-07-01/pool/method_delete.go +++ b/resource-manager/batch/2024-07-01/certificates/method_certificatedelete.go @@ -1,4 +1,4 @@ -package pool +package certificates import ( "context" @@ -14,14 +14,14 @@ import ( // 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 { +type CertificateDeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// Delete ... -func (c PoolClient) Delete(ctx context.Context, id PoolId) (result DeleteOperationResponse, err error) { +// CertificateDelete ... +func (c CertificatesClient) CertificateDelete(ctx context.Context, id CertificateId) (result CertificateDeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -56,15 +56,15 @@ func (c PoolClient) Delete(ctx context.Context, id PoolId) (result DeleteOperati return } -// DeleteThenPoll performs Delete then polls until it's completed -func (c PoolClient) DeleteThenPoll(ctx context.Context, id PoolId) error { - result, err := c.Delete(ctx, id) +// CertificateDeleteThenPoll performs CertificateDelete then polls until it's completed +func (c CertificatesClient) CertificateDeleteThenPoll(ctx context.Context, id CertificateId) error { + result, err := c.CertificateDelete(ctx, id) if err != nil { - return fmt.Errorf("performing Delete: %+v", err) + return fmt.Errorf("performing CertificateDelete: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) + return fmt.Errorf("polling after CertificateDelete: %+v", err) } return nil diff --git a/resource-manager/batch/2024-07-01/certificate/method_get.go b/resource-manager/batch/2024-07-01/certificates/method_certificateget.go similarity index 80% rename from resource-manager/batch/2024-07-01/certificate/method_get.go rename to resource-manager/batch/2024-07-01/certificates/method_certificateget.go index 297ae687e21..3e018acbe7d 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_get.go +++ b/resource-manager/batch/2024-07-01/certificates/method_certificateget.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type CertificateGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Certificate } -// Get ... -func (c CertificateClient) Get(ctx context.Context, id CertificateId) (result GetOperationResponse, err error) { +// CertificateGet ... +func (c CertificatesClient) CertificateGet(ctx context.Context, id CertificateId) (result CertificateGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/certificate/method_listbybatchaccount.go b/resource-manager/batch/2024-07-01/certificates/method_certificatelistbybatchaccount.go similarity index 50% rename from resource-manager/batch/2024-07-01/certificate/method_listbybatchaccount.go rename to resource-manager/batch/2024-07-01/certificates/method_certificatelistbybatchaccount.go index 9095d225ecc..e4230cc6df7 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-07-01/certificates/method_certificatelistbybatchaccount.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "context" @@ -12,40 +12,40 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListByBatchAccountOperationResponse struct { +type CertificateListByBatchAccountOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Certificate } -type ListByBatchAccountCompleteResult struct { +type CertificateListByBatchAccountCompleteResult struct { LatestHttpResponse *http.Response Items []Certificate } -type ListByBatchAccountOperationOptions struct { +type CertificateListByBatchAccountOperationOptions struct { Filter *string Maxresults *int64 Select *string } -func DefaultListByBatchAccountOperationOptions() ListByBatchAccountOperationOptions { - return ListByBatchAccountOperationOptions{} +func DefaultCertificateListByBatchAccountOperationOptions() CertificateListByBatchAccountOperationOptions { + return CertificateListByBatchAccountOperationOptions{} } -func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { +func (o CertificateListByBatchAccountOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} return &out } -func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { +func (o CertificateListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o ListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { +func (o CertificateListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} if o.Filter != nil { out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) @@ -59,11 +59,11 @@ func (o ListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { return &out } -type ListByBatchAccountCustomPager struct { +type CertificateListByBatchAccountCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByBatchAccountCustomPager) NextPageLink() *odata.Link { +func (p *CertificateListByBatchAccountCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -71,8 +71,8 @@ func (p *ListByBatchAccountCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByBatchAccount ... -func (c CertificateClient) ListByBatchAccount(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions) (result ListByBatchAccountOperationResponse, err error) { +// CertificateListByBatchAccount ... +func (c CertificatesClient) CertificateListByBatchAccount(ctx context.Context, id BatchAccountId, options CertificateListByBatchAccountOperationOptions) (result CertificateListByBatchAccountOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -80,7 +80,7 @@ func (c CertificateClient) ListByBatchAccount(ctx context.Context, id BatchAccou }, HttpMethod: http.MethodGet, OptionsObject: options, - Pager: &ListByBatchAccountCustomPager{}, + Pager: &CertificateListByBatchAccountCustomPager{}, Path: fmt.Sprintf("%s/certificates", id.ID()), } @@ -111,16 +111,16 @@ func (c CertificateClient) ListByBatchAccount(ctx context.Context, id BatchAccou return } -// ListByBatchAccountComplete retrieves all the results into a single object -func (c CertificateClient) ListByBatchAccountComplete(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions) (ListByBatchAccountCompleteResult, error) { - return c.ListByBatchAccountCompleteMatchingPredicate(ctx, id, options, CertificateOperationPredicate{}) +// CertificateListByBatchAccountComplete retrieves all the results into a single object +func (c CertificatesClient) CertificateListByBatchAccountComplete(ctx context.Context, id BatchAccountId, options CertificateListByBatchAccountOperationOptions) (CertificateListByBatchAccountCompleteResult, error) { + return c.CertificateListByBatchAccountCompleteMatchingPredicate(ctx, id, options, CertificateOperationPredicate{}) } -// ListByBatchAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CertificateClient) ListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions, predicate CertificateOperationPredicate) (result ListByBatchAccountCompleteResult, err error) { +// CertificateListByBatchAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c CertificatesClient) CertificateListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options CertificateListByBatchAccountOperationOptions, predicate CertificateOperationPredicate) (result CertificateListByBatchAccountCompleteResult, err error) { items := make([]Certificate, 0) - resp, err := c.ListByBatchAccount(ctx, id, options) + resp, err := c.CertificateListByBatchAccount(ctx, id, options) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -134,7 +134,7 @@ func (c CertificateClient) ListByBatchAccountCompleteMatchingPredicate(ctx conte } } - result = ListByBatchAccountCompleteResult{ + result = CertificateListByBatchAccountCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/batch/2024-07-01/certificate/method_update.go b/resource-manager/batch/2024-07-01/certificates/method_certificateupdate.go similarity index 63% rename from resource-manager/batch/2024-07-01/certificate/method_update.go rename to resource-manager/batch/2024-07-01/certificates/method_certificateupdate.go index d46adfe7c60..703a73fbfff 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_update.go +++ b/resource-manager/batch/2024-07-01/certificates/method_certificateupdate.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "context" @@ -12,21 +12,21 @@ import ( // 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 { +type CertificateUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Certificate } -type UpdateOperationOptions struct { +type CertificateUpdateOperationOptions struct { IfMatch *string } -func DefaultUpdateOperationOptions() UpdateOperationOptions { - return UpdateOperationOptions{} +func DefaultCertificateUpdateOperationOptions() CertificateUpdateOperationOptions { + return CertificateUpdateOperationOptions{} } -func (o UpdateOperationOptions) ToHeaders() *client.Headers { +func (o CertificateUpdateOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} if o.IfMatch != nil { out.Append("If-Match", fmt.Sprintf("%v", *o.IfMatch)) @@ -34,20 +34,20 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { return &out } -func (o UpdateOperationOptions) ToOData() *odata.Query { +func (o CertificateUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o UpdateOperationOptions) ToQuery() *client.QueryParams { +func (o CertificateUpdateOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} return &out } -// Update ... -func (c CertificateClient) Update(ctx context.Context, id CertificateId, input CertificateCreateOrUpdateParameters, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { +// CertificateUpdate ... +func (c CertificatesClient) CertificateUpdate(ctx context.Context, id CertificateId, input CertificateCreateOrUpdateParameters, options CertificateUpdateOperationOptions) (result CertificateUpdateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/certificate/model_certificate.go b/resource-manager/batch/2024-07-01/certificates/model_certificate.go similarity index 76% rename from resource-manager/batch/2024-07-01/certificate/model_certificate.go rename to resource-manager/batch/2024-07-01/certificates/model_certificate.go index ee1f31291b2..849d20d18a9 100644 --- a/resource-manager/batch/2024-07-01/certificate/model_certificate.go +++ b/resource-manager/batch/2024-07-01/certificates/model_certificate.go @@ -1,4 +1,8 @@ -package certificate +package certificates + +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. @@ -8,6 +12,7 @@ type Certificate struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *CertificateProperties `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/batch/2024-07-01/certificate/model_certificatecreateorupdateparameters.go b/resource-manager/batch/2024-07-01/certificates/model_certificatecreateorupdateparameters.go similarity index 96% rename from resource-manager/batch/2024-07-01/certificate/model_certificatecreateorupdateparameters.go rename to resource-manager/batch/2024-07-01/certificates/model_certificatecreateorupdateparameters.go index 3411f6bc34e..7d566573573 100644 --- a/resource-manager/batch/2024-07-01/certificate/model_certificatecreateorupdateparameters.go +++ b/resource-manager/batch/2024-07-01/certificates/model_certificatecreateorupdateparameters.go @@ -1,4 +1,4 @@ -package certificate +package certificates // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/certificate/model_certificatecreateorupdateproperties.go b/resource-manager/batch/2024-07-01/certificates/model_certificatecreateorupdateproperties.go similarity index 96% rename from resource-manager/batch/2024-07-01/certificate/model_certificatecreateorupdateproperties.go rename to resource-manager/batch/2024-07-01/certificates/model_certificatecreateorupdateproperties.go index 5af96095ec4..1047f6a3fc2 100644 --- a/resource-manager/batch/2024-07-01/certificate/model_certificatecreateorupdateproperties.go +++ b/resource-manager/batch/2024-07-01/certificates/model_certificatecreateorupdateproperties.go @@ -1,4 +1,4 @@ -package certificate +package certificates // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/certificate/model_certificateproperties.go b/resource-manager/batch/2024-07-01/certificates/model_certificateproperties.go similarity index 99% rename from resource-manager/batch/2024-07-01/certificate/model_certificateproperties.go rename to resource-manager/batch/2024-07-01/certificates/model_certificateproperties.go index 01b0c5dc127..eaecbfccb50 100644 --- a/resource-manager/batch/2024-07-01/certificate/model_certificateproperties.go +++ b/resource-manager/batch/2024-07-01/certificates/model_certificateproperties.go @@ -1,4 +1,4 @@ -package certificate +package certificates import ( "time" diff --git a/resource-manager/batch/2024-07-01/certificate/model_deletecertificateerror.go b/resource-manager/batch/2024-07-01/certificates/model_deletecertificateerror.go similarity index 95% rename from resource-manager/batch/2024-07-01/certificate/model_deletecertificateerror.go rename to resource-manager/batch/2024-07-01/certificates/model_deletecertificateerror.go index 1e12424fff4..e4ff3ea0c51 100644 --- a/resource-manager/batch/2024-07-01/certificate/model_deletecertificateerror.go +++ b/resource-manager/batch/2024-07-01/certificates/model_deletecertificateerror.go @@ -1,4 +1,4 @@ -package certificate +package certificates // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/certificate/predicates.go b/resource-manager/batch/2024-07-01/certificates/predicates.go similarity index 97% rename from resource-manager/batch/2024-07-01/certificate/predicates.go rename to resource-manager/batch/2024-07-01/certificates/predicates.go index e1663bf2b07..a58b89e3a36 100644 --- a/resource-manager/batch/2024-07-01/certificate/predicates.go +++ b/resource-manager/batch/2024-07-01/certificates/predicates.go @@ -1,4 +1,4 @@ -package certificate +package certificates // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/certificate/version.go b/resource-manager/batch/2024-07-01/certificates/version.go similarity index 74% rename from resource-manager/batch/2024-07-01/certificate/version.go rename to resource-manager/batch/2024-07-01/certificates/version.go index 6344cfd3246..06ddbfc24c3 100644 --- a/resource-manager/batch/2024-07-01/certificate/version.go +++ b/resource-manager/batch/2024-07-01/certificates/version.go @@ -1,4 +1,4 @@ -package certificate +package certificates // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package certificate const defaultApiVersion = "2024-07-01" func userAgent() string { - return "hashicorp/go-azure-sdk/certificate/2024-07-01" + return "hashicorp/go-azure-sdk/certificates/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/client.go b/resource-manager/batch/2024-07-01/client.go index 1c096fdf486..f57e63f112b 100644 --- a/resource-manager/batch/2024-07-01/client.go +++ b/resource-manager/batch/2024-07-01/client.go @@ -6,104 +6,104 @@ package v2024_07_01 import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/application" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/applicationpackage" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchaccount" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchmanagements" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/certificate" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/location" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/networksecurityperimeter" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/pool" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privateendpointconnection" - "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privatelinkresource" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/applicationpackages" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/applications" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/batchaccounts" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/certificates" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/detectorresponses" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/openapis" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/pools" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privateendpointconnections" + "github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privatelinkresources" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" ) type Client struct { - Application *application.ApplicationClient - ApplicationPackage *applicationpackage.ApplicationPackageClient - BatchAccount *batchaccount.BatchAccountClient - BatchManagements *batchmanagements.BatchManagementsClient - Certificate *certificate.CertificateClient - Location *location.LocationClient - NetworkSecurityPerimeter *networksecurityperimeter.NetworkSecurityPerimeterClient - Pool *pool.PoolClient - PrivateEndpointConnection *privateendpointconnection.PrivateEndpointConnectionClient - PrivateLinkResource *privatelinkresource.PrivateLinkResourceClient + ApplicationPackages *applicationpackages.ApplicationPackagesClient + Applications *applications.ApplicationsClient + BatchAccounts *batchaccounts.BatchAccountsClient + Certificates *certificates.CertificatesClient + DetectorResponses *detectorresponses.DetectorResponsesClient + NetworkSecurityPerimeterConfigurations *networksecurityperimeterconfigurations.NetworkSecurityPerimeterConfigurationsClient + Openapis *openapis.OpenapisClient + Pools *pools.PoolsClient + PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient + PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient } func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - applicationClient, err := application.NewApplicationClientWithBaseURI(sdkApi) + applicationPackagesClient, err := applicationpackages.NewApplicationPackagesClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building Application client: %+v", err) + return nil, fmt.Errorf("building ApplicationPackages client: %+v", err) } - configureFunc(applicationClient.Client) + configureFunc(applicationPackagesClient.Client) - applicationPackageClient, err := applicationpackage.NewApplicationPackageClientWithBaseURI(sdkApi) + applicationsClient, err := applications.NewApplicationsClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building ApplicationPackage client: %+v", err) + return nil, fmt.Errorf("building Applications client: %+v", err) } - configureFunc(applicationPackageClient.Client) + configureFunc(applicationsClient.Client) - batchAccountClient, err := batchaccount.NewBatchAccountClientWithBaseURI(sdkApi) + batchAccountsClient, err := batchaccounts.NewBatchAccountsClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building BatchAccount client: %+v", err) + return nil, fmt.Errorf("building BatchAccounts client: %+v", err) } - configureFunc(batchAccountClient.Client) + configureFunc(batchAccountsClient.Client) - batchManagementsClient, err := batchmanagements.NewBatchManagementsClientWithBaseURI(sdkApi) + certificatesClient, err := certificates.NewCertificatesClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building BatchManagements client: %+v", err) + return nil, fmt.Errorf("building Certificates client: %+v", err) } - configureFunc(batchManagementsClient.Client) + configureFunc(certificatesClient.Client) - certificateClient, err := certificate.NewCertificateClientWithBaseURI(sdkApi) + detectorResponsesClient, err := detectorresponses.NewDetectorResponsesClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building Certificate client: %+v", err) + return nil, fmt.Errorf("building DetectorResponses client: %+v", err) } - configureFunc(certificateClient.Client) + configureFunc(detectorResponsesClient.Client) - locationClient, err := location.NewLocationClientWithBaseURI(sdkApi) + networkSecurityPerimeterConfigurationsClient, err := networksecurityperimeterconfigurations.NewNetworkSecurityPerimeterConfigurationsClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building Location client: %+v", err) + return nil, fmt.Errorf("building NetworkSecurityPerimeterConfigurations client: %+v", err) } - configureFunc(locationClient.Client) + configureFunc(networkSecurityPerimeterConfigurationsClient.Client) - networkSecurityPerimeterClient, err := networksecurityperimeter.NewNetworkSecurityPerimeterClientWithBaseURI(sdkApi) + openapisClient, err := openapis.NewOpenapisClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building NetworkSecurityPerimeter client: %+v", err) + return nil, fmt.Errorf("building Openapis client: %+v", err) } - configureFunc(networkSecurityPerimeterClient.Client) + configureFunc(openapisClient.Client) - poolClient, err := pool.NewPoolClientWithBaseURI(sdkApi) + poolsClient, err := pools.NewPoolsClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building Pool client: %+v", err) + return nil, fmt.Errorf("building Pools client: %+v", err) } - configureFunc(poolClient.Client) + configureFunc(poolsClient.Client) - privateEndpointConnectionClient, err := privateendpointconnection.NewPrivateEndpointConnectionClientWithBaseURI(sdkApi) + privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building PrivateEndpointConnection client: %+v", err) + return nil, fmt.Errorf("building PrivateEndpointConnections client: %+v", err) } - configureFunc(privateEndpointConnectionClient.Client) + configureFunc(privateEndpointConnectionsClient.Client) - privateLinkResourceClient, err := privatelinkresource.NewPrivateLinkResourceClientWithBaseURI(sdkApi) + privateLinkResourcesClient, err := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building PrivateLinkResource client: %+v", err) + return nil, fmt.Errorf("building PrivateLinkResources client: %+v", err) } - configureFunc(privateLinkResourceClient.Client) + configureFunc(privateLinkResourcesClient.Client) return &Client{ - Application: applicationClient, - ApplicationPackage: applicationPackageClient, - BatchAccount: batchAccountClient, - BatchManagements: batchManagementsClient, - Certificate: certificateClient, - Location: locationClient, - NetworkSecurityPerimeter: networkSecurityPerimeterClient, - Pool: poolClient, - PrivateEndpointConnection: privateEndpointConnectionClient, - PrivateLinkResource: privateLinkResourceClient, + ApplicationPackages: applicationPackagesClient, + Applications: applicationsClient, + BatchAccounts: batchAccountsClient, + Certificates: certificatesClient, + DetectorResponses: detectorResponsesClient, + NetworkSecurityPerimeterConfigurations: networkSecurityPerimeterConfigurationsClient, + Openapis: openapisClient, + Pools: poolsClient, + PrivateEndpointConnections: privateEndpointConnectionsClient, + PrivateLinkResources: privateLinkResourcesClient, }, nil } diff --git a/resource-manager/batch/2024-07-01/detectorresponses/README.md b/resource-manager/batch/2024-07-01/detectorresponses/README.md new file mode 100644 index 00000000000..fd081868674 --- /dev/null +++ b/resource-manager/batch/2024-07-01/detectorresponses/README.md @@ -0,0 +1,53 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/detectorresponses` Documentation + +The `detectorresponses` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/detectorresponses" +``` + + +### Client Initialization + +```go +client := detectorresponses.NewDetectorResponsesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `DetectorResponsesClient.BatchAccountGetDetector` + +```go +ctx := context.TODO() +id := detectorresponses.NewDetectorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "detectorId") + +read, err := client.BatchAccountGetDetector(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `DetectorResponsesClient.BatchAccountListDetectors` + +```go +ctx := context.TODO() +id := detectorresponses.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +// alternatively `client.BatchAccountListDetectors(ctx, id)` can be used to do batched pagination +items, err := client.BatchAccountListDetectorsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/batch/2024-07-01/application/client.go b/resource-manager/batch/2024-07-01/detectorresponses/client.go similarity index 51% rename from resource-manager/batch/2024-07-01/application/client.go rename to resource-manager/batch/2024-07-01/detectorresponses/client.go index 552cea9994d..763dd6ee46d 100644 --- a/resource-manager/batch/2024-07-01/application/client.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/client.go @@ -1,4 +1,4 @@ -package application +package detectorresponses import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ApplicationClient struct { +type DetectorResponsesClient struct { Client *resourcemanager.Client } -func NewApplicationClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "application", defaultApiVersion) +func NewDetectorResponsesClientWithBaseURI(sdkApi sdkEnv.Api) (*DetectorResponsesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "detectorresponses", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating ApplicationClient: %+v", err) + return nil, fmt.Errorf("instantiating DetectorResponsesClient: %+v", err) } - return &ApplicationClient{ + return &DetectorResponsesClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount.go b/resource-manager/batch/2024-07-01/detectorresponses/id_batchaccount.go similarity index 99% rename from resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount.go rename to resource-manager/batch/2024-07-01/detectorresponses/id_batchaccount.go index 990b7377b69..246c68ac7f0 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/id_batchaccount.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/detectorresponses/id_batchaccount_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount_test.go rename to resource-manager/batch/2024-07-01/detectorresponses/id_batchaccount_test.go index dc5efb236d7..043f72db9d5 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_batchaccount_test.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/id_batchaccount_test.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses import ( "testing" diff --git a/resource-manager/batch/2024-07-01/batchmanagements/id_detector.go b/resource-manager/batch/2024-07-01/detectorresponses/id_detector.go similarity index 99% rename from resource-manager/batch/2024-07-01/batchmanagements/id_detector.go rename to resource-manager/batch/2024-07-01/detectorresponses/id_detector.go index 19b75f4839b..b13ca14a1d9 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_detector.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/id_detector.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/batchmanagements/id_detector_test.go b/resource-manager/batch/2024-07-01/detectorresponses/id_detector_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/batchmanagements/id_detector_test.go rename to resource-manager/batch/2024-07-01/detectorresponses/id_detector_test.go index b7e87bab0f3..354b516d799 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/id_detector_test.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/id_detector_test.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses import ( "testing" diff --git a/resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountgetdetector.go b/resource-manager/batch/2024-07-01/detectorresponses/method_batchaccountgetdetector.go similarity index 85% rename from resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountgetdetector.go rename to resource-manager/batch/2024-07-01/detectorresponses/method_batchaccountgetdetector.go index db44b1e56ed..93c69ab79dc 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountgetdetector.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/method_batchaccountgetdetector.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses import ( "context" @@ -18,7 +18,7 @@ type BatchAccountGetDetectorOperationResponse struct { } // BatchAccountGetDetector ... -func (c BatchManagementsClient) BatchAccountGetDetector(ctx context.Context, id DetectorId) (result BatchAccountGetDetectorOperationResponse, err error) { +func (c DetectorResponsesClient) BatchAccountGetDetector(ctx context.Context, id DetectorId) (result BatchAccountGetDetectorOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountlistdetectors.go b/resource-manager/batch/2024-07-01/detectorresponses/method_batchaccountlistdetectors.go similarity index 80% rename from resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountlistdetectors.go rename to resource-manager/batch/2024-07-01/detectorresponses/method_batchaccountlistdetectors.go index fc4fca4848a..856cb488587 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/method_batchaccountlistdetectors.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/method_batchaccountlistdetectors.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses import ( "context" @@ -36,7 +36,7 @@ func (p *BatchAccountListDetectorsCustomPager) NextPageLink() *odata.Link { } // BatchAccountListDetectors ... -func (c BatchManagementsClient) BatchAccountListDetectors(ctx context.Context, id BatchAccountId) (result BatchAccountListDetectorsOperationResponse, err error) { +func (c DetectorResponsesClient) BatchAccountListDetectors(ctx context.Context, id BatchAccountId) (result BatchAccountListDetectorsOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -75,12 +75,12 @@ func (c BatchManagementsClient) BatchAccountListDetectors(ctx context.Context, i } // BatchAccountListDetectorsComplete retrieves all the results into a single object -func (c BatchManagementsClient) BatchAccountListDetectorsComplete(ctx context.Context, id BatchAccountId) (BatchAccountListDetectorsCompleteResult, error) { +func (c DetectorResponsesClient) BatchAccountListDetectorsComplete(ctx context.Context, id BatchAccountId) (BatchAccountListDetectorsCompleteResult, error) { return c.BatchAccountListDetectorsCompleteMatchingPredicate(ctx, id, DetectorResponseOperationPredicate{}) } // BatchAccountListDetectorsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BatchManagementsClient) BatchAccountListDetectorsCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, predicate DetectorResponseOperationPredicate) (result BatchAccountListDetectorsCompleteResult, err error) { +func (c DetectorResponsesClient) BatchAccountListDetectorsCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, predicate DetectorResponseOperationPredicate) (result BatchAccountListDetectorsCompleteResult, err error) { items := make([]DetectorResponse, 0) resp, err := c.BatchAccountListDetectors(ctx, id) diff --git a/resource-manager/batch/2024-07-01/batchmanagements/model_detectorresponse.go b/resource-manager/batch/2024-07-01/detectorresponses/model_detectorresponse.go similarity index 76% rename from resource-manager/batch/2024-07-01/batchmanagements/model_detectorresponse.go rename to resource-manager/batch/2024-07-01/detectorresponses/model_detectorresponse.go index 844058ad02f..7823185c7b1 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/model_detectorresponse.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/model_detectorresponse.go @@ -1,4 +1,8 @@ -package batchmanagements +package detectorresponses + +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. @@ -8,6 +12,7 @@ type DetectorResponse struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *DetectorResponseProperties `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/batch/2024-07-01/batchmanagements/model_detectorresponseproperties.go b/resource-manager/batch/2024-07-01/detectorresponses/model_detectorresponseproperties.go similarity index 90% rename from resource-manager/batch/2024-07-01/batchmanagements/model_detectorresponseproperties.go rename to resource-manager/batch/2024-07-01/detectorresponses/model_detectorresponseproperties.go index 55bb4c0284f..f0fd2faa640 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/model_detectorresponseproperties.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/model_detectorresponseproperties.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchmanagements/predicates.go b/resource-manager/batch/2024-07-01/detectorresponses/predicates.go similarity index 96% rename from resource-manager/batch/2024-07-01/batchmanagements/predicates.go rename to resource-manager/batch/2024-07-01/detectorresponses/predicates.go index a38aabd4183..e1d57e6c9d2 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/predicates.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/predicates.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchmanagements/version.go b/resource-manager/batch/2024-07-01/detectorresponses/version.go similarity index 71% rename from resource-manager/batch/2024-07-01/batchmanagements/version.go rename to resource-manager/batch/2024-07-01/detectorresponses/version.go index c0c60f89368..d9fd397b3d4 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/version.go +++ b/resource-manager/batch/2024-07-01/detectorresponses/version.go @@ -1,4 +1,4 @@ -package batchmanagements +package detectorresponses // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package batchmanagements const defaultApiVersion = "2024-07-01" func userAgent() string { - return "hashicorp/go-azure-sdk/batchmanagements/2024-07-01" + return "hashicorp/go-azure-sdk/detectorresponses/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/location/README.md b/resource-manager/batch/2024-07-01/location/README.md deleted file mode 100644 index a353e1a15cc..00000000000 --- a/resource-manager/batch/2024-07-01/location/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/location` Documentation - -The `location` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/location" -``` - - -### Client Initialization - -```go -client := location.NewLocationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LocationClient.GetQuotas` - -```go -ctx := context.TODO() -id := location.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") - -read, err := client.GetQuotas(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LocationClient.ListSupportedVirtualMachineSkus` - -```go -ctx := context.TODO() -id := location.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") - -// alternatively `client.ListSupportedVirtualMachineSkus(ctx, id, location.DefaultListSupportedVirtualMachineSkusOperationOptions())` can be used to do batched pagination -items, err := client.ListSupportedVirtualMachineSkusComplete(ctx, id, location.DefaultListSupportedVirtualMachineSkusOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/batch/2024-07-01/location/method_listsupportedvirtualmachineskus.go b/resource-manager/batch/2024-07-01/location/method_listsupportedvirtualmachineskus.go deleted file mode 100644 index 2f2f3d56a2a..00000000000 --- a/resource-manager/batch/2024-07-01/location/method_listsupportedvirtualmachineskus.go +++ /dev/null @@ -1,138 +0,0 @@ -package location - -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 ListSupportedVirtualMachineSkusOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SupportedSku -} - -type ListSupportedVirtualMachineSkusCompleteResult struct { - LatestHttpResponse *http.Response - Items []SupportedSku -} - -type ListSupportedVirtualMachineSkusOperationOptions struct { - Filter *string - Maxresults *int64 -} - -func DefaultListSupportedVirtualMachineSkusOperationOptions() ListSupportedVirtualMachineSkusOperationOptions { - return ListSupportedVirtualMachineSkusOperationOptions{} -} - -func (o ListSupportedVirtualMachineSkusOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListSupportedVirtualMachineSkusOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - - return &out -} - -func (o ListSupportedVirtualMachineSkusOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - if o.Maxresults != nil { - out.Append("maxresults", fmt.Sprintf("%v", *o.Maxresults)) - } - return &out -} - -type ListSupportedVirtualMachineSkusCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListSupportedVirtualMachineSkusCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListSupportedVirtualMachineSkus ... -func (c LocationClient) ListSupportedVirtualMachineSkus(ctx context.Context, id LocationId, options ListSupportedVirtualMachineSkusOperationOptions) (result ListSupportedVirtualMachineSkusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListSupportedVirtualMachineSkusCustomPager{}, - Path: fmt.Sprintf("%s/virtualMachineSkus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SupportedSku `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListSupportedVirtualMachineSkusComplete retrieves all the results into a single object -func (c LocationClient) ListSupportedVirtualMachineSkusComplete(ctx context.Context, id LocationId, options ListSupportedVirtualMachineSkusOperationOptions) (ListSupportedVirtualMachineSkusCompleteResult, error) { - return c.ListSupportedVirtualMachineSkusCompleteMatchingPredicate(ctx, id, options, SupportedSkuOperationPredicate{}) -} - -// ListSupportedVirtualMachineSkusCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LocationClient) ListSupportedVirtualMachineSkusCompleteMatchingPredicate(ctx context.Context, id LocationId, options ListSupportedVirtualMachineSkusOperationOptions, predicate SupportedSkuOperationPredicate) (result ListSupportedVirtualMachineSkusCompleteResult, err error) { - items := make([]SupportedSku, 0) - - resp, err := c.ListSupportedVirtualMachineSkus(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListSupportedVirtualMachineSkusCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/README.md b/resource-manager/batch/2024-07-01/networksecurityperimeter/README.md deleted file mode 100644 index f6ceb86c30f..00000000000 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/README.md +++ /dev/null @@ -1,65 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/networksecurityperimeter` Documentation - -The `networksecurityperimeter` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/networksecurityperimeter" -``` - - -### Client Initialization - -```go -client := networksecurityperimeter.NewNetworkSecurityPerimeterClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkSecurityPerimeterClient.GetConfiguration` - -```go -ctx := context.TODO() -id := networksecurityperimeter.NewNetworkSecurityPerimeterConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "networkSecurityPerimeterConfigurationName") - -read, err := client.GetConfiguration(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkSecurityPerimeterClient.ListConfigurations` - -```go -ctx := context.TODO() -id := networksecurityperimeter.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -// alternatively `client.ListConfigurations(ctx, id)` can be used to do batched pagination -items, err := client.ListConfigurationsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkSecurityPerimeterClient.ReconcileConfiguration` - -```go -ctx := context.TODO() -id := networksecurityperimeter.NewNetworkSecurityPerimeterConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "networkSecurityPerimeterConfigurationName") - -if err := client.ReconcileConfigurationThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount.go deleted file mode 100644 index b4e6f275695..00000000000 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount.go +++ /dev/null @@ -1,130 +0,0 @@ -package networksecurityperimeter - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&BatchAccountId{}) -} - -var _ resourceids.ResourceId = &BatchAccountId{} - -// BatchAccountId is a struct representing the Resource ID for a Batch Account -type BatchAccountId struct { - SubscriptionId string - ResourceGroupName string - BatchAccountName string -} - -// NewBatchAccountID returns a new BatchAccountId struct -func NewBatchAccountID(subscriptionId string, resourceGroupName string, batchAccountName string) BatchAccountId { - return BatchAccountId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - BatchAccountName: batchAccountName, - } -} - -// ParseBatchAccountID parses 'input' into a BatchAccountId -func ParseBatchAccountID(input string) (*BatchAccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := BatchAccountId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseBatchAccountIDInsensitively parses 'input' case-insensitively into a BatchAccountId -// note: this method should only be used for API response data and not user input -func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := BatchAccountId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *BatchAccountId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) - } - - return nil -} - -// ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID -func ValidateBatchAccountID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBatchAccountID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Batch Account ID -func (id BatchAccountId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Batch/batchAccounts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BatchAccountName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Batch Account ID -func (id BatchAccountId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftBatch", "Microsoft.Batch", "Microsoft.Batch"), - resourceids.StaticSegment("staticBatchAccounts", "batchAccounts", "batchAccounts"), - resourceids.UserSpecifiedSegment("batchAccountName", "batchAccountName"), - } -} - -// String returns a human-readable description of this Batch Account ID -func (id BatchAccountId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Batch Account Name: %q", id.BatchAccountName), - } - return fmt.Sprintf("Batch Account (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount_test.go deleted file mode 100644 index 811ec552aca..00000000000 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_batchaccount_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networksecurityperimeter - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &BatchAccountId{} - -func TestNewBatchAccountID(t *testing.T) { - id := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.BatchAccountName != "batchAccountName" { - t.Fatalf("Expected %q but got %q for Segment 'BatchAccountName'", id.BatchAccountName, "batchAccountName") - } -} - -func TestFormatBatchAccountID(t *testing.T) { - actual := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBatchAccountID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BatchAccountId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BatchAccountName: "batchAccountName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBatchAccountID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BatchAccountName != v.Expected.BatchAccountName { - t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) - } - - } -} - -func TestParseBatchAccountIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BatchAccountId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BatchAccountName: "batchAccountName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - BatchAccountName: "bAtChAcCoUnTnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBatchAccountIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BatchAccountName != v.Expected.BatchAccountName { - t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) - } - - } -} - -func TestSegmentsForBatchAccountId(t *testing.T) { - segments := BatchAccountId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BatchAccountId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/method_listconfigurations.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/method_listconfigurations.go deleted file mode 100644 index c6392b5db74..00000000000 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/method_listconfigurations.go +++ /dev/null @@ -1,105 +0,0 @@ -package networksecurityperimeter - -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 ListConfigurationsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkSecurityPerimeterConfiguration -} - -type ListConfigurationsCompleteResult struct { - LatestHttpResponse *http.Response - Items []NetworkSecurityPerimeterConfiguration -} - -type ListConfigurationsCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListConfigurationsCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListConfigurations ... -func (c NetworkSecurityPerimeterClient) ListConfigurations(ctx context.Context, id BatchAccountId) (result ListConfigurationsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListConfigurationsCustomPager{}, - Path: fmt.Sprintf("%s/networkSecurityPerimeterConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkSecurityPerimeterConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListConfigurationsComplete retrieves all the results into a single object -func (c NetworkSecurityPerimeterClient) ListConfigurationsComplete(ctx context.Context, id BatchAccountId) (ListConfigurationsCompleteResult, error) { - return c.ListConfigurationsCompleteMatchingPredicate(ctx, id, NetworkSecurityPerimeterConfigurationOperationPredicate{}) -} - -// ListConfigurationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkSecurityPerimeterClient) ListConfigurationsCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, predicate NetworkSecurityPerimeterConfigurationOperationPredicate) (result ListConfigurationsCompleteResult, err error) { - items := make([]NetworkSecurityPerimeterConfiguration, 0) - - resp, err := c.ListConfigurations(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListConfigurationsCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/version.go b/resource-manager/batch/2024-07-01/networksecurityperimeter/version.go deleted file mode 100644 index b6ff1af90dc..00000000000 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecurityperimeter - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-07-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/networksecurityperimeter/2024-07-01" -} diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/README.md b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/README.md new file mode 100644 index 00000000000..e376d1aeffc --- /dev/null +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/README.md @@ -0,0 +1,65 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations` Documentation + +The `networksecurityperimeterconfigurations` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/networksecurityperimeterconfigurations" +``` + + +### Client Initialization + +```go +client := networksecurityperimeterconfigurations.NewNetworkSecurityPerimeterConfigurationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `NetworkSecurityPerimeterConfigurationsClient.NetworkSecurityPerimeterGetConfiguration` + +```go +ctx := context.TODO() +id := networksecurityperimeterconfigurations.NewNetworkSecurityPerimeterConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "networkSecurityPerimeterConfigurationName") + +read, err := client.NetworkSecurityPerimeterGetConfiguration(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `NetworkSecurityPerimeterConfigurationsClient.NetworkSecurityPerimeterListConfigurations` + +```go +ctx := context.TODO() +id := networksecurityperimeterconfigurations.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +// alternatively `client.NetworkSecurityPerimeterListConfigurations(ctx, id)` can be used to do batched pagination +items, err := client.NetworkSecurityPerimeterListConfigurationsComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `NetworkSecurityPerimeterConfigurationsClient.NetworkSecurityPerimeterReconcileConfiguration` + +```go +ctx := context.TODO() +id := networksecurityperimeterconfigurations.NewNetworkSecurityPerimeterConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "networkSecurityPerimeterConfigurationName") + +if err := client.NetworkSecurityPerimeterReconcileConfigurationThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/client.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/client.go similarity index 57% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/client.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/client.go index acc34025ed0..20530b9e06a 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/client.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/client.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type NetworkSecurityPerimeterClient struct { +type NetworkSecurityPerimeterConfigurationsClient struct { Client *resourcemanager.Client } -func NewNetworkSecurityPerimeterClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "networksecurityperimeter", defaultApiVersion) +func NewNetworkSecurityPerimeterConfigurationsClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkSecurityPerimeterConfigurationsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "networksecurityperimeterconfigurations", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterClient: %+v", err) + return nil, fmt.Errorf("instantiating NetworkSecurityPerimeterConfigurationsClient: %+v", err) } - return &NetworkSecurityPerimeterClient{ + return &NetworkSecurityPerimeterConfigurationsClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/constants.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/constants.go similarity index 99% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/constants.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/constants.go index fc47ae29707..0494227bcec 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/constants.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/constants.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations import ( "encoding/json" diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_batchaccount.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_batchaccount.go new file mode 100644 index 00000000000..88838b7c2b4 --- /dev/null +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_batchaccount.go @@ -0,0 +1,130 @@ +package networksecurityperimeterconfigurations + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&BatchAccountId{}) +} + +var _ resourceids.ResourceId = &BatchAccountId{} + +// BatchAccountId is a struct representing the Resource ID for a Batch Account +type BatchAccountId struct { + SubscriptionId string + ResourceGroupName string + BatchAccountName string +} + +// NewBatchAccountID returns a new BatchAccountId struct +func NewBatchAccountID(subscriptionId string, resourceGroupName string, batchAccountName string) BatchAccountId { + return BatchAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + BatchAccountName: batchAccountName, + } +} + +// ParseBatchAccountID parses 'input' into a BatchAccountId +func ParseBatchAccountID(input string) (*BatchAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BatchAccountId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBatchAccountIDInsensitively parses 'input' case-insensitively into a BatchAccountId +// note: this method should only be used for API response data and not user input +func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BatchAccountId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BatchAccountId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) + } + + return nil +} + +// ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID +func ValidateBatchAccountID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseBatchAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Batch Account ID +func (id BatchAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Batch/batchAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BatchAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Batch Account ID +func (id BatchAccountId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftBatch", "Microsoft.Batch", "Microsoft.Batch"), + resourceids.StaticSegment("staticBatchAccounts", "batchAccounts", "batchAccounts"), + resourceids.UserSpecifiedSegment("batchAccountName", "batchAccountName"), + } +} + +// String returns a human-readable description of this Batch Account ID +func (id BatchAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Batch Account Name: %q", id.BatchAccountName), + } + return fmt.Sprintf("Batch Account (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_batchaccount_test.go new file mode 100644 index 00000000000..21a7cc21881 --- /dev/null +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_batchaccount_test.go @@ -0,0 +1,282 @@ +package networksecurityperimeterconfigurations + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &BatchAccountId{} + +func TestNewBatchAccountID(t *testing.T) { + id := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.BatchAccountName != "batchAccountName" { + t.Fatalf("Expected %q but got %q for Segment 'BatchAccountName'", id.BatchAccountName, "batchAccountName") + } +} + +func TestFormatBatchAccountID(t *testing.T) { + actual := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseBatchAccountID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *BatchAccountId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + BatchAccountName: "batchAccountName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseBatchAccountID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.BatchAccountName != v.Expected.BatchAccountName { + t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) + } + + } +} + +func TestParseBatchAccountIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *BatchAccountId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + BatchAccountName: "batchAccountName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + BatchAccountName: "bAtChAcCoUnTnAmE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseBatchAccountIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.BatchAccountName != v.Expected.BatchAccountName { + t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) + } + + } +} + +func TestSegmentsForBatchAccountId(t *testing.T) { + segments := BatchAccountId{}.Segments() + if len(segments) == 0 { + t.Fatalf("BatchAccountId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go similarity index 99% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go index fb25510fc1a..983470c51bd 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration_test.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration_test.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration_test.go index 58772a580da..8dedf3d3a7c 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/id_networksecurityperimeterconfiguration_test.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/id_networksecurityperimeterconfiguration_test.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations import ( "testing" diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/method_getconfiguration.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimetergetconfiguration.go similarity index 70% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/method_getconfiguration.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimetergetconfiguration.go index bb7ef134bb8..fe3bb1f908c 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/method_getconfiguration.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimetergetconfiguration.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations import ( "context" @@ -11,14 +11,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type GetConfigurationOperationResponse struct { +type NetworkSecurityPerimeterGetConfigurationOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *NetworkSecurityPerimeterConfiguration } -// GetConfiguration ... -func (c NetworkSecurityPerimeterClient) GetConfiguration(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) (result GetConfigurationOperationResponse, err error) { +// NetworkSecurityPerimeterGetConfiguration ... +func (c NetworkSecurityPerimeterConfigurationsClient) NetworkSecurityPerimeterGetConfiguration(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) (result NetworkSecurityPerimeterGetConfigurationOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimeterlistconfigurations.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimeterlistconfigurations.go new file mode 100644 index 00000000000..36501ff3940 --- /dev/null +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimeterlistconfigurations.go @@ -0,0 +1,105 @@ +package networksecurityperimeterconfigurations + +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 NetworkSecurityPerimeterListConfigurationsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]NetworkSecurityPerimeterConfiguration +} + +type NetworkSecurityPerimeterListConfigurationsCompleteResult struct { + LatestHttpResponse *http.Response + Items []NetworkSecurityPerimeterConfiguration +} + +type NetworkSecurityPerimeterListConfigurationsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *NetworkSecurityPerimeterListConfigurationsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// NetworkSecurityPerimeterListConfigurations ... +func (c NetworkSecurityPerimeterConfigurationsClient) NetworkSecurityPerimeterListConfigurations(ctx context.Context, id BatchAccountId) (result NetworkSecurityPerimeterListConfigurationsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &NetworkSecurityPerimeterListConfigurationsCustomPager{}, + Path: fmt.Sprintf("%s/networkSecurityPerimeterConfigurations", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]NetworkSecurityPerimeterConfiguration `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// NetworkSecurityPerimeterListConfigurationsComplete retrieves all the results into a single object +func (c NetworkSecurityPerimeterConfigurationsClient) NetworkSecurityPerimeterListConfigurationsComplete(ctx context.Context, id BatchAccountId) (NetworkSecurityPerimeterListConfigurationsCompleteResult, error) { + return c.NetworkSecurityPerimeterListConfigurationsCompleteMatchingPredicate(ctx, id, NetworkSecurityPerimeterConfigurationOperationPredicate{}) +} + +// NetworkSecurityPerimeterListConfigurationsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c NetworkSecurityPerimeterConfigurationsClient) NetworkSecurityPerimeterListConfigurationsCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, predicate NetworkSecurityPerimeterConfigurationOperationPredicate) (result NetworkSecurityPerimeterListConfigurationsCompleteResult, err error) { + items := make([]NetworkSecurityPerimeterConfiguration, 0) + + resp, err := c.NetworkSecurityPerimeterListConfigurations(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = NetworkSecurityPerimeterListConfigurationsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/method_reconcileconfiguration.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimeterreconcileconfiguration.go similarity index 53% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/method_reconcileconfiguration.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimeterreconcileconfiguration.go index a57a997ebe6..8ce1cb18f76 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/method_reconcileconfiguration.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/method_networksecurityperimeterreconcileconfiguration.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations import ( "context" @@ -14,14 +14,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ReconcileConfigurationOperationResponse struct { +type NetworkSecurityPerimeterReconcileConfigurationOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// ReconcileConfiguration ... -func (c NetworkSecurityPerimeterClient) ReconcileConfiguration(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) (result ReconcileConfigurationOperationResponse, err error) { +// NetworkSecurityPerimeterReconcileConfiguration ... +func (c NetworkSecurityPerimeterConfigurationsClient) NetworkSecurityPerimeterReconcileConfiguration(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) (result NetworkSecurityPerimeterReconcileConfigurationOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -54,15 +54,15 @@ func (c NetworkSecurityPerimeterClient) ReconcileConfiguration(ctx context.Conte return } -// ReconcileConfigurationThenPoll performs ReconcileConfiguration then polls until it's completed -func (c NetworkSecurityPerimeterClient) ReconcileConfigurationThenPoll(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) error { - result, err := c.ReconcileConfiguration(ctx, id) +// NetworkSecurityPerimeterReconcileConfigurationThenPoll performs NetworkSecurityPerimeterReconcileConfiguration then polls until it's completed +func (c NetworkSecurityPerimeterConfigurationsClient) NetworkSecurityPerimeterReconcileConfigurationThenPoll(ctx context.Context, id NetworkSecurityPerimeterConfigurationId) error { + result, err := c.NetworkSecurityPerimeterReconcileConfiguration(ctx, id) if err != nil { - return fmt.Errorf("performing ReconcileConfiguration: %+v", err) + return fmt.Errorf("performing NetworkSecurityPerimeterReconcileConfiguration: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ReconcileConfiguration: %+v", err) + return fmt.Errorf("polling after NetworkSecurityPerimeterReconcileConfiguration: %+v", err) } return nil diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessrule.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessrule.go similarity index 86% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessrule.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessrule.go index ea14652f369..b543f652bad 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessrule.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessrule.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessruleproperties.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessruleproperties.go similarity index 95% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessruleproperties.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessruleproperties.go index a19f8ca5962..527cb118d57 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessruleproperties.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessruleproperties.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessrulepropertiessubscriptionsinlined.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessrulepropertiessubscriptionsinlined.go similarity index 84% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessrulepropertiessubscriptionsinlined.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessrulepropertiessubscriptionsinlined.go index 05a39ecaa09..5f339148d20 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_accessrulepropertiessubscriptionsinlined.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_accessrulepropertiessubscriptionsinlined.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeter.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeter.go similarity index 88% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeter.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeter.go index 763c2b09b79..a791e342b91 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeter.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeter.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeterconfiguration.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeterconfiguration.go similarity index 93% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeterconfiguration.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeterconfiguration.go index 061326a3e85..4d519d9b253 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeterconfiguration.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeterconfiguration.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeterconfigurationproperties.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeterconfigurationproperties.go similarity index 94% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeterconfigurationproperties.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeterconfigurationproperties.go index 06cc4dd24fd..5b778e0383c 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityperimeterconfigurationproperties.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityperimeterconfigurationproperties.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityprofile.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityprofile.go similarity index 92% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityprofile.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityprofile.go index 36b2a9be248..15479090154 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_networksecurityprofile.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_networksecurityprofile.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_provisioningissue.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_provisioningissue.go similarity index 87% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_provisioningissue.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_provisioningissue.go index c48f786a474..40675287dc7 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_provisioningissue.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_provisioningissue.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_provisioningissueproperties.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_provisioningissueproperties.go similarity index 92% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_provisioningissueproperties.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_provisioningissueproperties.go index fba10ab29cc..e65e4eeb6a1 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_provisioningissueproperties.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_provisioningissueproperties.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_resourceassociation.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_resourceassociation.go similarity index 87% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/model_resourceassociation.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_resourceassociation.go index c68cea02ec4..b0f0cce1a54 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/model_resourceassociation.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/model_resourceassociation.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeter/predicates.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/predicates.go similarity index 93% rename from resource-manager/batch/2024-07-01/networksecurityperimeter/predicates.go rename to resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/predicates.go index 91ff51d6cfc..fd3dce574e9 100644 --- a/resource-manager/batch/2024-07-01/networksecurityperimeter/predicates.go +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/predicates.go @@ -1,4 +1,4 @@ -package networksecurityperimeter +package networksecurityperimeterconfigurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/version.go b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/version.go new file mode 100644 index 00000000000..dce6efcb8bb --- /dev/null +++ b/resource-manager/batch/2024-07-01/networksecurityperimeterconfigurations/version.go @@ -0,0 +1,10 @@ +package networksecurityperimeterconfigurations + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/networksecurityperimeterconfigurations/2024-07-01" +} diff --git a/resource-manager/batch/2024-07-01/openapis/README.md b/resource-manager/batch/2024-07-01/openapis/README.md new file mode 100644 index 00000000000..32513894c3a --- /dev/null +++ b/resource-manager/batch/2024-07-01/openapis/README.md @@ -0,0 +1,74 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/openapis` Documentation + +The `openapis` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/openapis" +``` + + +### Client Initialization + +```go +client := openapis.NewOpenapisClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `OpenapisClient.LocationCheckNameAvailability` + +```go +ctx := context.TODO() +id := openapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +payload := openapis.CheckNameAvailabilityParameters{ + // ... +} + + +read, err := client.LocationCheckNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `OpenapisClient.LocationGetQuotas` + +```go +ctx := context.TODO() +id := openapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +read, err := client.LocationGetQuotas(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `OpenapisClient.LocationListSupportedVirtualMachineSkus` + +```go +ctx := context.TODO() +id := openapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +// alternatively `client.LocationListSupportedVirtualMachineSkus(ctx, id, openapis.DefaultLocationListSupportedVirtualMachineSkusOperationOptions())` can be used to do batched pagination +items, err := client.LocationListSupportedVirtualMachineSkusComplete(ctx, id, openapis.DefaultLocationListSupportedVirtualMachineSkusOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/batch/2024-07-01/location/client.go b/resource-manager/batch/2024-07-01/openapis/client.go similarity index 61% rename from resource-manager/batch/2024-07-01/location/client.go rename to resource-manager/batch/2024-07-01/openapis/client.go index ccb5443577a..497a88776d1 100644 --- a/resource-manager/batch/2024-07-01/location/client.go +++ b/resource-manager/batch/2024-07-01/openapis/client.go @@ -1,4 +1,4 @@ -package location +package openapis import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type LocationClient struct { +type OpenapisClient struct { Client *resourcemanager.Client } -func NewLocationClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "location", defaultApiVersion) +func NewOpenapisClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenapisClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "openapis", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating LocationClient: %+v", err) + return nil, fmt.Errorf("instantiating OpenapisClient: %+v", err) } - return &LocationClient{ + return &OpenapisClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/batchmanagements/constants.go b/resource-manager/batch/2024-07-01/openapis/constants.go similarity index 98% rename from resource-manager/batch/2024-07-01/batchmanagements/constants.go rename to resource-manager/batch/2024-07-01/openapis/constants.go index 67472b3c5ae..d59f243859a 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/constants.go +++ b/resource-manager/batch/2024-07-01/openapis/constants.go @@ -1,4 +1,4 @@ -package batchmanagements +package openapis import ( "encoding/json" diff --git a/resource-manager/batch/2024-07-01/location/id_location.go b/resource-manager/batch/2024-07-01/openapis/id_location.go similarity index 99% rename from resource-manager/batch/2024-07-01/location/id_location.go rename to resource-manager/batch/2024-07-01/openapis/id_location.go index 166b35f6a72..8a7f39a3d76 100644 --- a/resource-manager/batch/2024-07-01/location/id_location.go +++ b/resource-manager/batch/2024-07-01/openapis/id_location.go @@ -1,4 +1,4 @@ -package location +package openapis import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/location/id_location_test.go b/resource-manager/batch/2024-07-01/openapis/id_location_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/location/id_location_test.go rename to resource-manager/batch/2024-07-01/openapis/id_location_test.go index bd232cfdbf1..cc5b2b2f1f2 100644 --- a/resource-manager/batch/2024-07-01/location/id_location_test.go +++ b/resource-manager/batch/2024-07-01/openapis/id_location_test.go @@ -1,4 +1,4 @@ -package location +package openapis import ( "testing" diff --git a/resource-manager/batch/2024-07-01/batchmanagements/method_locationchecknameavailability.go b/resource-manager/batch/2024-07-01/openapis/method_locationchecknameavailability.go similarity index 83% rename from resource-manager/batch/2024-07-01/batchmanagements/method_locationchecknameavailability.go rename to resource-manager/batch/2024-07-01/openapis/method_locationchecknameavailability.go index 58082f97b01..f382de3ea38 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/method_locationchecknameavailability.go +++ b/resource-manager/batch/2024-07-01/openapis/method_locationchecknameavailability.go @@ -1,4 +1,4 @@ -package batchmanagements +package openapis import ( "context" @@ -19,7 +19,7 @@ type LocationCheckNameAvailabilityOperationResponse struct { } // LocationCheckNameAvailability ... -func (c BatchManagementsClient) LocationCheckNameAvailability(ctx context.Context, id LocationId, input CheckNameAvailabilityParameters) (result LocationCheckNameAvailabilityOperationResponse, err error) { +func (c OpenapisClient) LocationCheckNameAvailability(ctx context.Context, id LocationId, input CheckNameAvailabilityParameters) (result LocationCheckNameAvailabilityOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/location/method_getquotas.go b/resource-manager/batch/2024-07-01/openapis/method_locationgetquotas.go similarity index 81% rename from resource-manager/batch/2024-07-01/location/method_getquotas.go rename to resource-manager/batch/2024-07-01/openapis/method_locationgetquotas.go index 6f2f5db290b..1030bf4f3b7 100644 --- a/resource-manager/batch/2024-07-01/location/method_getquotas.go +++ b/resource-manager/batch/2024-07-01/openapis/method_locationgetquotas.go @@ -1,4 +1,4 @@ -package location +package openapis import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type GetQuotasOperationResponse struct { +type LocationGetQuotasOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *BatchLocationQuota } -// GetQuotas ... -func (c LocationClient) GetQuotas(ctx context.Context, id LocationId) (result GetQuotasOperationResponse, err error) { +// LocationGetQuotas ... +func (c OpenapisClient) LocationGetQuotas(ctx context.Context, id LocationId) (result LocationGetQuotasOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/openapis/method_locationlistsupportedvirtualmachineskus.go b/resource-manager/batch/2024-07-01/openapis/method_locationlistsupportedvirtualmachineskus.go new file mode 100644 index 00000000000..c9e28ee2f11 --- /dev/null +++ b/resource-manager/batch/2024-07-01/openapis/method_locationlistsupportedvirtualmachineskus.go @@ -0,0 +1,138 @@ +package openapis + +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 LocationListSupportedVirtualMachineSkusOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]SupportedSku +} + +type LocationListSupportedVirtualMachineSkusCompleteResult struct { + LatestHttpResponse *http.Response + Items []SupportedSku +} + +type LocationListSupportedVirtualMachineSkusOperationOptions struct { + Filter *string + Maxresults *int64 +} + +func DefaultLocationListSupportedVirtualMachineSkusOperationOptions() LocationListSupportedVirtualMachineSkusOperationOptions { + return LocationListSupportedVirtualMachineSkusOperationOptions{} +} + +func (o LocationListSupportedVirtualMachineSkusOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o LocationListSupportedVirtualMachineSkusOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o LocationListSupportedVirtualMachineSkusOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Filter != nil { + out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) + } + if o.Maxresults != nil { + out.Append("maxresults", fmt.Sprintf("%v", *o.Maxresults)) + } + return &out +} + +type LocationListSupportedVirtualMachineSkusCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *LocationListSupportedVirtualMachineSkusCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// LocationListSupportedVirtualMachineSkus ... +func (c OpenapisClient) LocationListSupportedVirtualMachineSkus(ctx context.Context, id LocationId, options LocationListSupportedVirtualMachineSkusOperationOptions) (result LocationListSupportedVirtualMachineSkusOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &LocationListSupportedVirtualMachineSkusCustomPager{}, + Path: fmt.Sprintf("%s/virtualMachineSkus", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]SupportedSku `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// LocationListSupportedVirtualMachineSkusComplete retrieves all the results into a single object +func (c OpenapisClient) LocationListSupportedVirtualMachineSkusComplete(ctx context.Context, id LocationId, options LocationListSupportedVirtualMachineSkusOperationOptions) (LocationListSupportedVirtualMachineSkusCompleteResult, error) { + return c.LocationListSupportedVirtualMachineSkusCompleteMatchingPredicate(ctx, id, options, SupportedSkuOperationPredicate{}) +} + +// LocationListSupportedVirtualMachineSkusCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c OpenapisClient) LocationListSupportedVirtualMachineSkusCompleteMatchingPredicate(ctx context.Context, id LocationId, options LocationListSupportedVirtualMachineSkusOperationOptions, predicate SupportedSkuOperationPredicate) (result LocationListSupportedVirtualMachineSkusCompleteResult, err error) { + items := make([]SupportedSku, 0) + + resp, err := c.LocationListSupportedVirtualMachineSkus(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = LocationListSupportedVirtualMachineSkusCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/batch/2024-07-01/location/model_batchlocationquota.go b/resource-manager/batch/2024-07-01/openapis/model_batchlocationquota.go similarity index 93% rename from resource-manager/batch/2024-07-01/location/model_batchlocationquota.go rename to resource-manager/batch/2024-07-01/openapis/model_batchlocationquota.go index 672823b7337..822fec907e7 100644 --- a/resource-manager/batch/2024-07-01/location/model_batchlocationquota.go +++ b/resource-manager/batch/2024-07-01/openapis/model_batchlocationquota.go @@ -1,4 +1,4 @@ -package location +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchmanagements/model_checknameavailabilityparameters.go b/resource-manager/batch/2024-07-01/openapis/model_checknameavailabilityparameters.go similarity index 91% rename from resource-manager/batch/2024-07-01/batchmanagements/model_checknameavailabilityparameters.go rename to resource-manager/batch/2024-07-01/openapis/model_checknameavailabilityparameters.go index 0284319e80b..4f7f8146f38 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/model_checknameavailabilityparameters.go +++ b/resource-manager/batch/2024-07-01/openapis/model_checknameavailabilityparameters.go @@ -1,4 +1,4 @@ -package batchmanagements +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchmanagements/model_checknameavailabilityresult.go b/resource-manager/batch/2024-07-01/openapis/model_checknameavailabilityresult.go similarity index 94% rename from resource-manager/batch/2024-07-01/batchmanagements/model_checknameavailabilityresult.go rename to resource-manager/batch/2024-07-01/openapis/model_checknameavailabilityresult.go index 4ce56422e16..a3c7cabe716 100644 --- a/resource-manager/batch/2024-07-01/batchmanagements/model_checknameavailabilityresult.go +++ b/resource-manager/batch/2024-07-01/openapis/model_checknameavailabilityresult.go @@ -1,4 +1,4 @@ -package batchmanagements +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/location/model_skucapability.go b/resource-manager/batch/2024-07-01/openapis/model_skucapability.go similarity index 94% rename from resource-manager/batch/2024-07-01/location/model_skucapability.go rename to resource-manager/batch/2024-07-01/openapis/model_skucapability.go index a9fbc21109c..c2152d453f9 100644 --- a/resource-manager/batch/2024-07-01/location/model_skucapability.go +++ b/resource-manager/batch/2024-07-01/openapis/model_skucapability.go @@ -1,4 +1,4 @@ -package location +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/location/model_supportedsku.go b/resource-manager/batch/2024-07-01/openapis/model_supportedsku.go similarity index 98% rename from resource-manager/batch/2024-07-01/location/model_supportedsku.go rename to resource-manager/batch/2024-07-01/openapis/model_supportedsku.go index 3f99eba4a39..8815422e443 100644 --- a/resource-manager/batch/2024-07-01/location/model_supportedsku.go +++ b/resource-manager/batch/2024-07-01/openapis/model_supportedsku.go @@ -1,4 +1,4 @@ -package location +package openapis import ( "time" diff --git a/resource-manager/batch/2024-07-01/location/predicates.go b/resource-manager/batch/2024-07-01/openapis/predicates.go similarity index 97% rename from resource-manager/batch/2024-07-01/location/predicates.go rename to resource-manager/batch/2024-07-01/openapis/predicates.go index ba59d166869..b67fcc7a8f1 100644 --- a/resource-manager/batch/2024-07-01/location/predicates.go +++ b/resource-manager/batch/2024-07-01/openapis/predicates.go @@ -1,4 +1,4 @@ -package location +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/location/version.go b/resource-manager/batch/2024-07-01/openapis/version.go similarity index 76% rename from resource-manager/batch/2024-07-01/location/version.go rename to resource-manager/batch/2024-07-01/openapis/version.go index 65b9b037968..6a6fb47c75d 100644 --- a/resource-manager/batch/2024-07-01/location/version.go +++ b/resource-manager/batch/2024-07-01/openapis/version.go @@ -1,4 +1,4 @@ -package location +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package location const defaultApiVersion = "2024-07-01" func userAgent() string { - return "hashicorp/go-azure-sdk/location/2024-07-01" + return "hashicorp/go-azure-sdk/openapis/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/pool/README.md b/resource-manager/batch/2024-07-01/pool/README.md deleted file mode 100644 index 9c1038cd3b3..00000000000 --- a/resource-manager/batch/2024-07-01/pool/README.md +++ /dev/null @@ -1,139 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/pool` Documentation - -The `pool` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/pool" -``` - - -### Client Initialization - -```go -client := pool.NewPoolClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PoolClient.Create` - -```go -ctx := context.TODO() -id := pool.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") - -payload := pool.Pool{ - // ... -} - - -read, err := client.Create(ctx, id, payload, pool.DefaultCreateOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PoolClient.Delete` - -```go -ctx := context.TODO() -id := pool.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PoolClient.DisableAutoScale` - -```go -ctx := context.TODO() -id := pool.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") - -read, err := client.DisableAutoScale(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PoolClient.Get` - -```go -ctx := context.TODO() -id := pool.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") - -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: `PoolClient.ListByBatchAccount` - -```go -ctx := context.TODO() -id := pool.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -// alternatively `client.ListByBatchAccount(ctx, id, pool.DefaultListByBatchAccountOperationOptions())` can be used to do batched pagination -items, err := client.ListByBatchAccountComplete(ctx, id, pool.DefaultListByBatchAccountOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PoolClient.StopResize` - -```go -ctx := context.TODO() -id := pool.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") - -read, err := client.StopResize(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PoolClient.Update` - -```go -ctx := context.TODO() -id := pool.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") - -payload := pool.Pool{ - // ... -} - - -read, err := client.Update(ctx, id, payload, pool.DefaultUpdateOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/batch/2024-07-01/pool/client.go b/resource-manager/batch/2024-07-01/pool/client.go deleted file mode 100644 index 54e29c9a688..00000000000 --- a/resource-manager/batch/2024-07-01/pool/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package pool - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 PoolClient struct { - Client *resourcemanager.Client -} - -func NewPoolClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "pool", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PoolClient: %+v", err) - } - - return &PoolClient{ - Client: client, - }, nil -} diff --git a/resource-manager/batch/2024-07-01/pools/README.md b/resource-manager/batch/2024-07-01/pools/README.md new file mode 100644 index 00000000000..2c277aead26 --- /dev/null +++ b/resource-manager/batch/2024-07-01/pools/README.md @@ -0,0 +1,139 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/pools` Documentation + +The `pools` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/pools" +``` + + +### Client Initialization + +```go +client := pools.NewPoolsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PoolsClient.PoolCreate` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") + +payload := pools.Pool{ + // ... +} + + +read, err := client.PoolCreate(ctx, id, payload, pools.DefaultPoolCreateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PoolsClient.PoolDelete` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") + +if err := client.PoolDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PoolsClient.PoolDisableAutoScale` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") + +read, err := client.PoolDisableAutoScale(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PoolsClient.PoolGet` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") + +read, err := client.PoolGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PoolsClient.PoolListByBatchAccount` + +```go +ctx := context.TODO() +id := pools.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +// alternatively `client.PoolListByBatchAccount(ctx, id, pools.DefaultPoolListByBatchAccountOperationOptions())` can be used to do batched pagination +items, err := client.PoolListByBatchAccountComplete(ctx, id, pools.DefaultPoolListByBatchAccountOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PoolsClient.PoolStopResize` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") + +read, err := client.PoolStopResize(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PoolsClient.PoolUpdate` + +```go +ctx := context.TODO() +id := pools.NewPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "poolName") + +payload := pools.Pool{ + // ... +} + + +read, err := client.PoolUpdate(ctx, id, payload, pools.DefaultPoolUpdateOperationOptions()) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/resource-manager/postgresql/2025-08-01/post/client.go b/resource-manager/batch/2024-07-01/pools/client.go similarity index 58% rename from resource-manager/postgresql/2025-08-01/post/client.go rename to resource-manager/batch/2024-07-01/pools/client.go index 5a71c067caa..5860764dffe 100644 --- a/resource-manager/postgresql/2025-08-01/post/client.go +++ b/resource-manager/batch/2024-07-01/pools/client.go @@ -1,4 +1,4 @@ -package post +package pools import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type POSTClient struct { +type PoolsClient struct { Client *resourcemanager.Client } -func NewPOSTClientWithBaseURI(sdkApi sdkEnv.Api) (*POSTClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "post", defaultApiVersion) +func NewPoolsClientWithBaseURI(sdkApi sdkEnv.Api) (*PoolsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "pools", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating POSTClient: %+v", err) + return nil, fmt.Errorf("instantiating PoolsClient: %+v", err) } - return &POSTClient{ + return &PoolsClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/pool/constants.go b/resource-manager/batch/2024-07-01/pools/constants.go similarity index 99% rename from resource-manager/batch/2024-07-01/pool/constants.go rename to resource-manager/batch/2024-07-01/pools/constants.go index eb3c1295df0..605ad61c75d 100644 --- a/resource-manager/batch/2024-07-01/pool/constants.go +++ b/resource-manager/batch/2024-07-01/pools/constants.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "encoding/json" diff --git a/resource-manager/batch/2024-07-01/pool/id_batchaccount.go b/resource-manager/batch/2024-07-01/pools/id_batchaccount.go similarity index 99% rename from resource-manager/batch/2024-07-01/pool/id_batchaccount.go rename to resource-manager/batch/2024-07-01/pools/id_batchaccount.go index 9c419de2dca..355c366bbd5 100644 --- a/resource-manager/batch/2024-07-01/pool/id_batchaccount.go +++ b/resource-manager/batch/2024-07-01/pools/id_batchaccount.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/pool/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/pools/id_batchaccount_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/pool/id_batchaccount_test.go rename to resource-manager/batch/2024-07-01/pools/id_batchaccount_test.go index 85b207ea3d8..b11d5488c11 100644 --- a/resource-manager/batch/2024-07-01/pool/id_batchaccount_test.go +++ b/resource-manager/batch/2024-07-01/pools/id_batchaccount_test.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "testing" diff --git a/resource-manager/batch/2024-07-01/pool/id_pool.go b/resource-manager/batch/2024-07-01/pools/id_pool.go similarity index 99% rename from resource-manager/batch/2024-07-01/pool/id_pool.go rename to resource-manager/batch/2024-07-01/pools/id_pool.go index 25e8665345f..48a2b1150e8 100644 --- a/resource-manager/batch/2024-07-01/pool/id_pool.go +++ b/resource-manager/batch/2024-07-01/pools/id_pool.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/pool/id_pool_test.go b/resource-manager/batch/2024-07-01/pools/id_pool_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/pool/id_pool_test.go rename to resource-manager/batch/2024-07-01/pools/id_pool_test.go index 2caaba8195c..3e3c5d1db7a 100644 --- a/resource-manager/batch/2024-07-01/pool/id_pool_test.go +++ b/resource-manager/batch/2024-07-01/pools/id_pool_test.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "testing" diff --git a/resource-manager/batch/2024-07-01/pool/method_create.go b/resource-manager/batch/2024-07-01/pools/method_poolcreate.go similarity index 70% rename from resource-manager/batch/2024-07-01/pool/method_create.go rename to resource-manager/batch/2024-07-01/pools/method_poolcreate.go index fd4569559b1..31625136aff 100644 --- a/resource-manager/batch/2024-07-01/pool/method_create.go +++ b/resource-manager/batch/2024-07-01/pools/method_poolcreate.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "context" @@ -12,22 +12,22 @@ import ( // 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 { +type PoolCreateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Pool } -type CreateOperationOptions struct { +type PoolCreateOperationOptions struct { IfMatch *string IfNoneMatch *string } -func DefaultCreateOperationOptions() CreateOperationOptions { - return CreateOperationOptions{} +func DefaultPoolCreateOperationOptions() PoolCreateOperationOptions { + return PoolCreateOperationOptions{} } -func (o CreateOperationOptions) ToHeaders() *client.Headers { +func (o PoolCreateOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} if o.IfMatch != nil { out.Append("If-Match", fmt.Sprintf("%v", *o.IfMatch)) @@ -38,20 +38,20 @@ func (o CreateOperationOptions) ToHeaders() *client.Headers { return &out } -func (o CreateOperationOptions) ToOData() *odata.Query { +func (o PoolCreateOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o CreateOperationOptions) ToQuery() *client.QueryParams { +func (o PoolCreateOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} return &out } -// Create ... -func (c PoolClient) Create(ctx context.Context, id PoolId, input Pool, options CreateOperationOptions) (result CreateOperationResponse, err error) { +// PoolCreate ... +func (c PoolsClient) PoolCreate(ctx context.Context, id PoolId, input Pool, options PoolCreateOperationOptions) (result PoolCreateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/certificate/method_delete.go b/resource-manager/batch/2024-07-01/pools/method_pooldelete.go similarity index 71% rename from resource-manager/batch/2024-07-01/certificate/method_delete.go rename to resource-manager/batch/2024-07-01/pools/method_pooldelete.go index 436364e39c6..54aa3f87063 100644 --- a/resource-manager/batch/2024-07-01/certificate/method_delete.go +++ b/resource-manager/batch/2024-07-01/pools/method_pooldelete.go @@ -1,4 +1,4 @@ -package certificate +package pools import ( "context" @@ -14,14 +14,14 @@ import ( // 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 { +type PoolDeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// Delete ... -func (c CertificateClient) Delete(ctx context.Context, id CertificateId) (result DeleteOperationResponse, err error) { +// PoolDelete ... +func (c PoolsClient) PoolDelete(ctx context.Context, id PoolId) (result PoolDeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -56,15 +56,15 @@ func (c CertificateClient) Delete(ctx context.Context, id CertificateId) (result return } -// DeleteThenPoll performs Delete then polls until it's completed -func (c CertificateClient) DeleteThenPoll(ctx context.Context, id CertificateId) error { - result, err := c.Delete(ctx, id) +// PoolDeleteThenPoll performs PoolDelete then polls until it's completed +func (c PoolsClient) PoolDeleteThenPoll(ctx context.Context, id PoolId) error { + result, err := c.PoolDelete(ctx, id) if err != nil { - return fmt.Errorf("performing Delete: %+v", err) + return fmt.Errorf("performing PoolDelete: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) + return fmt.Errorf("polling after PoolDelete: %+v", err) } return nil diff --git a/resource-manager/batch/2024-07-01/pool/method_disableautoscale.go b/resource-manager/batch/2024-07-01/pools/method_pooldisableautoscale.go similarity index 80% rename from resource-manager/batch/2024-07-01/pool/method_disableautoscale.go rename to resource-manager/batch/2024-07-01/pools/method_pooldisableautoscale.go index 326b5484098..8b4214eef7f 100644 --- a/resource-manager/batch/2024-07-01/pool/method_disableautoscale.go +++ b/resource-manager/batch/2024-07-01/pools/method_pooldisableautoscale.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type DisableAutoScaleOperationResponse struct { +type PoolDisableAutoScaleOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Pool } -// DisableAutoScale ... -func (c PoolClient) DisableAutoScale(ctx context.Context, id PoolId) (result DisableAutoScaleOperationResponse, err error) { +// PoolDisableAutoScale ... +func (c PoolsClient) PoolDisableAutoScale(ctx context.Context, id PoolId) (result PoolDisableAutoScaleOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/pool/method_get.go b/resource-manager/batch/2024-07-01/pools/method_poolget.go similarity index 83% rename from resource-manager/batch/2024-07-01/pool/method_get.go rename to resource-manager/batch/2024-07-01/pools/method_poolget.go index 08f23dd5e38..538ef5d4488 100644 --- a/resource-manager/batch/2024-07-01/pool/method_get.go +++ b/resource-manager/batch/2024-07-01/pools/method_poolget.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type PoolGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Pool } -// Get ... -func (c PoolClient) Get(ctx context.Context, id PoolId) (result GetOperationResponse, err error) { +// PoolGet ... +func (c PoolsClient) PoolGet(ctx context.Context, id PoolId) (result PoolGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/pool/method_listbybatchaccount.go b/resource-manager/batch/2024-07-01/pools/method_poollistbybatchaccount.go similarity index 53% rename from resource-manager/batch/2024-07-01/pool/method_listbybatchaccount.go rename to resource-manager/batch/2024-07-01/pools/method_poollistbybatchaccount.go index 230109ca49c..93847e2da2c 100644 --- a/resource-manager/batch/2024-07-01/pool/method_listbybatchaccount.go +++ b/resource-manager/batch/2024-07-01/pools/method_poollistbybatchaccount.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "context" @@ -12,40 +12,40 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListByBatchAccountOperationResponse struct { +type PoolListByBatchAccountOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Pool } -type ListByBatchAccountCompleteResult struct { +type PoolListByBatchAccountCompleteResult struct { LatestHttpResponse *http.Response Items []Pool } -type ListByBatchAccountOperationOptions struct { +type PoolListByBatchAccountOperationOptions struct { Filter *string Maxresults *int64 Select *string } -func DefaultListByBatchAccountOperationOptions() ListByBatchAccountOperationOptions { - return ListByBatchAccountOperationOptions{} +func DefaultPoolListByBatchAccountOperationOptions() PoolListByBatchAccountOperationOptions { + return PoolListByBatchAccountOperationOptions{} } -func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { +func (o PoolListByBatchAccountOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} return &out } -func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { +func (o PoolListByBatchAccountOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o ListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { +func (o PoolListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} if o.Filter != nil { out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) @@ -59,11 +59,11 @@ func (o ListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { return &out } -type ListByBatchAccountCustomPager struct { +type PoolListByBatchAccountCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByBatchAccountCustomPager) NextPageLink() *odata.Link { +func (p *PoolListByBatchAccountCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -71,8 +71,8 @@ func (p *ListByBatchAccountCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByBatchAccount ... -func (c PoolClient) ListByBatchAccount(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions) (result ListByBatchAccountOperationResponse, err error) { +// PoolListByBatchAccount ... +func (c PoolsClient) PoolListByBatchAccount(ctx context.Context, id BatchAccountId, options PoolListByBatchAccountOperationOptions) (result PoolListByBatchAccountOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -80,7 +80,7 @@ func (c PoolClient) ListByBatchAccount(ctx context.Context, id BatchAccountId, o }, HttpMethod: http.MethodGet, OptionsObject: options, - Pager: &ListByBatchAccountCustomPager{}, + Pager: &PoolListByBatchAccountCustomPager{}, Path: fmt.Sprintf("%s/pools", id.ID()), } @@ -111,16 +111,16 @@ func (c PoolClient) ListByBatchAccount(ctx context.Context, id BatchAccountId, o return } -// ListByBatchAccountComplete retrieves all the results into a single object -func (c PoolClient) ListByBatchAccountComplete(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions) (ListByBatchAccountCompleteResult, error) { - return c.ListByBatchAccountCompleteMatchingPredicate(ctx, id, options, PoolOperationPredicate{}) +// PoolListByBatchAccountComplete retrieves all the results into a single object +func (c PoolsClient) PoolListByBatchAccountComplete(ctx context.Context, id BatchAccountId, options PoolListByBatchAccountOperationOptions) (PoolListByBatchAccountCompleteResult, error) { + return c.PoolListByBatchAccountCompleteMatchingPredicate(ctx, id, options, PoolOperationPredicate{}) } -// ListByBatchAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PoolClient) ListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions, predicate PoolOperationPredicate) (result ListByBatchAccountCompleteResult, err error) { +// PoolListByBatchAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PoolsClient) PoolListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options PoolListByBatchAccountOperationOptions, predicate PoolOperationPredicate) (result PoolListByBatchAccountCompleteResult, err error) { items := make([]Pool, 0) - resp, err := c.ListByBatchAccount(ctx, id, options) + resp, err := c.PoolListByBatchAccount(ctx, id, options) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -134,7 +134,7 @@ func (c PoolClient) ListByBatchAccountCompleteMatchingPredicate(ctx context.Cont } } - result = ListByBatchAccountCompleteResult{ + result = PoolListByBatchAccountCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/batch/2024-07-01/pool/method_stopresize.go b/resource-manager/batch/2024-07-01/pools/method_poolstopresize.go similarity index 82% rename from resource-manager/batch/2024-07-01/pool/method_stopresize.go rename to resource-manager/batch/2024-07-01/pools/method_poolstopresize.go index e968c2a58ee..a479c192004 100644 --- a/resource-manager/batch/2024-07-01/pool/method_stopresize.go +++ b/resource-manager/batch/2024-07-01/pools/method_poolstopresize.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type StopResizeOperationResponse struct { +type PoolStopResizeOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Pool } -// StopResize ... -func (c PoolClient) StopResize(ctx context.Context, id PoolId) (result StopResizeOperationResponse, err error) { +// PoolStopResize ... +func (c PoolsClient) PoolStopResize(ctx context.Context, id PoolId) (result PoolStopResizeOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/pool/method_update.go b/resource-manager/batch/2024-07-01/pools/method_poolupdate.go similarity index 68% rename from resource-manager/batch/2024-07-01/pool/method_update.go rename to resource-manager/batch/2024-07-01/pools/method_poolupdate.go index 1bd909d87e9..c35362d4a07 100644 --- a/resource-manager/batch/2024-07-01/pool/method_update.go +++ b/resource-manager/batch/2024-07-01/pools/method_poolupdate.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "context" @@ -12,21 +12,21 @@ import ( // 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 { +type PoolUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Pool } -type UpdateOperationOptions struct { +type PoolUpdateOperationOptions struct { IfMatch *string } -func DefaultUpdateOperationOptions() UpdateOperationOptions { - return UpdateOperationOptions{} +func DefaultPoolUpdateOperationOptions() PoolUpdateOperationOptions { + return PoolUpdateOperationOptions{} } -func (o UpdateOperationOptions) ToHeaders() *client.Headers { +func (o PoolUpdateOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} if o.IfMatch != nil { out.Append("If-Match", fmt.Sprintf("%v", *o.IfMatch)) @@ -34,20 +34,20 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { return &out } -func (o UpdateOperationOptions) ToOData() *odata.Query { +func (o PoolUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o UpdateOperationOptions) ToQuery() *client.QueryParams { +func (o PoolUpdateOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} return &out } -// Update ... -func (c PoolClient) Update(ctx context.Context, id PoolId, input Pool, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { +// PoolUpdate ... +func (c PoolsClient) PoolUpdate(ctx context.Context, id PoolId, input Pool, options PoolUpdateOperationOptions) (result PoolUpdateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/pool/model_applicationpackagereference.go b/resource-manager/batch/2024-07-01/pools/model_applicationpackagereference.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_applicationpackagereference.go rename to resource-manager/batch/2024-07-01/pools/model_applicationpackagereference.go index cee391669f2..5b3cba2683f 100644 --- a/resource-manager/batch/2024-07-01/pool/model_applicationpackagereference.go +++ b/resource-manager/batch/2024-07-01/pools/model_applicationpackagereference.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_automaticosupgradepolicy.go b/resource-manager/batch/2024-07-01/pools/model_automaticosupgradepolicy.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_automaticosupgradepolicy.go rename to resource-manager/batch/2024-07-01/pools/model_automaticosupgradepolicy.go index 87cd1130189..713ceac253a 100644 --- a/resource-manager/batch/2024-07-01/pool/model_automaticosupgradepolicy.go +++ b/resource-manager/batch/2024-07-01/pools/model_automaticosupgradepolicy.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_autoscalerun.go b/resource-manager/batch/2024-07-01/pools/model_autoscalerun.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_autoscalerun.go rename to resource-manager/batch/2024-07-01/pools/model_autoscalerun.go index a7fc0434342..8205f667abb 100644 --- a/resource-manager/batch/2024-07-01/pool/model_autoscalerun.go +++ b/resource-manager/batch/2024-07-01/pools/model_autoscalerun.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "time" diff --git a/resource-manager/batch/2024-07-01/pool/model_autoscalerunerror.go b/resource-manager/batch/2024-07-01/pools/model_autoscalerunerror.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_autoscalerunerror.go rename to resource-manager/batch/2024-07-01/pools/model_autoscalerunerror.go index 48fe86695c2..188b070c2f3 100644 --- a/resource-manager/batch/2024-07-01/pool/model_autoscalerunerror.go +++ b/resource-manager/batch/2024-07-01/pools/model_autoscalerunerror.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_autoscalesettings.go b/resource-manager/batch/2024-07-01/pools/model_autoscalesettings.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_autoscalesettings.go rename to resource-manager/batch/2024-07-01/pools/model_autoscalesettings.go index 86d2808d4e4..cb625c3cb65 100644 --- a/resource-manager/batch/2024-07-01/pool/model_autoscalesettings.go +++ b/resource-manager/batch/2024-07-01/pools/model_autoscalesettings.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_autouserspecification.go b/resource-manager/batch/2024-07-01/pools/model_autouserspecification.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_autouserspecification.go rename to resource-manager/batch/2024-07-01/pools/model_autouserspecification.go index 4486ae5c662..40a70d9e05c 100644 --- a/resource-manager/batch/2024-07-01/pool/model_autouserspecification.go +++ b/resource-manager/batch/2024-07-01/pools/model_autouserspecification.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_azureblobfilesystemconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_azureblobfilesystemconfiguration.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_azureblobfilesystemconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_azureblobfilesystemconfiguration.go index 67efe0937db..79aff5dc0fc 100644 --- a/resource-manager/batch/2024-07-01/pool/model_azureblobfilesystemconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_azureblobfilesystemconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_azurefileshareconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_azurefileshareconfiguration.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_azurefileshareconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_azurefileshareconfiguration.go index 7ae87358d03..aed7f1aad9c 100644 --- a/resource-manager/batch/2024-07-01/pool/model_azurefileshareconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_azurefileshareconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_certificatereference.go b/resource-manager/batch/2024-07-01/pools/model_certificatereference.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_certificatereference.go rename to resource-manager/batch/2024-07-01/pools/model_certificatereference.go index d764ddbb7b9..350e9de9af6 100644 --- a/resource-manager/batch/2024-07-01/pool/model_certificatereference.go +++ b/resource-manager/batch/2024-07-01/pools/model_certificatereference.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_cifsmountconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_cifsmountconfiguration.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_cifsmountconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_cifsmountconfiguration.go index 12757b6d34a..e09ac10a1f8 100644 --- a/resource-manager/batch/2024-07-01/pool/model_cifsmountconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_cifsmountconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_computenodeidentityreference.go b/resource-manager/batch/2024-07-01/pools/model_computenodeidentityreference.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_computenodeidentityreference.go rename to resource-manager/batch/2024-07-01/pools/model_computenodeidentityreference.go index 5d061039b76..ef0f2c6731b 100644 --- a/resource-manager/batch/2024-07-01/pool/model_computenodeidentityreference.go +++ b/resource-manager/batch/2024-07-01/pools/model_computenodeidentityreference.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_containerconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_containerconfiguration.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_containerconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_containerconfiguration.go index 976a955be92..f3fe0f2fda6 100644 --- a/resource-manager/batch/2024-07-01/pool/model_containerconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_containerconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_containerhostbatchbindmountentry.go b/resource-manager/batch/2024-07-01/pools/model_containerhostbatchbindmountentry.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_containerhostbatchbindmountentry.go rename to resource-manager/batch/2024-07-01/pools/model_containerhostbatchbindmountentry.go index 17836613eea..b025c63d6ae 100644 --- a/resource-manager/batch/2024-07-01/pool/model_containerhostbatchbindmountentry.go +++ b/resource-manager/batch/2024-07-01/pools/model_containerhostbatchbindmountentry.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_containerregistry.go b/resource-manager/batch/2024-07-01/pools/model_containerregistry.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_containerregistry.go rename to resource-manager/batch/2024-07-01/pools/model_containerregistry.go index cc4b521ecad..93666fe1206 100644 --- a/resource-manager/batch/2024-07-01/pool/model_containerregistry.go +++ b/resource-manager/batch/2024-07-01/pools/model_containerregistry.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_datadisk.go b/resource-manager/batch/2024-07-01/pools/model_datadisk.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_datadisk.go rename to resource-manager/batch/2024-07-01/pools/model_datadisk.go index 8daa4484cbe..befae2ba112 100644 --- a/resource-manager/batch/2024-07-01/pool/model_datadisk.go +++ b/resource-manager/batch/2024-07-01/pools/model_datadisk.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_deploymentconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_deploymentconfiguration.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_deploymentconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_deploymentconfiguration.go index 8b159e23fe0..f9283f99371 100644 --- a/resource-manager/batch/2024-07-01/pool/model_deploymentconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_deploymentconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_diffdisksettings.go b/resource-manager/batch/2024-07-01/pools/model_diffdisksettings.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_diffdisksettings.go rename to resource-manager/batch/2024-07-01/pools/model_diffdisksettings.go index 4a6b0aabfb2..c2ffa60a7df 100644 --- a/resource-manager/batch/2024-07-01/pool/model_diffdisksettings.go +++ b/resource-manager/batch/2024-07-01/pools/model_diffdisksettings.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_diskencryptionconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_diskencryptionconfiguration.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_diskencryptionconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_diskencryptionconfiguration.go index b25a376a8cd..92401e09cec 100644 --- a/resource-manager/batch/2024-07-01/pool/model_diskencryptionconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_diskencryptionconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_environmentsetting.go b/resource-manager/batch/2024-07-01/pools/model_environmentsetting.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_environmentsetting.go rename to resource-manager/batch/2024-07-01/pools/model_environmentsetting.go index 6248e4aee95..18ace8b8c3b 100644 --- a/resource-manager/batch/2024-07-01/pool/model_environmentsetting.go +++ b/resource-manager/batch/2024-07-01/pools/model_environmentsetting.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_fixedscalesettings.go b/resource-manager/batch/2024-07-01/pools/model_fixedscalesettings.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_fixedscalesettings.go rename to resource-manager/batch/2024-07-01/pools/model_fixedscalesettings.go index 291d31fac89..f7b24a0fed0 100644 --- a/resource-manager/batch/2024-07-01/pool/model_fixedscalesettings.go +++ b/resource-manager/batch/2024-07-01/pools/model_fixedscalesettings.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_imagereference.go b/resource-manager/batch/2024-07-01/pools/model_imagereference.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_imagereference.go rename to resource-manager/batch/2024-07-01/pools/model_imagereference.go index 3a4ea821d41..b6ead8d2db4 100644 --- a/resource-manager/batch/2024-07-01/pool/model_imagereference.go +++ b/resource-manager/batch/2024-07-01/pools/model_imagereference.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_inboundnatpool.go b/resource-manager/batch/2024-07-01/pools/model_inboundnatpool.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_inboundnatpool.go rename to resource-manager/batch/2024-07-01/pools/model_inboundnatpool.go index 317ae85fa22..4fccfb0c83c 100644 --- a/resource-manager/batch/2024-07-01/pool/model_inboundnatpool.go +++ b/resource-manager/batch/2024-07-01/pools/model_inboundnatpool.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_linuxuserconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_linuxuserconfiguration.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_linuxuserconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_linuxuserconfiguration.go index 60148fc3cf4..d792de59e6b 100644 --- a/resource-manager/batch/2024-07-01/pool/model_linuxuserconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_linuxuserconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_manageddisk.go b/resource-manager/batch/2024-07-01/pools/model_manageddisk.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_manageddisk.go rename to resource-manager/batch/2024-07-01/pools/model_manageddisk.go index b4af15282c8..b631cc27e0e 100644 --- a/resource-manager/batch/2024-07-01/pool/model_manageddisk.go +++ b/resource-manager/batch/2024-07-01/pools/model_manageddisk.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_metadataitem.go b/resource-manager/batch/2024-07-01/pools/model_metadataitem.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_metadataitem.go rename to resource-manager/batch/2024-07-01/pools/model_metadataitem.go index 88e584f8828..e6efddb5bbe 100644 --- a/resource-manager/batch/2024-07-01/pool/model_metadataitem.go +++ b/resource-manager/batch/2024-07-01/pools/model_metadataitem.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_mountconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_mountconfiguration.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_mountconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_mountconfiguration.go index 699e78d963f..008a720e553 100644 --- a/resource-manager/batch/2024-07-01/pool/model_mountconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_mountconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_networkconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_networkconfiguration.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_networkconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_networkconfiguration.go index a4e7d5ab173..178315fcf55 100644 --- a/resource-manager/batch/2024-07-01/pool/model_networkconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_networkconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_networksecuritygrouprule.go b/resource-manager/batch/2024-07-01/pools/model_networksecuritygrouprule.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_networksecuritygrouprule.go rename to resource-manager/batch/2024-07-01/pools/model_networksecuritygrouprule.go index 5b341632086..fbe669cb130 100644 --- a/resource-manager/batch/2024-07-01/pool/model_networksecuritygrouprule.go +++ b/resource-manager/batch/2024-07-01/pools/model_networksecuritygrouprule.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_nfsmountconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_nfsmountconfiguration.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_nfsmountconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_nfsmountconfiguration.go index 7b4bac563c5..37a03c81871 100644 --- a/resource-manager/batch/2024-07-01/pool/model_nfsmountconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_nfsmountconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_nodeplacementconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_nodeplacementconfiguration.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_nodeplacementconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_nodeplacementconfiguration.go index 5b3284e1b91..50e701c5869 100644 --- a/resource-manager/batch/2024-07-01/pool/model_nodeplacementconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_nodeplacementconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_osdisk.go b/resource-manager/batch/2024-07-01/pools/model_osdisk.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_osdisk.go rename to resource-manager/batch/2024-07-01/pools/model_osdisk.go index a51976a2015..0c311634f40 100644 --- a/resource-manager/batch/2024-07-01/pool/model_osdisk.go +++ b/resource-manager/batch/2024-07-01/pools/model_osdisk.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_pool.go b/resource-manager/batch/2024-07-01/pools/model_pool.go similarity index 82% rename from resource-manager/batch/2024-07-01/pool/model_pool.go rename to resource-manager/batch/2024-07-01/pools/model_pool.go index ca9de248c6a..f612770a71b 100644 --- a/resource-manager/batch/2024-07-01/pool/model_pool.go +++ b/resource-manager/batch/2024-07-01/pools/model_pool.go @@ -1,7 +1,8 @@ -package pool +package pools import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" + "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" ) // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,6 +14,7 @@ type Pool struct { Identity *identity.UserAssignedMap `json:"identity,omitempty"` Name *string `json:"name,omitempty"` Properties *PoolProperties `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/batch/2024-07-01/pool/model_poolendpointconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_poolendpointconfiguration.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_poolendpointconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_poolendpointconfiguration.go index bb6db6ef74c..151f24a1a2b 100644 --- a/resource-manager/batch/2024-07-01/pool/model_poolendpointconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_poolendpointconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_poolproperties.go b/resource-manager/batch/2024-07-01/pools/model_poolproperties.go similarity index 99% rename from resource-manager/batch/2024-07-01/pool/model_poolproperties.go rename to resource-manager/batch/2024-07-01/pools/model_poolproperties.go index 31bed5fb1c9..1f73a1913d0 100644 --- a/resource-manager/batch/2024-07-01/pool/model_poolproperties.go +++ b/resource-manager/batch/2024-07-01/pools/model_poolproperties.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "time" diff --git a/resource-manager/batch/2024-07-01/pool/model_publicipaddressconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_publicipaddressconfiguration.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_publicipaddressconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_publicipaddressconfiguration.go index 99001d0826f..fb6876d2166 100644 --- a/resource-manager/batch/2024-07-01/pool/model_publicipaddressconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_publicipaddressconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_resizeerror.go b/resource-manager/batch/2024-07-01/pools/model_resizeerror.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_resizeerror.go rename to resource-manager/batch/2024-07-01/pools/model_resizeerror.go index 9b6eee87fdc..5d705d68102 100644 --- a/resource-manager/batch/2024-07-01/pool/model_resizeerror.go +++ b/resource-manager/batch/2024-07-01/pools/model_resizeerror.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_resizeoperationstatus.go b/resource-manager/batch/2024-07-01/pools/model_resizeoperationstatus.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_resizeoperationstatus.go rename to resource-manager/batch/2024-07-01/pools/model_resizeoperationstatus.go index b4ac9148d0c..b05f2c3d8e7 100644 --- a/resource-manager/batch/2024-07-01/pool/model_resizeoperationstatus.go +++ b/resource-manager/batch/2024-07-01/pools/model_resizeoperationstatus.go @@ -1,4 +1,4 @@ -package pool +package pools import ( "time" diff --git a/resource-manager/batch/2024-07-01/pool/model_resourcefile.go b/resource-manager/batch/2024-07-01/pools/model_resourcefile.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_resourcefile.go rename to resource-manager/batch/2024-07-01/pools/model_resourcefile.go index 00eb0fef9b2..ddc6bc2152a 100644 --- a/resource-manager/batch/2024-07-01/pool/model_resourcefile.go +++ b/resource-manager/batch/2024-07-01/pools/model_resourcefile.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_rollingupgradepolicy.go b/resource-manager/batch/2024-07-01/pools/model_rollingupgradepolicy.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_rollingupgradepolicy.go rename to resource-manager/batch/2024-07-01/pools/model_rollingupgradepolicy.go index e8e4ad8d4fa..ed2e8de01b4 100644 --- a/resource-manager/batch/2024-07-01/pool/model_rollingupgradepolicy.go +++ b/resource-manager/batch/2024-07-01/pools/model_rollingupgradepolicy.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_scalesettings.go b/resource-manager/batch/2024-07-01/pools/model_scalesettings.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_scalesettings.go rename to resource-manager/batch/2024-07-01/pools/model_scalesettings.go index afed1acf196..00905c62b5f 100644 --- a/resource-manager/batch/2024-07-01/pool/model_scalesettings.go +++ b/resource-manager/batch/2024-07-01/pools/model_scalesettings.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_securityprofile.go b/resource-manager/batch/2024-07-01/pools/model_securityprofile.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_securityprofile.go rename to resource-manager/batch/2024-07-01/pools/model_securityprofile.go index c3f6631223f..f436cd06a8a 100644 --- a/resource-manager/batch/2024-07-01/pool/model_securityprofile.go +++ b/resource-manager/batch/2024-07-01/pools/model_securityprofile.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_serviceartifactreference.go b/resource-manager/batch/2024-07-01/pools/model_serviceartifactreference.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_serviceartifactreference.go rename to resource-manager/batch/2024-07-01/pools/model_serviceartifactreference.go index ce21152df9d..6e661d4ea82 100644 --- a/resource-manager/batch/2024-07-01/pool/model_serviceartifactreference.go +++ b/resource-manager/batch/2024-07-01/pools/model_serviceartifactreference.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_starttask.go b/resource-manager/batch/2024-07-01/pools/model_starttask.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_starttask.go rename to resource-manager/batch/2024-07-01/pools/model_starttask.go index 6846c81fcb7..d8cbfc6dc95 100644 --- a/resource-manager/batch/2024-07-01/pool/model_starttask.go +++ b/resource-manager/batch/2024-07-01/pools/model_starttask.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_taskcontainersettings.go b/resource-manager/batch/2024-07-01/pools/model_taskcontainersettings.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_taskcontainersettings.go rename to resource-manager/batch/2024-07-01/pools/model_taskcontainersettings.go index ade200de619..c6ed12dc880 100644 --- a/resource-manager/batch/2024-07-01/pool/model_taskcontainersettings.go +++ b/resource-manager/batch/2024-07-01/pools/model_taskcontainersettings.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_taskschedulingpolicy.go b/resource-manager/batch/2024-07-01/pools/model_taskschedulingpolicy.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_taskschedulingpolicy.go rename to resource-manager/batch/2024-07-01/pools/model_taskschedulingpolicy.go index ad42b99fa04..5764e353a25 100644 --- a/resource-manager/batch/2024-07-01/pool/model_taskschedulingpolicy.go +++ b/resource-manager/batch/2024-07-01/pools/model_taskschedulingpolicy.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_uefisettings.go b/resource-manager/batch/2024-07-01/pools/model_uefisettings.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_uefisettings.go rename to resource-manager/batch/2024-07-01/pools/model_uefisettings.go index fd6d6836bac..95f18e8ed88 100644 --- a/resource-manager/batch/2024-07-01/pool/model_uefisettings.go +++ b/resource-manager/batch/2024-07-01/pools/model_uefisettings.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_upgradepolicy.go b/resource-manager/batch/2024-07-01/pools/model_upgradepolicy.go similarity index 96% rename from resource-manager/batch/2024-07-01/pool/model_upgradepolicy.go rename to resource-manager/batch/2024-07-01/pools/model_upgradepolicy.go index 67e90bfc5d5..e4473663c41 100644 --- a/resource-manager/batch/2024-07-01/pool/model_upgradepolicy.go +++ b/resource-manager/batch/2024-07-01/pools/model_upgradepolicy.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_useraccount.go b/resource-manager/batch/2024-07-01/pools/model_useraccount.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/model_useraccount.go rename to resource-manager/batch/2024-07-01/pools/model_useraccount.go index e22af08ada5..1829e8efc4d 100644 --- a/resource-manager/batch/2024-07-01/pool/model_useraccount.go +++ b/resource-manager/batch/2024-07-01/pools/model_useraccount.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_useridentity.go b/resource-manager/batch/2024-07-01/pools/model_useridentity.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_useridentity.go rename to resource-manager/batch/2024-07-01/pools/model_useridentity.go index 89ef2a53df9..69637324459 100644 --- a/resource-manager/batch/2024-07-01/pool/model_useridentity.go +++ b/resource-manager/batch/2024-07-01/pools/model_useridentity.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_virtualmachineconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_virtualmachineconfiguration.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_virtualmachineconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_virtualmachineconfiguration.go index eb6ddfadac1..157bae02d1d 100644 --- a/resource-manager/batch/2024-07-01/pool/model_virtualmachineconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_virtualmachineconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_vmdisksecurityprofile.go b/resource-manager/batch/2024-07-01/pools/model_vmdisksecurityprofile.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_vmdisksecurityprofile.go rename to resource-manager/batch/2024-07-01/pools/model_vmdisksecurityprofile.go index d3f93c78ff6..227db7f26e9 100644 --- a/resource-manager/batch/2024-07-01/pool/model_vmdisksecurityprofile.go +++ b/resource-manager/batch/2024-07-01/pools/model_vmdisksecurityprofile.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_vmextension.go b/resource-manager/batch/2024-07-01/pools/model_vmextension.go similarity index 98% rename from resource-manager/batch/2024-07-01/pool/model_vmextension.go rename to resource-manager/batch/2024-07-01/pools/model_vmextension.go index 9c6f4b36afd..386a8c9aeac 100644 --- a/resource-manager/batch/2024-07-01/pool/model_vmextension.go +++ b/resource-manager/batch/2024-07-01/pools/model_vmextension.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_windowsconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_windowsconfiguration.go similarity index 95% rename from resource-manager/batch/2024-07-01/pool/model_windowsconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_windowsconfiguration.go index f3f44236405..613123f1ece 100644 --- a/resource-manager/batch/2024-07-01/pool/model_windowsconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_windowsconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/model_windowsuserconfiguration.go b/resource-manager/batch/2024-07-01/pools/model_windowsuserconfiguration.go similarity index 94% rename from resource-manager/batch/2024-07-01/pool/model_windowsuserconfiguration.go rename to resource-manager/batch/2024-07-01/pools/model_windowsuserconfiguration.go index f977e22b75a..3b38bd2854a 100644 --- a/resource-manager/batch/2024-07-01/pool/model_windowsuserconfiguration.go +++ b/resource-manager/batch/2024-07-01/pools/model_windowsuserconfiguration.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/predicates.go b/resource-manager/batch/2024-07-01/pools/predicates.go similarity index 97% rename from resource-manager/batch/2024-07-01/pool/predicates.go rename to resource-manager/batch/2024-07-01/pools/predicates.go index 49ae3e2310d..1dd04f53eb5 100644 --- a/resource-manager/batch/2024-07-01/pool/predicates.go +++ b/resource-manager/batch/2024-07-01/pools/predicates.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/pool/version.go b/resource-manager/batch/2024-07-01/pools/version.go similarity index 77% rename from resource-manager/batch/2024-07-01/pool/version.go rename to resource-manager/batch/2024-07-01/pools/version.go index 3207a41aa77..aea5c5d9fb0 100644 --- a/resource-manager/batch/2024-07-01/pool/version.go +++ b/resource-manager/batch/2024-07-01/pools/version.go @@ -1,4 +1,4 @@ -package pool +package pools // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package pool const defaultApiVersion = "2024-07-01" func userAgent() string { - return "hashicorp/go-azure-sdk/pool/2024-07-01" + return "hashicorp/go-azure-sdk/pools/2024-07-01" } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/README.md b/resource-manager/batch/2024-07-01/privateendpointconnection/README.md deleted file mode 100644 index b99e1db6ddc..00000000000 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privateendpointconnection` Documentation - -The `privateendpointconnection` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/privateendpointconnection" -``` - - -### Client Initialization - -```go -client := privateendpointconnection.NewPrivateEndpointConnectionClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateEndpointConnectionClient.Delete` - -```go -ctx := context.TODO() -id := privateendpointconnection.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "privateEndpointConnectionName") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointConnectionClient.Get` - -```go -ctx := context.TODO() -id := privateendpointconnection.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "privateEndpointConnectionName") - -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: `PrivateEndpointConnectionClient.ListByBatchAccount` - -```go -ctx := context.TODO() -id := privateendpointconnection.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -// alternatively `client.ListByBatchAccount(ctx, id, privateendpointconnection.DefaultListByBatchAccountOperationOptions())` can be used to do batched pagination -items, err := client.ListByBatchAccountComplete(ctx, id, privateendpointconnection.DefaultListByBatchAccountOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointConnectionClient.Update` - -```go -ctx := context.TODO() -id := privateendpointconnection.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "privateEndpointConnectionName") - -payload := privateendpointconnection.PrivateEndpointConnection{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload, privateendpointconnection.DefaultUpdateOperationOptions()); err != nil { - // handle the error -} -``` diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount.go b/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount.go deleted file mode 100644 index 686c510807f..00000000000 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount.go +++ /dev/null @@ -1,130 +0,0 @@ -package privateendpointconnection - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&BatchAccountId{}) -} - -var _ resourceids.ResourceId = &BatchAccountId{} - -// BatchAccountId is a struct representing the Resource ID for a Batch Account -type BatchAccountId struct { - SubscriptionId string - ResourceGroupName string - BatchAccountName string -} - -// NewBatchAccountID returns a new BatchAccountId struct -func NewBatchAccountID(subscriptionId string, resourceGroupName string, batchAccountName string) BatchAccountId { - return BatchAccountId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - BatchAccountName: batchAccountName, - } -} - -// ParseBatchAccountID parses 'input' into a BatchAccountId -func ParseBatchAccountID(input string) (*BatchAccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := BatchAccountId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseBatchAccountIDInsensitively parses 'input' case-insensitively into a BatchAccountId -// note: this method should only be used for API response data and not user input -func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := BatchAccountId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *BatchAccountId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) - } - - return nil -} - -// ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID -func ValidateBatchAccountID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBatchAccountID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Batch Account ID -func (id BatchAccountId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Batch/batchAccounts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BatchAccountName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Batch Account ID -func (id BatchAccountId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftBatch", "Microsoft.Batch", "Microsoft.Batch"), - resourceids.StaticSegment("staticBatchAccounts", "batchAccounts", "batchAccounts"), - resourceids.UserSpecifiedSegment("batchAccountName", "batchAccountName"), - } -} - -// String returns a human-readable description of this Batch Account ID -func (id BatchAccountId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Batch Account Name: %q", id.BatchAccountName), - } - return fmt.Sprintf("Batch Account (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount_test.go deleted file mode 100644 index 11b7b035660..00000000000 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/id_batchaccount_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privateendpointconnection - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &BatchAccountId{} - -func TestNewBatchAccountID(t *testing.T) { - id := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.BatchAccountName != "batchAccountName" { - t.Fatalf("Expected %q but got %q for Segment 'BatchAccountName'", id.BatchAccountName, "batchAccountName") - } -} - -func TestFormatBatchAccountID(t *testing.T) { - actual := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBatchAccountID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BatchAccountId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BatchAccountName: "batchAccountName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBatchAccountID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BatchAccountName != v.Expected.BatchAccountName { - t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) - } - - } -} - -func TestParseBatchAccountIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BatchAccountId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BatchAccountName: "batchAccountName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - BatchAccountName: "bAtChAcCoUnTnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBatchAccountIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BatchAccountName != v.Expected.BatchAccountName { - t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) - } - - } -} - -func TestSegmentsForBatchAccountId(t *testing.T) { - segments := BatchAccountId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BatchAccountId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/method_listbybatchaccount.go b/resource-manager/batch/2024-07-01/privateendpointconnection/method_listbybatchaccount.go deleted file mode 100644 index 5ed91d577fe..00000000000 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/method_listbybatchaccount.go +++ /dev/null @@ -1,134 +0,0 @@ -package privateendpointconnection - -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 ListByBatchAccountOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateEndpointConnection -} - -type ListByBatchAccountCompleteResult struct { - LatestHttpResponse *http.Response - Items []PrivateEndpointConnection -} - -type ListByBatchAccountOperationOptions struct { - Maxresults *int64 -} - -func DefaultListByBatchAccountOperationOptions() ListByBatchAccountOperationOptions { - return ListByBatchAccountOperationOptions{} -} - -func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - - return &out -} - -func (o ListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Maxresults != nil { - out.Append("maxresults", fmt.Sprintf("%v", *o.Maxresults)) - } - return &out -} - -type ListByBatchAccountCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByBatchAccountCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByBatchAccount ... -func (c PrivateEndpointConnectionClient) ListByBatchAccount(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions) (result ListByBatchAccountOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListByBatchAccountCustomPager{}, - 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 -} - -// ListByBatchAccountComplete retrieves all the results into a single object -func (c PrivateEndpointConnectionClient) ListByBatchAccountComplete(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions) (ListByBatchAccountCompleteResult, error) { - return c.ListByBatchAccountCompleteMatchingPredicate(ctx, id, options, PrivateEndpointConnectionOperationPredicate{}) -} - -// ListByBatchAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointConnectionClient) ListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions, predicate PrivateEndpointConnectionOperationPredicate) (result ListByBatchAccountCompleteResult, err error) { - items := make([]PrivateEndpointConnection, 0) - - resp, err := c.ListByBatchAccount(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByBatchAccountCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/version.go b/resource-manager/batch/2024-07-01/privateendpointconnection/version.go deleted file mode 100644 index 80e7166f569..00000000000 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpointconnection - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-07-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/privateendpointconnection/2024-07-01" -} diff --git a/resource-manager/batch/2024-07-01/privateendpointconnections/README.md b/resource-manager/batch/2024-07-01/privateendpointconnections/README.md new file mode 100644 index 00000000000..87fd3d61d3a --- /dev/null +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privateendpointconnections` Documentation + +The `privateendpointconnections` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/privateendpointconnections" +``` + + +### Client Initialization + +```go +client := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.PrivateEndpointConnectionDelete` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "privateEndpointConnectionName") + +if err := client.PrivateEndpointConnectionDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.PrivateEndpointConnectionGet` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "privateEndpointConnectionName") + +read, err := client.PrivateEndpointConnectionGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.PrivateEndpointConnectionListByBatchAccount` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +// alternatively `client.PrivateEndpointConnectionListByBatchAccount(ctx, id, privateendpointconnections.DefaultPrivateEndpointConnectionListByBatchAccountOperationOptions())` can be used to do batched pagination +items, err := client.PrivateEndpointConnectionListByBatchAccountComplete(ctx, id, privateendpointconnections.DefaultPrivateEndpointConnectionListByBatchAccountOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `PrivateEndpointConnectionsClient.PrivateEndpointConnectionUpdate` + +```go +ctx := context.TODO() +id := privateendpointconnections.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "privateEndpointConnectionName") + +payload := privateendpointconnections.PrivateEndpointConnection{ + // ... +} + + +if err := client.PrivateEndpointConnectionUpdateThenPoll(ctx, id, payload, privateendpointconnections.DefaultPrivateEndpointConnectionUpdateOperationOptions()); err != nil { + // handle the error +} +``` diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/client.go b/resource-manager/batch/2024-07-01/privateendpointconnections/client.go similarity index 63% rename from resource-manager/batch/2024-07-01/privateendpointconnection/client.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/client.go index 60f4edcfcfb..50eaf09dcce 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/client.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/client.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type PrivateEndpointConnectionClient struct { +type PrivateEndpointConnectionsClient struct { Client *resourcemanager.Client } -func NewPrivateEndpointConnectionClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnection", defaultApiVersion) +func NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateEndpointConnectionsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "privateendpointconnections", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating PrivateEndpointConnectionClient: %+v", err) + return nil, fmt.Errorf("instantiating PrivateEndpointConnectionsClient: %+v", err) } - return &PrivateEndpointConnectionClient{ + return &PrivateEndpointConnectionsClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/constants.go b/resource-manager/batch/2024-07-01/privateendpointconnections/constants.go similarity index 99% rename from resource-manager/batch/2024-07-01/privateendpointconnection/constants.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/constants.go index d321de07a50..bfc722f661d 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/constants.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/constants.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections import ( "encoding/json" diff --git a/resource-manager/batch/2024-07-01/privateendpointconnections/id_batchaccount.go b/resource-manager/batch/2024-07-01/privateendpointconnections/id_batchaccount.go new file mode 100644 index 00000000000..48589d473e8 --- /dev/null +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/id_batchaccount.go @@ -0,0 +1,130 @@ +package privateendpointconnections + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&BatchAccountId{}) +} + +var _ resourceids.ResourceId = &BatchAccountId{} + +// BatchAccountId is a struct representing the Resource ID for a Batch Account +type BatchAccountId struct { + SubscriptionId string + ResourceGroupName string + BatchAccountName string +} + +// NewBatchAccountID returns a new BatchAccountId struct +func NewBatchAccountID(subscriptionId string, resourceGroupName string, batchAccountName string) BatchAccountId { + return BatchAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + BatchAccountName: batchAccountName, + } +} + +// ParseBatchAccountID parses 'input' into a BatchAccountId +func ParseBatchAccountID(input string) (*BatchAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BatchAccountId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBatchAccountIDInsensitively parses 'input' case-insensitively into a BatchAccountId +// note: this method should only be used for API response data and not user input +func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BatchAccountId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BatchAccountId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) + } + + return nil +} + +// ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID +func ValidateBatchAccountID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseBatchAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Batch Account ID +func (id BatchAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Batch/batchAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BatchAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Batch Account ID +func (id BatchAccountId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftBatch", "Microsoft.Batch", "Microsoft.Batch"), + resourceids.StaticSegment("staticBatchAccounts", "batchAccounts", "batchAccounts"), + resourceids.UserSpecifiedSegment("batchAccountName", "batchAccountName"), + } +} + +// String returns a human-readable description of this Batch Account ID +func (id BatchAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Batch Account Name: %q", id.BatchAccountName), + } + return fmt.Sprintf("Batch Account (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/batch/2024-07-01/privateendpointconnections/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/privateendpointconnections/id_batchaccount_test.go new file mode 100644 index 00000000000..e042c771abf --- /dev/null +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/id_batchaccount_test.go @@ -0,0 +1,282 @@ +package privateendpointconnections + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &BatchAccountId{} + +func TestNewBatchAccountID(t *testing.T) { + id := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.BatchAccountName != "batchAccountName" { + t.Fatalf("Expected %q but got %q for Segment 'BatchAccountName'", id.BatchAccountName, "batchAccountName") + } +} + +func TestFormatBatchAccountID(t *testing.T) { + actual := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseBatchAccountID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *BatchAccountId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + BatchAccountName: "batchAccountName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseBatchAccountID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.BatchAccountName != v.Expected.BatchAccountName { + t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) + } + + } +} + +func TestParseBatchAccountIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *BatchAccountId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + BatchAccountName: "batchAccountName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + BatchAccountName: "bAtChAcCoUnTnAmE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseBatchAccountIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.BatchAccountName != v.Expected.BatchAccountName { + t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) + } + + } +} + +func TestSegmentsForBatchAccountId(t *testing.T) { + segments := BatchAccountId{}.Segments() + if len(segments) == 0 { + t.Fatalf("BatchAccountId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection.go b/resource-manager/batch/2024-07-01/privateendpointconnections/id_privateendpointconnection.go similarity index 99% rename from resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/id_privateendpointconnection.go index c8419c90b3a..9a73f020afb 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/id_privateendpointconnection.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection_test.go b/resource-manager/batch/2024-07-01/privateendpointconnections/id_privateendpointconnection_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection_test.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/id_privateendpointconnection_test.go index c38620f9e86..0da16d09dc0 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/id_privateendpointconnection_test.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/id_privateendpointconnection_test.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections import ( "testing" diff --git a/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectiondelete.go b/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectiondelete.go new file mode 100644 index 00000000000..5a1a65a1082 --- /dev/null +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectiondelete.go @@ -0,0 +1,70 @@ +package privateendpointconnections + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionDeleteOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// PrivateEndpointConnectionDelete ... +func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionDelete(ctx context.Context, id PrivateEndpointConnectionId) (result PrivateEndpointConnectionDeleteOperationResponse, 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 +} + +// PrivateEndpointConnectionDeleteThenPoll performs PrivateEndpointConnectionDelete then polls until it's completed +func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionDeleteThenPoll(ctx context.Context, id PrivateEndpointConnectionId) error { + result, err := c.PrivateEndpointConnectionDelete(ctx, id) + if err != nil { + return fmt.Errorf("performing PrivateEndpointConnectionDelete: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after PrivateEndpointConnectionDelete: %+v", err) + } + + return nil +} diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/method_get.go b/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionget.go similarity index 74% rename from resource-manager/batch/2024-07-01/privateendpointconnection/method_get.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionget.go index 0658c39bfa5..a8b1b89766a 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/method_get.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionget.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type PrivateEndpointConnectionGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *PrivateEndpointConnection } -// Get ... -func (c PrivateEndpointConnectionClient) Get(ctx context.Context, id PrivateEndpointConnectionId) (result GetOperationResponse, err error) { +// PrivateEndpointConnectionGet ... +func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionGet(ctx context.Context, id PrivateEndpointConnectionId) (result PrivateEndpointConnectionGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionlistbybatchaccount.go b/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionlistbybatchaccount.go new file mode 100644 index 00000000000..2dd4000e34b --- /dev/null +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionlistbybatchaccount.go @@ -0,0 +1,134 @@ +package privateendpointconnections + +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 PrivateEndpointConnectionListByBatchAccountOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]PrivateEndpointConnection +} + +type PrivateEndpointConnectionListByBatchAccountCompleteResult struct { + LatestHttpResponse *http.Response + Items []PrivateEndpointConnection +} + +type PrivateEndpointConnectionListByBatchAccountOperationOptions struct { + Maxresults *int64 +} + +func DefaultPrivateEndpointConnectionListByBatchAccountOperationOptions() PrivateEndpointConnectionListByBatchAccountOperationOptions { + return PrivateEndpointConnectionListByBatchAccountOperationOptions{} +} + +func (o PrivateEndpointConnectionListByBatchAccountOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o PrivateEndpointConnectionListByBatchAccountOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o PrivateEndpointConnectionListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Maxresults != nil { + out.Append("maxresults", fmt.Sprintf("%v", *o.Maxresults)) + } + return &out +} + +type PrivateEndpointConnectionListByBatchAccountCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *PrivateEndpointConnectionListByBatchAccountCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// PrivateEndpointConnectionListByBatchAccount ... +func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListByBatchAccount(ctx context.Context, id BatchAccountId, options PrivateEndpointConnectionListByBatchAccountOperationOptions) (result PrivateEndpointConnectionListByBatchAccountOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &PrivateEndpointConnectionListByBatchAccountCustomPager{}, + 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 +} + +// PrivateEndpointConnectionListByBatchAccountComplete retrieves all the results into a single object +func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListByBatchAccountComplete(ctx context.Context, id BatchAccountId, options PrivateEndpointConnectionListByBatchAccountOperationOptions) (PrivateEndpointConnectionListByBatchAccountCompleteResult, error) { + return c.PrivateEndpointConnectionListByBatchAccountCompleteMatchingPredicate(ctx, id, options, PrivateEndpointConnectionOperationPredicate{}) +} + +// PrivateEndpointConnectionListByBatchAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options PrivateEndpointConnectionListByBatchAccountOperationOptions, predicate PrivateEndpointConnectionOperationPredicate) (result PrivateEndpointConnectionListByBatchAccountCompleteResult, err error) { + items := make([]PrivateEndpointConnection, 0) + + resp, err := c.PrivateEndpointConnectionListByBatchAccount(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = PrivateEndpointConnectionListByBatchAccountCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/method_update.go b/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionupdate.go similarity index 50% rename from resource-manager/batch/2024-07-01/privateendpointconnection/method_update.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionupdate.go index e7dfdb4d83f..973d9961128 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/method_update.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/method_privateendpointconnectionupdate.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections import ( "context" @@ -14,22 +14,22 @@ import ( // 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 { +type PrivateEndpointConnectionUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData Model *PrivateEndpointConnection } -type UpdateOperationOptions struct { +type PrivateEndpointConnectionUpdateOperationOptions struct { IfMatch *string } -func DefaultUpdateOperationOptions() UpdateOperationOptions { - return UpdateOperationOptions{} +func DefaultPrivateEndpointConnectionUpdateOperationOptions() PrivateEndpointConnectionUpdateOperationOptions { + return PrivateEndpointConnectionUpdateOperationOptions{} } -func (o UpdateOperationOptions) ToHeaders() *client.Headers { +func (o PrivateEndpointConnectionUpdateOperationOptions) ToHeaders() *client.Headers { out := client.Headers{} if o.IfMatch != nil { out.Append("If-Match", fmt.Sprintf("%v", *o.IfMatch)) @@ -37,20 +37,20 @@ func (o UpdateOperationOptions) ToHeaders() *client.Headers { return &out } -func (o UpdateOperationOptions) ToOData() *odata.Query { +func (o PrivateEndpointConnectionUpdateOperationOptions) ToOData() *odata.Query { out := odata.Query{} return &out } -func (o UpdateOperationOptions) ToQuery() *client.QueryParams { +func (o PrivateEndpointConnectionUpdateOperationOptions) ToQuery() *client.QueryParams { out := client.QueryParams{} return &out } -// Update ... -func (c PrivateEndpointConnectionClient) Update(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection, options UpdateOperationOptions) (result UpdateOperationResponse, err error) { +// PrivateEndpointConnectionUpdate ... +func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionUpdate(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection, options PrivateEndpointConnectionUpdateOperationOptions) (result PrivateEndpointConnectionUpdateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -89,15 +89,15 @@ func (c PrivateEndpointConnectionClient) Update(ctx context.Context, id PrivateE return } -// UpdateThenPoll performs Update then polls until it's completed -func (c PrivateEndpointConnectionClient) UpdateThenPoll(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection, options UpdateOperationOptions) error { - result, err := c.Update(ctx, id, input, options) +// PrivateEndpointConnectionUpdateThenPoll performs PrivateEndpointConnectionUpdate then polls until it's completed +func (c PrivateEndpointConnectionsClient) PrivateEndpointConnectionUpdateThenPoll(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection, options PrivateEndpointConnectionUpdateOperationOptions) error { + result, err := c.PrivateEndpointConnectionUpdate(ctx, id, input, options) if err != nil { - return fmt.Errorf("performing Update: %+v", err) + return fmt.Errorf("performing PrivateEndpointConnectionUpdate: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) + return fmt.Errorf("polling after PrivateEndpointConnectionUpdate: %+v", err) } return nil diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/model_privateendpoint.go b/resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpoint.go similarity index 86% rename from resource-manager/batch/2024-07-01/privateendpointconnection/model_privateendpoint.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpoint.go index 36d044c72d1..1bc8cf2a97c 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/model_privateendpoint.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpoint.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/model_privateendpointconnection.go b/resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpointconnection.go similarity index 76% rename from resource-manager/batch/2024-07-01/privateendpointconnection/model_privateendpointconnection.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpointconnection.go index 47b9b151ef6..539c6b9a036 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/model_privateendpointconnection.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpointconnection.go @@ -1,4 +1,8 @@ -package privateendpointconnection +package privateendpointconnections + +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. @@ -8,6 +12,7 @@ type PrivateEndpointConnection struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *PrivateEndpointConnectionProperties `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/batch/2024-07-01/privateendpointconnection/model_privateendpointconnectionproperties.go b/resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpointconnectionproperties.go similarity index 95% rename from resource-manager/batch/2024-07-01/privateendpointconnection/model_privateendpointconnectionproperties.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpointconnectionproperties.go index 44a28007fe1..9772469a812 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/model_privateendpointconnectionproperties.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/model_privateendpointconnectionproperties.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/model_privatelinkserviceconnectionstate.go b/resource-manager/batch/2024-07-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go similarity index 92% rename from resource-manager/batch/2024-07-01/privateendpointconnection/model_privatelinkserviceconnectionstate.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go index 278ed02405a..d7ae83ad4d8 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/model_privatelinkserviceconnectionstate.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/model_privatelinkserviceconnectionstate.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/predicates.go b/resource-manager/batch/2024-07-01/privateendpointconnections/predicates.go similarity index 95% rename from resource-manager/batch/2024-07-01/privateendpointconnection/predicates.go rename to resource-manager/batch/2024-07-01/privateendpointconnections/predicates.go index 92647ebc1ea..fac337a4245 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/predicates.go +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/predicates.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package privateendpointconnections // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/privateendpointconnections/version.go b/resource-manager/batch/2024-07-01/privateendpointconnections/version.go new file mode 100644 index 00000000000..2b664927c6c --- /dev/null +++ b/resource-manager/batch/2024-07-01/privateendpointconnections/version.go @@ -0,0 +1,10 @@ +package privateendpointconnections + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/privateendpointconnections/2024-07-01" +} diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/README.md b/resource-manager/batch/2024-07-01/privatelinkresource/README.md deleted file mode 100644 index 531aa1a0568..00000000000 --- a/resource-manager/batch/2024-07-01/privatelinkresource/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privatelinkresource` Documentation - -The `privatelinkresource` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/privatelinkresource" -``` - - -### Client Initialization - -```go -client := privatelinkresource.NewPrivateLinkResourceClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateLinkResourceClient.Get` - -```go -ctx := context.TODO() -id := privatelinkresource.NewPrivateLinkResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "privateLinkResourceName") - -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: `PrivateLinkResourceClient.ListByBatchAccount` - -```go -ctx := context.TODO() -id := privatelinkresource.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - -// alternatively `client.ListByBatchAccount(ctx, id, privatelinkresource.DefaultListByBatchAccountOperationOptions())` can be used to do batched pagination -items, err := client.ListByBatchAccountComplete(ctx, id, privatelinkresource.DefaultListByBatchAccountOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount.go b/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount.go deleted file mode 100644 index 9bd1aa4df28..00000000000 --- a/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount.go +++ /dev/null @@ -1,130 +0,0 @@ -package privatelinkresource - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&BatchAccountId{}) -} - -var _ resourceids.ResourceId = &BatchAccountId{} - -// BatchAccountId is a struct representing the Resource ID for a Batch Account -type BatchAccountId struct { - SubscriptionId string - ResourceGroupName string - BatchAccountName string -} - -// NewBatchAccountID returns a new BatchAccountId struct -func NewBatchAccountID(subscriptionId string, resourceGroupName string, batchAccountName string) BatchAccountId { - return BatchAccountId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - BatchAccountName: batchAccountName, - } -} - -// ParseBatchAccountID parses 'input' into a BatchAccountId -func ParseBatchAccountID(input string) (*BatchAccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := BatchAccountId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseBatchAccountIDInsensitively parses 'input' case-insensitively into a BatchAccountId -// note: this method should only be used for API response data and not user input -func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { - parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := BatchAccountId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *BatchAccountId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) - } - - return nil -} - -// ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID -func ValidateBatchAccountID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBatchAccountID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Batch Account ID -func (id BatchAccountId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Batch/batchAccounts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BatchAccountName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Batch Account ID -func (id BatchAccountId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftBatch", "Microsoft.Batch", "Microsoft.Batch"), - resourceids.StaticSegment("staticBatchAccounts", "batchAccounts", "batchAccounts"), - resourceids.UserSpecifiedSegment("batchAccountName", "batchAccountName"), - } -} - -// String returns a human-readable description of this Batch Account ID -func (id BatchAccountId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Batch Account Name: %q", id.BatchAccountName), - } - return fmt.Sprintf("Batch Account (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount_test.go deleted file mode 100644 index 55722fd5e6a..00000000000 --- a/resource-manager/batch/2024-07-01/privatelinkresource/id_batchaccount_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatelinkresource - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &BatchAccountId{} - -func TestNewBatchAccountID(t *testing.T) { - id := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.BatchAccountName != "batchAccountName" { - t.Fatalf("Expected %q but got %q for Segment 'BatchAccountName'", id.BatchAccountName, "batchAccountName") - } -} - -func TestFormatBatchAccountID(t *testing.T) { - actual := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBatchAccountID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BatchAccountId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BatchAccountName: "batchAccountName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBatchAccountID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BatchAccountName != v.Expected.BatchAccountName { - t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) - } - - } -} - -func TestParseBatchAccountIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BatchAccountId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BatchAccountName: "batchAccountName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE", - Expected: &BatchAccountId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - BatchAccountName: "bAtChAcCoUnTnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBatchAccountIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BatchAccountName != v.Expected.BatchAccountName { - t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) - } - - } -} - -func TestSegmentsForBatchAccountId(t *testing.T) { - segments := BatchAccountId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BatchAccountId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/method_listbybatchaccount.go b/resource-manager/batch/2024-07-01/privatelinkresource/method_listbybatchaccount.go deleted file mode 100644 index e74b98a7760..00000000000 --- a/resource-manager/batch/2024-07-01/privatelinkresource/method_listbybatchaccount.go +++ /dev/null @@ -1,134 +0,0 @@ -package privatelinkresource - -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 ListByBatchAccountOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateLinkResource -} - -type ListByBatchAccountCompleteResult struct { - LatestHttpResponse *http.Response - Items []PrivateLinkResource -} - -type ListByBatchAccountOperationOptions struct { - Maxresults *int64 -} - -func DefaultListByBatchAccountOperationOptions() ListByBatchAccountOperationOptions { - return ListByBatchAccountOperationOptions{} -} - -func (o ListByBatchAccountOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListByBatchAccountOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - - return &out -} - -func (o ListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Maxresults != nil { - out.Append("maxresults", fmt.Sprintf("%v", *o.Maxresults)) - } - return &out -} - -type ListByBatchAccountCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByBatchAccountCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByBatchAccount ... -func (c PrivateLinkResourceClient) ListByBatchAccount(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions) (result ListByBatchAccountOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListByBatchAccountCustomPager{}, - 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 *[]PrivateLinkResource `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByBatchAccountComplete retrieves all the results into a single object -func (c PrivateLinkResourceClient) ListByBatchAccountComplete(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions) (ListByBatchAccountCompleteResult, error) { - return c.ListByBatchAccountCompleteMatchingPredicate(ctx, id, options, PrivateLinkResourceOperationPredicate{}) -} - -// ListByBatchAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkResourceClient) ListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options ListByBatchAccountOperationOptions, predicate PrivateLinkResourceOperationPredicate) (result ListByBatchAccountCompleteResult, err error) { - items := make([]PrivateLinkResource, 0) - - resp, err := c.ListByBatchAccount(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByBatchAccountCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/version.go b/resource-manager/batch/2024-07-01/privatelinkresource/version.go deleted file mode 100644 index af7b4d607f9..00000000000 --- a/resource-manager/batch/2024-07-01/privatelinkresource/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkresource - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-07-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/privatelinkresource/2024-07-01" -} diff --git a/resource-manager/batch/2024-07-01/privatelinkresources/README.md b/resource-manager/batch/2024-07-01/privatelinkresources/README.md new file mode 100644 index 00000000000..5853d7d7b72 --- /dev/null +++ b/resource-manager/batch/2024-07-01/privatelinkresources/README.md @@ -0,0 +1,53 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/privatelinkresources` Documentation + +The `privatelinkresources` SDK allows for interaction with Azure Resource Manager `batch` (API Version `2024-07-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/batch/2024-07-01/privatelinkresources" +``` + + +### Client Initialization + +```go +client := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `PrivateLinkResourcesClient.PrivateLinkResourceGet` + +```go +ctx := context.TODO() +id := privatelinkresources.NewPrivateLinkResourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "privateLinkResourceName") + +read, err := client.PrivateLinkResourceGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `PrivateLinkResourcesClient.PrivateLinkResourceListByBatchAccount` + +```go +ctx := context.TODO() +id := privatelinkresources.NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + +// alternatively `client.PrivateLinkResourceListByBatchAccount(ctx, id, privatelinkresources.DefaultPrivateLinkResourceListByBatchAccountOperationOptions())` can be used to do batched pagination +items, err := client.PrivateLinkResourceListByBatchAccountComplete(ctx, id, privatelinkresources.DefaultPrivateLinkResourceListByBatchAccountOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/client.go b/resource-manager/batch/2024-07-01/privatelinkresources/client.go similarity index 58% rename from resource-manager/batch/2024-07-01/privatelinkresource/client.go rename to resource-manager/batch/2024-07-01/privatelinkresources/client.go index 36c07ed6dbf..28c00b21f03 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/client.go +++ b/resource-manager/batch/2024-07-01/privatelinkresources/client.go @@ -1,4 +1,4 @@ -package privatelinkresource +package privatelinkresources import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type PrivateLinkResourceClient struct { +type PrivateLinkResourcesClient struct { Client *resourcemanager.Client } -func NewPrivateLinkResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourceClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "privatelinkresource", defaultApiVersion) +func NewPrivateLinkResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateLinkResourcesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "privatelinkresources", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating PrivateLinkResourceClient: %+v", err) + return nil, fmt.Errorf("instantiating PrivateLinkResourcesClient: %+v", err) } - return &PrivateLinkResourceClient{ + return &PrivateLinkResourcesClient{ Client: client, }, nil } diff --git a/resource-manager/batch/2024-07-01/privatelinkresources/id_batchaccount.go b/resource-manager/batch/2024-07-01/privatelinkresources/id_batchaccount.go new file mode 100644 index 00000000000..7ed6d73a257 --- /dev/null +++ b/resource-manager/batch/2024-07-01/privatelinkresources/id_batchaccount.go @@ -0,0 +1,130 @@ +package privatelinkresources + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&BatchAccountId{}) +} + +var _ resourceids.ResourceId = &BatchAccountId{} + +// BatchAccountId is a struct representing the Resource ID for a Batch Account +type BatchAccountId struct { + SubscriptionId string + ResourceGroupName string + BatchAccountName string +} + +// NewBatchAccountID returns a new BatchAccountId struct +func NewBatchAccountID(subscriptionId string, resourceGroupName string, batchAccountName string) BatchAccountId { + return BatchAccountId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + BatchAccountName: batchAccountName, + } +} + +// ParseBatchAccountID parses 'input' into a BatchAccountId +func ParseBatchAccountID(input string) (*BatchAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BatchAccountId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBatchAccountIDInsensitively parses 'input' case-insensitively into a BatchAccountId +// note: this method should only be used for API response data and not user input +func ParseBatchAccountIDInsensitively(input string) (*BatchAccountId, error) { + parser := resourceids.NewParserFromResourceIdType(&BatchAccountId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BatchAccountId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BatchAccountId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.BatchAccountName, ok = input.Parsed["batchAccountName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "batchAccountName", input) + } + + return nil +} + +// ValidateBatchAccountID checks that 'input' can be parsed as a Batch Account ID +func ValidateBatchAccountID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseBatchAccountID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Batch Account ID +func (id BatchAccountId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Batch/batchAccounts/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BatchAccountName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Batch Account ID +func (id BatchAccountId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftBatch", "Microsoft.Batch", "Microsoft.Batch"), + resourceids.StaticSegment("staticBatchAccounts", "batchAccounts", "batchAccounts"), + resourceids.UserSpecifiedSegment("batchAccountName", "batchAccountName"), + } +} + +// String returns a human-readable description of this Batch Account ID +func (id BatchAccountId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Batch Account Name: %q", id.BatchAccountName), + } + return fmt.Sprintf("Batch Account (%s)", strings.Join(components, "\n")) +} diff --git a/resource-manager/batch/2024-07-01/privatelinkresources/id_batchaccount_test.go b/resource-manager/batch/2024-07-01/privatelinkresources/id_batchaccount_test.go new file mode 100644 index 00000000000..a70e98df965 --- /dev/null +++ b/resource-manager/batch/2024-07-01/privatelinkresources/id_batchaccount_test.go @@ -0,0 +1,282 @@ +package privatelinkresources + +import ( + "testing" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ resourceids.ResourceId = &BatchAccountId{} + +func TestNewBatchAccountID(t *testing.T) { + id := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName") + + if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { + t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") + } + + if id.ResourceGroupName != "example-resource-group" { + t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") + } + + if id.BatchAccountName != "batchAccountName" { + t.Fatalf("Expected %q but got %q for Segment 'BatchAccountName'", id.BatchAccountName, "batchAccountName") + } +} + +func TestFormatBatchAccountID(t *testing.T) { + actual := NewBatchAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName").ID() + expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName" + if actual != expected { + t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) + } +} + +func TestParseBatchAccountID(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *BatchAccountId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + BatchAccountName: "batchAccountName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseBatchAccountID(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.BatchAccountName != v.Expected.BatchAccountName { + t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) + } + + } +} + +func TestParseBatchAccountIDInsensitively(t *testing.T) { + testData := []struct { + Input string + Error bool + Expected *BatchAccountId + }{ + { + // Incomplete URI + Input: "", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh", + Error: true, + }, + { + // Incomplete URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts", + Error: true, + }, + { + // Incomplete URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs", + Error: true, + }, + { + // Valid URI + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "example-resource-group", + BatchAccountName: "batchAccountName", + }, + }, + { + // Invalid (Valid Uri with Extra segment) + Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Batch/batchAccounts/batchAccountName/extra", + Error: true, + }, + { + // Valid URI (mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE", + Expected: &BatchAccountId{ + SubscriptionId: "12345678-1234-9876-4563-123456789012", + ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", + BatchAccountName: "bAtChAcCoUnTnAmE", + }, + }, + { + // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) + Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.bAtCh/bAtChAcCoUnTs/bAtChAcCoUnTnAmE/extra", + Error: true, + }, + } + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + actual, err := ParseBatchAccountIDInsensitively(v.Input) + if err != nil { + if v.Error { + continue + } + + t.Fatalf("Expect a value but got an error: %+v", err) + } + if v.Error { + t.Fatal("Expect an error but didn't get one") + } + + if actual.SubscriptionId != v.Expected.SubscriptionId { + t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) + } + + if actual.ResourceGroupName != v.Expected.ResourceGroupName { + t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) + } + + if actual.BatchAccountName != v.Expected.BatchAccountName { + t.Fatalf("Expected %q but got %q for BatchAccountName", v.Expected.BatchAccountName, actual.BatchAccountName) + } + + } +} + +func TestSegmentsForBatchAccountId(t *testing.T) { + segments := BatchAccountId{}.Segments() + if len(segments) == 0 { + t.Fatalf("BatchAccountId has no segments") + } + + uniqueNames := make(map[string]struct{}, 0) + for _, segment := range segments { + uniqueNames[segment.Name] = struct{}{} + } + if len(uniqueNames) != len(segments) { + t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) + } +} diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource.go b/resource-manager/batch/2024-07-01/privatelinkresources/id_privatelinkresource.go similarity index 99% rename from resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource.go rename to resource-manager/batch/2024-07-01/privatelinkresources/id_privatelinkresource.go index 77d21d6170e..b6681272217 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource.go +++ b/resource-manager/batch/2024-07-01/privatelinkresources/id_privatelinkresource.go @@ -1,4 +1,4 @@ -package privatelinkresource +package privatelinkresources import ( "fmt" diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource_test.go b/resource-manager/batch/2024-07-01/privatelinkresources/id_privatelinkresource_test.go similarity index 99% rename from resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource_test.go rename to resource-manager/batch/2024-07-01/privatelinkresources/id_privatelinkresource_test.go index 946c94afbec..0226ef47033 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/id_privatelinkresource_test.go +++ b/resource-manager/batch/2024-07-01/privatelinkresources/id_privatelinkresource_test.go @@ -1,4 +1,4 @@ -package privatelinkresource +package privatelinkresources import ( "testing" diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/method_get.go b/resource-manager/batch/2024-07-01/privatelinkresources/method_privatelinkresourceget.go similarity index 77% rename from resource-manager/batch/2024-07-01/privatelinkresource/method_get.go rename to resource-manager/batch/2024-07-01/privatelinkresources/method_privatelinkresourceget.go index a408895b355..ec7bf3b961e 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/method_get.go +++ b/resource-manager/batch/2024-07-01/privatelinkresources/method_privatelinkresourceget.go @@ -1,4 +1,4 @@ -package privatelinkresource +package privatelinkresources import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type PrivateLinkResourceGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *PrivateLinkResource } -// Get ... -func (c PrivateLinkResourceClient) Get(ctx context.Context, id PrivateLinkResourceId) (result GetOperationResponse, err error) { +// PrivateLinkResourceGet ... +func (c PrivateLinkResourcesClient) PrivateLinkResourceGet(ctx context.Context, id PrivateLinkResourceId) (result PrivateLinkResourceGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/batch/2024-07-01/privatelinkresources/method_privatelinkresourcelistbybatchaccount.go b/resource-manager/batch/2024-07-01/privatelinkresources/method_privatelinkresourcelistbybatchaccount.go new file mode 100644 index 00000000000..52598f886c9 --- /dev/null +++ b/resource-manager/batch/2024-07-01/privatelinkresources/method_privatelinkresourcelistbybatchaccount.go @@ -0,0 +1,134 @@ +package privatelinkresources + +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 PrivateLinkResourceListByBatchAccountOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]PrivateLinkResource +} + +type PrivateLinkResourceListByBatchAccountCompleteResult struct { + LatestHttpResponse *http.Response + Items []PrivateLinkResource +} + +type PrivateLinkResourceListByBatchAccountOperationOptions struct { + Maxresults *int64 +} + +func DefaultPrivateLinkResourceListByBatchAccountOperationOptions() PrivateLinkResourceListByBatchAccountOperationOptions { + return PrivateLinkResourceListByBatchAccountOperationOptions{} +} + +func (o PrivateLinkResourceListByBatchAccountOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o PrivateLinkResourceListByBatchAccountOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o PrivateLinkResourceListByBatchAccountOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.Maxresults != nil { + out.Append("maxresults", fmt.Sprintf("%v", *o.Maxresults)) + } + return &out +} + +type PrivateLinkResourceListByBatchAccountCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *PrivateLinkResourceListByBatchAccountCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// PrivateLinkResourceListByBatchAccount ... +func (c PrivateLinkResourcesClient) PrivateLinkResourceListByBatchAccount(ctx context.Context, id BatchAccountId, options PrivateLinkResourceListByBatchAccountOperationOptions) (result PrivateLinkResourceListByBatchAccountOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &PrivateLinkResourceListByBatchAccountCustomPager{}, + 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 *[]PrivateLinkResource `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// PrivateLinkResourceListByBatchAccountComplete retrieves all the results into a single object +func (c PrivateLinkResourcesClient) PrivateLinkResourceListByBatchAccountComplete(ctx context.Context, id BatchAccountId, options PrivateLinkResourceListByBatchAccountOperationOptions) (PrivateLinkResourceListByBatchAccountCompleteResult, error) { + return c.PrivateLinkResourceListByBatchAccountCompleteMatchingPredicate(ctx, id, options, PrivateLinkResourceOperationPredicate{}) +} + +// PrivateLinkResourceListByBatchAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c PrivateLinkResourcesClient) PrivateLinkResourceListByBatchAccountCompleteMatchingPredicate(ctx context.Context, id BatchAccountId, options PrivateLinkResourceListByBatchAccountOperationOptions, predicate PrivateLinkResourceOperationPredicate) (result PrivateLinkResourceListByBatchAccountCompleteResult, err error) { + items := make([]PrivateLinkResource, 0) + + resp, err := c.PrivateLinkResourceListByBatchAccount(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = PrivateLinkResourceListByBatchAccountCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/model_privatelinkresource.go b/resource-manager/batch/2024-07-01/privatelinkresources/model_privatelinkresource.go similarity index 76% rename from resource-manager/batch/2024-07-01/privatelinkresource/model_privatelinkresource.go rename to resource-manager/batch/2024-07-01/privatelinkresources/model_privatelinkresource.go index e4cb204d73f..4a197402e28 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/model_privatelinkresource.go +++ b/resource-manager/batch/2024-07-01/privatelinkresources/model_privatelinkresource.go @@ -1,4 +1,8 @@ -package privatelinkresource +package privatelinkresources + +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. @@ -8,6 +12,7 @@ type PrivateLinkResource struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *PrivateLinkResourceProperties `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/batch/2024-07-01/privatelinkresource/model_privatelinkresourceproperties.go b/resource-manager/batch/2024-07-01/privatelinkresources/model_privatelinkresourceproperties.go similarity index 93% rename from resource-manager/batch/2024-07-01/privatelinkresource/model_privatelinkresourceproperties.go rename to resource-manager/batch/2024-07-01/privatelinkresources/model_privatelinkresourceproperties.go index bae657c2cde..3c98012cdd1 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/model_privatelinkresourceproperties.go +++ b/resource-manager/batch/2024-07-01/privatelinkresources/model_privatelinkresourceproperties.go @@ -1,4 +1,4 @@ -package privatelinkresource +package privatelinkresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/privatelinkresource/predicates.go b/resource-manager/batch/2024-07-01/privatelinkresources/predicates.go similarity index 96% rename from resource-manager/batch/2024-07-01/privatelinkresource/predicates.go rename to resource-manager/batch/2024-07-01/privatelinkresources/predicates.go index d3378fa9cf3..7c87b5259c0 100644 --- a/resource-manager/batch/2024-07-01/privatelinkresource/predicates.go +++ b/resource-manager/batch/2024-07-01/privatelinkresources/predicates.go @@ -1,4 +1,4 @@ -package privatelinkresource +package privatelinkresources // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/privatelinkresources/version.go b/resource-manager/batch/2024-07-01/privatelinkresources/version.go new file mode 100644 index 00000000000..ef2c1f9d6b9 --- /dev/null +++ b/resource-manager/batch/2024-07-01/privatelinkresources/version.go @@ -0,0 +1,10 @@ +package privatelinkresources + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2024-07-01" + +func userAgent() string { + return "hashicorp/go-azure-sdk/privatelinkresources/2024-07-01" +} diff --git a/resource-manager/datamigration/2025-06-30/patch/model_connectioninfo.go b/resource-manager/datamigration/2025-06-30/patch/model_connectioninfo.go index d4e2552112f..c2f31e4cfc7 100644 --- a/resource-manager/datamigration/2025-06-30/patch/model_connectioninfo.go +++ b/resource-manager/datamigration/2025-06-30/patch/model_connectioninfo.go @@ -63,7 +63,7 @@ func UnmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) return out, nil } - if strings.EqualFold(value, "MongoDbConnectionInfo") { + if strings.EqualFold(value, "mongoDbConnectionInfo") { var out MongoDbConnectionInfo if err := json.Unmarshal(input, &out); err != nil { return nil, fmt.Errorf("unmarshaling into MongoDbConnectionInfo: %+v", err) diff --git a/resource-manager/datamigration/2025-06-30/patch/model_mongodbconnectioninfo.go b/resource-manager/datamigration/2025-06-30/patch/model_mongodbconnectioninfo.go index 15d26059cff..00b80cf489b 100644 --- a/resource-manager/datamigration/2025-06-30/patch/model_mongodbconnectioninfo.go +++ b/resource-manager/datamigration/2025-06-30/patch/model_mongodbconnectioninfo.go @@ -53,7 +53,7 @@ func (s MongoDbConnectionInfo) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("unmarshaling MongoDbConnectionInfo: %+v", err) } - decoded["type"] = "MongoDbConnectionInfo" + decoded["type"] = "mongoDbConnectionInfo" encoded, err = json.Marshal(decoded) if err != nil { diff --git a/resource-manager/datamigration/2025-06-30/servicetaskresource/model_connectioninfo.go b/resource-manager/datamigration/2025-06-30/servicetaskresource/model_connectioninfo.go index a2c64b788f0..ec590fac48b 100644 --- a/resource-manager/datamigration/2025-06-30/servicetaskresource/model_connectioninfo.go +++ b/resource-manager/datamigration/2025-06-30/servicetaskresource/model_connectioninfo.go @@ -63,7 +63,7 @@ func UnmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error) return out, nil } - if strings.EqualFold(value, "MongoDbConnectionInfo") { + if strings.EqualFold(value, "mongoDbConnectionInfo") { var out MongoDbConnectionInfo if err := json.Unmarshal(input, &out); err != nil { return nil, fmt.Errorf("unmarshaling into MongoDbConnectionInfo: %+v", err) diff --git a/resource-manager/datamigration/2025-06-30/servicetaskresource/model_mongodbconnectioninfo.go b/resource-manager/datamigration/2025-06-30/servicetaskresource/model_mongodbconnectioninfo.go index 1e1be2df7fa..65db8947ef2 100644 --- a/resource-manager/datamigration/2025-06-30/servicetaskresource/model_mongodbconnectioninfo.go +++ b/resource-manager/datamigration/2025-06-30/servicetaskresource/model_mongodbconnectioninfo.go @@ -53,7 +53,7 @@ func (s MongoDbConnectionInfo) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("unmarshaling MongoDbConnectionInfo: %+v", err) } - decoded["type"] = "MongoDbConnectionInfo" + decoded["type"] = "mongoDbConnectionInfo" encoded, err = json.Marshal(decoded) if err != nil { diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/README.md b/resource-manager/management/2020-05-01/checknameavailability/README.md similarity index 84% rename from resource-manager/managementgroups/2020-05-01/checknameavailability/README.md rename to resource-manager/management/2020-05-01/checknameavailability/README.md index aa97643f155..91575435b4d 100644 --- a/resource-manager/managementgroups/2020-05-01/checknameavailability/README.md +++ b/resource-manager/management/2020-05-01/checknameavailability/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/checknameavailability` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2020-05-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `management` (API Version `2020-05-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/managementgroups/2020-05-01/checknameavailability" +import "github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/checknameavailability" ``` diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/client.go b/resource-manager/management/2020-05-01/checknameavailability/client.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/checknameavailability/client.go rename to resource-manager/management/2020-05-01/checknameavailability/client.go diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/constants.go b/resource-manager/management/2020-05-01/checknameavailability/constants.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/checknameavailability/constants.go rename to resource-manager/management/2020-05-01/checknameavailability/constants.go diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/method_checknameavailability.go b/resource-manager/management/2020-05-01/checknameavailability/method_checknameavailability.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/checknameavailability/method_checknameavailability.go rename to resource-manager/management/2020-05-01/checknameavailability/method_checknameavailability.go diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/model_checknameavailabilityrequest.go b/resource-manager/management/2020-05-01/checknameavailability/model_checknameavailabilityrequest.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/checknameavailability/model_checknameavailabilityrequest.go rename to resource-manager/management/2020-05-01/checknameavailability/model_checknameavailabilityrequest.go diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/model_checknameavailabilityresult.go b/resource-manager/management/2020-05-01/checknameavailability/model_checknameavailabilityresult.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/checknameavailability/model_checknameavailabilityresult.go rename to resource-manager/management/2020-05-01/checknameavailability/model_checknameavailabilityresult.go diff --git a/resource-manager/managementgroups/2020-05-01/checknameavailability/version.go b/resource-manager/management/2020-05-01/checknameavailability/version.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/checknameavailability/version.go rename to resource-manager/management/2020-05-01/checknameavailability/version.go diff --git a/resource-manager/managementgroups/2020-05-01/client.go b/resource-manager/management/2020-05-01/client.go similarity index 82% rename from resource-manager/managementgroups/2020-05-01/client.go rename to resource-manager/management/2020-05-01/client.go index b49eac57c02..1a149085433 100644 --- a/resource-manager/managementgroups/2020-05-01/client.go +++ b/resource-manager/management/2020-05-01/client.go @@ -6,10 +6,10 @@ package v2020_05_01 import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/checknameavailability" - "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/entities" - "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/tenantbackfill" + "github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/checknameavailability" + "github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/entities" + "github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/managementgroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/tenantbackfill" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" ) diff --git a/resource-manager/managementgroups/2020-05-01/entities/README.md b/resource-manager/management/2020-05-01/entities/README.md similarity index 87% rename from resource-manager/managementgroups/2020-05-01/entities/README.md rename to resource-manager/management/2020-05-01/entities/README.md index b08d348eb63..4865cb87835 100644 --- a/resource-manager/managementgroups/2020-05-01/entities/README.md +++ b/resource-manager/management/2020-05-01/entities/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/entities` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/entities` Documentation -The `entities` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2020-05-01`). +The `entities` SDK allows for interaction with Azure Resource Manager `management` (API Version `2020-05-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/managementgroups/2020-05-01/entities" +import "github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/entities" ``` diff --git a/resource-manager/managementgroups/2020-05-01/entities/client.go b/resource-manager/management/2020-05-01/entities/client.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/entities/client.go rename to resource-manager/management/2020-05-01/entities/client.go diff --git a/resource-manager/managementgroups/2020-05-01/entities/constants.go b/resource-manager/management/2020-05-01/entities/constants.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/entities/constants.go rename to resource-manager/management/2020-05-01/entities/constants.go diff --git a/resource-manager/managementgroups/2020-05-01/entities/method_list.go b/resource-manager/management/2020-05-01/entities/method_list.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/entities/method_list.go rename to resource-manager/management/2020-05-01/entities/method_list.go diff --git a/resource-manager/managementgroups/2020-05-01/entities/model_entityinfo.go b/resource-manager/management/2020-05-01/entities/model_entityinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/entities/model_entityinfo.go rename to resource-manager/management/2020-05-01/entities/model_entityinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/entities/model_entityinfoproperties.go b/resource-manager/management/2020-05-01/entities/model_entityinfoproperties.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/entities/model_entityinfoproperties.go rename to resource-manager/management/2020-05-01/entities/model_entityinfoproperties.go diff --git a/resource-manager/managementgroups/2020-05-01/entities/model_entityparentgroupinfo.go b/resource-manager/management/2020-05-01/entities/model_entityparentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/entities/model_entityparentgroupinfo.go rename to resource-manager/management/2020-05-01/entities/model_entityparentgroupinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/entities/predicates.go b/resource-manager/management/2020-05-01/entities/predicates.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/entities/predicates.go rename to resource-manager/management/2020-05-01/entities/predicates.go diff --git a/resource-manager/managementgroups/2020-05-01/entities/version.go b/resource-manager/management/2020-05-01/entities/version.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/entities/version.go rename to resource-manager/management/2020-05-01/entities/version.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/README.md b/resource-manager/management/2020-05-01/managementgroups/README.md similarity index 97% rename from resource-manager/managementgroups/2020-05-01/managementgroups/README.md rename to resource-manager/management/2020-05-01/managementgroups/README.md index 73e273a74d8..3abf5b95ab5 100644 --- a/resource-manager/managementgroups/2020-05-01/managementgroups/README.md +++ b/resource-manager/management/2020-05-01/managementgroups/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/managementgroups` Documentation -The `managementgroups` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2020-05-01`). +The `managementgroups` SDK allows for interaction with Azure Resource Manager `management` (API Version `2020-05-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). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/managementgroups" +import "github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/managementgroups" ``` diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/client.go b/resource-manager/management/2020-05-01/managementgroups/client.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/client.go rename to resource-manager/management/2020-05-01/managementgroups/client.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/constants.go b/resource-manager/management/2020-05-01/managementgroups/constants.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/constants.go rename to resource-manager/management/2020-05-01/managementgroups/constants.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go b/resource-manager/management/2020-05-01/managementgroups/id_subscription.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription.go rename to resource-manager/management/2020-05-01/managementgroups/id_subscription.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription_test.go b/resource-manager/management/2020-05-01/managementgroups/id_subscription_test.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/id_subscription_test.go rename to resource-manager/management/2020-05-01/managementgroups/id_subscription_test.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go b/resource-manager/management/2020-05-01/managementgroups/method_createorupdate.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_createorupdate.go rename to resource-manager/management/2020-05-01/managementgroups/method_createorupdate.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go b/resource-manager/management/2020-05-01/managementgroups/method_delete.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_delete.go rename to resource-manager/management/2020-05-01/managementgroups/method_delete.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go b/resource-manager/management/2020-05-01/managementgroups/method_get.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_get.go rename to resource-manager/management/2020-05-01/managementgroups/method_get.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go b/resource-manager/management/2020-05-01/managementgroups/method_getdescendants.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_getdescendants.go rename to resource-manager/management/2020-05-01/managementgroups/method_getdescendants.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go b/resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go rename to resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingscreateorupdate.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsdelete.go b/resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingsdelete.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsdelete.go rename to resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingsdelete.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go b/resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingsget.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsget.go rename to resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingsget.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go b/resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingslist.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingslist.go rename to resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingslist.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go b/resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingsupdate.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_hierarchysettingsupdate.go rename to resource-manager/management/2020-05-01/managementgroups/method_hierarchysettingsupdate.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go b/resource-manager/management/2020-05-01/managementgroups/method_list.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_list.go rename to resource-manager/management/2020-05-01/managementgroups/method_list.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go b/resource-manager/management/2020-05-01/managementgroups/method_subscriptionscreate.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionscreate.go rename to resource-manager/management/2020-05-01/managementgroups/method_subscriptionscreate.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go b/resource-manager/management/2020-05-01/managementgroups/method_subscriptionsdelete.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsdelete.go rename to resource-manager/management/2020-05-01/managementgroups/method_subscriptionsdelete.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go b/resource-manager/management/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go rename to resource-manager/management/2020-05-01/managementgroups/method_subscriptionsgetsubscription.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscriptionsundermanagementgroup.go b/resource-manager/management/2020-05-01/managementgroups/method_subscriptionsgetsubscriptionsundermanagementgroup.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_subscriptionsgetsubscriptionsundermanagementgroup.go rename to resource-manager/management/2020-05-01/managementgroups/method_subscriptionsgetsubscriptionsundermanagementgroup.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go b/resource-manager/management/2020-05-01/managementgroups/method_update.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/method_update.go rename to resource-manager/management/2020-05-01/managementgroups/method_update.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_azureasyncoperationresults.go b/resource-manager/management/2020-05-01/managementgroups/model_azureasyncoperationresults.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_azureasyncoperationresults.go rename to resource-manager/management/2020-05-01/managementgroups/model_azureasyncoperationresults.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go b/resource-manager/management/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go rename to resource-manager/management/2020-05-01/managementgroups/model_createmanagementgroupchildinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupdetails.go b/resource-manager/management/2020-05-01/managementgroups/model_createmanagementgroupdetails.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupdetails.go rename to resource-manager/management/2020-05-01/managementgroups/model_createmanagementgroupdetails.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupproperties.go b/resource-manager/management/2020-05-01/managementgroups/model_createmanagementgroupproperties.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgroupproperties.go rename to resource-manager/management/2020-05-01/managementgroups/model_createmanagementgroupproperties.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgrouprequest.go b/resource-manager/management/2020-05-01/managementgroups/model_createmanagementgrouprequest.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_createmanagementgrouprequest.go rename to resource-manager/management/2020-05-01/managementgroups/model_createmanagementgrouprequest.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsproperties.go b/resource-manager/management/2020-05-01/managementgroups/model_createorupdatesettingsproperties.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsproperties.go rename to resource-manager/management/2020-05-01/managementgroups/model_createorupdatesettingsproperties.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsrequest.go b/resource-manager/management/2020-05-01/managementgroups/model_createorupdatesettingsrequest.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_createorupdatesettingsrequest.go rename to resource-manager/management/2020-05-01/managementgroups/model_createorupdatesettingsrequest.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_createparentgroupinfo.go b/resource-manager/management/2020-05-01/managementgroups/model_createparentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_createparentgroupinfo.go rename to resource-manager/management/2020-05-01/managementgroups/model_createparentgroupinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfo.go b/resource-manager/management/2020-05-01/managementgroups/model_descendantinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfo.go rename to resource-manager/management/2020-05-01/managementgroups/model_descendantinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfoproperties.go b/resource-manager/management/2020-05-01/managementgroups/model_descendantinfoproperties.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantinfoproperties.go rename to resource-manager/management/2020-05-01/managementgroups/model_descendantinfoproperties.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantparentgroupinfo.go b/resource-manager/management/2020-05-01/managementgroups/model_descendantparentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_descendantparentgroupinfo.go rename to resource-manager/management/2020-05-01/managementgroups/model_descendantparentgroupinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettings.go b/resource-manager/management/2020-05-01/managementgroups/model_hierarchysettings.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettings.go rename to resource-manager/management/2020-05-01/managementgroups/model_hierarchysettings.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsinfo.go b/resource-manager/management/2020-05-01/managementgroups/model_hierarchysettingsinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsinfo.go rename to resource-manager/management/2020-05-01/managementgroups/model_hierarchysettingsinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingslist.go b/resource-manager/management/2020-05-01/managementgroups/model_hierarchysettingslist.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingslist.go rename to resource-manager/management/2020-05-01/managementgroups/model_hierarchysettingslist.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsproperties.go b/resource-manager/management/2020-05-01/managementgroups/model_hierarchysettingsproperties.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_hierarchysettingsproperties.go rename to resource-manager/management/2020-05-01/managementgroups/model_hierarchysettingsproperties.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroup.go b/resource-manager/management/2020-05-01/managementgroups/model_managementgroup.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroup.go rename to resource-manager/management/2020-05-01/managementgroups/model_managementgroup.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go b/resource-manager/management/2020-05-01/managementgroups/model_managementgroupchildinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupchildinfo.go rename to resource-manager/management/2020-05-01/managementgroups/model_managementgroupchildinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupdetails.go b/resource-manager/management/2020-05-01/managementgroups/model_managementgroupdetails.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupdetails.go rename to resource-manager/management/2020-05-01/managementgroups/model_managementgroupdetails.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfo.go b/resource-manager/management/2020-05-01/managementgroups/model_managementgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfo.go rename to resource-manager/management/2020-05-01/managementgroups/model_managementgroupinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfoproperties.go b/resource-manager/management/2020-05-01/managementgroups/model_managementgroupinfoproperties.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupinfoproperties.go rename to resource-manager/management/2020-05-01/managementgroups/model_managementgroupinfoproperties.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgrouppathelement.go b/resource-manager/management/2020-05-01/managementgroups/model_managementgrouppathelement.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgrouppathelement.go rename to resource-manager/management/2020-05-01/managementgroups/model_managementgrouppathelement.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupproperties.go b/resource-manager/management/2020-05-01/managementgroups/model_managementgroupproperties.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_managementgroupproperties.go rename to resource-manager/management/2020-05-01/managementgroups/model_managementgroupproperties.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_parentgroupinfo.go b/resource-manager/management/2020-05-01/managementgroups/model_parentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_parentgroupinfo.go rename to resource-manager/management/2020-05-01/managementgroups/model_parentgroupinfo.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_patchmanagementgrouprequest.go b/resource-manager/management/2020-05-01/managementgroups/model_patchmanagementgrouprequest.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_patchmanagementgrouprequest.go rename to resource-manager/management/2020-05-01/managementgroups/model_patchmanagementgrouprequest.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroup.go b/resource-manager/management/2020-05-01/managementgroups/model_subscriptionundermanagementgroup.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroup.go rename to resource-manager/management/2020-05-01/managementgroups/model_subscriptionundermanagementgroup.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroupproperties.go b/resource-manager/management/2020-05-01/managementgroups/model_subscriptionundermanagementgroupproperties.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/model_subscriptionundermanagementgroupproperties.go rename to resource-manager/management/2020-05-01/managementgroups/model_subscriptionundermanagementgroupproperties.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/predicates.go b/resource-manager/management/2020-05-01/managementgroups/predicates.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/predicates.go rename to resource-manager/management/2020-05-01/managementgroups/predicates.go diff --git a/resource-manager/managementgroups/2020-05-01/managementgroups/version.go b/resource-manager/management/2020-05-01/managementgroups/version.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/managementgroups/version.go rename to resource-manager/management/2020-05-01/managementgroups/version.go diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/README.md b/resource-manager/management/2020-05-01/tenantbackfill/README.md similarity index 88% rename from resource-manager/managementgroups/2020-05-01/tenantbackfill/README.md rename to resource-manager/management/2020-05-01/tenantbackfill/README.md index 05a7f4d489e..b1f0a785c40 100644 --- a/resource-manager/managementgroups/2020-05-01/tenantbackfill/README.md +++ b/resource-manager/management/2020-05-01/tenantbackfill/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2020-05-01/tenantbackfill` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/tenantbackfill` Documentation -The `tenantbackfill` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2020-05-01`). +The `tenantbackfill` SDK allows for interaction with Azure Resource Manager `management` (API Version `2020-05-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/managementgroups/2020-05-01/tenantbackfill" +import "github.com/hashicorp/go-azure-sdk/resource-manager/management/2020-05-01/tenantbackfill" ``` diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/client.go b/resource-manager/management/2020-05-01/tenantbackfill/client.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/tenantbackfill/client.go rename to resource-manager/management/2020-05-01/tenantbackfill/client.go diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/constants.go b/resource-manager/management/2020-05-01/tenantbackfill/constants.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/tenantbackfill/constants.go rename to resource-manager/management/2020-05-01/tenantbackfill/constants.go diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_starttenantbackfill.go b/resource-manager/management/2020-05-01/tenantbackfill/method_starttenantbackfill.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/tenantbackfill/method_starttenantbackfill.go rename to resource-manager/management/2020-05-01/tenantbackfill/method_starttenantbackfill.go diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/method_status.go b/resource-manager/management/2020-05-01/tenantbackfill/method_status.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/tenantbackfill/method_status.go rename to resource-manager/management/2020-05-01/tenantbackfill/method_status.go diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/model_tenantbackfillstatusresult.go b/resource-manager/management/2020-05-01/tenantbackfill/model_tenantbackfillstatusresult.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/tenantbackfill/model_tenantbackfillstatusresult.go rename to resource-manager/management/2020-05-01/tenantbackfill/model_tenantbackfillstatusresult.go diff --git a/resource-manager/managementgroups/2020-05-01/tenantbackfill/version.go b/resource-manager/management/2020-05-01/tenantbackfill/version.go similarity index 100% rename from resource-manager/managementgroups/2020-05-01/tenantbackfill/version.go rename to resource-manager/management/2020-05-01/tenantbackfill/version.go diff --git a/resource-manager/managementgroups/2023-04-01/client.go b/resource-manager/management/2023-04-01/client.go similarity index 83% rename from resource-manager/managementgroups/2023-04-01/client.go rename to resource-manager/management/2023-04-01/client.go index 03dcaa8a079..5e724c1c1de 100644 --- a/resource-manager/managementgroups/2023-04-01/client.go +++ b/resource-manager/management/2023-04-01/client.go @@ -6,10 +6,10 @@ package v2023_04_01 import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup" - "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/managementgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/managements" - "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup" + "github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/managementgroups" + "github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/managements" + "github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/subscriptionundermanagementgroups" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" ) diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/README.md b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/README.md similarity index 91% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/README.md rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/README.md index 97d6d45e89c..94b60d356ef 100644 --- a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/README.md +++ b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup` Documentation -The `hierarchysettingsoperationgroup` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2023-04-01`). +The `hierarchysettingsoperationgroup` SDK allows for interaction with Azure Resource Manager `management` (API Version `2023-04-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). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup" +import "github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup" ``` diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/client.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/client.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/client.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/client.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingscreateorupdate.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingscreateorupdate.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingscreateorupdate.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingscreateorupdate.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsdelete.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsdelete.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsdelete.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsdelete.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsget.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsget.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsget.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsget.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsupdate.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsupdate.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsupdate.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/method_hierarchysettingsupdate.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsproperties.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsproperties.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsrequest.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsrequest.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsrequest.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/model_createorupdatesettingsrequest.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettings.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettings.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettings.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettings.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettingsproperties.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettingsproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettingsproperties.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/model_hierarchysettingsproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/version.go b/resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/version.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/hierarchysettingsoperationgroup/version.go rename to resource-manager/management/2023-04-01/hierarchysettingsoperationgroup/version.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/README.md b/resource-manager/management/2023-04-01/managementgroups/README.md similarity index 94% rename from resource-manager/managementgroups/2023-04-01/managementgroups/README.md rename to resource-manager/management/2023-04-01/managementgroups/README.md index 1cc10f18b51..cd25a2ed30c 100644 --- a/resource-manager/managementgroups/2023-04-01/managementgroups/README.md +++ b/resource-manager/management/2023-04-01/managementgroups/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/managementgroups` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/managementgroups` Documentation -The `managementgroups` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2023-04-01`). +The `managementgroups` SDK allows for interaction with Azure Resource Manager `management` (API Version `2023-04-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). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/managementgroups" +import "github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/managementgroups" ``` diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/client.go b/resource-manager/management/2023-04-01/managementgroups/client.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/client.go rename to resource-manager/management/2023-04-01/managementgroups/client.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/constants.go b/resource-manager/management/2023-04-01/managementgroups/constants.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/constants.go rename to resource-manager/management/2023-04-01/managementgroups/constants.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_createorupdate.go b/resource-manager/management/2023-04-01/managementgroups/method_createorupdate.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/method_createorupdate.go rename to resource-manager/management/2023-04-01/managementgroups/method_createorupdate.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_delete.go b/resource-manager/management/2023-04-01/managementgroups/method_delete.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/method_delete.go rename to resource-manager/management/2023-04-01/managementgroups/method_delete.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_get.go b/resource-manager/management/2023-04-01/managementgroups/method_get.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/method_get.go rename to resource-manager/management/2023-04-01/managementgroups/method_get.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_getdescendants.go b/resource-manager/management/2023-04-01/managementgroups/method_getdescendants.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/method_getdescendants.go rename to resource-manager/management/2023-04-01/managementgroups/method_getdescendants.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingslist.go b/resource-manager/management/2023-04-01/managementgroups/method_hierarchysettingslist.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/method_hierarchysettingslist.go rename to resource-manager/management/2023-04-01/managementgroups/method_hierarchysettingslist.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/method_update.go b/resource-manager/management/2023-04-01/managementgroups/method_update.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/method_update.go rename to resource-manager/management/2023-04-01/managementgroups/method_update.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_azureasyncoperationresults.go b/resource-manager/management/2023-04-01/managementgroups/model_azureasyncoperationresults.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_azureasyncoperationresults.go rename to resource-manager/management/2023-04-01/managementgroups/model_azureasyncoperationresults.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_createmanagementgroupchildinfo.go b/resource-manager/management/2023-04-01/managementgroups/model_createmanagementgroupchildinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_createmanagementgroupchildinfo.go rename to resource-manager/management/2023-04-01/managementgroups/model_createmanagementgroupchildinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_createmanagementgroupdetails.go b/resource-manager/management/2023-04-01/managementgroups/model_createmanagementgroupdetails.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_createmanagementgroupdetails.go rename to resource-manager/management/2023-04-01/managementgroups/model_createmanagementgroupdetails.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_createmanagementgroupproperties.go b/resource-manager/management/2023-04-01/managementgroups/model_createmanagementgroupproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_createmanagementgroupproperties.go rename to resource-manager/management/2023-04-01/managementgroups/model_createmanagementgroupproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_createmanagementgrouprequest.go b/resource-manager/management/2023-04-01/managementgroups/model_createmanagementgrouprequest.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_createmanagementgrouprequest.go rename to resource-manager/management/2023-04-01/managementgroups/model_createmanagementgrouprequest.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_createparentgroupinfo.go b/resource-manager/management/2023-04-01/managementgroups/model_createparentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_createparentgroupinfo.go rename to resource-manager/management/2023-04-01/managementgroups/model_createparentgroupinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_descendantinfo.go b/resource-manager/management/2023-04-01/managementgroups/model_descendantinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_descendantinfo.go rename to resource-manager/management/2023-04-01/managementgroups/model_descendantinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_descendantinfoproperties.go b/resource-manager/management/2023-04-01/managementgroups/model_descendantinfoproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_descendantinfoproperties.go rename to resource-manager/management/2023-04-01/managementgroups/model_descendantinfoproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_descendantparentgroupinfo.go b/resource-manager/management/2023-04-01/managementgroups/model_descendantparentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_descendantparentgroupinfo.go rename to resource-manager/management/2023-04-01/managementgroups/model_descendantparentgroupinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_hierarchysettingsinfo.go b/resource-manager/management/2023-04-01/managementgroups/model_hierarchysettingsinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_hierarchysettingsinfo.go rename to resource-manager/management/2023-04-01/managementgroups/model_hierarchysettingsinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_hierarchysettingslist.go b/resource-manager/management/2023-04-01/managementgroups/model_hierarchysettingslist.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_hierarchysettingslist.go rename to resource-manager/management/2023-04-01/managementgroups/model_hierarchysettingslist.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_hierarchysettingsproperties.go b/resource-manager/management/2023-04-01/managementgroups/model_hierarchysettingsproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_hierarchysettingsproperties.go rename to resource-manager/management/2023-04-01/managementgroups/model_hierarchysettingsproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroup.go b/resource-manager/management/2023-04-01/managementgroups/model_managementgroup.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroup.go rename to resource-manager/management/2023-04-01/managementgroups/model_managementgroup.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroupchildinfo.go b/resource-manager/management/2023-04-01/managementgroups/model_managementgroupchildinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroupchildinfo.go rename to resource-manager/management/2023-04-01/managementgroups/model_managementgroupchildinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroupdetails.go b/resource-manager/management/2023-04-01/managementgroups/model_managementgroupdetails.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroupdetails.go rename to resource-manager/management/2023-04-01/managementgroups/model_managementgroupdetails.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroupinfoproperties.go b/resource-manager/management/2023-04-01/managementgroups/model_managementgroupinfoproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroupinfoproperties.go rename to resource-manager/management/2023-04-01/managementgroups/model_managementgroupinfoproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgrouppathelement.go b/resource-manager/management/2023-04-01/managementgroups/model_managementgrouppathelement.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgrouppathelement.go rename to resource-manager/management/2023-04-01/managementgroups/model_managementgrouppathelement.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroupproperties.go b/resource-manager/management/2023-04-01/managementgroups/model_managementgroupproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_managementgroupproperties.go rename to resource-manager/management/2023-04-01/managementgroups/model_managementgroupproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_parentgroupinfo.go b/resource-manager/management/2023-04-01/managementgroups/model_parentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_parentgroupinfo.go rename to resource-manager/management/2023-04-01/managementgroups/model_parentgroupinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/model_patchmanagementgrouprequest.go b/resource-manager/management/2023-04-01/managementgroups/model_patchmanagementgrouprequest.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/model_patchmanagementgrouprequest.go rename to resource-manager/management/2023-04-01/managementgroups/model_patchmanagementgrouprequest.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/predicates.go b/resource-manager/management/2023-04-01/managementgroups/predicates.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/predicates.go rename to resource-manager/management/2023-04-01/managementgroups/predicates.go diff --git a/resource-manager/managementgroups/2023-04-01/managementgroups/version.go b/resource-manager/management/2023-04-01/managementgroups/version.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managementgroups/version.go rename to resource-manager/management/2023-04-01/managementgroups/version.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/README.md b/resource-manager/management/2023-04-01/managements/README.md similarity index 94% rename from resource-manager/managementgroups/2023-04-01/managements/README.md rename to resource-manager/management/2023-04-01/managements/README.md index ef513c78eda..863bd18b639 100644 --- a/resource-manager/managementgroups/2023-04-01/managements/README.md +++ b/resource-manager/management/2023-04-01/managements/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/managements` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/managements` Documentation -The `managements` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2023-04-01`). +The `managements` SDK allows for interaction with Azure Resource Manager `management` (API Version `2023-04-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/managementgroups/2023-04-01/managements" +import "github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/managements" ``` diff --git a/resource-manager/managementgroups/2023-04-01/managements/client.go b/resource-manager/management/2023-04-01/managements/client.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/client.go rename to resource-manager/management/2023-04-01/managements/client.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/constants.go b/resource-manager/management/2023-04-01/managements/constants.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/constants.go rename to resource-manager/management/2023-04-01/managements/constants.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/method_checknameavailability.go b/resource-manager/management/2023-04-01/managements/method_checknameavailability.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/method_checknameavailability.go rename to resource-manager/management/2023-04-01/managements/method_checknameavailability.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/method_entitieslist.go b/resource-manager/management/2023-04-01/managements/method_entitieslist.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/method_entitieslist.go rename to resource-manager/management/2023-04-01/managements/method_entitieslist.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/method_managementgroupslist.go b/resource-manager/management/2023-04-01/managements/method_managementgroupslist.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/method_managementgroupslist.go rename to resource-manager/management/2023-04-01/managements/method_managementgroupslist.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/method_starttenantbackfill.go b/resource-manager/management/2023-04-01/managements/method_starttenantbackfill.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/method_starttenantbackfill.go rename to resource-manager/management/2023-04-01/managements/method_starttenantbackfill.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/method_tenantbackfillstatus.go b/resource-manager/management/2023-04-01/managements/method_tenantbackfillstatus.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/method_tenantbackfillstatus.go rename to resource-manager/management/2023-04-01/managements/method_tenantbackfillstatus.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/model_checknameavailabilityrequest.go b/resource-manager/management/2023-04-01/managements/model_checknameavailabilityrequest.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/model_checknameavailabilityrequest.go rename to resource-manager/management/2023-04-01/managements/model_checknameavailabilityrequest.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/model_checknameavailabilityresult.go b/resource-manager/management/2023-04-01/managements/model_checknameavailabilityresult.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/model_checknameavailabilityresult.go rename to resource-manager/management/2023-04-01/managements/model_checknameavailabilityresult.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/model_entityinfo.go b/resource-manager/management/2023-04-01/managements/model_entityinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/model_entityinfo.go rename to resource-manager/management/2023-04-01/managements/model_entityinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/model_entityinfoproperties.go b/resource-manager/management/2023-04-01/managements/model_entityinfoproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/model_entityinfoproperties.go rename to resource-manager/management/2023-04-01/managements/model_entityinfoproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/model_entityparentgroupinfo.go b/resource-manager/management/2023-04-01/managements/model_entityparentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/model_entityparentgroupinfo.go rename to resource-manager/management/2023-04-01/managements/model_entityparentgroupinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/model_managementgroupinfo.go b/resource-manager/management/2023-04-01/managements/model_managementgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/model_managementgroupinfo.go rename to resource-manager/management/2023-04-01/managements/model_managementgroupinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/model_managementgroupinfoproperties.go b/resource-manager/management/2023-04-01/managements/model_managementgroupinfoproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/model_managementgroupinfoproperties.go rename to resource-manager/management/2023-04-01/managements/model_managementgroupinfoproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/model_tenantbackfillstatusresult.go b/resource-manager/management/2023-04-01/managements/model_tenantbackfillstatusresult.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/model_tenantbackfillstatusresult.go rename to resource-manager/management/2023-04-01/managements/model_tenantbackfillstatusresult.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/predicates.go b/resource-manager/management/2023-04-01/managements/predicates.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/predicates.go rename to resource-manager/management/2023-04-01/managements/predicates.go diff --git a/resource-manager/managementgroups/2023-04-01/managements/version.go b/resource-manager/management/2023-04-01/managements/version.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/managements/version.go rename to resource-manager/management/2023-04-01/managements/version.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/README.md b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/README.md similarity index 93% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/README.md rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/README.md index 86d31ddb564..3188b83c11b 100644 --- a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/README.md +++ b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/subscriptionundermanagementgroups` Documentation -The `subscriptionundermanagementgroups` SDK allows for interaction with Azure Resource Manager `managementgroups` (API Version `2023-04-01`). +The `subscriptionundermanagementgroups` SDK allows for interaction with Azure Resource Manager `management` (API Version `2023-04-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). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups" +import "github.com/hashicorp/go-azure-sdk/resource-manager/management/2023-04-01/subscriptionundermanagementgroups" ``` diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/client.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/client.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/client.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/client.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/id_subscription.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/id_subscription.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/id_subscription.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/id_subscription.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/id_subscription_test.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/id_subscription_test.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/id_subscription_test.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/id_subscription_test.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionscreate.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionscreate.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionscreate.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionscreate.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsdelete.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsdelete.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsdelete.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsdelete.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscription.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscription.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscription.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscription.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscriptionsundermanagementgroup.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscriptionsundermanagementgroup.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscriptionsundermanagementgroup.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/method_managementgroupsubscriptionsgetsubscriptionsundermanagementgroup.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/model_descendantparentgroupinfo.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/model_descendantparentgroupinfo.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/model_descendantparentgroupinfo.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/model_descendantparentgroupinfo.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroup.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroup.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroup.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroup.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroupproperties.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroupproperties.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroupproperties.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/model_subscriptionundermanagementgroupproperties.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/predicates.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/predicates.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/predicates.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/predicates.go diff --git a/resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/version.go b/resource-manager/management/2023-04-01/subscriptionundermanagementgroups/version.go similarity index 100% rename from resource-manager/managementgroups/2023-04-01/subscriptionundermanagementgroups/version.go rename to resource-manager/management/2023-04-01/subscriptionundermanagementgroups/version.go diff --git a/resource-manager/network/2024-05-01/networkmanageractiveconfigurations/constants.go b/resource-manager/network/2024-05-01/networkmanageractiveconfigurations/constants.go index c9291fb2fab..793caeabedc 100644 --- a/resource-manager/network/2024-05-01/networkmanageractiveconfigurations/constants.go +++ b/resource-manager/network/2024-05-01/networkmanageractiveconfigurations/constants.go @@ -138,6 +138,8 @@ func parseGroupMemberType(input string) (*GroupMemberType, error) { type ProvisioningState string const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" @@ -146,6 +148,8 @@ const ( func PossibleValuesForProvisioningState() []string { return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), string(ProvisioningStateDeleting), string(ProvisioningStateFailed), string(ProvisioningStateSucceeded), @@ -168,6 +172,8 @@ func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { func parseProvisioningState(input string) (*ProvisioningState, error) { vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, "deleting": ProvisioningStateDeleting, "failed": ProvisioningStateFailed, "succeeded": ProvisioningStateSucceeded, diff --git a/resource-manager/network/2024-05-01/networkmanageractiveconnectivityconfigurations/constants.go b/resource-manager/network/2024-05-01/networkmanageractiveconnectivityconfigurations/constants.go index 642ecd4a0bd..6f3a6c4f554 100644 --- a/resource-manager/network/2024-05-01/networkmanageractiveconnectivityconfigurations/constants.go +++ b/resource-manager/network/2024-05-01/networkmanageractiveconnectivityconfigurations/constants.go @@ -217,6 +217,8 @@ func parseIsGlobal(input string) (*IsGlobal, error) { type ProvisioningState string const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" @@ -225,6 +227,8 @@ const ( func PossibleValuesForProvisioningState() []string { return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), string(ProvisioningStateDeleting), string(ProvisioningStateFailed), string(ProvisioningStateSucceeded), @@ -247,6 +251,8 @@ func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { func parseProvisioningState(input string) (*ProvisioningState, error) { vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, "deleting": ProvisioningStateDeleting, "failed": ProvisioningStateFailed, "succeeded": ProvisioningStateSucceeded, diff --git a/resource-manager/network/2024-05-01/networkmanagereffectiveconnectivityconfiguration/constants.go b/resource-manager/network/2024-05-01/networkmanagereffectiveconnectivityconfiguration/constants.go index caa8b3c8747..9007e4a33df 100644 --- a/resource-manager/network/2024-05-01/networkmanagereffectiveconnectivityconfiguration/constants.go +++ b/resource-manager/network/2024-05-01/networkmanagereffectiveconnectivityconfiguration/constants.go @@ -217,6 +217,8 @@ func parseIsGlobal(input string) (*IsGlobal, error) { type ProvisioningState string const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" @@ -225,6 +227,8 @@ const ( func PossibleValuesForProvisioningState() []string { return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), string(ProvisioningStateDeleting), string(ProvisioningStateFailed), string(ProvisioningStateSucceeded), @@ -247,6 +251,8 @@ func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { func parseProvisioningState(input string) (*ProvisioningState, error) { vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, "deleting": ProvisioningStateDeleting, "failed": ProvisioningStateFailed, "succeeded": ProvisioningStateSucceeded, diff --git a/resource-manager/network/2024-05-01/networkmanagereffectivesecurityadminrules/constants.go b/resource-manager/network/2024-05-01/networkmanagereffectivesecurityadminrules/constants.go index 67086d778e3..6dbd1e6db74 100644 --- a/resource-manager/network/2024-05-01/networkmanagereffectivesecurityadminrules/constants.go +++ b/resource-manager/network/2024-05-01/networkmanagereffectivesecurityadminrules/constants.go @@ -138,6 +138,8 @@ func parseGroupMemberType(input string) (*GroupMemberType, error) { type ProvisioningState string const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" @@ -146,6 +148,8 @@ const ( func PossibleValuesForProvisioningState() []string { return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), string(ProvisioningStateDeleting), string(ProvisioningStateFailed), string(ProvisioningStateSucceeded), @@ -168,6 +172,8 @@ func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { func parseProvisioningState(input string) (*ProvisioningState, error) { vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, "deleting": ProvisioningStateDeleting, "failed": ProvisioningStateFailed, "succeeded": ProvisioningStateSucceeded, diff --git a/resource-manager/network/2024-07-01/networkmanageractiveconfigurations/constants.go b/resource-manager/network/2024-07-01/networkmanageractiveconfigurations/constants.go index 793caeabedc..c9291fb2fab 100644 --- a/resource-manager/network/2024-07-01/networkmanageractiveconfigurations/constants.go +++ b/resource-manager/network/2024-07-01/networkmanageractiveconfigurations/constants.go @@ -138,8 +138,6 @@ func parseGroupMemberType(input string) (*GroupMemberType, error) { type ProvisioningState string const ( - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" @@ -148,8 +146,6 @@ const ( func PossibleValuesForProvisioningState() []string { return []string{ - string(ProvisioningStateCanceled), - string(ProvisioningStateCreating), string(ProvisioningStateDeleting), string(ProvisioningStateFailed), string(ProvisioningStateSucceeded), @@ -172,8 +168,6 @@ func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { func parseProvisioningState(input string) (*ProvisioningState, error) { vals := map[string]ProvisioningState{ - "canceled": ProvisioningStateCanceled, - "creating": ProvisioningStateCreating, "deleting": ProvisioningStateDeleting, "failed": ProvisioningStateFailed, "succeeded": ProvisioningStateSucceeded, diff --git a/resource-manager/network/2024-07-01/networkmanageractiveconnectivityconfigurations/constants.go b/resource-manager/network/2024-07-01/networkmanageractiveconnectivityconfigurations/constants.go index 451770f8cbb..8195863c49a 100644 --- a/resource-manager/network/2024-07-01/networkmanageractiveconnectivityconfigurations/constants.go +++ b/resource-manager/network/2024-07-01/networkmanageractiveconnectivityconfigurations/constants.go @@ -340,8 +340,6 @@ func parsePeeringEnforcement(input string) (*PeeringEnforcement, error) { type ProvisioningState string const ( - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" @@ -350,8 +348,6 @@ const ( func PossibleValuesForProvisioningState() []string { return []string{ - string(ProvisioningStateCanceled), - string(ProvisioningStateCreating), string(ProvisioningStateDeleting), string(ProvisioningStateFailed), string(ProvisioningStateSucceeded), @@ -374,8 +370,6 @@ func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { func parseProvisioningState(input string) (*ProvisioningState, error) { vals := map[string]ProvisioningState{ - "canceled": ProvisioningStateCanceled, - "creating": ProvisioningStateCreating, "deleting": ProvisioningStateDeleting, "failed": ProvisioningStateFailed, "succeeded": ProvisioningStateSucceeded, diff --git a/resource-manager/network/2024-10-01/networkmanagereffectiveconnectivityconfiguration/constants.go b/resource-manager/network/2024-10-01/networkmanagereffectiveconnectivityconfiguration/constants.go index aa292723727..c5bc0377dcd 100644 --- a/resource-manager/network/2024-10-01/networkmanagereffectiveconnectivityconfiguration/constants.go +++ b/resource-manager/network/2024-10-01/networkmanagereffectiveconnectivityconfiguration/constants.go @@ -340,6 +340,8 @@ func parsePeeringEnforcement(input string) (*PeeringEnforcement, error) { type ProvisioningState string const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" @@ -348,6 +350,8 @@ const ( func PossibleValuesForProvisioningState() []string { return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), string(ProvisioningStateDeleting), string(ProvisioningStateFailed), string(ProvisioningStateSucceeded), @@ -370,6 +374,8 @@ func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { func parseProvisioningState(input string) (*ProvisioningState, error) { vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, "deleting": ProvisioningStateDeleting, "failed": ProvisioningStateFailed, "succeeded": ProvisioningStateSucceeded, diff --git a/resource-manager/network/2024-10-01/networkmanagereffectivesecurityadminrules/constants.go b/resource-manager/network/2024-10-01/networkmanagereffectivesecurityadminrules/constants.go index 67086d778e3..6dbd1e6db74 100644 --- a/resource-manager/network/2024-10-01/networkmanagereffectivesecurityadminrules/constants.go +++ b/resource-manager/network/2024-10-01/networkmanagereffectivesecurityadminrules/constants.go @@ -138,6 +138,8 @@ func parseGroupMemberType(input string) (*GroupMemberType, error) { type ProvisioningState string const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" @@ -146,6 +148,8 @@ const ( func PossibleValuesForProvisioningState() []string { return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), string(ProvisioningStateDeleting), string(ProvisioningStateFailed), string(ProvisioningStateSucceeded), @@ -168,6 +172,8 @@ func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { func parseProvisioningState(input string) (*ProvisioningState, error) { vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, "deleting": ProvisioningStateDeleting, "failed": ProvisioningStateFailed, "succeeded": ProvisioningStateSucceeded, diff --git a/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/README.md b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/README.md new file mode 100644 index 00000000000..045877aa1c7 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/README.md @@ -0,0 +1,82 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/administratormicrosoftentras` Documentation + +The `administratormicrosoftentras` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/administratormicrosoftentras" +``` + + +### Client Initialization + +```go +client := administratormicrosoftentras.NewAdministratorMicrosoftEntrasClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AdministratorMicrosoftEntrasClient.AdministratorsMicrosoftEntraCreateOrUpdate` + +```go +ctx := context.TODO() +id := administratormicrosoftentras.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "objectId") + +payload := administratormicrosoftentras.AdministratorMicrosoftEntraAdd{ + // ... +} + + +if err := client.AdministratorsMicrosoftEntraCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AdministratorMicrosoftEntrasClient.AdministratorsMicrosoftEntraDelete` + +```go +ctx := context.TODO() +id := administratormicrosoftentras.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "objectId") + +if err := client.AdministratorsMicrosoftEntraDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `AdministratorMicrosoftEntrasClient.AdministratorsMicrosoftEntraGet` + +```go +ctx := context.TODO() +id := administratormicrosoftentras.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "objectId") + +read, err := client.AdministratorsMicrosoftEntraGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AdministratorMicrosoftEntrasClient.AdministratorsMicrosoftEntraListByServer` + +```go +ctx := context.TODO() +id := administratormicrosoftentras.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.AdministratorsMicrosoftEntraListByServer(ctx, id)` can be used to do batched pagination +items, err := client.AdministratorsMicrosoftEntraListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/client.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/client.go similarity index 54% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/client.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/client.go index c75639a755e..c0258f26ee6 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/client.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/client.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AdministratorsMicrosoftEntraClient struct { +type AdministratorMicrosoftEntrasClient struct { Client *resourcemanager.Client } -func NewAdministratorsMicrosoftEntraClientWithBaseURI(sdkApi sdkEnv.Api) (*AdministratorsMicrosoftEntraClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "administratorsmicrosoftentra", defaultApiVersion) +func NewAdministratorMicrosoftEntrasClientWithBaseURI(sdkApi sdkEnv.Api) (*AdministratorMicrosoftEntrasClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "administratormicrosoftentras", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating AdministratorsMicrosoftEntraClient: %+v", err) + return nil, fmt.Errorf("instantiating AdministratorMicrosoftEntrasClient: %+v", err) } - return &AdministratorsMicrosoftEntraClient{ + return &AdministratorMicrosoftEntrasClient{ Client: client, }, nil } diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/constants.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/constants.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/constants.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/constants.go index 9dba01d25b1..c1b5363d001 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/constants.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/constants.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "encoding/json" diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_administrator.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_administrator.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_administrator.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_administrator.go index 6a0af921aeb..5399585195a 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_administrator.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_administrator.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_administrator_test.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_administrator_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_administrator_test.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_administrator_test.go index aceaef67f24..0fd8bf97f97 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_administrator_test.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_administrator_test.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_flexibleserver.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_flexibleserver.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_flexibleserver.go index 6cf93eb33d2..958e1f46a09 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_flexibleserver.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_flexibleserver.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_flexibleserver_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_flexibleserver_test.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_flexibleserver_test.go index f57e1fe4ce1..b4d43f7c601 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/id_flexibleserver_test.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/id_flexibleserver_test.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_create.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentracreateorupdate.go similarity index 52% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_create.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentracreateorupdate.go index 58541150f63..9df2a7bd28c 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_create.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentracreateorupdate.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package administratormicrosoftentras import ( "context" @@ -14,14 +14,14 @@ import ( // 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 { +type AdministratorsMicrosoftEntraCreateOrUpdateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// Create ... -func (c BackupsAutomaticAndOnDemandClient) Create(ctx context.Context, id BackupId) (result CreateOperationResponse, err error) { +// AdministratorsMicrosoftEntraCreateOrUpdate ... +func (c AdministratorMicrosoftEntrasClient) AdministratorsMicrosoftEntraCreateOrUpdate(ctx context.Context, id AdministratorId, input AdministratorMicrosoftEntraAdd) (result AdministratorsMicrosoftEntraCreateOrUpdateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -36,6 +36,10 @@ func (c BackupsAutomaticAndOnDemandClient) Create(ctx context.Context, id Backup return } + if err = req.Marshal(input); err != nil { + return + } + var resp *client.Response resp, err = req.Execute(ctx) if resp != nil { @@ -54,15 +58,15 @@ func (c BackupsAutomaticAndOnDemandClient) Create(ctx context.Context, id Backup return } -// CreateThenPoll performs Create then polls until it's completed -func (c BackupsAutomaticAndOnDemandClient) CreateThenPoll(ctx context.Context, id BackupId) error { - result, err := c.Create(ctx, id) +// AdministratorsMicrosoftEntraCreateOrUpdateThenPoll performs AdministratorsMicrosoftEntraCreateOrUpdate then polls until it's completed +func (c AdministratorMicrosoftEntrasClient) AdministratorsMicrosoftEntraCreateOrUpdateThenPoll(ctx context.Context, id AdministratorId, input AdministratorMicrosoftEntraAdd) error { + result, err := c.AdministratorsMicrosoftEntraCreateOrUpdate(ctx, id, input) if err != nil { - return fmt.Errorf("performing Create: %+v", err) + return fmt.Errorf("performing AdministratorsMicrosoftEntraCreateOrUpdate: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) + return fmt.Errorf("polling after AdministratorsMicrosoftEntraCreateOrUpdate: %+v", err) } return nil diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_delete.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentradelete.go similarity index 59% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_delete.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentradelete.go index 2b7a4f56f26..fdf30bae30c 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_delete.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentradelete.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package administratormicrosoftentras import ( "context" @@ -14,14 +14,14 @@ import ( // 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 { +type AdministratorsMicrosoftEntraDeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// Delete ... -func (c BackupsAutomaticAndOnDemandClient) Delete(ctx context.Context, id BackupId) (result DeleteOperationResponse, err error) { +// AdministratorsMicrosoftEntraDelete ... +func (c AdministratorMicrosoftEntrasClient) AdministratorsMicrosoftEntraDelete(ctx context.Context, id AdministratorId) (result AdministratorsMicrosoftEntraDeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -55,15 +55,15 @@ func (c BackupsAutomaticAndOnDemandClient) Delete(ctx context.Context, id Backup return } -// DeleteThenPoll performs Delete then polls until it's completed -func (c BackupsAutomaticAndOnDemandClient) DeleteThenPoll(ctx context.Context, id BackupId) error { - result, err := c.Delete(ctx, id) +// AdministratorsMicrosoftEntraDeleteThenPoll performs AdministratorsMicrosoftEntraDelete then polls until it's completed +func (c AdministratorMicrosoftEntrasClient) AdministratorsMicrosoftEntraDeleteThenPoll(ctx context.Context, id AdministratorId) error { + result, err := c.AdministratorsMicrosoftEntraDelete(ctx, id) if err != nil { - return fmt.Errorf("performing Delete: %+v", err) + return fmt.Errorf("performing AdministratorsMicrosoftEntraDelete: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) + return fmt.Errorf("polling after AdministratorsMicrosoftEntraDelete: %+v", err) } return nil diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_get.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentraget.go similarity index 74% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_get.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentraget.go index a05ca0c101b..36e0685d07f 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_get.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentraget.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type AdministratorsMicrosoftEntraGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *AdministratorMicrosoftEntra } -// Get ... -func (c AdministratorsMicrosoftEntraClient) Get(ctx context.Context, id AdministratorId) (result GetOperationResponse, err error) { +// AdministratorsMicrosoftEntraGet ... +func (c AdministratorMicrosoftEntrasClient) AdministratorsMicrosoftEntraGet(ctx context.Context, id AdministratorId) (result AdministratorsMicrosoftEntraGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_listbyserver.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentralistbyserver.go similarity index 50% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_listbyserver.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentralistbyserver.go index 07410af72fa..fe07f38a580 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_listbyserver.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/method_administratorsmicrosoftentralistbyserver.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "context" @@ -12,22 +12,22 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListByServerOperationResponse struct { +type AdministratorsMicrosoftEntraListByServerOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]AdministratorMicrosoftEntra } -type ListByServerCompleteResult struct { +type AdministratorsMicrosoftEntraListByServerCompleteResult struct { LatestHttpResponse *http.Response Items []AdministratorMicrosoftEntra } -type ListByServerCustomPager struct { +type AdministratorsMicrosoftEntraListByServerCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByServerCustomPager) NextPageLink() *odata.Link { +func (p *AdministratorsMicrosoftEntraListByServerCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -35,15 +35,15 @@ func (p *ListByServerCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByServer ... -func (c AdministratorsMicrosoftEntraClient) ListByServer(ctx context.Context, id FlexibleServerId) (result ListByServerOperationResponse, err error) { +// AdministratorsMicrosoftEntraListByServer ... +func (c AdministratorMicrosoftEntrasClient) AdministratorsMicrosoftEntraListByServer(ctx context.Context, id FlexibleServerId) (result AdministratorsMicrosoftEntraListByServerOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListByServerCustomPager{}, + Pager: &AdministratorsMicrosoftEntraListByServerCustomPager{}, Path: fmt.Sprintf("%s/administrators", id.ID()), } @@ -74,16 +74,16 @@ func (c AdministratorsMicrosoftEntraClient) ListByServer(ctx context.Context, id return } -// ListByServerComplete retrieves all the results into a single object -func (c AdministratorsMicrosoftEntraClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, AdministratorMicrosoftEntraOperationPredicate{}) +// AdministratorsMicrosoftEntraListByServerComplete retrieves all the results into a single object +func (c AdministratorMicrosoftEntrasClient) AdministratorsMicrosoftEntraListByServerComplete(ctx context.Context, id FlexibleServerId) (AdministratorsMicrosoftEntraListByServerCompleteResult, error) { + return c.AdministratorsMicrosoftEntraListByServerCompleteMatchingPredicate(ctx, id, AdministratorMicrosoftEntraOperationPredicate{}) } -// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AdministratorsMicrosoftEntraClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate AdministratorMicrosoftEntraOperationPredicate) (result ListByServerCompleteResult, err error) { +// AdministratorsMicrosoftEntraListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AdministratorMicrosoftEntrasClient) AdministratorsMicrosoftEntraListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate AdministratorMicrosoftEntraOperationPredicate) (result AdministratorsMicrosoftEntraListByServerCompleteResult, err error) { items := make([]AdministratorMicrosoftEntra, 0) - resp, err := c.ListByServer(ctx, id) + resp, err := c.AdministratorsMicrosoftEntraListByServer(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -97,7 +97,7 @@ func (c AdministratorsMicrosoftEntraClient) ListByServerCompleteMatchingPredicat } } - result = ListByServerCompleteResult{ + result = AdministratorsMicrosoftEntraListByServerCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentra.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentra.go similarity index 94% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentra.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentra.go index 599c6448eb0..a527bf9b78e 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentra.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentra.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentraadd.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentraadd.go similarity index 88% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentraadd.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentraadd.go index c6371c24b2f..620fd1eab7e 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentraadd.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentraadd.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentraproperties.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentraproperties.go similarity index 92% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentraproperties.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentraproperties.go index f1f2ce9b55c..5cbe5a92167 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentraproperties.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentraproperties.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentrapropertiesforadd.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentrapropertiesforadd.go similarity index 91% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentrapropertiesforadd.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentrapropertiesforadd.go index e66826eea82..f902f3c4f24 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/model_administratormicrosoftentrapropertiesforadd.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/model_administratormicrosoftentrapropertiesforadd.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/predicates.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/predicates.go similarity index 94% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/predicates.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/predicates.go index 0639cc6f1c6..ca6f44588b5 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/predicates.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/predicates.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/version.go b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/version.go similarity index 69% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/version.go rename to resource-manager/postgresql/2025-08-01/administratormicrosoftentras/version.go index 70ba5e4ca6e..77b2179a725 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/version.go +++ b/resource-manager/postgresql/2025-08-01/administratormicrosoftentras/version.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package administratormicrosoftentras // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package administratorsmicrosoftentra const defaultApiVersion = "2025-08-01" func userAgent() string { - return "hashicorp/go-azure-sdk/administratorsmicrosoftentra/2025-08-01" + return "hashicorp/go-azure-sdk/administratormicrosoftentras/2025-08-01" } diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/README.md b/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/README.md deleted file mode 100644 index 911aea742a2..00000000000 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra` Documentation - -The `administratorsmicrosoftentra` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/administratorsmicrosoftentra" -``` - - -### Client Initialization - -```go -client := administratorsmicrosoftentra.NewAdministratorsMicrosoftEntraClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AdministratorsMicrosoftEntraClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := administratorsmicrosoftentra.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "objectId") - -payload := administratorsmicrosoftentra.AdministratorMicrosoftEntraAdd{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AdministratorsMicrosoftEntraClient.Delete` - -```go -ctx := context.TODO() -id := administratorsmicrosoftentra.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "objectId") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `AdministratorsMicrosoftEntraClient.Get` - -```go -ctx := context.TODO() -id := administratorsmicrosoftentra.NewAdministratorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "objectId") - -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: `AdministratorsMicrosoftEntraClient.ListByServer` - -```go -ctx := context.TODO() -id := administratorsmicrosoftentra.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_delete.go b/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_delete.go deleted file mode 100644 index fa87b3cef73..00000000000 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package administratorsmicrosoftentra - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/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 AdministratorsMicrosoftEntraClient) Delete(ctx context.Context, id AdministratorId) (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 AdministratorsMicrosoftEntraClient) DeleteThenPoll(ctx context.Context, id AdministratorId) 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/postgresql/2025-08-01/advancedthreatprotectionsettings/README.md b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/README.md deleted file mode 100644 index 6c33b522962..00000000000 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings` Documentation - -The `advancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/advancedthreatprotectionsettings" -``` - - -### Client Initialization - -```go -client := advancedthreatprotectionsettings.NewAdvancedThreatProtectionSettingsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AdvancedThreatProtectionSettingsClient.Get` - -```go -ctx := context.TODO() -id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -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: `AdvancedThreatProtectionSettingsClient.ListByServer` - -```go -ctx := context.TODO() -id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AdvancedThreatProtectionSettingsClient.ServerThreatProtectionSettingsCreateOrUpdate` - -```go -ctx := context.TODO() -id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -payload := advancedthreatprotectionsettings.AdvancedThreatProtectionSettingsModel{ - // ... -} - - -if err := client.ServerThreatProtectionSettingsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_listbyserver.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_listbyserver.go deleted file mode 100644 index ac299511f6e..00000000000 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_listbyserver.go +++ /dev/null @@ -1,105 +0,0 @@ -package advancedthreatprotectionsettings - -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 ListByServerOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AdvancedThreatProtectionSettingsModel -} - -type ListByServerCompleteResult struct { - LatestHttpResponse *http.Response - Items []AdvancedThreatProtectionSettingsModel -} - -type ListByServerCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListByServerCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListByServer ... -func (c AdvancedThreatProtectionSettingsClient) ListByServer(ctx context.Context, id FlexibleServerId) (result ListByServerOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Pager: &ListByServerCustomPager{}, - Path: fmt.Sprintf("%s/advancedThreatProtectionSettings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AdvancedThreatProtectionSettingsModel `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByServerComplete retrieves all the results into a single object -func (c AdvancedThreatProtectionSettingsClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, AdvancedThreatProtectionSettingsModelOperationPredicate{}) -} - -// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AdvancedThreatProtectionSettingsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate AdvancedThreatProtectionSettingsModelOperationPredicate) (result ListByServerCompleteResult, err error) { - items := make([]AdvancedThreatProtectionSettingsModel, 0) - - resp, err := c.ListByServer(ctx, id) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByServerCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/README.md b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/README.md new file mode 100644 index 00000000000..02876d6decb --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/README.md @@ -0,0 +1,70 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels` Documentation + +The `advancedthreatprotectionsettingsmodels` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels" +``` + + +### Client Initialization + +```go +client := advancedthreatprotectionsettingsmodels.NewAdvancedThreatProtectionSettingsModelsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AdvancedThreatProtectionSettingsModelsClient.AdvancedThreatProtectionSettingsGet` + +```go +ctx := context.TODO() +id := advancedthreatprotectionsettingsmodels.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +read, err := client.AdvancedThreatProtectionSettingsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AdvancedThreatProtectionSettingsModelsClient.AdvancedThreatProtectionSettingsListByServer` + +```go +ctx := context.TODO() +id := advancedthreatprotectionsettingsmodels.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.AdvancedThreatProtectionSettingsListByServer(ctx, id)` can be used to do batched pagination +items, err := client.AdvancedThreatProtectionSettingsListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AdvancedThreatProtectionSettingsModelsClient.ServerThreatProtectionSettingsCreateOrUpdate` + +```go +ctx := context.TODO() +id := advancedthreatprotectionsettingsmodels.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := advancedthreatprotectionsettingsmodels.AdvancedThreatProtectionSettingsModel{ + // ... +} + + +if err := client.ServerThreatProtectionSettingsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/client.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/client.go similarity index 57% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/client.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/client.go index e7a35ff187e..5d6550126e1 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/client.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/client.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package advancedthreatprotectionsettingsmodels import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type AdvancedThreatProtectionSettingsClient struct { +type AdvancedThreatProtectionSettingsModelsClient struct { Client *resourcemanager.Client } -func NewAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvancedThreatProtectionSettingsClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "advancedthreatprotectionsettings", defaultApiVersion) +func NewAdvancedThreatProtectionSettingsModelsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvancedThreatProtectionSettingsModelsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "advancedthreatprotectionsettingsmodels", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating AdvancedThreatProtectionSettingsClient: %+v", err) + return nil, fmt.Errorf("instantiating AdvancedThreatProtectionSettingsModelsClient: %+v", err) } - return &AdvancedThreatProtectionSettingsClient{ + return &AdvancedThreatProtectionSettingsModelsClient{ Client: client, }, nil } diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/constants.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/constants.go similarity index 96% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/constants.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/constants.go index 33c03e5a580..662456f04a2 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/constants.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/constants.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package advancedthreatprotectionsettingsmodels import ( "encoding/json" diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/id_flexibleserver.go similarity index 98% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_flexibleserver.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/id_flexibleserver.go index 02ce4f7d074..5b10dd0dd0b 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_flexibleserver.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/id_flexibleserver.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package advancedthreatprotectionsettingsmodels import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/id_flexibleserver_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_flexibleserver_test.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/id_flexibleserver_test.go index d592c3e6e30..698b86a8668 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_flexibleserver_test.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/id_flexibleserver_test.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package advancedthreatprotectionsettingsmodels import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_get.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_advancedthreatprotectionsettingsget.go similarity index 74% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_get.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_advancedthreatprotectionsettingsget.go index 7f3fb6ec8df..7e4c1804869 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_get.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_advancedthreatprotectionsettingsget.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package advancedthreatprotectionsettingsmodels import ( "context" @@ -12,14 +12,14 @@ import ( // 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 { +type AdvancedThreatProtectionSettingsGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *AdvancedThreatProtectionSettingsModel } -// Get ... -func (c AdvancedThreatProtectionSettingsClient) Get(ctx context.Context, id FlexibleServerId) (result GetOperationResponse, err error) { +// AdvancedThreatProtectionSettingsGet ... +func (c AdvancedThreatProtectionSettingsModelsClient) AdvancedThreatProtectionSettingsGet(ctx context.Context, id FlexibleServerId) (result AdvancedThreatProtectionSettingsGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_advancedthreatprotectionsettingslistbyserver.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_advancedthreatprotectionsettingslistbyserver.go new file mode 100644 index 00000000000..4d2829e8400 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_advancedthreatprotectionsettingslistbyserver.go @@ -0,0 +1,105 @@ +package advancedthreatprotectionsettingsmodels + +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 AdvancedThreatProtectionSettingsListByServerOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AdvancedThreatProtectionSettingsModel +} + +type AdvancedThreatProtectionSettingsListByServerCompleteResult struct { + LatestHttpResponse *http.Response + Items []AdvancedThreatProtectionSettingsModel +} + +type AdvancedThreatProtectionSettingsListByServerCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *AdvancedThreatProtectionSettingsListByServerCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// AdvancedThreatProtectionSettingsListByServer ... +func (c AdvancedThreatProtectionSettingsModelsClient) AdvancedThreatProtectionSettingsListByServer(ctx context.Context, id FlexibleServerId) (result AdvancedThreatProtectionSettingsListByServerOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &AdvancedThreatProtectionSettingsListByServerCustomPager{}, + Path: fmt.Sprintf("%s/advancedThreatProtectionSettings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AdvancedThreatProtectionSettingsModel `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// AdvancedThreatProtectionSettingsListByServerComplete retrieves all the results into a single object +func (c AdvancedThreatProtectionSettingsModelsClient) AdvancedThreatProtectionSettingsListByServerComplete(ctx context.Context, id FlexibleServerId) (AdvancedThreatProtectionSettingsListByServerCompleteResult, error) { + return c.AdvancedThreatProtectionSettingsListByServerCompleteMatchingPredicate(ctx, id, AdvancedThreatProtectionSettingsModelOperationPredicate{}) +} + +// AdvancedThreatProtectionSettingsListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AdvancedThreatProtectionSettingsModelsClient) AdvancedThreatProtectionSettingsListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate AdvancedThreatProtectionSettingsModelOperationPredicate) (result AdvancedThreatProtectionSettingsListByServerCompleteResult, err error) { + items := make([]AdvancedThreatProtectionSettingsModel, 0) + + resp, err := c.AdvancedThreatProtectionSettingsListByServer(ctx, id) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = AdvancedThreatProtectionSettingsListByServerCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_serverthreatprotectionsettingscreateorupdate.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_serverthreatprotectionsettingscreateorupdate.go similarity index 77% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_serverthreatprotectionsettingscreateorupdate.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_serverthreatprotectionsettingscreateorupdate.go index 0bff3e194cb..0b761ca57d9 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/method_serverthreatprotectionsettingscreateorupdate.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/method_serverthreatprotectionsettingscreateorupdate.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package advancedthreatprotectionsettingsmodels import ( "context" @@ -21,7 +21,7 @@ type ServerThreatProtectionSettingsCreateOrUpdateOperationResponse struct { } // ServerThreatProtectionSettingsCreateOrUpdate ... -func (c AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsCreateOrUpdate(ctx context.Context, id FlexibleServerId, input AdvancedThreatProtectionSettingsModel) (result ServerThreatProtectionSettingsCreateOrUpdateOperationResponse, err error) { +func (c AdvancedThreatProtectionSettingsModelsClient) ServerThreatProtectionSettingsCreateOrUpdate(ctx context.Context, id FlexibleServerId, input AdvancedThreatProtectionSettingsModel) (result ServerThreatProtectionSettingsCreateOrUpdateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -59,7 +59,7 @@ func (c AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsCr } // ServerThreatProtectionSettingsCreateOrUpdateThenPoll performs ServerThreatProtectionSettingsCreateOrUpdate then polls until it's completed -func (c AdvancedThreatProtectionSettingsClient) ServerThreatProtectionSettingsCreateOrUpdateThenPoll(ctx context.Context, id FlexibleServerId, input AdvancedThreatProtectionSettingsModel) error { +func (c AdvancedThreatProtectionSettingsModelsClient) ServerThreatProtectionSettingsCreateOrUpdateThenPoll(ctx context.Context, id FlexibleServerId, input AdvancedThreatProtectionSettingsModel) error { result, err := c.ServerThreatProtectionSettingsCreateOrUpdate(ctx, id, input) if err != nil { return fmt.Errorf("performing ServerThreatProtectionSettingsCreateOrUpdate: %+v", err) diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/model_advancedthreatprotectionsettingsmodel.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/model_advancedthreatprotectionsettingsmodel.go similarity index 93% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/model_advancedthreatprotectionsettingsmodel.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/model_advancedthreatprotectionsettingsmodel.go index e5ce8e84b32..d5fc09b6b82 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/model_advancedthreatprotectionsettingsmodel.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/model_advancedthreatprotectionsettingsmodel.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package advancedthreatprotectionsettingsmodels import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/model_advancedthreatprotectionsettingsproperties.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/model_advancedthreatprotectionsettingsproperties.go similarity index 94% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/model_advancedthreatprotectionsettingsproperties.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/model_advancedthreatprotectionsettingsproperties.go index 59aad3b33a2..cdcf0550cdc 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/model_advancedthreatprotectionsettingsproperties.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/model_advancedthreatprotectionsettingsproperties.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package advancedthreatprotectionsettingsmodels import ( "time" diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/predicates.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/predicates.go similarity index 93% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/predicates.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/predicates.go index 8b03d156cc2..dae77b038ed 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/predicates.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/predicates.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package advancedthreatprotectionsettingsmodels // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/version.go b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/version.go similarity index 81% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/version.go rename to resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/version.go index 79745a054d1..ed2208eb9c3 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/version.go +++ b/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels/version.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package advancedthreatprotectionsettingsmodels // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package advancedthreatprotectionsettings const defaultApiVersion = "2025-08-01" func userAgent() string { - return "hashicorp/go-azure-sdk/advancedthreatprotectionsettings/2025-08-01" + return "hashicorp/go-azure-sdk/advancedthreatprotectionsettingsmodels/2025-08-01" } diff --git a/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/README.md b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/README.md new file mode 100644 index 00000000000..2b7b90a09d0 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/README.md @@ -0,0 +1,77 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/backupautomaticandondemands` Documentation + +The `backupautomaticandondemands` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/backupautomaticandondemands" +``` + + +### Client Initialization + +```go +client := backupautomaticandondemands.NewBackupAutomaticAndOnDemandsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BackupAutomaticAndOnDemandsClient.BackupsAutomaticAndOnDemandCreate` + +```go +ctx := context.TODO() +id := backupautomaticandondemands.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "backupName") + +if err := client.BackupsAutomaticAndOnDemandCreateThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupAutomaticAndOnDemandsClient.BackupsAutomaticAndOnDemandDelete` + +```go +ctx := context.TODO() +id := backupautomaticandondemands.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "backupName") + +if err := client.BackupsAutomaticAndOnDemandDeleteThenPoll(ctx, id); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupAutomaticAndOnDemandsClient.BackupsAutomaticAndOnDemandGet` + +```go +ctx := context.TODO() +id := backupautomaticandondemands.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "backupName") + +read, err := client.BackupsAutomaticAndOnDemandGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BackupAutomaticAndOnDemandsClient.BackupsAutomaticAndOnDemandListByServer` + +```go +ctx := context.TODO() +id := backupautomaticandondemands.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.BackupsAutomaticAndOnDemandListByServer(ctx, id)` can be used to do batched pagination +items, err := client.BackupsAutomaticAndOnDemandListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/client.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/client.go new file mode 100644 index 00000000000..d05531e89f6 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/client.go @@ -0,0 +1,26 @@ +package backupautomaticandondemands + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "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 BackupAutomaticAndOnDemandsClient struct { + Client *resourcemanager.Client +} + +func NewBackupAutomaticAndOnDemandsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupAutomaticAndOnDemandsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "backupautomaticandondemands", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating BackupAutomaticAndOnDemandsClient: %+v", err) + } + + return &BackupAutomaticAndOnDemandsClient{ + Client: client, + }, nil +} diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/constants.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/constants.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/constants.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/constants.go index 70f42c2970b..f562d691a48 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/constants.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/constants.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands import ( "encoding/json" diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_backup.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_backup.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_backup.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_backup.go index a6f48471588..ff2a1eb7731 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_backup.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_backup.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_backup_test.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_backup_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_backup_test.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_backup_test.go index 294621d61ee..ba4d99bf109 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/id_backup_test.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_backup_test.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/capturedlogs/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_flexibleserver.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/capturedlogs/id_flexibleserver.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_flexibleserver.go index 284d4757ee0..ee18f21d11c 100644 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/id_flexibleserver.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_flexibleserver.go @@ -1,4 +1,4 @@ -package capturedlogs +package backupautomaticandondemands import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/capturedlogs/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_flexibleserver_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/capturedlogs/id_flexibleserver_test.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_flexibleserver_test.go index f81c4a5d30f..1871e9307b3 100644 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/id_flexibleserver_test.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/id_flexibleserver_test.go @@ -1,4 +1,4 @@ -package capturedlogs +package backupautomaticandondemands import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_createorupdate.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandcreate.go similarity index 59% rename from resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_createorupdate.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandcreate.go index bb05a7a1d80..cb66f7e9280 100644 --- a/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra/method_createorupdate.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandcreate.go @@ -1,4 +1,4 @@ -package administratorsmicrosoftentra +package backupautomaticandondemands import ( "context" @@ -14,14 +14,14 @@ import ( // 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 { +type BackupsAutomaticAndOnDemandCreateOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// CreateOrUpdate ... -func (c AdministratorsMicrosoftEntraClient) CreateOrUpdate(ctx context.Context, id AdministratorId, input AdministratorMicrosoftEntraAdd) (result CreateOrUpdateOperationResponse, err error) { +// BackupsAutomaticAndOnDemandCreate ... +func (c BackupAutomaticAndOnDemandsClient) BackupsAutomaticAndOnDemandCreate(ctx context.Context, id BackupId) (result BackupsAutomaticAndOnDemandCreateOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -36,10 +36,6 @@ func (c AdministratorsMicrosoftEntraClient) CreateOrUpdate(ctx context.Context, return } - if err = req.Marshal(input); err != nil { - return - } - var resp *client.Response resp, err = req.Execute(ctx) if resp != nil { @@ -58,15 +54,15 @@ func (c AdministratorsMicrosoftEntraClient) CreateOrUpdate(ctx context.Context, return } -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c AdministratorsMicrosoftEntraClient) CreateOrUpdateThenPoll(ctx context.Context, id AdministratorId, input AdministratorMicrosoftEntraAdd) error { - result, err := c.CreateOrUpdate(ctx, id, input) +// BackupsAutomaticAndOnDemandCreateThenPoll performs BackupsAutomaticAndOnDemandCreate then polls until it's completed +func (c BackupAutomaticAndOnDemandsClient) BackupsAutomaticAndOnDemandCreateThenPoll(ctx context.Context, id BackupId) error { + result, err := c.BackupsAutomaticAndOnDemandCreate(ctx, id) if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) + return fmt.Errorf("performing BackupsAutomaticAndOnDemandCreate: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) + return fmt.Errorf("polling after BackupsAutomaticAndOnDemandCreate: %+v", err) } return nil diff --git a/resource-manager/batch/2024-07-01/privateendpointconnection/method_delete.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemanddelete.go similarity index 59% rename from resource-manager/batch/2024-07-01/privateendpointconnection/method_delete.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemanddelete.go index 79b75c96d92..d5219859245 100644 --- a/resource-manager/batch/2024-07-01/privateendpointconnection/method_delete.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemanddelete.go @@ -1,4 +1,4 @@ -package privateendpointconnection +package backupautomaticandondemands import ( "context" @@ -14,14 +14,14 @@ import ( // 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 { +type BackupsAutomaticAndOnDemandDeleteOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData } -// Delete ... -func (c PrivateEndpointConnectionClient) Delete(ctx context.Context, id PrivateEndpointConnectionId) (result DeleteOperationResponse, err error) { +// BackupsAutomaticAndOnDemandDelete ... +func (c BackupAutomaticAndOnDemandsClient) BackupsAutomaticAndOnDemandDelete(ctx context.Context, id BackupId) (result BackupsAutomaticAndOnDemandDeleteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -55,15 +55,15 @@ func (c PrivateEndpointConnectionClient) Delete(ctx context.Context, id PrivateE return } -// DeleteThenPoll performs Delete then polls until it's completed -func (c PrivateEndpointConnectionClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointConnectionId) error { - result, err := c.Delete(ctx, id) +// BackupsAutomaticAndOnDemandDeleteThenPoll performs BackupsAutomaticAndOnDemandDelete then polls until it's completed +func (c BackupAutomaticAndOnDemandsClient) BackupsAutomaticAndOnDemandDeleteThenPoll(ctx context.Context, id BackupId) error { + result, err := c.BackupsAutomaticAndOnDemandDelete(ctx, id) if err != nil { - return fmt.Errorf("performing Delete: %+v", err) + return fmt.Errorf("performing BackupsAutomaticAndOnDemandDelete: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) + return fmt.Errorf("polling after BackupsAutomaticAndOnDemandDelete: %+v", err) } return nil diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_get.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandget.go similarity index 75% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_get.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandget.go index ce4e88718ba..134bba3144b 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_get.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandget.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type BackupsAutomaticAndOnDemandGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *BackupAutomaticAndOnDemand } -// Get ... -func (c BackupsAutomaticAndOnDemandClient) Get(ctx context.Context, id BackupId) (result GetOperationResponse, err error) { +// BackupsAutomaticAndOnDemandGet ... +func (c BackupAutomaticAndOnDemandsClient) BackupsAutomaticAndOnDemandGet(ctx context.Context, id BackupId) (result BackupsAutomaticAndOnDemandGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_listbyserver.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandlistbyserver.go similarity index 50% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_listbyserver.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandlistbyserver.go index ee270959fa6..5656eb849de 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/method_listbyserver.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/method_backupsautomaticandondemandlistbyserver.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands import ( "context" @@ -12,22 +12,22 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListByServerOperationResponse struct { +type BackupsAutomaticAndOnDemandListByServerOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]BackupAutomaticAndOnDemand } -type ListByServerCompleteResult struct { +type BackupsAutomaticAndOnDemandListByServerCompleteResult struct { LatestHttpResponse *http.Response Items []BackupAutomaticAndOnDemand } -type ListByServerCustomPager struct { +type BackupsAutomaticAndOnDemandListByServerCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByServerCustomPager) NextPageLink() *odata.Link { +func (p *BackupsAutomaticAndOnDemandListByServerCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -35,15 +35,15 @@ func (p *ListByServerCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByServer ... -func (c BackupsAutomaticAndOnDemandClient) ListByServer(ctx context.Context, id FlexibleServerId) (result ListByServerOperationResponse, err error) { +// BackupsAutomaticAndOnDemandListByServer ... +func (c BackupAutomaticAndOnDemandsClient) BackupsAutomaticAndOnDemandListByServer(ctx context.Context, id FlexibleServerId) (result BackupsAutomaticAndOnDemandListByServerOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListByServerCustomPager{}, + Pager: &BackupsAutomaticAndOnDemandListByServerCustomPager{}, Path: fmt.Sprintf("%s/backups", id.ID()), } @@ -74,16 +74,16 @@ func (c BackupsAutomaticAndOnDemandClient) ListByServer(ctx context.Context, id return } -// ListByServerComplete retrieves all the results into a single object -func (c BackupsAutomaticAndOnDemandClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, BackupAutomaticAndOnDemandOperationPredicate{}) +// BackupsAutomaticAndOnDemandListByServerComplete retrieves all the results into a single object +func (c BackupAutomaticAndOnDemandsClient) BackupsAutomaticAndOnDemandListByServerComplete(ctx context.Context, id FlexibleServerId) (BackupsAutomaticAndOnDemandListByServerCompleteResult, error) { + return c.BackupsAutomaticAndOnDemandListByServerCompleteMatchingPredicate(ctx, id, BackupAutomaticAndOnDemandOperationPredicate{}) } -// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BackupsAutomaticAndOnDemandClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate BackupAutomaticAndOnDemandOperationPredicate) (result ListByServerCompleteResult, err error) { +// BackupsAutomaticAndOnDemandListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BackupAutomaticAndOnDemandsClient) BackupsAutomaticAndOnDemandListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate BackupAutomaticAndOnDemandOperationPredicate) (result BackupsAutomaticAndOnDemandListByServerCompleteResult, err error) { items := make([]BackupAutomaticAndOnDemand, 0) - resp, err := c.ListByServer(ctx, id) + resp, err := c.BackupsAutomaticAndOnDemandListByServer(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -97,7 +97,7 @@ func (c BackupsAutomaticAndOnDemandClient) ListByServerCompleteMatchingPredicate } } - result = ListByServerCompleteResult{ + result = BackupsAutomaticAndOnDemandListByServerCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/model_backupautomaticandondemand.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/model_backupautomaticandondemand.go similarity index 94% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/model_backupautomaticandondemand.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/model_backupautomaticandondemand.go index 56e640a26c9..842526f652a 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/model_backupautomaticandondemand.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/model_backupautomaticandondemand.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/model_backupautomaticandondemandproperties.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/model_backupautomaticandondemandproperties.go similarity index 95% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/model_backupautomaticandondemandproperties.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/model_backupautomaticandondemandproperties.go index e7eff7459f3..1219d47cf99 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/model_backupautomaticandondemandproperties.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/model_backupautomaticandondemandproperties.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands import ( "time" diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/predicates.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/predicates.go similarity index 94% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/predicates.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/predicates.go index 3e43c6d1db2..535f9c6d102 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/predicates.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/predicates.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/version.go b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/version.go similarity index 70% rename from resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/version.go rename to resource-manager/postgresql/2025-08-01/backupautomaticandondemands/version.go index 066bf19bd0e..26e0adedcff 100644 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/version.go +++ b/resource-manager/postgresql/2025-08-01/backupautomaticandondemands/version.go @@ -1,4 +1,4 @@ -package backupsautomaticandondemand +package backupautomaticandondemands // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package backupsautomaticandondemand const defaultApiVersion = "2025-08-01" func userAgent() string { - return "hashicorp/go-azure-sdk/backupsautomaticandondemand/2025-08-01" + return "hashicorp/go-azure-sdk/backupautomaticandondemands/2025-08-01" } diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/README.md b/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/README.md deleted file mode 100644 index 3944a753dbe..00000000000 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/README.md +++ /dev/null @@ -1,77 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand` Documentation - -The `backupsautomaticandondemand` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/backupsautomaticandondemand" -``` - - -### Client Initialization - -```go -client := backupsautomaticandondemand.NewBackupsAutomaticAndOnDemandClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BackupsAutomaticAndOnDemandClient.Create` - -```go -ctx := context.TODO() -id := backupsautomaticandondemand.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "backupName") - -if err := client.CreateThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `BackupsAutomaticAndOnDemandClient.Delete` - -```go -ctx := context.TODO() -id := backupsautomaticandondemand.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "backupName") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `BackupsAutomaticAndOnDemandClient.Get` - -```go -ctx := context.TODO() -id := backupsautomaticandondemand.NewBackupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "backupName") - -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: `BackupsAutomaticAndOnDemandClient.ListByServer` - -```go -ctx := context.TODO() -id := backupsautomaticandondemand.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/client.go b/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/client.go deleted file mode 100644 index 149029a1618..00000000000 --- a/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package backupsautomaticandondemand - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 BackupsAutomaticAndOnDemandClient struct { - Client *resourcemanager.Client -} - -func NewBackupsAutomaticAndOnDemandClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsAutomaticAndOnDemandClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "backupsautomaticandondemand", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating BackupsAutomaticAndOnDemandClient: %+v", err) - } - - return &BackupsAutomaticAndOnDemandClient{ - Client: client, - }, nil -} diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/README.md b/resource-manager/postgresql/2025-08-01/backupslongtermretention/README.md deleted file mode 100644 index 516ed319ca0..00000000000 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/README.md +++ /dev/null @@ -1,91 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/backupslongtermretention` Documentation - -The `backupslongtermretention` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/backupslongtermretention" -``` - - -### Client Initialization - -```go -client := backupslongtermretention.NewBackupsLongTermRetentionClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BackupsLongTermRetentionClient.CheckPrerequisites` - -```go -ctx := context.TODO() -id := backupslongtermretention.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -payload := backupslongtermretention.BackupRequestBase{ - // ... -} - - -read, err := client.CheckPrerequisites(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BackupsLongTermRetentionClient.Get` - -```go -ctx := context.TODO() -id := backupslongtermretention.NewLtrBackupOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "ltrBackupOperationName") - -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: `BackupsLongTermRetentionClient.ListByServer` - -```go -ctx := context.TODO() -id := backupslongtermretention.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BackupsLongTermRetentionClient.Start` - -```go -ctx := context.TODO() -id := backupslongtermretention.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -payload := backupslongtermretention.BackupsLongTermRetentionRequest{ - // ... -} - - -if err := client.StartThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_flexibleserver.go deleted file mode 100644 index 1f7e86e7313..00000000000 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_flexibleserver.go +++ /dev/null @@ -1,130 +0,0 @@ -package backupslongtermretention - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&FlexibleServerId{}) -} - -var _ resourceids.ResourceId = &FlexibleServerId{} - -// FlexibleServerId is a struct representing the Resource ID for a Flexible Server -type FlexibleServerId struct { - SubscriptionId string - ResourceGroupName string - FlexibleServerName string -} - -// NewFlexibleServerID returns a new FlexibleServerId struct -func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { - return FlexibleServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FlexibleServerName: flexibleServerName, - } -} - -// ParseFlexibleServerID parses 'input' into a FlexibleServerId -func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId -// note: this method should only be used for API response data and not user input -func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) - } - - return nil -} - -// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID -func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFlexibleServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Flexible Server ID -func (id FlexibleServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforPostgreSQL/flexibleServers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID -func (id FlexibleServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforPostgreSQL", "Microsoft.DBforPostgreSQL", "Microsoft.DBforPostgreSQL"), - resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), - resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), - } -} - -// String returns a human-readable description of this Flexible Server ID -func (id FlexibleServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), - } - return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_flexibleserver_test.go deleted file mode 100644 index 2ccdbcd7c3e..00000000000 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_flexibleserver_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package backupslongtermretention - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &FlexibleServerId{} - -func TestNewFlexibleServerID(t *testing.T) { - id := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FlexibleServerName != "flexibleServerName" { - t.Fatalf("Expected %q but got %q for Segment 'FlexibleServerName'", id.FlexibleServerName, "flexibleServerName") - } -} - -func TestFormatFlexibleServerID(t *testing.T) { - actual := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFlexibleServerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestParseFlexibleServerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FlexibleServerName: "fLeXiBlEsErVeRnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestSegmentsForFlexibleServerId(t *testing.T) { - segments := FlexibleServerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FlexibleServerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/README.md b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/README.md new file mode 100644 index 00000000000..ea2aec8573e --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/README.md @@ -0,0 +1,53 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations` Documentation + +The `backupslongtermretentionoperations` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/backupslongtermretentionoperations" +``` + + +### Client Initialization + +```go +client := backupslongtermretentionoperations.NewBackupsLongTermRetentionOperationsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BackupsLongTermRetentionOperationsClient.BackupsLongTermRetentionGet` + +```go +ctx := context.TODO() +id := backupslongtermretentionoperations.NewLtrBackupOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "ltrBackupOperationName") + +read, err := client.BackupsLongTermRetentionGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BackupsLongTermRetentionOperationsClient.BackupsLongTermRetentionListByServer` + +```go +ctx := context.TODO() +id := backupslongtermretentionoperations.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.BackupsLongTermRetentionListByServer(ctx, id)` can be used to do batched pagination +items, err := client.BackupsLongTermRetentionListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/client.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/client.go similarity index 59% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/client.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/client.go index e30a9d7a16f..907ccab402d 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/client.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/client.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type BackupsLongTermRetentionClient struct { +type BackupsLongTermRetentionOperationsClient struct { Client *resourcemanager.Client } -func NewBackupsLongTermRetentionClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsLongTermRetentionClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "backupslongtermretention", defaultApiVersion) +func NewBackupsLongTermRetentionOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsLongTermRetentionOperationsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "backupslongtermretentionoperations", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating BackupsLongTermRetentionClient: %+v", err) + return nil, fmt.Errorf("instantiating BackupsLongTermRetentionOperationsClient: %+v", err) } - return &BackupsLongTermRetentionClient{ + return &BackupsLongTermRetentionOperationsClient{ Client: client, }, nil } diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/constants.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/constants.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/constants.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/constants.go index 296a442f322..e0565e4c44a 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/constants.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/constants.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations import ( "encoding/json" diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_flexibleserver.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/id_flexibleserver.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_flexibleserver.go index 6c8af36ce31..fe0c631161e 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/id_flexibleserver.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_flexibleserver.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package backupslongtermretentionoperations import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_flexibleserver_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/id_flexibleserver_test.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_flexibleserver_test.go index f686975522e..56d94ebbd24 100644 --- a/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings/id_flexibleserver_test.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_flexibleserver_test.go @@ -1,4 +1,4 @@ -package advancedthreatprotectionsettings +package backupslongtermretentionoperations import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_ltrbackupoperation.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_ltrbackupoperation.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/id_ltrbackupoperation.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_ltrbackupoperation.go index 903757f5d8e..1d2c9d96aa1 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_ltrbackupoperation.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_ltrbackupoperation.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_ltrbackupoperation_test.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_ltrbackupoperation_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/id_ltrbackupoperation_test.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_ltrbackupoperation_test.go index 8bf6f2effcb..4330a6533d7 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/id_ltrbackupoperation_test.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/id_ltrbackupoperation_test.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/method_get.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/method_backupslongtermretentionget.go similarity index 74% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/method_get.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/method_backupslongtermretentionget.go index 4aaad7c19cd..59f1ee1feb2 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/method_get.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/method_backupslongtermretentionget.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type BackupsLongTermRetentionGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *BackupsLongTermRetentionOperation } -// Get ... -func (c BackupsLongTermRetentionClient) Get(ctx context.Context, id LtrBackupOperationId) (result GetOperationResponse, err error) { +// BackupsLongTermRetentionGet ... +func (c BackupsLongTermRetentionOperationsClient) BackupsLongTermRetentionGet(ctx context.Context, id LtrBackupOperationId) (result BackupsLongTermRetentionGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/method_listbyserver.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/method_backupslongtermretentionlistbyserver.go similarity index 51% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/method_listbyserver.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/method_backupslongtermretentionlistbyserver.go index ee071ffbc7e..4b3432368b1 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/method_listbyserver.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/method_backupslongtermretentionlistbyserver.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations import ( "context" @@ -12,22 +12,22 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListByServerOperationResponse struct { +type BackupsLongTermRetentionListByServerOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]BackupsLongTermRetentionOperation } -type ListByServerCompleteResult struct { +type BackupsLongTermRetentionListByServerCompleteResult struct { LatestHttpResponse *http.Response Items []BackupsLongTermRetentionOperation } -type ListByServerCustomPager struct { +type BackupsLongTermRetentionListByServerCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByServerCustomPager) NextPageLink() *odata.Link { +func (p *BackupsLongTermRetentionListByServerCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -35,15 +35,15 @@ func (p *ListByServerCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByServer ... -func (c BackupsLongTermRetentionClient) ListByServer(ctx context.Context, id FlexibleServerId) (result ListByServerOperationResponse, err error) { +// BackupsLongTermRetentionListByServer ... +func (c BackupsLongTermRetentionOperationsClient) BackupsLongTermRetentionListByServer(ctx context.Context, id FlexibleServerId) (result BackupsLongTermRetentionListByServerOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListByServerCustomPager{}, + Pager: &BackupsLongTermRetentionListByServerCustomPager{}, Path: fmt.Sprintf("%s/ltrBackupOperations", id.ID()), } @@ -74,16 +74,16 @@ func (c BackupsLongTermRetentionClient) ListByServer(ctx context.Context, id Fle return } -// ListByServerComplete retrieves all the results into a single object -func (c BackupsLongTermRetentionClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, BackupsLongTermRetentionOperationOperationPredicate{}) +// BackupsLongTermRetentionListByServerComplete retrieves all the results into a single object +func (c BackupsLongTermRetentionOperationsClient) BackupsLongTermRetentionListByServerComplete(ctx context.Context, id FlexibleServerId) (BackupsLongTermRetentionListByServerCompleteResult, error) { + return c.BackupsLongTermRetentionListByServerCompleteMatchingPredicate(ctx, id, BackupsLongTermRetentionOperationOperationPredicate{}) } -// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BackupsLongTermRetentionClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate BackupsLongTermRetentionOperationOperationPredicate) (result ListByServerCompleteResult, err error) { +// BackupsLongTermRetentionListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BackupsLongTermRetentionOperationsClient) BackupsLongTermRetentionListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate BackupsLongTermRetentionOperationOperationPredicate) (result BackupsLongTermRetentionListByServerCompleteResult, err error) { items := make([]BackupsLongTermRetentionOperation, 0) - resp, err := c.ListByServer(ctx, id) + resp, err := c.BackupsLongTermRetentionListByServer(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -97,7 +97,7 @@ func (c BackupsLongTermRetentionClient) ListByServerCompleteMatchingPredicate(ct } } - result = ListByServerCompleteResult{ + result = BackupsLongTermRetentionListByServerCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionoperation.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/model_backupslongtermretentionoperation.go similarity index 93% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionoperation.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/model_backupslongtermretentionoperation.go index d0bdfe10aef..007d0a2bae4 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionoperation.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/model_backupslongtermretentionoperation.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/model_ltrbackupoperationresponseproperties.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/model_ltrbackupoperationresponseproperties.go new file mode 100644 index 00000000000..a8b0e13eff3 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/model_ltrbackupoperationresponseproperties.go @@ -0,0 +1,44 @@ +package backupslongtermretentionoperations + +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 LtrBackupOperationResponseProperties struct { + BackupMetadata *string `json:"backupMetadata,omitempty"` + BackupName *string `json:"backupName,omitempty"` + DataTransferredInBytes *int64 `json:"dataTransferredInBytes,omitempty"` + DatasourceSizeInBytes *int64 `json:"datasourceSizeInBytes,omitempty"` + EndTime *string `json:"endTime,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + StartTime string `json:"startTime"` + Status ExecutionStatus `json:"status"` +} + +func (o *LtrBackupOperationResponseProperties) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *LtrBackupOperationResponseProperties) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *LtrBackupOperationResponseProperties) GetStartTimeAsTime() (*time.Time, error) { + return dates.ParseAsFormat(&o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *LtrBackupOperationResponseProperties) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = formatted +} diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/predicates.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/predicates.go similarity index 93% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/predicates.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/predicates.go index b361889dc28..46721aa5256 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/predicates.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/predicates.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/version.go b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/version.go similarity index 64% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/version.go rename to resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/version.go index 7b5dc0ea0e8..984599646df 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/version.go +++ b/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations/version.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package backupslongtermretentionoperations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package backupslongtermretention const defaultApiVersion = "2025-08-01" func userAgent() string { - return "hashicorp/go-azure-sdk/backupslongtermretention/2025-08-01" + return "hashicorp/go-azure-sdk/backupslongtermretentionoperations/2025-08-01" } diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/README.md b/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/README.md deleted file mode 100644 index 575fe943804..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/capabilitiesbylocation` Documentation - -The `capabilitiesbylocation` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/capabilitiesbylocation" -``` - - -### Client Initialization - -```go -client := capabilitiesbylocation.NewCapabilitiesByLocationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CapabilitiesByLocationClient.List` - -```go -ctx := context.TODO() -id := capabilitiesbylocation.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") - -// 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/postgresql/2025-08-01/capabilitiesbylocation/client.go b/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/client.go deleted file mode 100644 index 578240144dd..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package capabilitiesbylocation - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 CapabilitiesByLocationClient struct { - Client *resourcemanager.Client -} - -func NewCapabilitiesByLocationClientWithBaseURI(sdkApi sdkEnv.Api) (*CapabilitiesByLocationClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "capabilitiesbylocation", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CapabilitiesByLocationClient: %+v", err) - } - - return &CapabilitiesByLocationClient{ - Client: client, - }, nil -} diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/id_location.go b/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/id_location.go deleted file mode 100644 index 3c817c97a4f..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/id_location.go +++ /dev/null @@ -1,121 +0,0 @@ -package capabilitiesbylocation - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LocationId{}) -} - -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) - } - - id := LocationId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - 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) - } - - id := LocationId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.LocationName, ok = input.Parsed["locationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) - } - - return 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.DBforPostgreSQL/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("staticMicrosoftDBforPostgreSQL", "Microsoft.DBforPostgreSQL", "Microsoft.DBforPostgreSQL"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationName"), - } -} - -// 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/postgresql/2025-08-01/capabilitiesbylocation/id_location_test.go b/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/id_location_test.go deleted file mode 100644 index 4c6695f6285..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package capabilitiesbylocation - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (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", "locationName") - - if id.SubscriptionId != "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 != "locationName" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationName") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName" - 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.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName/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.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/lOcAtIoNs/lOcAtIoNnAmE", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/lOcAtIoNs/lOcAtIoNnAmE/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/postgresql/2025-08-01/capabilitiesbylocation/predicates.go b/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/predicates.go deleted file mode 100644 index 381d68d4470..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/predicates.go +++ /dev/null @@ -1,22 +0,0 @@ -package capabilitiesbylocation - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CapabilityOperationPredicate struct { - Name *string - Reason *string -} - -func (p CapabilityOperationPredicate) Matches(input Capability) bool { - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Reason != nil && (input.Reason == nil || *p.Reason != *input.Reason) { - return false - } - - return true -} diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/version.go b/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/version.go deleted file mode 100644 index b3a44ef57dd..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package capabilitiesbylocation - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2025-08-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/capabilitiesbylocation/2025-08-01" -} diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/README.md b/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/README.md deleted file mode 100644 index 8925416fda5..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/capabilitiesbyserver` Documentation - -The `capabilitiesbyserver` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/capabilitiesbyserver" -``` - - -### Client Initialization - -```go -client := capabilitiesbyserver.NewCapabilitiesByServerClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CapabilitiesByServerClient.List` - -```go -ctx := context.TODO() -id := capabilitiesbyserver.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -// 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/postgresql/2025-08-01/capabilitiesbyserver/client.go b/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/client.go deleted file mode 100644 index 6eebfd7c4b0..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package capabilitiesbyserver - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 CapabilitiesByServerClient struct { - Client *resourcemanager.Client -} - -func NewCapabilitiesByServerClientWithBaseURI(sdkApi sdkEnv.Api) (*CapabilitiesByServerClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "capabilitiesbyserver", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CapabilitiesByServerClient: %+v", err) - } - - return &CapabilitiesByServerClient{ - Client: client, - }, nil -} diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/constants.go b/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/constants.go deleted file mode 100644 index 3e9de7e217d..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/constants.go +++ /dev/null @@ -1,426 +0,0 @@ -package capabilitiesbyserver - -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 CapabilityStatus string - -const ( - CapabilityStatusAvailable CapabilityStatus = "Available" - CapabilityStatusDefault CapabilityStatus = "Default" - CapabilityStatusDisabled CapabilityStatus = "Disabled" - CapabilityStatusVisible CapabilityStatus = "Visible" -) - -func PossibleValuesForCapabilityStatus() []string { - return []string{ - string(CapabilityStatusAvailable), - string(CapabilityStatusDefault), - string(CapabilityStatusDisabled), - string(CapabilityStatusVisible), - } -} - -func (s *CapabilityStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCapabilityStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCapabilityStatus(input string) (*CapabilityStatus, error) { - vals := map[string]CapabilityStatus{ - "available": CapabilityStatusAvailable, - "default": CapabilityStatusDefault, - "disabled": CapabilityStatusDisabled, - "visible": CapabilityStatusVisible, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CapabilityStatus(input) - return &out, nil -} - -type FastProvisioningSupport string - -const ( - FastProvisioningSupportDisabled FastProvisioningSupport = "Disabled" - FastProvisioningSupportEnabled FastProvisioningSupport = "Enabled" -) - -func PossibleValuesForFastProvisioningSupport() []string { - return []string{ - string(FastProvisioningSupportDisabled), - string(FastProvisioningSupportEnabled), - } -} - -func (s *FastProvisioningSupport) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFastProvisioningSupport(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFastProvisioningSupport(input string) (*FastProvisioningSupport, error) { - vals := map[string]FastProvisioningSupport{ - "disabled": FastProvisioningSupportDisabled, - "enabled": FastProvisioningSupportEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FastProvisioningSupport(input) - return &out, nil -} - -type FeatureStatus string - -const ( - FeatureStatusDisabled FeatureStatus = "Disabled" - FeatureStatusEnabled FeatureStatus = "Enabled" -) - -func PossibleValuesForFeatureStatus() []string { - return []string{ - string(FeatureStatusDisabled), - string(FeatureStatusEnabled), - } -} - -func (s *FeatureStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFeatureStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFeatureStatus(input string) (*FeatureStatus, error) { - vals := map[string]FeatureStatus{ - "disabled": FeatureStatusDisabled, - "enabled": FeatureStatusEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FeatureStatus(input) - return &out, nil -} - -type GeographicallyRedundantBackupSupport string - -const ( - GeographicallyRedundantBackupSupportDisabled GeographicallyRedundantBackupSupport = "Disabled" - GeographicallyRedundantBackupSupportEnabled GeographicallyRedundantBackupSupport = "Enabled" -) - -func PossibleValuesForGeographicallyRedundantBackupSupport() []string { - return []string{ - string(GeographicallyRedundantBackupSupportDisabled), - string(GeographicallyRedundantBackupSupportEnabled), - } -} - -func (s *GeographicallyRedundantBackupSupport) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGeographicallyRedundantBackupSupport(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGeographicallyRedundantBackupSupport(input string) (*GeographicallyRedundantBackupSupport, error) { - vals := map[string]GeographicallyRedundantBackupSupport{ - "disabled": GeographicallyRedundantBackupSupportDisabled, - "enabled": GeographicallyRedundantBackupSupportEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GeographicallyRedundantBackupSupport(input) - return &out, nil -} - -type HighAvailabilityMode string - -const ( - HighAvailabilityModeSameZone HighAvailabilityMode = "SameZone" - HighAvailabilityModeZoneRedundant HighAvailabilityMode = "ZoneRedundant" -) - -func PossibleValuesForHighAvailabilityMode() []string { - return []string{ - string(HighAvailabilityModeSameZone), - string(HighAvailabilityModeZoneRedundant), - } -} - -func (s *HighAvailabilityMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHighAvailabilityMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHighAvailabilityMode(input string) (*HighAvailabilityMode, error) { - vals := map[string]HighAvailabilityMode{ - "samezone": HighAvailabilityModeSameZone, - "zoneredundant": HighAvailabilityModeZoneRedundant, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HighAvailabilityMode(input) - return &out, nil -} - -type LocationRestricted string - -const ( - LocationRestrictedDisabled LocationRestricted = "Disabled" - LocationRestrictedEnabled LocationRestricted = "Enabled" -) - -func PossibleValuesForLocationRestricted() []string { - return []string{ - string(LocationRestrictedDisabled), - string(LocationRestrictedEnabled), - } -} - -func (s *LocationRestricted) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLocationRestricted(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLocationRestricted(input string) (*LocationRestricted, error) { - vals := map[string]LocationRestricted{ - "disabled": LocationRestrictedDisabled, - "enabled": LocationRestrictedEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LocationRestricted(input) - return &out, nil -} - -type OnlineStorageResizeSupport string - -const ( - OnlineStorageResizeSupportDisabled OnlineStorageResizeSupport = "Disabled" - OnlineStorageResizeSupportEnabled OnlineStorageResizeSupport = "Enabled" -) - -func PossibleValuesForOnlineStorageResizeSupport() []string { - return []string{ - string(OnlineStorageResizeSupportDisabled), - string(OnlineStorageResizeSupportEnabled), - } -} - -func (s *OnlineStorageResizeSupport) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOnlineStorageResizeSupport(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOnlineStorageResizeSupport(input string) (*OnlineStorageResizeSupport, error) { - vals := map[string]OnlineStorageResizeSupport{ - "disabled": OnlineStorageResizeSupportDisabled, - "enabled": OnlineStorageResizeSupportEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OnlineStorageResizeSupport(input) - return &out, nil -} - -type StorageAutoGrowthSupport string - -const ( - StorageAutoGrowthSupportDisabled StorageAutoGrowthSupport = "Disabled" - StorageAutoGrowthSupportEnabled StorageAutoGrowthSupport = "Enabled" -) - -func PossibleValuesForStorageAutoGrowthSupport() []string { - return []string{ - string(StorageAutoGrowthSupportDisabled), - string(StorageAutoGrowthSupportEnabled), - } -} - -func (s *StorageAutoGrowthSupport) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStorageAutoGrowthSupport(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStorageAutoGrowthSupport(input string) (*StorageAutoGrowthSupport, error) { - vals := map[string]StorageAutoGrowthSupport{ - "disabled": StorageAutoGrowthSupportDisabled, - "enabled": StorageAutoGrowthSupportEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageAutoGrowthSupport(input) - return &out, nil -} - -type ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport string - -const ( - ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportDisabled ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport = "Disabled" - ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportEnabled ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport = "Enabled" -) - -func PossibleValuesForZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport() []string { - return []string{ - string(ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportDisabled), - string(ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportEnabled), - } -} - -func (s *ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport(input string) (*ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport, error) { - vals := map[string]ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport{ - "disabled": ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportDisabled, - "enabled": ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport(input) - return &out, nil -} - -type ZoneRedundantHighAvailabilitySupport string - -const ( - ZoneRedundantHighAvailabilitySupportDisabled ZoneRedundantHighAvailabilitySupport = "Disabled" - ZoneRedundantHighAvailabilitySupportEnabled ZoneRedundantHighAvailabilitySupport = "Enabled" -) - -func PossibleValuesForZoneRedundantHighAvailabilitySupport() []string { - return []string{ - string(ZoneRedundantHighAvailabilitySupportDisabled), - string(ZoneRedundantHighAvailabilitySupportEnabled), - } -} - -func (s *ZoneRedundantHighAvailabilitySupport) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseZoneRedundantHighAvailabilitySupport(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseZoneRedundantHighAvailabilitySupport(input string) (*ZoneRedundantHighAvailabilitySupport, error) { - vals := map[string]ZoneRedundantHighAvailabilitySupport{ - "disabled": ZoneRedundantHighAvailabilitySupportDisabled, - "enabled": ZoneRedundantHighAvailabilitySupportEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ZoneRedundantHighAvailabilitySupport(input) - return &out, nil -} diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/predicates.go b/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/predicates.go deleted file mode 100644 index 8fdb901e105..00000000000 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/predicates.go +++ /dev/null @@ -1,22 +0,0 @@ -package capabilitiesbyserver - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CapabilityOperationPredicate struct { - Name *string - Reason *string -} - -func (p CapabilityOperationPredicate) Matches(input Capability) bool { - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Reason != nil && (input.Reason == nil || *p.Reason != *input.Reason) { - return false - } - - return true -} diff --git a/resource-manager/postgresql/2025-08-01/capturedlogs/README.md b/resource-manager/postgresql/2025-08-01/capturedlogs/README.md deleted file mode 100644 index 65a0b81eca8..00000000000 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/capturedlogs` Documentation - -The `capturedlogs` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/capturedlogs" -``` - - -### Client Initialization - -```go -client := capturedlogs.NewCapturedLogsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CapturedLogsClient.ListByServer` - -```go -ctx := context.TODO() -id := capturedlogs.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/postgresql/2025-08-01/capturedlogs/predicates.go b/resource-manager/postgresql/2025-08-01/capturedlogs/predicates.go deleted file mode 100644 index ed2b47cb21b..00000000000 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package capturedlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CapturedLogOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p CapturedLogOperationPredicate) Matches(input CapturedLog) 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/postgresql/2025-08-01/capturedlogs/version.go b/resource-manager/postgresql/2025-08-01/capturedlogs/version.go deleted file mode 100644 index 04cc7904ad8..00000000000 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package capturedlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2025-08-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/capturedlogs/2025-08-01" -} diff --git a/resource-manager/postgresql/2025-08-01/client.go b/resource-manager/postgresql/2025-08-01/client.go index 94cc929066e..5706c2ae01f 100644 --- a/resource-manager/postgresql/2025-08-01/client.go +++ b/resource-manager/postgresql/2025-08-01/client.go @@ -6,99 +6,65 @@ package v2025_08_01 import ( "fmt" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/administratorsmicrosoftentra" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettings" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/backupsautomaticandondemand" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/backupslongtermretention" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/capabilitiesbylocation" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/capabilitiesbyserver" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/capturedlogs" + "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/administratormicrosoftentras" + "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/advancedthreatprotectionsettingsmodels" + "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/backupautomaticandondemands" + "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/backupslongtermretentionoperations" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/configurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/customoperation" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/databases" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/firewallrules" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/migrations" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/nameavailability" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/post" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/privatednszonesuffix" + "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/openapis" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/privateendpointconnections" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/privatelinkresources" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/replicas" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/servers" - "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/tuningoptions" + "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup" "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/virtualendpoints" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" ) type Client struct { - AdministratorsMicrosoftEntra *administratorsmicrosoftentra.AdministratorsMicrosoftEntraClient - AdvancedThreatProtectionSettings *advancedthreatprotectionsettings.AdvancedThreatProtectionSettingsClient - BackupsAutomaticAndOnDemand *backupsautomaticandondemand.BackupsAutomaticAndOnDemandClient - BackupsLongTermRetention *backupslongtermretention.BackupsLongTermRetentionClient - CapabilitiesByLocation *capabilitiesbylocation.CapabilitiesByLocationClient - CapabilitiesByServer *capabilitiesbyserver.CapabilitiesByServerClient - CapturedLogs *capturedlogs.CapturedLogsClient - Configurations *configurations.ConfigurationsClient - CustomOperation *customoperation.CustomOperationClient - Databases *databases.DatabasesClient - FirewallRules *firewallrules.FirewallRulesClient - Migrations *migrations.MigrationsClient - NameAvailability *nameavailability.NameAvailabilityClient - POST *post.POSTClient - PrivateDnsZoneSuffix *privatednszonesuffix.PrivateDnsZoneSuffixClient - PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient - PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient - QuotaUsagesForFlexibleServers *quotausagesforflexibleservers.QuotaUsagesForFlexibleServersClient - Replicas *replicas.ReplicasClient - Servers *servers.ServersClient - TuningOptions *tuningoptions.TuningOptionsClient - VirtualEndpoints *virtualendpoints.VirtualEndpointsClient + AdministratorMicrosoftEntras *administratormicrosoftentras.AdministratorMicrosoftEntrasClient + AdvancedThreatProtectionSettingsModels *advancedthreatprotectionsettingsmodels.AdvancedThreatProtectionSettingsModelsClient + BackupAutomaticAndOnDemands *backupautomaticandondemands.BackupAutomaticAndOnDemandsClient + BackupsLongTermRetentionOperations *backupslongtermretentionoperations.BackupsLongTermRetentionOperationsClient + Configurations *configurations.ConfigurationsClient + Databases *databases.DatabasesClient + FirewallRules *firewallrules.FirewallRulesClient + Migrations *migrations.MigrationsClient + Openapis *openapis.OpenapisClient + PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient + PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient + Servers *servers.ServersClient + TuningOptionsOperationGroup *tuningoptionsoperationgroup.TuningOptionsOperationGroupClient + VirtualEndpoints *virtualendpoints.VirtualEndpointsClient } func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - administratorsMicrosoftEntraClient, err := administratorsmicrosoftentra.NewAdministratorsMicrosoftEntraClientWithBaseURI(sdkApi) + administratorMicrosoftEntrasClient, err := administratormicrosoftentras.NewAdministratorMicrosoftEntrasClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building AdministratorsMicrosoftEntra client: %+v", err) + return nil, fmt.Errorf("building AdministratorMicrosoftEntras client: %+v", err) } - configureFunc(administratorsMicrosoftEntraClient.Client) + configureFunc(administratorMicrosoftEntrasClient.Client) - advancedThreatProtectionSettingsClient, err := advancedthreatprotectionsettings.NewAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi) + advancedThreatProtectionSettingsModelsClient, err := advancedthreatprotectionsettingsmodels.NewAdvancedThreatProtectionSettingsModelsClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building AdvancedThreatProtectionSettings client: %+v", err) + return nil, fmt.Errorf("building AdvancedThreatProtectionSettingsModels client: %+v", err) } - configureFunc(advancedThreatProtectionSettingsClient.Client) + configureFunc(advancedThreatProtectionSettingsModelsClient.Client) - backupsAutomaticAndOnDemandClient, err := backupsautomaticandondemand.NewBackupsAutomaticAndOnDemandClientWithBaseURI(sdkApi) + backupAutomaticAndOnDemandsClient, err := backupautomaticandondemands.NewBackupAutomaticAndOnDemandsClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building BackupsAutomaticAndOnDemand client: %+v", err) + return nil, fmt.Errorf("building BackupAutomaticAndOnDemands client: %+v", err) } - configureFunc(backupsAutomaticAndOnDemandClient.Client) + configureFunc(backupAutomaticAndOnDemandsClient.Client) - backupsLongTermRetentionClient, err := backupslongtermretention.NewBackupsLongTermRetentionClientWithBaseURI(sdkApi) + backupsLongTermRetentionOperationsClient, err := backupslongtermretentionoperations.NewBackupsLongTermRetentionOperationsClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building BackupsLongTermRetention client: %+v", err) + return nil, fmt.Errorf("building BackupsLongTermRetentionOperations client: %+v", err) } - configureFunc(backupsLongTermRetentionClient.Client) - - capabilitiesByLocationClient, err := capabilitiesbylocation.NewCapabilitiesByLocationClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building CapabilitiesByLocation client: %+v", err) - } - configureFunc(capabilitiesByLocationClient.Client) - - capabilitiesByServerClient, err := capabilitiesbyserver.NewCapabilitiesByServerClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building CapabilitiesByServer client: %+v", err) - } - configureFunc(capabilitiesByServerClient.Client) - - capturedLogsClient, err := capturedlogs.NewCapturedLogsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building CapturedLogs client: %+v", err) - } - configureFunc(capturedLogsClient.Client) + configureFunc(backupsLongTermRetentionOperationsClient.Client) configurationsClient, err := configurations.NewConfigurationsClientWithBaseURI(sdkApi) if err != nil { @@ -106,12 +72,6 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(configurationsClient.Client) - customOperationClient, err := customoperation.NewCustomOperationClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building CustomOperation client: %+v", err) - } - configureFunc(customOperationClient.Client) - databasesClient, err := databases.NewDatabasesClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building Databases client: %+v", err) @@ -130,23 +90,11 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(migrationsClient.Client) - nameAvailabilityClient, err := nameavailability.NewNameAvailabilityClientWithBaseURI(sdkApi) + openapisClient, err := openapis.NewOpenapisClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building NameAvailability client: %+v", err) + return nil, fmt.Errorf("building Openapis client: %+v", err) } - configureFunc(nameAvailabilityClient.Client) - - pOSTClient, err := post.NewPOSTClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building POST client: %+v", err) - } - configureFunc(pOSTClient.Client) - - privateDnsZoneSuffixClient, err := privatednszonesuffix.NewPrivateDnsZoneSuffixClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building PrivateDnsZoneSuffix client: %+v", err) - } - configureFunc(privateDnsZoneSuffixClient.Client) + configureFunc(openapisClient.Client) privateEndpointConnectionsClient, err := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(sdkApi) if err != nil { @@ -160,29 +108,17 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag } configureFunc(privateLinkResourcesClient.Client) - quotaUsagesForFlexibleServersClient, err := quotausagesforflexibleservers.NewQuotaUsagesForFlexibleServersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building QuotaUsagesForFlexibleServers client: %+v", err) - } - configureFunc(quotaUsagesForFlexibleServersClient.Client) - - replicasClient, err := replicas.NewReplicasClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Replicas client: %+v", err) - } - configureFunc(replicasClient.Client) - serversClient, err := servers.NewServersClientWithBaseURI(sdkApi) if err != nil { return nil, fmt.Errorf("building Servers client: %+v", err) } configureFunc(serversClient.Client) - tuningOptionsClient, err := tuningoptions.NewTuningOptionsClientWithBaseURI(sdkApi) + tuningOptionsOperationGroupClient, err := tuningoptionsoperationgroup.NewTuningOptionsOperationGroupClientWithBaseURI(sdkApi) if err != nil { - return nil, fmt.Errorf("building TuningOptions client: %+v", err) + return nil, fmt.Errorf("building TuningOptionsOperationGroup client: %+v", err) } - configureFunc(tuningOptionsClient.Client) + configureFunc(tuningOptionsOperationGroupClient.Client) virtualEndpointsClient, err := virtualendpoints.NewVirtualEndpointsClientWithBaseURI(sdkApi) if err != nil { @@ -191,27 +127,19 @@ func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanag configureFunc(virtualEndpointsClient.Client) return &Client{ - AdministratorsMicrosoftEntra: administratorsMicrosoftEntraClient, - AdvancedThreatProtectionSettings: advancedThreatProtectionSettingsClient, - BackupsAutomaticAndOnDemand: backupsAutomaticAndOnDemandClient, - BackupsLongTermRetention: backupsLongTermRetentionClient, - CapabilitiesByLocation: capabilitiesByLocationClient, - CapabilitiesByServer: capabilitiesByServerClient, - CapturedLogs: capturedLogsClient, - Configurations: configurationsClient, - CustomOperation: customOperationClient, - Databases: databasesClient, - FirewallRules: firewallRulesClient, - Migrations: migrationsClient, - NameAvailability: nameAvailabilityClient, - POST: pOSTClient, - PrivateDnsZoneSuffix: privateDnsZoneSuffixClient, - PrivateEndpointConnections: privateEndpointConnectionsClient, - PrivateLinkResources: privateLinkResourcesClient, - QuotaUsagesForFlexibleServers: quotaUsagesForFlexibleServersClient, - Replicas: replicasClient, - Servers: serversClient, - TuningOptions: tuningOptionsClient, - VirtualEndpoints: virtualEndpointsClient, + AdministratorMicrosoftEntras: administratorMicrosoftEntrasClient, + AdvancedThreatProtectionSettingsModels: advancedThreatProtectionSettingsModelsClient, + BackupAutomaticAndOnDemands: backupAutomaticAndOnDemandsClient, + BackupsLongTermRetentionOperations: backupsLongTermRetentionOperationsClient, + Configurations: configurationsClient, + Databases: databasesClient, + FirewallRules: firewallRulesClient, + Migrations: migrationsClient, + Openapis: openapisClient, + PrivateEndpointConnections: privateEndpointConnectionsClient, + PrivateLinkResources: privateLinkResourcesClient, + Servers: serversClient, + TuningOptionsOperationGroup: tuningOptionsOperationGroupClient, + VirtualEndpoints: virtualEndpointsClient, }, nil } diff --git a/resource-manager/postgresql/2025-08-01/customoperation/README.md b/resource-manager/postgresql/2025-08-01/customoperation/README.md deleted file mode 100644 index 115f5a4cbd1..00000000000 --- a/resource-manager/postgresql/2025-08-01/customoperation/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/customoperation` Documentation - -The `customoperation` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/customoperation" -``` - - -### Client Initialization - -```go -client := customoperation.NewCustomOperationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CustomOperationClient.MigrationsCheckNameAvailability` - -```go -ctx := context.TODO() -id := customoperation.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -payload := customoperation.MigrationNameAvailability{ - // ... -} - - -read, err := client.MigrationsCheckNameAvailability(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/postgresql/2025-08-01/customoperation/client.go b/resource-manager/postgresql/2025-08-01/customoperation/client.go deleted file mode 100644 index dd76465d0b7..00000000000 --- a/resource-manager/postgresql/2025-08-01/customoperation/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package customoperation - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 CustomOperationClient struct { - Client *resourcemanager.Client -} - -func NewCustomOperationClientWithBaseURI(sdkApi sdkEnv.Api) (*CustomOperationClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "customoperation", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CustomOperationClient: %+v", err) - } - - return &CustomOperationClient{ - Client: client, - }, nil -} diff --git a/resource-manager/postgresql/2025-08-01/customoperation/constants.go b/resource-manager/postgresql/2025-08-01/customoperation/constants.go deleted file mode 100644 index cc163c7370f..00000000000 --- a/resource-manager/postgresql/2025-08-01/customoperation/constants.go +++ /dev/null @@ -1,51 +0,0 @@ -package customoperation - -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 MigrationNameAvailabilityReason string - -const ( - MigrationNameAvailabilityReasonAlreadyExists MigrationNameAvailabilityReason = "AlreadyExists" - MigrationNameAvailabilityReasonInvalid MigrationNameAvailabilityReason = "Invalid" -) - -func PossibleValuesForMigrationNameAvailabilityReason() []string { - return []string{ - string(MigrationNameAvailabilityReasonAlreadyExists), - string(MigrationNameAvailabilityReasonInvalid), - } -} - -func (s *MigrationNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationNameAvailabilityReason(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationNameAvailabilityReason(input string) (*MigrationNameAvailabilityReason, error) { - vals := map[string]MigrationNameAvailabilityReason{ - "alreadyexists": MigrationNameAvailabilityReasonAlreadyExists, - "invalid": MigrationNameAvailabilityReasonInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationNameAvailabilityReason(input) - return &out, nil -} diff --git a/resource-manager/postgresql/2025-08-01/customoperation/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/customoperation/id_flexibleserver.go deleted file mode 100644 index 0f6154d881d..00000000000 --- a/resource-manager/postgresql/2025-08-01/customoperation/id_flexibleserver.go +++ /dev/null @@ -1,130 +0,0 @@ -package customoperation - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&FlexibleServerId{}) -} - -var _ resourceids.ResourceId = &FlexibleServerId{} - -// FlexibleServerId is a struct representing the Resource ID for a Flexible Server -type FlexibleServerId struct { - SubscriptionId string - ResourceGroupName string - FlexibleServerName string -} - -// NewFlexibleServerID returns a new FlexibleServerId struct -func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { - return FlexibleServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FlexibleServerName: flexibleServerName, - } -} - -// ParseFlexibleServerID parses 'input' into a FlexibleServerId -func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId -// note: this method should only be used for API response data and not user input -func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) - } - - return nil -} - -// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID -func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFlexibleServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Flexible Server ID -func (id FlexibleServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforPostgreSQL/flexibleServers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID -func (id FlexibleServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforPostgreSQL", "Microsoft.DBforPostgreSQL", "Microsoft.DBforPostgreSQL"), - resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), - resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), - } -} - -// String returns a human-readable description of this Flexible Server ID -func (id FlexibleServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), - } - return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/postgresql/2025-08-01/customoperation/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/customoperation/id_flexibleserver_test.go deleted file mode 100644 index 9417a483ab8..00000000000 --- a/resource-manager/postgresql/2025-08-01/customoperation/id_flexibleserver_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package customoperation - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &FlexibleServerId{} - -func TestNewFlexibleServerID(t *testing.T) { - id := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FlexibleServerName != "flexibleServerName" { - t.Fatalf("Expected %q but got %q for Segment 'FlexibleServerName'", id.FlexibleServerName, "flexibleServerName") - } -} - -func TestFormatFlexibleServerID(t *testing.T) { - actual := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFlexibleServerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestParseFlexibleServerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FlexibleServerName: "fLeXiBlEsErVeRnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestSegmentsForFlexibleServerId(t *testing.T) { - segments := FlexibleServerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FlexibleServerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/postgresql/2025-08-01/customoperation/model_migrationnameavailability.go b/resource-manager/postgresql/2025-08-01/customoperation/model_migrationnameavailability.go deleted file mode 100644 index c8a74e0427e..00000000000 --- a/resource-manager/postgresql/2025-08-01/customoperation/model_migrationnameavailability.go +++ /dev/null @@ -1,12 +0,0 @@ -package customoperation - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MigrationNameAvailability struct { - Message *string `json:"message,omitempty"` - Name string `json:"name"` - NameAvailable *bool `json:"nameAvailable,omitempty"` - Reason *MigrationNameAvailabilityReason `json:"reason,omitempty"` - Type string `json:"type"` -} diff --git a/resource-manager/postgresql/2025-08-01/customoperation/version.go b/resource-manager/postgresql/2025-08-01/customoperation/version.go deleted file mode 100644 index 11b676dc73f..00000000000 --- a/resource-manager/postgresql/2025-08-01/customoperation/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package customoperation - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2025-08-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/customoperation/2025-08-01" -} diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/README.md b/resource-manager/postgresql/2025-08-01/nameavailability/README.md deleted file mode 100644 index 59dfbcba6bb..00000000000 --- a/resource-manager/postgresql/2025-08-01/nameavailability/README.md +++ /dev/null @@ -1,63 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/nameavailability` Documentation - -The `nameavailability` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/nameavailability" -``` - - -### Client Initialization - -```go -client := nameavailability.NewNameAvailabilityClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NameAvailabilityClient.CheckGlobally` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -payload := nameavailability.CheckNameAvailabilityRequest{ - // ... -} - - -read, err := client.CheckGlobally(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NameAvailabilityClient.CheckWithLocation` - -```go -ctx := context.TODO() -id := nameavailability.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") - -payload := nameavailability.CheckNameAvailabilityRequest{ - // ... -} - - -read, err := client.CheckWithLocation(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/postgresql/2025-08-01/nameavailability/client.go b/resource-manager/postgresql/2025-08-01/nameavailability/client.go deleted file mode 100644 index f2f16d23618..00000000000 --- a/resource-manager/postgresql/2025-08-01/nameavailability/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package nameavailability - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 NameAvailabilityClient struct { - Client *resourcemanager.Client -} - -func NewNameAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*NameAvailabilityClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "nameavailability", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NameAvailabilityClient: %+v", err) - } - - return &NameAvailabilityClient{ - Client: client, - }, nil -} diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/constants.go b/resource-manager/postgresql/2025-08-01/nameavailability/constants.go deleted file mode 100644 index c0c4ebae05e..00000000000 --- a/resource-manager/postgresql/2025-08-01/nameavailability/constants.go +++ /dev/null @@ -1,51 +0,0 @@ -package nameavailability - -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 CheckNameAvailabilityReason string - -const ( - CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" - CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" -) - -func PossibleValuesForCheckNameAvailabilityReason() []string { - return []string{ - string(CheckNameAvailabilityReasonAlreadyExists), - string(CheckNameAvailabilityReasonInvalid), - } -} - -func (s *CheckNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCheckNameAvailabilityReason(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCheckNameAvailabilityReason(input string) (*CheckNameAvailabilityReason, error) { - vals := map[string]CheckNameAvailabilityReason{ - "alreadyexists": CheckNameAvailabilityReasonAlreadyExists, - "invalid": CheckNameAvailabilityReasonInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CheckNameAvailabilityReason(input) - return &out, nil -} diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/version.go b/resource-manager/postgresql/2025-08-01/nameavailability/version.go deleted file mode 100644 index 2d10aa25374..00000000000 --- a/resource-manager/postgresql/2025-08-01/nameavailability/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package nameavailability - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2025-08-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/nameavailability/2025-08-01" -} diff --git a/resource-manager/postgresql/2025-08-01/openapis/README.md b/resource-manager/postgresql/2025-08-01/openapis/README.md new file mode 100644 index 00000000000..0a6d578ce43 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/openapis/README.md @@ -0,0 +1,134 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/openapis` Documentation + +The `openapis` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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-helpers/resourcemanager/commonids" +import "github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/openapis" +``` + + +### Client Initialization + +```go +client := openapis.NewOpenapisClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `OpenapisClient.CapabilitiesByLocationList` + +```go +ctx := context.TODO() +id := openapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +// alternatively `client.CapabilitiesByLocationList(ctx, id)` can be used to do batched pagination +items, err := client.CapabilitiesByLocationListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `OpenapisClient.NameAvailabilityCheckGlobally` + +```go +ctx := context.TODO() +id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") + +payload := openapis.CheckNameAvailabilityRequest{ + // ... +} + + +read, err := client.NameAvailabilityCheckGlobally(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `OpenapisClient.NameAvailabilityCheckWithLocation` + +```go +ctx := context.TODO() +id := openapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +payload := openapis.CheckNameAvailabilityRequest{ + // ... +} + + +read, err := client.NameAvailabilityCheckWithLocation(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `OpenapisClient.PrivateDnsZoneSuffixGet` + +```go +ctx := context.TODO() + + +read, err := client.PrivateDnsZoneSuffixGet(ctx) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `OpenapisClient.QuotaUsagesList` + +```go +ctx := context.TODO() +id := openapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +// alternatively `client.QuotaUsagesList(ctx, id)` can be used to do batched pagination +items, err := client.QuotaUsagesListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `OpenapisClient.VirtualNetworkSubnetUsageList` + +```go +ctx := context.TODO() +id := openapis.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +payload := openapis.VirtualNetworkSubnetUsageParameter{ + // ... +} + + +read, err := client.VirtualNetworkSubnetUsageList(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/postgresql/2025-08-01/replicas/client.go b/resource-manager/postgresql/2025-08-01/openapis/client.go similarity index 61% rename from resource-manager/postgresql/2025-08-01/replicas/client.go rename to resource-manager/postgresql/2025-08-01/openapis/client.go index b494c8a0a7f..497a88776d1 100644 --- a/resource-manager/postgresql/2025-08-01/replicas/client.go +++ b/resource-manager/postgresql/2025-08-01/openapis/client.go @@ -1,4 +1,4 @@ -package replicas +package openapis import ( "fmt" @@ -10,17 +10,17 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ReplicasClient struct { +type OpenapisClient struct { Client *resourcemanager.Client } -func NewReplicasClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicasClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "replicas", defaultApiVersion) +func NewOpenapisClientWithBaseURI(sdkApi sdkEnv.Api) (*OpenapisClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "openapis", defaultApiVersion) if err != nil { - return nil, fmt.Errorf("instantiating ReplicasClient: %+v", err) + return nil, fmt.Errorf("instantiating OpenapisClient: %+v", err) } - return &ReplicasClient{ + return &OpenapisClient{ Client: client, }, nil } diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/constants.go b/resource-manager/postgresql/2025-08-01/openapis/constants.go similarity index 91% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/constants.go rename to resource-manager/postgresql/2025-08-01/openapis/constants.go index 846e599acad..46fbf5fc002 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/constants.go +++ b/resource-manager/postgresql/2025-08-01/openapis/constants.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package openapis import ( "encoding/json" @@ -56,6 +56,47 @@ func parseCapabilityStatus(input string) (*CapabilityStatus, error) { return &out, nil } +type CheckNameAvailabilityReason string + +const ( + CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" + CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" +) + +func PossibleValuesForCheckNameAvailabilityReason() []string { + return []string{ + string(CheckNameAvailabilityReasonAlreadyExists), + string(CheckNameAvailabilityReasonInvalid), + } +} + +func (s *CheckNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCheckNameAvailabilityReason(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCheckNameAvailabilityReason(input string) (*CheckNameAvailabilityReason, error) { + vals := map[string]CheckNameAvailabilityReason{ + "alreadyexists": CheckNameAvailabilityReasonAlreadyExists, + "invalid": CheckNameAvailabilityReasonInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CheckNameAvailabilityReason(input) + return &out, nil +} + type FastProvisioningSupport string const ( diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/id_location.go b/resource-manager/postgresql/2025-08-01/openapis/id_location.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/nameavailability/id_location.go rename to resource-manager/postgresql/2025-08-01/openapis/id_location.go index ae4482304ca..07984357a78 100644 --- a/resource-manager/postgresql/2025-08-01/nameavailability/id_location.go +++ b/resource-manager/postgresql/2025-08-01/openapis/id_location.go @@ -1,4 +1,4 @@ -package nameavailability +package openapis import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/id_location_test.go b/resource-manager/postgresql/2025-08-01/openapis/id_location_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/nameavailability/id_location_test.go rename to resource-manager/postgresql/2025-08-01/openapis/id_location_test.go index 7ef2cc6594c..dfffbfdc97d 100644 --- a/resource-manager/postgresql/2025-08-01/nameavailability/id_location_test.go +++ b/resource-manager/postgresql/2025-08-01/openapis/id_location_test.go @@ -1,4 +1,4 @@ -package nameavailability +package openapis import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/method_list.go b/resource-manager/postgresql/2025-08-01/openapis/method_capabilitiesbylocationlist.go similarity index 55% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/method_list.go rename to resource-manager/postgresql/2025-08-01/openapis/method_capabilitiesbylocationlist.go index 3188751dadd..bf7a380f28f 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/method_list.go +++ b/resource-manager/postgresql/2025-08-01/openapis/method_capabilitiesbylocationlist.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package openapis import ( "context" @@ -12,22 +12,22 @@ import ( // 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 { +type CapabilitiesByLocationListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Capability } -type ListCompleteResult struct { +type CapabilitiesByLocationListCompleteResult struct { LatestHttpResponse *http.Response Items []Capability } -type ListCustomPager struct { +type CapabilitiesByLocationListCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListCustomPager) NextPageLink() *odata.Link { +func (p *CapabilitiesByLocationListCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -35,15 +35,15 @@ func (p *ListCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// List ... -func (c CapabilitiesByLocationClient) List(ctx context.Context, id LocationId) (result ListOperationResponse, err error) { +// CapabilitiesByLocationList ... +func (c OpenapisClient) CapabilitiesByLocationList(ctx context.Context, id LocationId) (result CapabilitiesByLocationListOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, + Pager: &CapabilitiesByLocationListCustomPager{}, Path: fmt.Sprintf("%s/capabilities", id.ID()), } @@ -74,16 +74,16 @@ func (c CapabilitiesByLocationClient) List(ctx context.Context, id LocationId) ( return } -// ListComplete retrieves all the results into a single object -func (c CapabilitiesByLocationClient) ListComplete(ctx context.Context, id LocationId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, CapabilityOperationPredicate{}) +// CapabilitiesByLocationListComplete retrieves all the results into a single object +func (c OpenapisClient) CapabilitiesByLocationListComplete(ctx context.Context, id LocationId) (CapabilitiesByLocationListCompleteResult, error) { + return c.CapabilitiesByLocationListCompleteMatchingPredicate(ctx, id, CapabilityOperationPredicate{}) } -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CapabilitiesByLocationClient) ListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate CapabilityOperationPredicate) (result ListCompleteResult, err error) { +// CapabilitiesByLocationListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c OpenapisClient) CapabilitiesByLocationListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate CapabilityOperationPredicate) (result CapabilitiesByLocationListCompleteResult, err error) { items := make([]Capability, 0) - resp, err := c.List(ctx, id) + resp, err := c.CapabilitiesByLocationList(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -97,7 +97,7 @@ func (c CapabilitiesByLocationClient) ListCompleteMatchingPredicate(ctx context. } } - result = ListCompleteResult{ + result = CapabilitiesByLocationListCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/method_checkglobally.go b/resource-manager/postgresql/2025-08-01/openapis/method_nameavailabilitycheckglobally.go similarity index 78% rename from resource-manager/postgresql/2025-08-01/nameavailability/method_checkglobally.go rename to resource-manager/postgresql/2025-08-01/openapis/method_nameavailabilitycheckglobally.go index 90a6e03aed5..326795fd74c 100644 --- a/resource-manager/postgresql/2025-08-01/nameavailability/method_checkglobally.go +++ b/resource-manager/postgresql/2025-08-01/openapis/method_nameavailabilitycheckglobally.go @@ -1,4 +1,4 @@ -package nameavailability +package openapis import ( "context" @@ -13,14 +13,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type CheckGloballyOperationResponse struct { +type NameAvailabilityCheckGloballyOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *NameAvailabilityModel } -// CheckGlobally ... -func (c NameAvailabilityClient) CheckGlobally(ctx context.Context, id commonids.SubscriptionId, input CheckNameAvailabilityRequest) (result CheckGloballyOperationResponse, err error) { +// NameAvailabilityCheckGlobally ... +func (c OpenapisClient) NameAvailabilityCheckGlobally(ctx context.Context, id commonids.SubscriptionId, input CheckNameAvailabilityRequest) (result NameAvailabilityCheckGloballyOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/method_checkwithlocation.go b/resource-manager/postgresql/2025-08-01/openapis/method_nameavailabilitycheckwithlocation.go similarity index 76% rename from resource-manager/postgresql/2025-08-01/nameavailability/method_checkwithlocation.go rename to resource-manager/postgresql/2025-08-01/openapis/method_nameavailabilitycheckwithlocation.go index 59b7d8e77e5..41de9a27746 100644 --- a/resource-manager/postgresql/2025-08-01/nameavailability/method_checkwithlocation.go +++ b/resource-manager/postgresql/2025-08-01/openapis/method_nameavailabilitycheckwithlocation.go @@ -1,4 +1,4 @@ -package nameavailability +package openapis import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type CheckWithLocationOperationResponse struct { +type NameAvailabilityCheckWithLocationOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *NameAvailabilityModel } -// CheckWithLocation ... -func (c NameAvailabilityClient) CheckWithLocation(ctx context.Context, id LocationId, input CheckNameAvailabilityRequest) (result CheckWithLocationOperationResponse, err error) { +// NameAvailabilityCheckWithLocation ... +func (c OpenapisClient) NameAvailabilityCheckWithLocation(ctx context.Context, id LocationId, input CheckNameAvailabilityRequest) (result NameAvailabilityCheckWithLocationOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/privatednszonesuffix/method_get.go b/resource-manager/postgresql/2025-08-01/openapis/method_privatednszonesuffixget.go similarity index 80% rename from resource-manager/postgresql/2025-08-01/privatednszonesuffix/method_get.go rename to resource-manager/postgresql/2025-08-01/openapis/method_privatednszonesuffixget.go index 8232bf5161a..08926aef863 100644 --- a/resource-manager/postgresql/2025-08-01/privatednszonesuffix/method_get.go +++ b/resource-manager/postgresql/2025-08-01/openapis/method_privatednszonesuffixget.go @@ -1,4 +1,4 @@ -package privatednszonesuffix +package openapis import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type PrivateDnsZoneSuffixGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *string } -// Get ... -func (c PrivateDnsZoneSuffixClient) Get(ctx context.Context) (result GetOperationResponse, err error) { +// PrivateDnsZoneSuffixGet ... +func (c OpenapisClient) PrivateDnsZoneSuffixGet(ctx context.Context) (result PrivateDnsZoneSuffixGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/method_quotausageslist.go b/resource-manager/postgresql/2025-08-01/openapis/method_quotausageslist.go similarity index 80% rename from resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/method_quotausageslist.go rename to resource-manager/postgresql/2025-08-01/openapis/method_quotausageslist.go index 11bbf0c8c72..8969c648497 100644 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/method_quotausageslist.go +++ b/resource-manager/postgresql/2025-08-01/openapis/method_quotausageslist.go @@ -1,4 +1,4 @@ -package quotausagesforflexibleservers +package openapis import ( "context" @@ -36,7 +36,7 @@ func (p *QuotaUsagesListCustomPager) NextPageLink() *odata.Link { } // QuotaUsagesList ... -func (c QuotaUsagesForFlexibleServersClient) QuotaUsagesList(ctx context.Context, id LocationId) (result QuotaUsagesListOperationResponse, err error) { +func (c OpenapisClient) QuotaUsagesList(ctx context.Context, id LocationId) (result QuotaUsagesListOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -75,12 +75,12 @@ func (c QuotaUsagesForFlexibleServersClient) QuotaUsagesList(ctx context.Context } // QuotaUsagesListComplete retrieves all the results into a single object -func (c QuotaUsagesForFlexibleServersClient) QuotaUsagesListComplete(ctx context.Context, id LocationId) (QuotaUsagesListCompleteResult, error) { +func (c OpenapisClient) QuotaUsagesListComplete(ctx context.Context, id LocationId) (QuotaUsagesListCompleteResult, error) { return c.QuotaUsagesListCompleteMatchingPredicate(ctx, id, QuotaUsageOperationPredicate{}) } // QuotaUsagesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c QuotaUsagesForFlexibleServersClient) QuotaUsagesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate QuotaUsageOperationPredicate) (result QuotaUsagesListCompleteResult, err error) { +func (c OpenapisClient) QuotaUsagesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate QuotaUsageOperationPredicate) (result QuotaUsagesListCompleteResult, err error) { items := make([]QuotaUsage, 0) resp, err := c.QuotaUsagesList(ctx, id) diff --git a/resource-manager/postgresql/2025-08-01/customoperation/method_migrationschecknameavailability.go b/resource-manager/postgresql/2025-08-01/openapis/method_virtualnetworksubnetusagelist.go similarity index 66% rename from resource-manager/postgresql/2025-08-01/customoperation/method_migrationschecknameavailability.go rename to resource-manager/postgresql/2025-08-01/openapis/method_virtualnetworksubnetusagelist.go index aa00598be1e..8cd3fd70adf 100644 --- a/resource-manager/postgresql/2025-08-01/customoperation/method_migrationschecknameavailability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/method_virtualnetworksubnetusagelist.go @@ -1,4 +1,4 @@ -package customoperation +package openapis import ( "context" @@ -12,21 +12,21 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type MigrationsCheckNameAvailabilityOperationResponse struct { +type VirtualNetworkSubnetUsageListOperationResponse struct { HttpResponse *http.Response OData *odata.OData - Model *MigrationNameAvailability + Model *VirtualNetworkSubnetUsageModel } -// MigrationsCheckNameAvailability ... -func (c CustomOperationClient) MigrationsCheckNameAvailability(ctx context.Context, id FlexibleServerId, input MigrationNameAvailability) (result MigrationsCheckNameAvailabilityOperationResponse, err error) { +// VirtualNetworkSubnetUsageList ... +func (c OpenapisClient) VirtualNetworkSubnetUsageList(ctx context.Context, id LocationId, input VirtualNetworkSubnetUsageParameter) (result VirtualNetworkSubnetUsageListOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/checkMigrationNameAvailability", id.ID()), + Path: fmt.Sprintf("%s/checkVirtualNetworkSubnetUsage", id.ID()), } req, err := c.Client.NewRequest(ctx, opts) @@ -48,7 +48,7 @@ func (c CustomOperationClient) MigrationsCheckNameAvailability(ctx context.Conte return } - var model MigrationNameAvailability + var model VirtualNetworkSubnetUsageModel result.Model = &model if err = resp.Unmarshal(result.Model); err != nil { return diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_capability.go b/resource-manager/postgresql/2025-08-01/openapis/model_capability.go similarity index 98% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_capability.go rename to resource-manager/postgresql/2025-08-01/openapis/model_capability.go index 15150a821ea..4fc32b0d224 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_capability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_capability.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/model_checknameavailabilityrequest.go b/resource-manager/postgresql/2025-08-01/openapis/model_checknameavailabilityrequest.go similarity index 91% rename from resource-manager/postgresql/2025-08-01/nameavailability/model_checknameavailabilityrequest.go rename to resource-manager/postgresql/2025-08-01/openapis/model_checknameavailabilityrequest.go index 8a3fe533a80..52975411ec2 100644 --- a/resource-manager/postgresql/2025-08-01/nameavailability/model_checknameavailabilityrequest.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_checknameavailabilityrequest.go @@ -1,4 +1,4 @@ -package nameavailability +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/batch/2024-07-01/batchaccount/model_privateendpoint.go b/resource-manager/postgresql/2025-08-01/openapis/model_delegatedsubnetusage.go similarity index 52% rename from resource-manager/batch/2024-07-01/batchaccount/model_privateendpoint.go rename to resource-manager/postgresql/2025-08-01/openapis/model_delegatedsubnetusage.go index e60387e8f83..38534cb746c 100644 --- a/resource-manager/batch/2024-07-01/batchaccount/model_privateendpoint.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_delegatedsubnetusage.go @@ -1,8 +1,9 @@ -package batchaccount +package openapis // 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 { - Id *string `json:"id,omitempty"` +type DelegatedSubnetUsage struct { + SubnetName *string `json:"subnetName,omitempty"` + Usage *int64 `json:"usage,omitempty"` } diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_fastprovisioningeditioncapability.go b/resource-manager/postgresql/2025-08-01/openapis/model_fastprovisioningeditioncapability.go similarity index 96% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_fastprovisioningeditioncapability.go rename to resource-manager/postgresql/2025-08-01/openapis/model_fastprovisioningeditioncapability.go index 569d9f3f50e..479f5b7f599 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_fastprovisioningeditioncapability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_fastprovisioningeditioncapability.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/nameavailability/model_nameavailabilitymodel.go b/resource-manager/postgresql/2025-08-01/openapis/model_nameavailabilitymodel.go similarity index 95% rename from resource-manager/postgresql/2025-08-01/nameavailability/model_nameavailabilitymodel.go rename to resource-manager/postgresql/2025-08-01/openapis/model_nameavailabilitymodel.go index 95c81843ae6..ebadc0b30c7 100644 --- a/resource-manager/postgresql/2025-08-01/nameavailability/model_nameavailabilitymodel.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_nameavailabilitymodel.go @@ -1,4 +1,4 @@ -package nameavailability +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/model_nameproperty.go b/resource-manager/postgresql/2025-08-01/openapis/model_nameproperty.go similarity index 88% rename from resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/model_nameproperty.go rename to resource-manager/postgresql/2025-08-01/openapis/model_nameproperty.go index 1077e373b7a..67637654d1e 100644 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/model_nameproperty.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_nameproperty.go @@ -1,4 +1,4 @@ -package quotausagesforflexibleservers +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/model_quotausage.go b/resource-manager/postgresql/2025-08-01/openapis/model_quotausage.go similarity index 92% rename from resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/model_quotausage.go rename to resource-manager/postgresql/2025-08-01/openapis/model_quotausage.go index 632b7336b70..d2f52f4c7d9 100644 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/model_quotausage.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_quotausage.go @@ -1,4 +1,4 @@ -package quotausagesforflexibleservers +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_servereditioncapability.go b/resource-manager/postgresql/2025-08-01/openapis/model_servereditioncapability.go similarity index 96% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_servereditioncapability.go rename to resource-manager/postgresql/2025-08-01/openapis/model_servereditioncapability.go index 1bd13350167..59506c325f5 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_servereditioncapability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_servereditioncapability.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_serverskucapability.go b/resource-manager/postgresql/2025-08-01/openapis/model_serverskucapability.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_serverskucapability.go rename to resource-manager/postgresql/2025-08-01/openapis/model_serverskucapability.go index 693d218b679..14831e4ec46 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_serverskucapability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_serverskucapability.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_serverversioncapability.go b/resource-manager/postgresql/2025-08-01/openapis/model_serverversioncapability.go similarity index 95% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_serverversioncapability.go rename to resource-manager/postgresql/2025-08-01/openapis/model_serverversioncapability.go index 5ff946a3f23..71383fb8ef7 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_serverversioncapability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_serverversioncapability.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storageeditioncapability.go b/resource-manager/postgresql/2025-08-01/openapis/model_storageeditioncapability.go similarity index 95% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storageeditioncapability.go rename to resource-manager/postgresql/2025-08-01/openapis/model_storageeditioncapability.go index c4627f6ad85..1781201f4d4 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storageeditioncapability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_storageeditioncapability.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storagembcapability.go b/resource-manager/postgresql/2025-08-01/openapis/model_storagembcapability.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storagembcapability.go rename to resource-manager/postgresql/2025-08-01/openapis/model_storagembcapability.go index 9e1841fc7b5..599f1ee8592 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storagembcapability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_storagembcapability.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storagetiercapability.go b/resource-manager/postgresql/2025-08-01/openapis/model_storagetiercapability.go similarity index 93% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storagetiercapability.go rename to resource-manager/postgresql/2025-08-01/openapis/model_storagetiercapability.go index c867cefc779..d002df5bada 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_storagetiercapability.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_storagetiercapability.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_supportedfeature.go b/resource-manager/postgresql/2025-08-01/openapis/model_supportedfeature.go similarity index 90% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_supportedfeature.go rename to resource-manager/postgresql/2025-08-01/openapis/model_supportedfeature.go index 1b9d1dff05c..8f53f8960a3 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/model_supportedfeature.go +++ b/resource-manager/postgresql/2025-08-01/openapis/model_supportedfeature.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/openapis/model_virtualnetworksubnetusagemodel.go b/resource-manager/postgresql/2025-08-01/openapis/model_virtualnetworksubnetusagemodel.go new file mode 100644 index 00000000000..29855b1f667 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/openapis/model_virtualnetworksubnetusagemodel.go @@ -0,0 +1,10 @@ +package openapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualNetworkSubnetUsageModel struct { + DelegatedSubnetsUsage *[]DelegatedSubnetUsage `json:"delegatedSubnetsUsage,omitempty"` + Location *string `json:"location,omitempty"` + SubscriptionId *string `json:"subscriptionId,omitempty"` +} diff --git a/resource-manager/postgresql/2025-08-01/openapis/model_virtualnetworksubnetusageparameter.go b/resource-manager/postgresql/2025-08-01/openapis/model_virtualnetworksubnetusageparameter.go new file mode 100644 index 00000000000..6a699a8f791 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/openapis/model_virtualnetworksubnetusageparameter.go @@ -0,0 +1,8 @@ +package openapis + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type VirtualNetworkSubnetUsageParameter struct { + VirtualNetworkArmResourceId *string `json:"virtualNetworkArmResourceId,omitempty"` +} diff --git a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/predicates.go b/resource-manager/postgresql/2025-08-01/openapis/predicates.go similarity index 67% rename from resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/predicates.go rename to resource-manager/postgresql/2025-08-01/openapis/predicates.go index b44aef2e754..f36c32b452b 100644 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/predicates.go +++ b/resource-manager/postgresql/2025-08-01/openapis/predicates.go @@ -1,8 +1,26 @@ -package quotausagesforflexibleservers +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type CapabilityOperationPredicate struct { + Name *string + Reason *string +} + +func (p CapabilityOperationPredicate) Matches(input Capability) bool { + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Reason != nil && (input.Reason == nil || *p.Reason != *input.Reason) { + return false + } + + return true +} + type QuotaUsageOperationPredicate struct { CurrentValue *int64 Id *string diff --git a/resource-manager/postgresql/2025-08-01/post/version.go b/resource-manager/postgresql/2025-08-01/openapis/version.go similarity index 76% rename from resource-manager/postgresql/2025-08-01/post/version.go rename to resource-manager/postgresql/2025-08-01/openapis/version.go index a1f0d694860..bf71efb49eb 100644 --- a/resource-manager/postgresql/2025-08-01/post/version.go +++ b/resource-manager/postgresql/2025-08-01/openapis/version.go @@ -1,4 +1,4 @@ -package post +package openapis // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package post const defaultApiVersion = "2025-08-01" func userAgent() string { - return "hashicorp/go-azure-sdk/post/2025-08-01" + return "hashicorp/go-azure-sdk/openapis/2025-08-01" } diff --git a/resource-manager/postgresql/2025-08-01/post/README.md b/resource-manager/postgresql/2025-08-01/post/README.md deleted file mode 100644 index 7b975d2cb25..00000000000 --- a/resource-manager/postgresql/2025-08-01/post/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/post` Documentation - -The `post` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/post" -``` - - -### Client Initialization - -```go -client := post.NewPOSTClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `POSTClient.MigrationsCheckNameAvailability` - -```go -ctx := context.TODO() -id := post.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -payload := post.MigrationNameAvailability{ - // ... -} - - -read, err := client.MigrationsCheckNameAvailability(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/postgresql/2025-08-01/post/constants.go b/resource-manager/postgresql/2025-08-01/post/constants.go deleted file mode 100644 index b8131265872..00000000000 --- a/resource-manager/postgresql/2025-08-01/post/constants.go +++ /dev/null @@ -1,51 +0,0 @@ -package post - -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 MigrationNameAvailabilityReason string - -const ( - MigrationNameAvailabilityReasonAlreadyExists MigrationNameAvailabilityReason = "AlreadyExists" - MigrationNameAvailabilityReasonInvalid MigrationNameAvailabilityReason = "Invalid" -) - -func PossibleValuesForMigrationNameAvailabilityReason() []string { - return []string{ - string(MigrationNameAvailabilityReasonAlreadyExists), - string(MigrationNameAvailabilityReasonInvalid), - } -} - -func (s *MigrationNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMigrationNameAvailabilityReason(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMigrationNameAvailabilityReason(input string) (*MigrationNameAvailabilityReason, error) { - vals := map[string]MigrationNameAvailabilityReason{ - "alreadyexists": MigrationNameAvailabilityReasonAlreadyExists, - "invalid": MigrationNameAvailabilityReasonInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MigrationNameAvailabilityReason(input) - return &out, nil -} diff --git a/resource-manager/postgresql/2025-08-01/post/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/post/id_flexibleserver.go deleted file mode 100644 index 9be26998464..00000000000 --- a/resource-manager/postgresql/2025-08-01/post/id_flexibleserver.go +++ /dev/null @@ -1,130 +0,0 @@ -package post - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&FlexibleServerId{}) -} - -var _ resourceids.ResourceId = &FlexibleServerId{} - -// FlexibleServerId is a struct representing the Resource ID for a Flexible Server -type FlexibleServerId struct { - SubscriptionId string - ResourceGroupName string - FlexibleServerName string -} - -// NewFlexibleServerID returns a new FlexibleServerId struct -func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { - return FlexibleServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FlexibleServerName: flexibleServerName, - } -} - -// ParseFlexibleServerID parses 'input' into a FlexibleServerId -func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId -// note: this method should only be used for API response data and not user input -func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) - } - - return nil -} - -// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID -func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFlexibleServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Flexible Server ID -func (id FlexibleServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforPostgreSQL/flexibleServers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID -func (id FlexibleServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforPostgreSQL", "Microsoft.DBforPostgreSQL", "Microsoft.DBforPostgreSQL"), - resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), - resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), - } -} - -// String returns a human-readable description of this Flexible Server ID -func (id FlexibleServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), - } - return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/postgresql/2025-08-01/post/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/post/id_flexibleserver_test.go deleted file mode 100644 index e5c918cf832..00000000000 --- a/resource-manager/postgresql/2025-08-01/post/id_flexibleserver_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package post - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &FlexibleServerId{} - -func TestNewFlexibleServerID(t *testing.T) { - id := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FlexibleServerName != "flexibleServerName" { - t.Fatalf("Expected %q but got %q for Segment 'FlexibleServerName'", id.FlexibleServerName, "flexibleServerName") - } -} - -func TestFormatFlexibleServerID(t *testing.T) { - actual := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFlexibleServerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestParseFlexibleServerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FlexibleServerName: "fLeXiBlEsErVeRnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestSegmentsForFlexibleServerId(t *testing.T) { - segments := FlexibleServerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FlexibleServerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/postgresql/2025-08-01/privatednszonesuffix/client.go b/resource-manager/postgresql/2025-08-01/privatednszonesuffix/client.go deleted file mode 100644 index 42a6575eb27..00000000000 --- a/resource-manager/postgresql/2025-08-01/privatednszonesuffix/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatednszonesuffix - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 PrivateDnsZoneSuffixClient struct { - Client *resourcemanager.Client -} - -func NewPrivateDnsZoneSuffixClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateDnsZoneSuffixClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "privatednszonesuffix", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateDnsZoneSuffixClient: %+v", err) - } - - return &PrivateDnsZoneSuffixClient{ - Client: client, - }, nil -} diff --git a/resource-manager/postgresql/2025-08-01/privatednszonesuffix/version.go b/resource-manager/postgresql/2025-08-01/privatednszonesuffix/version.go deleted file mode 100644 index f9178e95fc2..00000000000 --- a/resource-manager/postgresql/2025-08-01/privatednszonesuffix/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatednszonesuffix - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2025-08-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/privatednszonesuffix/2025-08-01" -} diff --git a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/README.md b/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/README.md deleted file mode 100644 index b2f618be218..00000000000 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers` Documentation - -The `quotausagesforflexibleservers` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/quotausagesforflexibleservers" -``` - - -### Client Initialization - -```go -client := quotausagesforflexibleservers.NewQuotaUsagesForFlexibleServersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `QuotaUsagesForFlexibleServersClient.QuotaUsagesList` - -```go -ctx := context.TODO() -id := quotausagesforflexibleservers.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") - -// alternatively `client.QuotaUsagesList(ctx, id)` can be used to do batched pagination -items, err := client.QuotaUsagesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/client.go b/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/client.go deleted file mode 100644 index 381036fe862..00000000000 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package quotausagesforflexibleservers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "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 QuotaUsagesForFlexibleServersClient struct { - Client *resourcemanager.Client -} - -func NewQuotaUsagesForFlexibleServersClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaUsagesForFlexibleServersClient, error) { - client, err := resourcemanager.NewClient(sdkApi, "quotausagesforflexibleservers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating QuotaUsagesForFlexibleServersClient: %+v", err) - } - - return &QuotaUsagesForFlexibleServersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/id_location.go b/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/id_location.go deleted file mode 100644 index 03bb1e9221d..00000000000 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/id_location.go +++ /dev/null @@ -1,121 +0,0 @@ -package quotausagesforflexibleservers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&LocationId{}) -} - -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) - } - - id := LocationId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - 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) - } - - id := LocationId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *LocationId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.LocationName, ok = input.Parsed["locationName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "locationName", input) - } - - return 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.DBforPostgreSQL/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("staticMicrosoftDBforPostgreSQL", "Microsoft.DBforPostgreSQL", "Microsoft.DBforPostgreSQL"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationName"), - } -} - -// 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/postgresql/2025-08-01/quotausagesforflexibleservers/id_location_test.go b/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/id_location_test.go deleted file mode 100644 index c8037a7d29f..00000000000 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package quotausagesforflexibleservers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (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", "locationName") - - if id.SubscriptionId != "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 != "locationName" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationName") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName" - 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.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName/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.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.DBforPostgreSQL/locations/locationName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/lOcAtIoNs/lOcAtIoNnAmE", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/lOcAtIoNs/lOcAtIoNnAmE/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/postgresql/2025-08-01/quotausagesforflexibleservers/version.go b/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/version.go deleted file mode 100644 index 82cd3abbce4..00000000000 --- a/resource-manager/postgresql/2025-08-01/quotausagesforflexibleservers/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package quotausagesforflexibleservers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2025-08-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/quotausagesforflexibleservers/2025-08-01" -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/README.md b/resource-manager/postgresql/2025-08-01/replicas/README.md deleted file mode 100644 index d873125c968..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/replicas` Documentation - -The `replicas` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/replicas" -``` - - -### Client Initialization - -```go -client := replicas.NewReplicasClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ReplicasClient.ListByServer` - -```go -ctx := context.TODO() -id := replicas.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/postgresql/2025-08-01/replicas/constants.go b/resource-manager/postgresql/2025-08-01/replicas/constants.go deleted file mode 100644 index de6481f66fd..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/constants.go +++ /dev/null @@ -1,1012 +0,0 @@ -package replicas - -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 AzureManagedDiskPerformanceTier string - -const ( - AzureManagedDiskPerformanceTierPEightZero AzureManagedDiskPerformanceTier = "P80" - AzureManagedDiskPerformanceTierPFiveZero AzureManagedDiskPerformanceTier = "P50" - AzureManagedDiskPerformanceTierPFour AzureManagedDiskPerformanceTier = "P4" - AzureManagedDiskPerformanceTierPFourZero AzureManagedDiskPerformanceTier = "P40" - AzureManagedDiskPerformanceTierPOne AzureManagedDiskPerformanceTier = "P1" - AzureManagedDiskPerformanceTierPOneFive AzureManagedDiskPerformanceTier = "P15" - AzureManagedDiskPerformanceTierPOneZero AzureManagedDiskPerformanceTier = "P10" - AzureManagedDiskPerformanceTierPSevenZero AzureManagedDiskPerformanceTier = "P70" - AzureManagedDiskPerformanceTierPSix AzureManagedDiskPerformanceTier = "P6" - AzureManagedDiskPerformanceTierPSixZero AzureManagedDiskPerformanceTier = "P60" - AzureManagedDiskPerformanceTierPThree AzureManagedDiskPerformanceTier = "P3" - AzureManagedDiskPerformanceTierPThreeZero AzureManagedDiskPerformanceTier = "P30" - AzureManagedDiskPerformanceTierPTwo AzureManagedDiskPerformanceTier = "P2" - AzureManagedDiskPerformanceTierPTwoZero AzureManagedDiskPerformanceTier = "P20" -) - -func PossibleValuesForAzureManagedDiskPerformanceTier() []string { - return []string{ - string(AzureManagedDiskPerformanceTierPEightZero), - string(AzureManagedDiskPerformanceTierPFiveZero), - string(AzureManagedDiskPerformanceTierPFour), - string(AzureManagedDiskPerformanceTierPFourZero), - string(AzureManagedDiskPerformanceTierPOne), - string(AzureManagedDiskPerformanceTierPOneFive), - string(AzureManagedDiskPerformanceTierPOneZero), - string(AzureManagedDiskPerformanceTierPSevenZero), - string(AzureManagedDiskPerformanceTierPSix), - string(AzureManagedDiskPerformanceTierPSixZero), - string(AzureManagedDiskPerformanceTierPThree), - string(AzureManagedDiskPerformanceTierPThreeZero), - string(AzureManagedDiskPerformanceTierPTwo), - string(AzureManagedDiskPerformanceTierPTwoZero), - } -} - -func (s *AzureManagedDiskPerformanceTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureManagedDiskPerformanceTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureManagedDiskPerformanceTier(input string) (*AzureManagedDiskPerformanceTier, error) { - vals := map[string]AzureManagedDiskPerformanceTier{ - "p80": AzureManagedDiskPerformanceTierPEightZero, - "p50": AzureManagedDiskPerformanceTierPFiveZero, - "p4": AzureManagedDiskPerformanceTierPFour, - "p40": AzureManagedDiskPerformanceTierPFourZero, - "p1": AzureManagedDiskPerformanceTierPOne, - "p15": AzureManagedDiskPerformanceTierPOneFive, - "p10": AzureManagedDiskPerformanceTierPOneZero, - "p70": AzureManagedDiskPerformanceTierPSevenZero, - "p6": AzureManagedDiskPerformanceTierPSix, - "p60": AzureManagedDiskPerformanceTierPSixZero, - "p3": AzureManagedDiskPerformanceTierPThree, - "p30": AzureManagedDiskPerformanceTierPThreeZero, - "p2": AzureManagedDiskPerformanceTierPTwo, - "p20": AzureManagedDiskPerformanceTierPTwoZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureManagedDiskPerformanceTier(input) - return &out, nil -} - -type CreateMode string - -const ( - CreateModeCreate CreateMode = "Create" - CreateModeDefault CreateMode = "Default" - CreateModeGeoRestore CreateMode = "GeoRestore" - CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" - CreateModeReplica CreateMode = "Replica" - CreateModeReviveDropped CreateMode = "ReviveDropped" - CreateModeUpdate CreateMode = "Update" -) - -func PossibleValuesForCreateMode() []string { - return []string{ - string(CreateModeCreate), - string(CreateModeDefault), - string(CreateModeGeoRestore), - string(CreateModePointInTimeRestore), - string(CreateModeReplica), - string(CreateModeReviveDropped), - string(CreateModeUpdate), - } -} - -func (s *CreateMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCreateMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCreateMode(input string) (*CreateMode, error) { - vals := map[string]CreateMode{ - "create": CreateModeCreate, - "default": CreateModeDefault, - "georestore": CreateModeGeoRestore, - "pointintimerestore": CreateModePointInTimeRestore, - "replica": CreateModeReplica, - "revivedropped": CreateModeReviveDropped, - "update": CreateModeUpdate, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CreateMode(input) - return &out, nil -} - -type DataEncryptionType string - -const ( - DataEncryptionTypeAzureKeyVault DataEncryptionType = "AzureKeyVault" - DataEncryptionTypeSystemManaged DataEncryptionType = "SystemManaged" -) - -func PossibleValuesForDataEncryptionType() []string { - return []string{ - string(DataEncryptionTypeAzureKeyVault), - string(DataEncryptionTypeSystemManaged), - } -} - -func (s *DataEncryptionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDataEncryptionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDataEncryptionType(input string) (*DataEncryptionType, error) { - vals := map[string]DataEncryptionType{ - "azurekeyvault": DataEncryptionTypeAzureKeyVault, - "systemmanaged": DataEncryptionTypeSystemManaged, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DataEncryptionType(input) - return &out, nil -} - -type EncryptionKeyStatus string - -const ( - EncryptionKeyStatusInvalid EncryptionKeyStatus = "Invalid" - EncryptionKeyStatusValid EncryptionKeyStatus = "Valid" -) - -func PossibleValuesForEncryptionKeyStatus() []string { - return []string{ - string(EncryptionKeyStatusInvalid), - string(EncryptionKeyStatusValid), - } -} - -func (s *EncryptionKeyStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEncryptionKeyStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEncryptionKeyStatus(input string) (*EncryptionKeyStatus, error) { - vals := map[string]EncryptionKeyStatus{ - "invalid": EncryptionKeyStatusInvalid, - "valid": EncryptionKeyStatusValid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EncryptionKeyStatus(input) - return &out, nil -} - -type GeographicallyRedundantBackup string - -const ( - GeographicallyRedundantBackupDisabled GeographicallyRedundantBackup = "Disabled" - GeographicallyRedundantBackupEnabled GeographicallyRedundantBackup = "Enabled" -) - -func PossibleValuesForGeographicallyRedundantBackup() []string { - return []string{ - string(GeographicallyRedundantBackupDisabled), - string(GeographicallyRedundantBackupEnabled), - } -} - -func (s *GeographicallyRedundantBackup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGeographicallyRedundantBackup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGeographicallyRedundantBackup(input string) (*GeographicallyRedundantBackup, error) { - vals := map[string]GeographicallyRedundantBackup{ - "disabled": GeographicallyRedundantBackupDisabled, - "enabled": GeographicallyRedundantBackupEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GeographicallyRedundantBackup(input) - return &out, nil -} - -type HighAvailabilityMode string - -const ( - HighAvailabilityModeDisabled HighAvailabilityMode = "Disabled" - HighAvailabilityModeSameZone HighAvailabilityMode = "SameZone" - HighAvailabilityModeZoneRedundant HighAvailabilityMode = "ZoneRedundant" -) - -func PossibleValuesForHighAvailabilityMode() []string { - return []string{ - string(HighAvailabilityModeDisabled), - string(HighAvailabilityModeSameZone), - string(HighAvailabilityModeZoneRedundant), - } -} - -func (s *HighAvailabilityMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHighAvailabilityMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHighAvailabilityMode(input string) (*HighAvailabilityMode, error) { - vals := map[string]HighAvailabilityMode{ - "disabled": HighAvailabilityModeDisabled, - "samezone": HighAvailabilityModeSameZone, - "zoneredundant": HighAvailabilityModeZoneRedundant, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HighAvailabilityMode(input) - return &out, nil -} - -type HighAvailabilityState string - -const ( - HighAvailabilityStateCreatingStandby HighAvailabilityState = "CreatingStandby" - HighAvailabilityStateFailingOver HighAvailabilityState = "FailingOver" - HighAvailabilityStateHealthy HighAvailabilityState = "Healthy" - HighAvailabilityStateNotEnabled HighAvailabilityState = "NotEnabled" - HighAvailabilityStateRemovingStandby HighAvailabilityState = "RemovingStandby" - HighAvailabilityStateReplicatingData HighAvailabilityState = "ReplicatingData" -) - -func PossibleValuesForHighAvailabilityState() []string { - return []string{ - string(HighAvailabilityStateCreatingStandby), - string(HighAvailabilityStateFailingOver), - string(HighAvailabilityStateHealthy), - string(HighAvailabilityStateNotEnabled), - string(HighAvailabilityStateRemovingStandby), - string(HighAvailabilityStateReplicatingData), - } -} - -func (s *HighAvailabilityState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHighAvailabilityState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHighAvailabilityState(input string) (*HighAvailabilityState, error) { - vals := map[string]HighAvailabilityState{ - "creatingstandby": HighAvailabilityStateCreatingStandby, - "failingover": HighAvailabilityStateFailingOver, - "healthy": HighAvailabilityStateHealthy, - "notenabled": HighAvailabilityStateNotEnabled, - "removingstandby": HighAvailabilityStateRemovingStandby, - "replicatingdata": HighAvailabilityStateReplicatingData, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HighAvailabilityState(input) - return &out, nil -} - -type MicrosoftEntraAuth string - -const ( - MicrosoftEntraAuthDisabled MicrosoftEntraAuth = "Disabled" - MicrosoftEntraAuthEnabled MicrosoftEntraAuth = "Enabled" -) - -func PossibleValuesForMicrosoftEntraAuth() []string { - return []string{ - string(MicrosoftEntraAuthDisabled), - string(MicrosoftEntraAuthEnabled), - } -} - -func (s *MicrosoftEntraAuth) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMicrosoftEntraAuth(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMicrosoftEntraAuth(input string) (*MicrosoftEntraAuth, error) { - vals := map[string]MicrosoftEntraAuth{ - "disabled": MicrosoftEntraAuthDisabled, - "enabled": MicrosoftEntraAuthEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MicrosoftEntraAuth(input) - return &out, nil -} - -type PasswordBasedAuth string - -const ( - PasswordBasedAuthDisabled PasswordBasedAuth = "Disabled" - PasswordBasedAuthEnabled PasswordBasedAuth = "Enabled" -) - -func PossibleValuesForPasswordBasedAuth() []string { - return []string{ - string(PasswordBasedAuthDisabled), - string(PasswordBasedAuthEnabled), - } -} - -func (s *PasswordBasedAuth) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePasswordBasedAuth(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePasswordBasedAuth(input string) (*PasswordBasedAuth, error) { - vals := map[string]PasswordBasedAuth{ - "disabled": PasswordBasedAuthDisabled, - "enabled": PasswordBasedAuthEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PasswordBasedAuth(input) - return &out, nil -} - -type PostgresMajorVersion string - -const ( - PostgresMajorVersionOneEight PostgresMajorVersion = "18" - PostgresMajorVersionOneFive PostgresMajorVersion = "15" - PostgresMajorVersionOneFour PostgresMajorVersion = "14" - PostgresMajorVersionOneOne PostgresMajorVersion = "11" - PostgresMajorVersionOneSeven PostgresMajorVersion = "17" - PostgresMajorVersionOneSix PostgresMajorVersion = "16" - PostgresMajorVersionOneThree PostgresMajorVersion = "13" - PostgresMajorVersionOneTwo PostgresMajorVersion = "12" -) - -func PossibleValuesForPostgresMajorVersion() []string { - return []string{ - string(PostgresMajorVersionOneEight), - string(PostgresMajorVersionOneFive), - string(PostgresMajorVersionOneFour), - string(PostgresMajorVersionOneOne), - string(PostgresMajorVersionOneSeven), - string(PostgresMajorVersionOneSix), - string(PostgresMajorVersionOneThree), - string(PostgresMajorVersionOneTwo), - } -} - -func (s *PostgresMajorVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePostgresMajorVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePostgresMajorVersion(input string) (*PostgresMajorVersion, error) { - vals := map[string]PostgresMajorVersion{ - "18": PostgresMajorVersionOneEight, - "15": PostgresMajorVersionOneFive, - "14": PostgresMajorVersionOneFour, - "11": PostgresMajorVersionOneOne, - "17": PostgresMajorVersionOneSeven, - "16": PostgresMajorVersionOneSix, - "13": PostgresMajorVersionOneThree, - "12": PostgresMajorVersionOneTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PostgresMajorVersion(input) - return &out, nil -} - -type PrivateEndpointConnectionProvisioningState string - -const ( - PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" - PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" - PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" - PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" -) - -func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { - return []string{ - string(PrivateEndpointConnectionProvisioningStateCreating), - string(PrivateEndpointConnectionProvisioningStateDeleting), - string(PrivateEndpointConnectionProvisioningStateFailed), - string(PrivateEndpointConnectionProvisioningStateSucceeded), - } -} - -func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrivateEndpointConnectionProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { - vals := map[string]PrivateEndpointConnectionProvisioningState{ - "creating": PrivateEndpointConnectionProvisioningStateCreating, - "deleting": PrivateEndpointConnectionProvisioningStateDeleting, - "failed": PrivateEndpointConnectionProvisioningStateFailed, - "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateEndpointConnectionProvisioningState(input) - return &out, nil -} - -type PrivateEndpointServiceConnectionStatus string - -const ( - PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" - PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" - PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" -) - -func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { - return []string{ - string(PrivateEndpointServiceConnectionStatusApproved), - string(PrivateEndpointServiceConnectionStatusPending), - string(PrivateEndpointServiceConnectionStatusRejected), - } -} - -func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePrivateEndpointServiceConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { - vals := map[string]PrivateEndpointServiceConnectionStatus{ - "approved": PrivateEndpointServiceConnectionStatusApproved, - "pending": PrivateEndpointServiceConnectionStatusPending, - "rejected": PrivateEndpointServiceConnectionStatusRejected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PrivateEndpointServiceConnectionStatus(input) - return &out, nil -} - -type ReadReplicaPromoteMode string - -const ( - ReadReplicaPromoteModeStandalone ReadReplicaPromoteMode = "Standalone" - ReadReplicaPromoteModeSwitchover ReadReplicaPromoteMode = "Switchover" -) - -func PossibleValuesForReadReplicaPromoteMode() []string { - return []string{ - string(ReadReplicaPromoteModeStandalone), - string(ReadReplicaPromoteModeSwitchover), - } -} - -func (s *ReadReplicaPromoteMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseReadReplicaPromoteMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseReadReplicaPromoteMode(input string) (*ReadReplicaPromoteMode, error) { - vals := map[string]ReadReplicaPromoteMode{ - "standalone": ReadReplicaPromoteModeStandalone, - "switchover": ReadReplicaPromoteModeSwitchover, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ReadReplicaPromoteMode(input) - return &out, nil -} - -type ReadReplicaPromoteOption string - -const ( - ReadReplicaPromoteOptionForced ReadReplicaPromoteOption = "Forced" - ReadReplicaPromoteOptionPlanned ReadReplicaPromoteOption = "Planned" -) - -func PossibleValuesForReadReplicaPromoteOption() []string { - return []string{ - string(ReadReplicaPromoteOptionForced), - string(ReadReplicaPromoteOptionPlanned), - } -} - -func (s *ReadReplicaPromoteOption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseReadReplicaPromoteOption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseReadReplicaPromoteOption(input string) (*ReadReplicaPromoteOption, error) { - vals := map[string]ReadReplicaPromoteOption{ - "forced": ReadReplicaPromoteOptionForced, - "planned": ReadReplicaPromoteOptionPlanned, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ReadReplicaPromoteOption(input) - return &out, nil -} - -type ReplicationRole string - -const ( - ReplicationRoleAsyncReplica ReplicationRole = "AsyncReplica" - ReplicationRoleGeoAsyncReplica ReplicationRole = "GeoAsyncReplica" - ReplicationRoleNone ReplicationRole = "None" - ReplicationRolePrimary ReplicationRole = "Primary" -) - -func PossibleValuesForReplicationRole() []string { - return []string{ - string(ReplicationRoleAsyncReplica), - string(ReplicationRoleGeoAsyncReplica), - string(ReplicationRoleNone), - string(ReplicationRolePrimary), - } -} - -func (s *ReplicationRole) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseReplicationRole(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseReplicationRole(input string) (*ReplicationRole, error) { - vals := map[string]ReplicationRole{ - "asyncreplica": ReplicationRoleAsyncReplica, - "geoasyncreplica": ReplicationRoleGeoAsyncReplica, - "none": ReplicationRoleNone, - "primary": ReplicationRolePrimary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ReplicationRole(input) - return &out, nil -} - -type ReplicationState string - -const ( - ReplicationStateActive ReplicationState = "Active" - ReplicationStateBroken ReplicationState = "Broken" - ReplicationStateCatchup ReplicationState = "Catchup" - ReplicationStateProvisioning ReplicationState = "Provisioning" - ReplicationStateReconfiguring ReplicationState = "Reconfiguring" - ReplicationStateUpdating ReplicationState = "Updating" -) - -func PossibleValuesForReplicationState() []string { - return []string{ - string(ReplicationStateActive), - string(ReplicationStateBroken), - string(ReplicationStateCatchup), - string(ReplicationStateProvisioning), - string(ReplicationStateReconfiguring), - string(ReplicationStateUpdating), - } -} - -func (s *ReplicationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseReplicationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseReplicationState(input string) (*ReplicationState, error) { - vals := map[string]ReplicationState{ - "active": ReplicationStateActive, - "broken": ReplicationStateBroken, - "catchup": ReplicationStateCatchup, - "provisioning": ReplicationStateProvisioning, - "reconfiguring": ReplicationStateReconfiguring, - "updating": ReplicationStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ReplicationState(input) - return &out, nil -} - -type ServerPublicNetworkAccessState string - -const ( - ServerPublicNetworkAccessStateDisabled ServerPublicNetworkAccessState = "Disabled" - ServerPublicNetworkAccessStateEnabled ServerPublicNetworkAccessState = "Enabled" -) - -func PossibleValuesForServerPublicNetworkAccessState() []string { - return []string{ - string(ServerPublicNetworkAccessStateDisabled), - string(ServerPublicNetworkAccessStateEnabled), - } -} - -func (s *ServerPublicNetworkAccessState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServerPublicNetworkAccessState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServerPublicNetworkAccessState(input string) (*ServerPublicNetworkAccessState, error) { - vals := map[string]ServerPublicNetworkAccessState{ - "disabled": ServerPublicNetworkAccessStateDisabled, - "enabled": ServerPublicNetworkAccessStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServerPublicNetworkAccessState(input) - return &out, nil -} - -type ServerState string - -const ( - ServerStateDisabled ServerState = "Disabled" - ServerStateDropping ServerState = "Dropping" - ServerStateInaccessible ServerState = "Inaccessible" - ServerStateProvisioning ServerState = "Provisioning" - ServerStateReady ServerState = "Ready" - ServerStateRestarting ServerState = "Restarting" - ServerStateStarting ServerState = "Starting" - ServerStateStopped ServerState = "Stopped" - ServerStateStopping ServerState = "Stopping" - ServerStateUpdating ServerState = "Updating" -) - -func PossibleValuesForServerState() []string { - return []string{ - string(ServerStateDisabled), - string(ServerStateDropping), - string(ServerStateInaccessible), - string(ServerStateProvisioning), - string(ServerStateReady), - string(ServerStateRestarting), - string(ServerStateStarting), - string(ServerStateStopped), - string(ServerStateStopping), - string(ServerStateUpdating), - } -} - -func (s *ServerState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServerState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServerState(input string) (*ServerState, error) { - vals := map[string]ServerState{ - "disabled": ServerStateDisabled, - "dropping": ServerStateDropping, - "inaccessible": ServerStateInaccessible, - "provisioning": ServerStateProvisioning, - "ready": ServerStateReady, - "restarting": ServerStateRestarting, - "starting": ServerStateStarting, - "stopped": ServerStateStopped, - "stopping": ServerStateStopping, - "updating": ServerStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServerState(input) - return &out, nil -} - -type SkuTier string - -const ( - SkuTierBurstable SkuTier = "Burstable" - SkuTierGeneralPurpose SkuTier = "GeneralPurpose" - SkuTierMemoryOptimized SkuTier = "MemoryOptimized" -) - -func PossibleValuesForSkuTier() []string { - return []string{ - string(SkuTierBurstable), - string(SkuTierGeneralPurpose), - string(SkuTierMemoryOptimized), - } -} - -func (s *SkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSkuTier(input string) (*SkuTier, error) { - vals := map[string]SkuTier{ - "burstable": SkuTierBurstable, - "generalpurpose": SkuTierGeneralPurpose, - "memoryoptimized": SkuTierMemoryOptimized, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SkuTier(input) - return &out, nil -} - -type StorageAutoGrow string - -const ( - StorageAutoGrowDisabled StorageAutoGrow = "Disabled" - StorageAutoGrowEnabled StorageAutoGrow = "Enabled" -) - -func PossibleValuesForStorageAutoGrow() []string { - return []string{ - string(StorageAutoGrowDisabled), - string(StorageAutoGrowEnabled), - } -} - -func (s *StorageAutoGrow) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStorageAutoGrow(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStorageAutoGrow(input string) (*StorageAutoGrow, error) { - vals := map[string]StorageAutoGrow{ - "disabled": StorageAutoGrowDisabled, - "enabled": StorageAutoGrowEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageAutoGrow(input) - return &out, nil -} - -type StorageType string - -const ( - StorageTypePremiumLRS StorageType = "Premium_LRS" - StorageTypePremiumVTwoLRS StorageType = "PremiumV2_LRS" - StorageTypeUltraSSDLRS StorageType = "UltraSSD_LRS" -) - -func PossibleValuesForStorageType() []string { - return []string{ - string(StorageTypePremiumLRS), - string(StorageTypePremiumVTwoLRS), - string(StorageTypeUltraSSDLRS), - } -} - -func (s *StorageType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStorageType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStorageType(input string) (*StorageType, error) { - vals := map[string]StorageType{ - "premium_lrs": StorageTypePremiumLRS, - "premiumv2_lrs": StorageTypePremiumVTwoLRS, - "ultrassd_lrs": StorageTypeUltraSSDLRS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := StorageType(input) - return &out, nil -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/replicas/id_flexibleserver.go deleted file mode 100644 index f2e8777baa9..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/id_flexibleserver.go +++ /dev/null @@ -1,130 +0,0 @@ -package replicas - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&FlexibleServerId{}) -} - -var _ resourceids.ResourceId = &FlexibleServerId{} - -// FlexibleServerId is a struct representing the Resource ID for a Flexible Server -type FlexibleServerId struct { - SubscriptionId string - ResourceGroupName string - FlexibleServerName string -} - -// NewFlexibleServerID returns a new FlexibleServerId struct -func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { - return FlexibleServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FlexibleServerName: flexibleServerName, - } -} - -// ParseFlexibleServerID parses 'input' into a FlexibleServerId -func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId -// note: this method should only be used for API response data and not user input -func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) - } - - return nil -} - -// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID -func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFlexibleServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Flexible Server ID -func (id FlexibleServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforPostgreSQL/flexibleServers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID -func (id FlexibleServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforPostgreSQL", "Microsoft.DBforPostgreSQL", "Microsoft.DBforPostgreSQL"), - resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), - resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), - } -} - -// String returns a human-readable description of this Flexible Server ID -func (id FlexibleServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), - } - return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/replicas/id_flexibleserver_test.go deleted file mode 100644 index e4e16876663..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/id_flexibleserver_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package replicas - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &FlexibleServerId{} - -func TestNewFlexibleServerID(t *testing.T) { - id := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FlexibleServerName != "flexibleServerName" { - t.Fatalf("Expected %q but got %q for Segment 'FlexibleServerName'", id.FlexibleServerName, "flexibleServerName") - } -} - -func TestFormatFlexibleServerID(t *testing.T) { - actual := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFlexibleServerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestParseFlexibleServerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FlexibleServerName: "fLeXiBlEsErVeRnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestSegmentsForFlexibleServerId(t *testing.T) { - segments := FlexibleServerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FlexibleServerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_authconfig.go b/resource-manager/postgresql/2025-08-01/replicas/model_authconfig.go deleted file mode 100644 index c142629bb23..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_authconfig.go +++ /dev/null @@ -1,10 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthConfig struct { - ActiveDirectoryAuth *MicrosoftEntraAuth `json:"activeDirectoryAuth,omitempty"` - PasswordAuth *PasswordBasedAuth `json:"passwordAuth,omitempty"` - TenantId *string `json:"tenantId,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_backup.go b/resource-manager/postgresql/2025-08-01/replicas/model_backup.go deleted file mode 100644 index 32f27e46d2a..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_backup.go +++ /dev/null @@ -1,28 +0,0 @@ -package replicas - -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 Backup struct { - BackupRetentionDays *int64 `json:"backupRetentionDays,omitempty"` - EarliestRestoreDate *string `json:"earliestRestoreDate,omitempty"` - GeoRedundantBackup *GeographicallyRedundantBackup `json:"geoRedundantBackup,omitempty"` -} - -func (o *Backup) GetEarliestRestoreDateAsTime() (*time.Time, error) { - if o.EarliestRestoreDate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EarliestRestoreDate, "2006-01-02T15:04:05Z07:00") -} - -func (o *Backup) SetEarliestRestoreDateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EarliestRestoreDate = &formatted -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_cluster.go b/resource-manager/postgresql/2025-08-01/replicas/model_cluster.go deleted file mode 100644 index 2877b60ed8d..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_cluster.go +++ /dev/null @@ -1,9 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Cluster struct { - ClusterSize *int64 `json:"clusterSize,omitempty"` - DefaultDatabaseName *string `json:"defaultDatabaseName,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_dataencryption.go b/resource-manager/postgresql/2025-08-01/replicas/model_dataencryption.go deleted file mode 100644 index 4dca78e4824..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_dataencryption.go +++ /dev/null @@ -1,14 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DataEncryption struct { - GeoBackupEncryptionKeyStatus *EncryptionKeyStatus `json:"geoBackupEncryptionKeyStatus,omitempty"` - GeoBackupKeyURI *string `json:"geoBackupKeyURI,omitempty"` - GeoBackupUserAssignedIdentityId *string `json:"geoBackupUserAssignedIdentityId,omitempty"` - PrimaryEncryptionKeyStatus *EncryptionKeyStatus `json:"primaryEncryptionKeyStatus,omitempty"` - PrimaryKeyURI *string `json:"primaryKeyURI,omitempty"` - PrimaryUserAssignedIdentityId *string `json:"primaryUserAssignedIdentityId,omitempty"` - Type *DataEncryptionType `json:"type,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_highavailability.go b/resource-manager/postgresql/2025-08-01/replicas/model_highavailability.go deleted file mode 100644 index 622a3703b03..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_highavailability.go +++ /dev/null @@ -1,10 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HighAvailability struct { - Mode *HighAvailabilityMode `json:"mode,omitempty"` - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` - State *HighAvailabilityState `json:"state,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_maintenancewindow.go b/resource-manager/postgresql/2025-08-01/replicas/model_maintenancewindow.go deleted file mode 100644 index cc7a0b4cfe2..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_maintenancewindow.go +++ /dev/null @@ -1,11 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MaintenanceWindow struct { - CustomWindow *string `json:"customWindow,omitempty"` - DayOfWeek *int64 `json:"dayOfWeek,omitempty"` - StartHour *int64 `json:"startHour,omitempty"` - StartMinute *int64 `json:"startMinute,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_network.go b/resource-manager/postgresql/2025-08-01/replicas/model_network.go deleted file mode 100644 index 9dbfaa0820c..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_network.go +++ /dev/null @@ -1,10 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Network struct { - DelegatedSubnetResourceId *string `json:"delegatedSubnetResourceId,omitempty"` - PrivateDnsZoneArmResourceId *string `json:"privateDnsZoneArmResourceId,omitempty"` - PublicNetworkAccess *ServerPublicNetworkAccessState `json:"publicNetworkAccess,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_privateendpointconnectionproperties.go b/resource-manager/postgresql/2025-08-01/replicas/model_privateendpointconnectionproperties.go deleted file mode 100644 index d3068b6993f..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package replicas - -// 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 { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_privatelinkserviceconnectionstate.go b/resource-manager/postgresql/2025-08-01/replicas/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 311ee4497b7..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package replicas - -// 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 *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_replica.go b/resource-manager/postgresql/2025-08-01/replicas/model_replica.go deleted file mode 100644 index aa9e1a91f9f..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_replica.go +++ /dev/null @@ -1,12 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Replica struct { - Capacity *int64 `json:"capacity,omitempty"` - PromoteMode *ReadReplicaPromoteMode `json:"promoteMode,omitempty"` - PromoteOption *ReadReplicaPromoteOption `json:"promoteOption,omitempty"` - ReplicationState *ReplicationState `json:"replicationState,omitempty"` - Role *ReplicationRole `json:"role,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_server.go b/resource-manager/postgresql/2025-08-01/replicas/model_server.go deleted file mode 100644 index 097dc475576..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_server.go +++ /dev/null @@ -1,21 +0,0 @@ -package replicas - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "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 Server struct { - Id *string `json:"id,omitempty"` - Identity *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *ServerProperties `json:"properties,omitempty"` - Sku *Sku `json:"sku,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_serverproperties.go b/resource-manager/postgresql/2025-08-01/replicas/model_serverproperties.go deleted file mode 100644 index 7088ca764bf..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_serverproperties.go +++ /dev/null @@ -1,47 +0,0 @@ -package replicas - -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 ServerProperties struct { - AdministratorLogin *string `json:"administratorLogin,omitempty"` - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - AuthConfig *AuthConfig `json:"authConfig,omitempty"` - AvailabilityZone *string `json:"availabilityZone,omitempty"` - Backup *Backup `json:"backup,omitempty"` - Cluster *Cluster `json:"cluster,omitempty"` - CreateMode *CreateMode `json:"createMode,omitempty"` - DataEncryption *DataEncryption `json:"dataEncryption,omitempty"` - FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` - HighAvailability *HighAvailability `json:"highAvailability,omitempty"` - MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` - MinorVersion *string `json:"minorVersion,omitempty"` - Network *Network `json:"network,omitempty"` - PointInTimeUTC *string `json:"pointInTimeUTC,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - Replica *Replica `json:"replica,omitempty"` - ReplicaCapacity *int64 `json:"replicaCapacity,omitempty"` - ReplicationRole *ReplicationRole `json:"replicationRole,omitempty"` - SourceServerResourceId *string `json:"sourceServerResourceId,omitempty"` - State *ServerState `json:"state,omitempty"` - Storage *Storage `json:"storage,omitempty"` - Version *PostgresMajorVersion `json:"version,omitempty"` -} - -func (o *ServerProperties) GetPointInTimeUTCAsTime() (*time.Time, error) { - if o.PointInTimeUTC == nil { - return nil, nil - } - return dates.ParseAsFormat(o.PointInTimeUTC, "2006-01-02T15:04:05Z07:00") -} - -func (o *ServerProperties) SetPointInTimeUTCAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.PointInTimeUTC = &formatted -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_sku.go b/resource-manager/postgresql/2025-08-01/replicas/model_sku.go deleted file mode 100644 index 198e743bce6..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_sku.go +++ /dev/null @@ -1,9 +0,0 @@ -package replicas - -// 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 string `json:"name"` - Tier SkuTier `json:"tier"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/model_storage.go b/resource-manager/postgresql/2025-08-01/replicas/model_storage.go deleted file mode 100644 index d0bb84afe1c..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/model_storage.go +++ /dev/null @@ -1,13 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Storage struct { - AutoGrow *StorageAutoGrow `json:"autoGrow,omitempty"` - Iops *int64 `json:"iops,omitempty"` - StorageSizeGB *int64 `json:"storageSizeGB,omitempty"` - Throughput *int64 `json:"throughput,omitempty"` - Tier *AzureManagedDiskPerformanceTier `json:"tier,omitempty"` - Type *StorageType `json:"type,omitempty"` -} diff --git a/resource-manager/postgresql/2025-08-01/replicas/predicates.go b/resource-manager/postgresql/2025-08-01/replicas/predicates.go deleted file mode 100644 index ea213c7c556..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServerOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ServerOperationPredicate) Matches(input Server) bool { - - 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/postgresql/2025-08-01/replicas/version.go b/resource-manager/postgresql/2025-08-01/replicas/version.go deleted file mode 100644 index ded89f29927..00000000000 --- a/resource-manager/postgresql/2025-08-01/replicas/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package replicas - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2025-08-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/replicas/2025-08-01" -} diff --git a/resource-manager/postgresql/2025-08-01/servers/README.md b/resource-manager/postgresql/2025-08-01/servers/README.md index f91f3dd93b0..869c625e7d8 100644 --- a/resource-manager/postgresql/2025-08-01/servers/README.md +++ b/resource-manager/postgresql/2025-08-01/servers/README.md @@ -21,6 +21,78 @@ client.Client.Authorizer = authorizer ``` +### Example Usage: `ServersClient.BackupsLongTermRetentionCheckPrerequisites` + +```go +ctx := context.TODO() +id := servers.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := servers.BackupRequestBase{ + // ... +} + + +read, err := client.BackupsLongTermRetentionCheckPrerequisites(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServersClient.BackupsLongTermRetentionStart` + +```go +ctx := context.TODO() +id := servers.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := servers.BackupsLongTermRetentionRequest{ + // ... +} + + +if err := client.BackupsLongTermRetentionStartThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `ServersClient.CapabilitiesByServerList` + +```go +ctx := context.TODO() +id := servers.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.CapabilitiesByServerList(ctx, id)` can be used to do batched pagination +items, err := client.CapabilitiesByServerListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ServersClient.CapturedLogsListByServer` + +```go +ctx := context.TODO() +id := servers.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.CapturedLogsListByServer(ctx, id)` can be used to do batched pagination +items, err := client.CapturedLogsListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + ### Example Usage: `ServersClient.CreateOrUpdate` ```go @@ -100,6 +172,44 @@ for _, item := range items { ``` +### Example Usage: `ServersClient.MigrationsCheckNameAvailability` + +```go +ctx := context.TODO() +id := servers.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := servers.MigrationNameAvailability{ + // ... +} + + +read, err := client.MigrationsCheckNameAvailability(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ServersClient.ReplicasListByServer` + +```go +ctx := context.TODO() +id := servers.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.ReplicasListByServer(ctx, id)` can be used to do batched pagination +items, err := client.ReplicasListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + ### Example Usage: `ServersClient.Restart` ```go diff --git a/resource-manager/postgresql/2025-08-01/servers/constants.go b/resource-manager/postgresql/2025-08-01/servers/constants.go index b23218e1da8..c7e219f70a4 100644 --- a/resource-manager/postgresql/2025-08-01/servers/constants.go +++ b/resource-manager/postgresql/2025-08-01/servers/constants.go @@ -86,6 +86,53 @@ func parseAzureManagedDiskPerformanceTier(input string) (*AzureManagedDiskPerfor return &out, nil } +type CapabilityStatus string + +const ( + CapabilityStatusAvailable CapabilityStatus = "Available" + CapabilityStatusDefault CapabilityStatus = "Default" + CapabilityStatusDisabled CapabilityStatus = "Disabled" + CapabilityStatusVisible CapabilityStatus = "Visible" +) + +func PossibleValuesForCapabilityStatus() []string { + return []string{ + string(CapabilityStatusAvailable), + string(CapabilityStatusDefault), + string(CapabilityStatusDisabled), + string(CapabilityStatusVisible), + } +} + +func (s *CapabilityStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCapabilityStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCapabilityStatus(input string) (*CapabilityStatus, error) { + vals := map[string]CapabilityStatus{ + "available": CapabilityStatusAvailable, + "default": CapabilityStatusDefault, + "disabled": CapabilityStatusDisabled, + "visible": CapabilityStatusVisible, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CapabilityStatus(input) + return &out, nil +} + type CreateMode string const ( @@ -265,6 +312,53 @@ func parseEncryptionKeyStatus(input string) (*EncryptionKeyStatus, error) { return &out, nil } +type ExecutionStatus string + +const ( + ExecutionStatusCancelled ExecutionStatus = "Cancelled" + ExecutionStatusFailed ExecutionStatus = "Failed" + ExecutionStatusRunning ExecutionStatus = "Running" + ExecutionStatusSucceeded ExecutionStatus = "Succeeded" +) + +func PossibleValuesForExecutionStatus() []string { + return []string{ + string(ExecutionStatusCancelled), + string(ExecutionStatusFailed), + string(ExecutionStatusRunning), + string(ExecutionStatusSucceeded), + } +} + +func (s *ExecutionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseExecutionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseExecutionStatus(input string) (*ExecutionStatus, error) { + vals := map[string]ExecutionStatus{ + "cancelled": ExecutionStatusCancelled, + "failed": ExecutionStatusFailed, + "running": ExecutionStatusRunning, + "succeeded": ExecutionStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ExecutionStatus(input) + return &out, nil +} + type FailoverMode string const ( @@ -312,6 +406,88 @@ func parseFailoverMode(input string) (*FailoverMode, error) { return &out, nil } +type FastProvisioningSupport string + +const ( + FastProvisioningSupportDisabled FastProvisioningSupport = "Disabled" + FastProvisioningSupportEnabled FastProvisioningSupport = "Enabled" +) + +func PossibleValuesForFastProvisioningSupport() []string { + return []string{ + string(FastProvisioningSupportDisabled), + string(FastProvisioningSupportEnabled), + } +} + +func (s *FastProvisioningSupport) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFastProvisioningSupport(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFastProvisioningSupport(input string) (*FastProvisioningSupport, error) { + vals := map[string]FastProvisioningSupport{ + "disabled": FastProvisioningSupportDisabled, + "enabled": FastProvisioningSupportEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FastProvisioningSupport(input) + return &out, nil +} + +type FeatureStatus string + +const ( + FeatureStatusDisabled FeatureStatus = "Disabled" + FeatureStatusEnabled FeatureStatus = "Enabled" +) + +func PossibleValuesForFeatureStatus() []string { + return []string{ + string(FeatureStatusDisabled), + string(FeatureStatusEnabled), + } +} + +func (s *FeatureStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFeatureStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFeatureStatus(input string) (*FeatureStatus, error) { + vals := map[string]FeatureStatus{ + "disabled": FeatureStatusDisabled, + "enabled": FeatureStatusEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FeatureStatus(input) + return &out, nil +} + type GeographicallyRedundantBackup string const ( @@ -353,17 +529,56 @@ func parseGeographicallyRedundantBackup(input string) (*GeographicallyRedundantB return &out, nil } +type GeographicallyRedundantBackupSupport string + +const ( + GeographicallyRedundantBackupSupportDisabled GeographicallyRedundantBackupSupport = "Disabled" + GeographicallyRedundantBackupSupportEnabled GeographicallyRedundantBackupSupport = "Enabled" +) + +func PossibleValuesForGeographicallyRedundantBackupSupport() []string { + return []string{ + string(GeographicallyRedundantBackupSupportDisabled), + string(GeographicallyRedundantBackupSupportEnabled), + } +} + +func (s *GeographicallyRedundantBackupSupport) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseGeographicallyRedundantBackupSupport(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseGeographicallyRedundantBackupSupport(input string) (*GeographicallyRedundantBackupSupport, error) { + vals := map[string]GeographicallyRedundantBackupSupport{ + "disabled": GeographicallyRedundantBackupSupportDisabled, + "enabled": GeographicallyRedundantBackupSupportEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := GeographicallyRedundantBackupSupport(input) + return &out, nil +} + type HighAvailabilityMode string const ( - HighAvailabilityModeDisabled HighAvailabilityMode = "Disabled" HighAvailabilityModeSameZone HighAvailabilityMode = "SameZone" HighAvailabilityModeZoneRedundant HighAvailabilityMode = "ZoneRedundant" ) func PossibleValuesForHighAvailabilityMode() []string { return []string{ - string(HighAvailabilityModeDisabled), string(HighAvailabilityModeSameZone), string(HighAvailabilityModeZoneRedundant), } @@ -384,7 +599,6 @@ func (s *HighAvailabilityMode) UnmarshalJSON(bytes []byte) error { func parseHighAvailabilityMode(input string) (*HighAvailabilityMode, error) { vals := map[string]HighAvailabilityMode{ - "disabled": HighAvailabilityModeDisabled, "samezone": HighAvailabilityModeSameZone, "zoneredundant": HighAvailabilityModeZoneRedundant, } @@ -450,6 +664,47 @@ func parseHighAvailabilityState(input string) (*HighAvailabilityState, error) { return &out, nil } +type LocationRestricted string + +const ( + LocationRestrictedDisabled LocationRestricted = "Disabled" + LocationRestrictedEnabled LocationRestricted = "Enabled" +) + +func PossibleValuesForLocationRestricted() []string { + return []string{ + string(LocationRestrictedDisabled), + string(LocationRestrictedEnabled), + } +} + +func (s *LocationRestricted) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseLocationRestricted(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseLocationRestricted(input string) (*LocationRestricted, error) { + vals := map[string]LocationRestricted{ + "disabled": LocationRestrictedDisabled, + "enabled": LocationRestrictedEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := LocationRestricted(input) + return &out, nil +} + type MicrosoftEntraAuth string const ( @@ -491,6 +746,88 @@ func parseMicrosoftEntraAuth(input string) (*MicrosoftEntraAuth, error) { return &out, nil } +type MigrationNameAvailabilityReason string + +const ( + MigrationNameAvailabilityReasonAlreadyExists MigrationNameAvailabilityReason = "AlreadyExists" + MigrationNameAvailabilityReasonInvalid MigrationNameAvailabilityReason = "Invalid" +) + +func PossibleValuesForMigrationNameAvailabilityReason() []string { + return []string{ + string(MigrationNameAvailabilityReasonAlreadyExists), + string(MigrationNameAvailabilityReasonInvalid), + } +} + +func (s *MigrationNameAvailabilityReason) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMigrationNameAvailabilityReason(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMigrationNameAvailabilityReason(input string) (*MigrationNameAvailabilityReason, error) { + vals := map[string]MigrationNameAvailabilityReason{ + "alreadyexists": MigrationNameAvailabilityReasonAlreadyExists, + "invalid": MigrationNameAvailabilityReasonInvalid, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MigrationNameAvailabilityReason(input) + return &out, nil +} + +type OnlineStorageResizeSupport string + +const ( + OnlineStorageResizeSupportDisabled OnlineStorageResizeSupport = "Disabled" + OnlineStorageResizeSupportEnabled OnlineStorageResizeSupport = "Enabled" +) + +func PossibleValuesForOnlineStorageResizeSupport() []string { + return []string{ + string(OnlineStorageResizeSupportDisabled), + string(OnlineStorageResizeSupportEnabled), + } +} + +func (s *OnlineStorageResizeSupport) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOnlineStorageResizeSupport(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOnlineStorageResizeSupport(input string) (*OnlineStorageResizeSupport, error) { + vals := map[string]OnlineStorageResizeSupport{ + "disabled": OnlineStorageResizeSupportDisabled, + "enabled": OnlineStorageResizeSupportEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OnlineStorageResizeSupport(input) + return &out, nil +} + type PasswordBasedAuth string const ( @@ -532,6 +869,50 @@ func parsePasswordBasedAuth(input string) (*PasswordBasedAuth, error) { return &out, nil } +type PostgreSqlFlexibleServerHighAvailabilityMode string + +const ( + PostgreSqlFlexibleServerHighAvailabilityModeDisabled PostgreSqlFlexibleServerHighAvailabilityMode = "Disabled" + PostgreSqlFlexibleServerHighAvailabilityModeSameZone PostgreSqlFlexibleServerHighAvailabilityMode = "SameZone" + PostgreSqlFlexibleServerHighAvailabilityModeZoneRedundant PostgreSqlFlexibleServerHighAvailabilityMode = "ZoneRedundant" +) + +func PossibleValuesForPostgreSqlFlexibleServerHighAvailabilityMode() []string { + return []string{ + string(PostgreSqlFlexibleServerHighAvailabilityModeDisabled), + string(PostgreSqlFlexibleServerHighAvailabilityModeSameZone), + string(PostgreSqlFlexibleServerHighAvailabilityModeZoneRedundant), + } +} + +func (s *PostgreSqlFlexibleServerHighAvailabilityMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePostgreSqlFlexibleServerHighAvailabilityMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePostgreSqlFlexibleServerHighAvailabilityMode(input string) (*PostgreSqlFlexibleServerHighAvailabilityMode, error) { + vals := map[string]PostgreSqlFlexibleServerHighAvailabilityMode{ + "disabled": PostgreSqlFlexibleServerHighAvailabilityModeDisabled, + "samezone": PostgreSqlFlexibleServerHighAvailabilityModeSameZone, + "zoneredundant": PostgreSqlFlexibleServerHighAvailabilityModeZoneRedundant, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PostgreSqlFlexibleServerHighAvailabilityMode(input) + return &out, nil +} + type PostgresMajorVersion string const ( @@ -1055,6 +1436,47 @@ func parseStorageAutoGrow(input string) (*StorageAutoGrow, error) { return &out, nil } +type StorageAutoGrowthSupport string + +const ( + StorageAutoGrowthSupportDisabled StorageAutoGrowthSupport = "Disabled" + StorageAutoGrowthSupportEnabled StorageAutoGrowthSupport = "Enabled" +) + +func PossibleValuesForStorageAutoGrowthSupport() []string { + return []string{ + string(StorageAutoGrowthSupportDisabled), + string(StorageAutoGrowthSupportEnabled), + } +} + +func (s *StorageAutoGrowthSupport) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseStorageAutoGrowthSupport(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseStorageAutoGrowthSupport(input string) (*StorageAutoGrowthSupport, error) { + vals := map[string]StorageAutoGrowthSupport{ + "disabled": StorageAutoGrowthSupportDisabled, + "enabled": StorageAutoGrowthSupportEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := StorageAutoGrowthSupport(input) + return &out, nil +} + type StorageType string const ( @@ -1098,3 +1520,85 @@ func parseStorageType(input string) (*StorageType, error) { out := StorageType(input) return &out, nil } + +type ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport string + +const ( + ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportDisabled ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport = "Disabled" + ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportEnabled ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport = "Enabled" +) + +func PossibleValuesForZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport() []string { + return []string{ + string(ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportDisabled), + string(ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportEnabled), + } +} + +func (s *ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport(input string) (*ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport, error) { + vals := map[string]ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport{ + "disabled": ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportDisabled, + "enabled": ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupportEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport(input) + return &out, nil +} + +type ZoneRedundantHighAvailabilitySupport string + +const ( + ZoneRedundantHighAvailabilitySupportDisabled ZoneRedundantHighAvailabilitySupport = "Disabled" + ZoneRedundantHighAvailabilitySupportEnabled ZoneRedundantHighAvailabilitySupport = "Enabled" +) + +func PossibleValuesForZoneRedundantHighAvailabilitySupport() []string { + return []string{ + string(ZoneRedundantHighAvailabilitySupportDisabled), + string(ZoneRedundantHighAvailabilitySupportEnabled), + } +} + +func (s *ZoneRedundantHighAvailabilitySupport) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseZoneRedundantHighAvailabilitySupport(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseZoneRedundantHighAvailabilitySupport(input string) (*ZoneRedundantHighAvailabilitySupport, error) { + vals := map[string]ZoneRedundantHighAvailabilitySupport{ + "disabled": ZoneRedundantHighAvailabilitySupportDisabled, + "enabled": ZoneRedundantHighAvailabilitySupportEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ZoneRedundantHighAvailabilitySupport(input) + return &out, nil +} diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/method_checkprerequisites.go b/resource-manager/postgresql/2025-08-01/servers/method_backupslongtermretentioncheckprerequisites.go similarity index 74% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/method_checkprerequisites.go rename to resource-manager/postgresql/2025-08-01/servers/method_backupslongtermretentioncheckprerequisites.go index 1713ed1913c..dc2b7a2e82a 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/method_checkprerequisites.go +++ b/resource-manager/postgresql/2025-08-01/servers/method_backupslongtermretentioncheckprerequisites.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers import ( "context" @@ -12,14 +12,14 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type CheckPrerequisitesOperationResponse struct { +type BackupsLongTermRetentionCheckPrerequisitesOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *LtrPreBackupResponse } -// CheckPrerequisites ... -func (c BackupsLongTermRetentionClient) CheckPrerequisites(ctx context.Context, id FlexibleServerId, input BackupRequestBase) (result CheckPrerequisitesOperationResponse, err error) { +// BackupsLongTermRetentionCheckPrerequisites ... +func (c ServersClient) BackupsLongTermRetentionCheckPrerequisites(ctx context.Context, id FlexibleServerId, input BackupRequestBase) (result BackupsLongTermRetentionCheckPrerequisitesOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/method_start.go b/resource-manager/postgresql/2025-08-01/servers/method_backupslongtermretentionstart.go similarity index 62% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/method_start.go rename to resource-manager/postgresql/2025-08-01/servers/method_backupslongtermretentionstart.go index 04407a25183..9b5ab165272 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/method_start.go +++ b/resource-manager/postgresql/2025-08-01/servers/method_backupslongtermretentionstart.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers import ( "context" @@ -14,15 +14,15 @@ import ( // 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 { +type BackupsLongTermRetentionStartOperationResponse struct { Poller pollers.Poller HttpResponse *http.Response OData *odata.OData Model *BackupsLongTermRetentionResponse } -// Start ... -func (c BackupsLongTermRetentionClient) Start(ctx context.Context, id FlexibleServerId, input BackupsLongTermRetentionRequest) (result StartOperationResponse, err error) { +// BackupsLongTermRetentionStart ... +func (c ServersClient) BackupsLongTermRetentionStart(ctx context.Context, id FlexibleServerId, input BackupsLongTermRetentionRequest) (result BackupsLongTermRetentionStartOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -60,15 +60,15 @@ func (c BackupsLongTermRetentionClient) Start(ctx context.Context, id FlexibleSe return } -// StartThenPoll performs Start then polls until it's completed -func (c BackupsLongTermRetentionClient) StartThenPoll(ctx context.Context, id FlexibleServerId, input BackupsLongTermRetentionRequest) error { - result, err := c.Start(ctx, id, input) +// BackupsLongTermRetentionStartThenPoll performs BackupsLongTermRetentionStart then polls until it's completed +func (c ServersClient) BackupsLongTermRetentionStartThenPoll(ctx context.Context, id FlexibleServerId, input BackupsLongTermRetentionRequest) error { + result, err := c.BackupsLongTermRetentionStart(ctx, id, input) if err != nil { - return fmt.Errorf("performing Start: %+v", err) + return fmt.Errorf("performing BackupsLongTermRetentionStart: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) + return fmt.Errorf("polling after BackupsLongTermRetentionStart: %+v", err) } return nil diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/method_list.go b/resource-manager/postgresql/2025-08-01/servers/method_capabilitiesbyserverlist.go similarity index 55% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/method_list.go rename to resource-manager/postgresql/2025-08-01/servers/method_capabilitiesbyserverlist.go index de099b01ba5..533b7d646f5 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/method_list.go +++ b/resource-manager/postgresql/2025-08-01/servers/method_capabilitiesbyserverlist.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package servers import ( "context" @@ -12,22 +12,22 @@ import ( // 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 { +type CapabilitiesByServerListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Capability } -type ListCompleteResult struct { +type CapabilitiesByServerListCompleteResult struct { LatestHttpResponse *http.Response Items []Capability } -type ListCustomPager struct { +type CapabilitiesByServerListCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListCustomPager) NextPageLink() *odata.Link { +func (p *CapabilitiesByServerListCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -35,15 +35,15 @@ func (p *ListCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// List ... -func (c CapabilitiesByServerClient) List(ctx context.Context, id FlexibleServerId) (result ListOperationResponse, err error) { +// CapabilitiesByServerList ... +func (c ServersClient) CapabilitiesByServerList(ctx context.Context, id FlexibleServerId) (result CapabilitiesByServerListOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListCustomPager{}, + Pager: &CapabilitiesByServerListCustomPager{}, Path: fmt.Sprintf("%s/capabilities", id.ID()), } @@ -74,16 +74,16 @@ func (c CapabilitiesByServerClient) List(ctx context.Context, id FlexibleServerI return } -// ListComplete retrieves all the results into a single object -func (c CapabilitiesByServerClient) ListComplete(ctx context.Context, id FlexibleServerId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, CapabilityOperationPredicate{}) +// CapabilitiesByServerListComplete retrieves all the results into a single object +func (c ServersClient) CapabilitiesByServerListComplete(ctx context.Context, id FlexibleServerId) (CapabilitiesByServerListCompleteResult, error) { + return c.CapabilitiesByServerListCompleteMatchingPredicate(ctx, id, CapabilityOperationPredicate{}) } -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CapabilitiesByServerClient) ListCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate CapabilityOperationPredicate) (result ListCompleteResult, err error) { +// CapabilitiesByServerListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ServersClient) CapabilitiesByServerListCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate CapabilityOperationPredicate) (result CapabilitiesByServerListCompleteResult, err error) { items := make([]Capability, 0) - resp, err := c.List(ctx, id) + resp, err := c.CapabilitiesByServerList(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -97,7 +97,7 @@ func (c CapabilitiesByServerClient) ListCompleteMatchingPredicate(ctx context.Co } } - result = ListCompleteResult{ + result = CapabilitiesByServerListCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/postgresql/2025-08-01/capturedlogs/method_listbyserver.go b/resource-manager/postgresql/2025-08-01/servers/method_capturedlogslistbyserver.go similarity index 55% rename from resource-manager/postgresql/2025-08-01/capturedlogs/method_listbyserver.go rename to resource-manager/postgresql/2025-08-01/servers/method_capturedlogslistbyserver.go index 9a52e5ee500..f54aa40f176 100644 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/method_listbyserver.go +++ b/resource-manager/postgresql/2025-08-01/servers/method_capturedlogslistbyserver.go @@ -1,4 +1,4 @@ -package capturedlogs +package servers import ( "context" @@ -12,22 +12,22 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListByServerOperationResponse struct { +type CapturedLogsListByServerOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]CapturedLog } -type ListByServerCompleteResult struct { +type CapturedLogsListByServerCompleteResult struct { LatestHttpResponse *http.Response Items []CapturedLog } -type ListByServerCustomPager struct { +type CapturedLogsListByServerCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByServerCustomPager) NextPageLink() *odata.Link { +func (p *CapturedLogsListByServerCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -35,15 +35,15 @@ func (p *ListByServerCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByServer ... -func (c CapturedLogsClient) ListByServer(ctx context.Context, id FlexibleServerId) (result ListByServerOperationResponse, err error) { +// CapturedLogsListByServer ... +func (c ServersClient) CapturedLogsListByServer(ctx context.Context, id FlexibleServerId) (result CapturedLogsListByServerOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListByServerCustomPager{}, + Pager: &CapturedLogsListByServerCustomPager{}, Path: fmt.Sprintf("%s/logFiles", id.ID()), } @@ -74,16 +74,16 @@ func (c CapturedLogsClient) ListByServer(ctx context.Context, id FlexibleServerI return } -// ListByServerComplete retrieves all the results into a single object -func (c CapturedLogsClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, CapturedLogOperationPredicate{}) +// CapturedLogsListByServerComplete retrieves all the results into a single object +func (c ServersClient) CapturedLogsListByServerComplete(ctx context.Context, id FlexibleServerId) (CapturedLogsListByServerCompleteResult, error) { + return c.CapturedLogsListByServerCompleteMatchingPredicate(ctx, id, CapturedLogOperationPredicate{}) } -// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CapturedLogsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate CapturedLogOperationPredicate) (result ListByServerCompleteResult, err error) { +// CapturedLogsListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ServersClient) CapturedLogsListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate CapturedLogOperationPredicate) (result CapturedLogsListByServerCompleteResult, err error) { items := make([]CapturedLog, 0) - resp, err := c.ListByServer(ctx, id) + resp, err := c.CapturedLogsListByServer(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -97,7 +97,7 @@ func (c CapturedLogsClient) ListByServerCompleteMatchingPredicate(ctx context.Co } } - result = ListByServerCompleteResult{ + result = CapturedLogsListByServerCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/postgresql/2025-08-01/post/method_migrationschecknameavailability.go b/resource-manager/postgresql/2025-08-01/servers/method_migrationschecknameavailability.go similarity index 84% rename from resource-manager/postgresql/2025-08-01/post/method_migrationschecknameavailability.go rename to resource-manager/postgresql/2025-08-01/servers/method_migrationschecknameavailability.go index 309c6d40d7f..10856f8b518 100644 --- a/resource-manager/postgresql/2025-08-01/post/method_migrationschecknameavailability.go +++ b/resource-manager/postgresql/2025-08-01/servers/method_migrationschecknameavailability.go @@ -1,4 +1,4 @@ -package post +package servers import ( "context" @@ -19,7 +19,7 @@ type MigrationsCheckNameAvailabilityOperationResponse struct { } // MigrationsCheckNameAvailability ... -func (c POSTClient) MigrationsCheckNameAvailability(ctx context.Context, id FlexibleServerId, input MigrationNameAvailability) (result MigrationsCheckNameAvailabilityOperationResponse, err error) { +func (c ServersClient) MigrationsCheckNameAvailability(ctx context.Context, id FlexibleServerId, input MigrationNameAvailability) (result MigrationsCheckNameAvailabilityOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/replicas/method_listbyserver.go b/resource-manager/postgresql/2025-08-01/servers/method_replicaslistbyserver.go similarity index 57% rename from resource-manager/postgresql/2025-08-01/replicas/method_listbyserver.go rename to resource-manager/postgresql/2025-08-01/servers/method_replicaslistbyserver.go index 16d7c7771c4..a97ac4e8982 100644 --- a/resource-manager/postgresql/2025-08-01/replicas/method_listbyserver.go +++ b/resource-manager/postgresql/2025-08-01/servers/method_replicaslistbyserver.go @@ -1,4 +1,4 @@ -package replicas +package servers import ( "context" @@ -12,22 +12,22 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListByServerOperationResponse struct { +type ReplicasListByServerOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Server } -type ListByServerCompleteResult struct { +type ReplicasListByServerCompleteResult struct { LatestHttpResponse *http.Response Items []Server } -type ListByServerCustomPager struct { +type ReplicasListByServerCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByServerCustomPager) NextPageLink() *odata.Link { +func (p *ReplicasListByServerCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -35,15 +35,15 @@ func (p *ListByServerCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByServer ... -func (c ReplicasClient) ListByServer(ctx context.Context, id FlexibleServerId) (result ListByServerOperationResponse, err error) { +// ReplicasListByServer ... +func (c ServersClient) ReplicasListByServer(ctx context.Context, id FlexibleServerId) (result ReplicasListByServerOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListByServerCustomPager{}, + Pager: &ReplicasListByServerCustomPager{}, Path: fmt.Sprintf("%s/replicas", id.ID()), } @@ -74,16 +74,16 @@ func (c ReplicasClient) ListByServer(ctx context.Context, id FlexibleServerId) ( return } -// ListByServerComplete retrieves all the results into a single object -func (c ReplicasClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, ServerOperationPredicate{}) +// ReplicasListByServerComplete retrieves all the results into a single object +func (c ServersClient) ReplicasListByServerComplete(ctx context.Context, id FlexibleServerId) (ReplicasListByServerCompleteResult, error) { + return c.ReplicasListByServerCompleteMatchingPredicate(ctx, id, ServerOperationPredicate{}) } -// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ReplicasClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ServerOperationPredicate) (result ListByServerCompleteResult, err error) { +// ReplicasListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ServersClient) ReplicasListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ServerOperationPredicate) (result ReplicasListByServerCompleteResult, err error) { items := make([]Server, 0) - resp, err := c.ListByServer(ctx, id) + resp, err := c.ReplicasListByServer(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -97,7 +97,7 @@ func (c ReplicasClient) ListByServerCompleteMatchingPredicate(ctx context.Contex } } - result = ListByServerCompleteResult{ + result = ReplicasListByServerCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backuprequestbase.go b/resource-manager/postgresql/2025-08-01/servers/model_backuprequestbase.go similarity index 88% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backuprequestbase.go rename to resource-manager/postgresql/2025-08-01/servers/model_backuprequestbase.go index 4f743c8467a..839e262df62 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backuprequestbase.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_backuprequestbase.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupsettings.go b/resource-manager/postgresql/2025-08-01/servers/model_backupsettings.go similarity index 87% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupsettings.go rename to resource-manager/postgresql/2025-08-01/servers/model_backupsettings.go index 6d900dfef7a..ce9bc4699a0 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupsettings.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_backupsettings.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionrequest.go b/resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionrequest.go similarity index 90% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionrequest.go rename to resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionrequest.go index 2495e7b05bc..1593d90b6f6 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionrequest.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionrequest.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionresponse.go b/resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionresponse.go similarity index 89% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionresponse.go rename to resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionresponse.go index ceeb7e7c813..5e744e602a7 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionresponse.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionresponse.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionresponseproperties.go b/resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionresponseproperties.go similarity index 89% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionresponseproperties.go rename to resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionresponseproperties.go index 1191b44ed20..69b6cb1bc62 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupslongtermretentionresponseproperties.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_backupslongtermretentionresponseproperties.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupstoredetails.go b/resource-manager/postgresql/2025-08-01/servers/model_backupstoredetails.go similarity index 87% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupstoredetails.go rename to resource-manager/postgresql/2025-08-01/servers/model_backupstoredetails.go index 6f83f348f3d..d47fb0f801e 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_backupstoredetails.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_backupstoredetails.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_capability.go b/resource-manager/postgresql/2025-08-01/servers/model_capability.go similarity index 98% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_capability.go rename to resource-manager/postgresql/2025-08-01/servers/model_capability.go index 5a32443b33f..abceff2ec38 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_capability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_capability.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capturedlogs/model_capturedlog.go b/resource-manager/postgresql/2025-08-01/servers/model_capturedlog.go similarity index 96% rename from resource-manager/postgresql/2025-08-01/capturedlogs/model_capturedlog.go rename to resource-manager/postgresql/2025-08-01/servers/model_capturedlog.go index e8e8c8c4c97..bd5b830eded 100644 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/model_capturedlog.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_capturedlog.go @@ -1,4 +1,4 @@ -package capturedlogs +package servers import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" diff --git a/resource-manager/postgresql/2025-08-01/capturedlogs/model_capturedlogproperties.go b/resource-manager/postgresql/2025-08-01/servers/model_capturedlogproperties.go similarity index 98% rename from resource-manager/postgresql/2025-08-01/capturedlogs/model_capturedlogproperties.go rename to resource-manager/postgresql/2025-08-01/servers/model_capturedlogproperties.go index 5f31c6fbd30..92f6f19727e 100644 --- a/resource-manager/postgresql/2025-08-01/capturedlogs/model_capturedlogproperties.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_capturedlogproperties.go @@ -1,4 +1,4 @@ -package capturedlogs +package servers import ( "time" diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_fastprovisioningeditioncapability.go b/resource-manager/postgresql/2025-08-01/servers/model_fastprovisioningeditioncapability.go similarity index 95% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_fastprovisioningeditioncapability.go rename to resource-manager/postgresql/2025-08-01/servers/model_fastprovisioningeditioncapability.go index 34e9ba96ed9..a156e1c0641 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_fastprovisioningeditioncapability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_fastprovisioningeditioncapability.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/servers/model_highavailability.go b/resource-manager/postgresql/2025-08-01/servers/model_highavailability.go index 13e2e472759..d8b2c745ed1 100644 --- a/resource-manager/postgresql/2025-08-01/servers/model_highavailability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_highavailability.go @@ -4,7 +4,7 @@ package servers // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type HighAvailability struct { - Mode *HighAvailabilityMode `json:"mode,omitempty"` - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` - State *HighAvailabilityState `json:"state,omitempty"` + Mode *PostgreSqlFlexibleServerHighAvailabilityMode `json:"mode,omitempty"` + StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` + State *HighAvailabilityState `json:"state,omitempty"` } diff --git a/resource-manager/postgresql/2025-08-01/servers/model_highavailabilityforpatch.go b/resource-manager/postgresql/2025-08-01/servers/model_highavailabilityforpatch.go index 343a9aeea2b..2bc2dca602b 100644 --- a/resource-manager/postgresql/2025-08-01/servers/model_highavailabilityforpatch.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_highavailabilityforpatch.go @@ -4,7 +4,7 @@ package servers // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type HighAvailabilityForPatch struct { - Mode *HighAvailabilityMode `json:"mode,omitempty"` - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` - State *HighAvailabilityState `json:"state,omitempty"` + Mode *PostgreSqlFlexibleServerHighAvailabilityMode `json:"mode,omitempty"` + StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` + State *HighAvailabilityState `json:"state,omitempty"` } diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_ltrbackupoperationresponseproperties.go b/resource-manager/postgresql/2025-08-01/servers/model_ltrbackupoperationresponseproperties.go similarity index 98% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_ltrbackupoperationresponseproperties.go rename to resource-manager/postgresql/2025-08-01/servers/model_ltrbackupoperationresponseproperties.go index 1a2e3917d30..6edd35de293 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_ltrbackupoperationresponseproperties.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_ltrbackupoperationresponseproperties.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers import ( "time" diff --git a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_ltrprebackupresponse.go b/resource-manager/postgresql/2025-08-01/servers/model_ltrprebackupresponse.go similarity index 89% rename from resource-manager/postgresql/2025-08-01/backupslongtermretention/model_ltrprebackupresponse.go rename to resource-manager/postgresql/2025-08-01/servers/model_ltrprebackupresponse.go index 0645590d6ac..123d82e1f27 100644 --- a/resource-manager/postgresql/2025-08-01/backupslongtermretention/model_ltrprebackupresponse.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_ltrprebackupresponse.go @@ -1,4 +1,4 @@ -package backupslongtermretention +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/post/model_migrationnameavailability.go b/resource-manager/postgresql/2025-08-01/servers/model_migrationnameavailability.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/post/model_migrationnameavailability.go rename to resource-manager/postgresql/2025-08-01/servers/model_migrationnameavailability.go index e862e84ea01..7cb98493a68 100644 --- a/resource-manager/postgresql/2025-08-01/post/model_migrationnameavailability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_migrationnameavailability.go @@ -1,4 +1,4 @@ -package post +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_servereditioncapability.go b/resource-manager/postgresql/2025-08-01/servers/model_servereditioncapability.go similarity index 95% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_servereditioncapability.go rename to resource-manager/postgresql/2025-08-01/servers/model_servereditioncapability.go index 20f223dbf87..0e91b6881c4 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_servereditioncapability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_servereditioncapability.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_serverskucapability.go b/resource-manager/postgresql/2025-08-01/servers/model_serverskucapability.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_serverskucapability.go rename to resource-manager/postgresql/2025-08-01/servers/model_serverskucapability.go index 96bfe3d1a0c..10f9171c084 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_serverskucapability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_serverskucapability.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_serverversioncapability.go b/resource-manager/postgresql/2025-08-01/servers/model_serverversioncapability.go similarity index 95% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_serverversioncapability.go rename to resource-manager/postgresql/2025-08-01/servers/model_serverversioncapability.go index b43302b53ba..61624f84406 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_serverversioncapability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_serverversioncapability.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storageeditioncapability.go b/resource-manager/postgresql/2025-08-01/servers/model_storageeditioncapability.go similarity index 94% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storageeditioncapability.go rename to resource-manager/postgresql/2025-08-01/servers/model_storageeditioncapability.go index b51682d80e8..3a9e9957720 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storageeditioncapability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_storageeditioncapability.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storagembcapability.go b/resource-manager/postgresql/2025-08-01/servers/model_storagembcapability.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storagembcapability.go rename to resource-manager/postgresql/2025-08-01/servers/model_storagembcapability.go index f57f5d9d732..28090412d4a 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storagembcapability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_storagembcapability.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storagetiercapability.go b/resource-manager/postgresql/2025-08-01/servers/model_storagetiercapability.go similarity index 92% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storagetiercapability.go rename to resource-manager/postgresql/2025-08-01/servers/model_storagetiercapability.go index 51b618f2b5b..752bdfce74d 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_storagetiercapability.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_storagetiercapability.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_supportedfeature.go b/resource-manager/postgresql/2025-08-01/servers/model_supportedfeature.go similarity index 90% rename from resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_supportedfeature.go rename to resource-manager/postgresql/2025-08-01/servers/model_supportedfeature.go index 547fcddc5b8..75d8ea7b93d 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbylocation/model_supportedfeature.go +++ b/resource-manager/postgresql/2025-08-01/servers/model_supportedfeature.go @@ -1,4 +1,4 @@ -package capabilitiesbylocation +package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/servers/predicates.go b/resource-manager/postgresql/2025-08-01/servers/predicates.go index 8b49f30ccbe..85509bf23db 100644 --- a/resource-manager/postgresql/2025-08-01/servers/predicates.go +++ b/resource-manager/postgresql/2025-08-01/servers/predicates.go @@ -3,6 +3,47 @@ package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type CapabilityOperationPredicate struct { + Name *string + Reason *string +} + +func (p CapabilityOperationPredicate) Matches(input Capability) bool { + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Reason != nil && (input.Reason == nil || *p.Reason != *input.Reason) { + return false + } + + return true +} + +type CapturedLogOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p CapturedLogOperationPredicate) Matches(input CapturedLog) 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 +} + type ServerOperationPredicate struct { Id *string Location *string diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/README.md b/resource-manager/postgresql/2025-08-01/tuningoptions/README.md deleted file mode 100644 index b543bd670d8..00000000000 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/tuningoptions` Documentation - -The `tuningoptions` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/tuningoptions" -``` - - -### Client Initialization - -```go -client := tuningoptions.NewTuningOptionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `TuningOptionsClient.Get` - -```go -ctx := context.TODO() -id := tuningoptions.NewTuningOptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "index") - -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: `TuningOptionsClient.ListByServer` - -```go -ctx := context.TODO() -id := tuningoptions.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - -// alternatively `client.ListByServer(ctx, id)` can be used to do batched pagination -items, err := client.ListByServerComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `TuningOptionsClient.ListRecommendations` - -```go -ctx := context.TODO() -id := tuningoptions.NewTuningOptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "index") - -// alternatively `client.ListRecommendations(ctx, id, tuningoptions.DefaultListRecommendationsOperationOptions())` can be used to do batched pagination -items, err := client.ListRecommendationsComplete(ctx, id, tuningoptions.DefaultListRecommendationsOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/tuningoptions/id_flexibleserver.go deleted file mode 100644 index dbd02ef0864..00000000000 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/id_flexibleserver.go +++ /dev/null @@ -1,130 +0,0 @@ -package tuningoptions - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -func init() { - recaser.RegisterResourceId(&FlexibleServerId{}) -} - -var _ resourceids.ResourceId = &FlexibleServerId{} - -// FlexibleServerId is a struct representing the Resource ID for a Flexible Server -type FlexibleServerId struct { - SubscriptionId string - ResourceGroupName string - FlexibleServerName string -} - -// NewFlexibleServerID returns a new FlexibleServerId struct -func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { - return FlexibleServerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FlexibleServerName: flexibleServerName, - } -} - -// ParseFlexibleServerID parses 'input' into a FlexibleServerId -func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId -// note: this method should only be used for API response data and not user input -func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { - parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := FlexibleServerId{} - if err = id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { - var ok bool - - if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) - } - - if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) - } - - if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) - } - - return nil -} - -// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID -func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFlexibleServerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Flexible Server ID -func (id FlexibleServerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforPostgreSQL/flexibleServers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID -func (id FlexibleServerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftDBforPostgreSQL", "Microsoft.DBforPostgreSQL", "Microsoft.DBforPostgreSQL"), - resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), - resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), - } -} - -// String returns a human-readable description of this Flexible Server ID -func (id FlexibleServerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), - } - return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/tuningoptions/id_flexibleserver_test.go deleted file mode 100644 index ce97e66c329..00000000000 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/id_flexibleserver_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package tuningoptions - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &FlexibleServerId{} - -func TestNewFlexibleServerID(t *testing.T) { - id := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FlexibleServerName != "flexibleServerName" { - t.Fatalf("Expected %q but got %q for Segment 'FlexibleServerName'", id.FlexibleServerName, "flexibleServerName") - } -} - -func TestFormatFlexibleServerID(t *testing.T) { - actual := NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFlexibleServerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestParseFlexibleServerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlexibleServerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FlexibleServerName: "flexibleServerName", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServerName/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE", - Expected: &FlexibleServerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FlexibleServerName: "fLeXiBlEsErVeRnAmE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.dBfOrPoStGrEsQl/fLeXiBlEsErVeRs/fLeXiBlEsErVeRnAmE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlexibleServerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FlexibleServerName != v.Expected.FlexibleServerName { - t.Fatalf("Expected %q but got %q for FlexibleServerName", v.Expected.FlexibleServerName, actual.FlexibleServerName) - } - - } -} - -func TestSegmentsForFlexibleServerId(t *testing.T) { - segments := FlexibleServerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FlexibleServerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/method_listrecommendations.go b/resource-manager/postgresql/2025-08-01/tuningoptions/method_listrecommendations.go deleted file mode 100644 index 0b2fe0c3896..00000000000 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/method_listrecommendations.go +++ /dev/null @@ -1,134 +0,0 @@ -package tuningoptions - -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 ListRecommendationsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ObjectRecommendation -} - -type ListRecommendationsCompleteResult struct { - LatestHttpResponse *http.Response - Items []ObjectRecommendation -} - -type ListRecommendationsOperationOptions struct { - RecommendationType *RecommendationTypeParameterEnum -} - -func DefaultListRecommendationsOperationOptions() ListRecommendationsOperationOptions { - return ListRecommendationsOperationOptions{} -} - -func (o ListRecommendationsOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListRecommendationsOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - - return &out -} - -func (o ListRecommendationsOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.RecommendationType != nil { - out.Append("recommendationType", fmt.Sprintf("%v", *o.RecommendationType)) - } - return &out -} - -type ListRecommendationsCustomPager struct { - NextLink *odata.Link `json:"nextLink"` -} - -func (p *ListRecommendationsCustomPager) NextPageLink() *odata.Link { - defer func() { - p.NextLink = nil - }() - - return p.NextLink -} - -// ListRecommendations ... -func (c TuningOptionsClient) ListRecommendations(ctx context.Context, id TuningOptionId, options ListRecommendationsOperationOptions) (result ListRecommendationsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - OptionsObject: options, - Pager: &ListRecommendationsCustomPager{}, - Path: fmt.Sprintf("%s/recommendations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ObjectRecommendation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListRecommendationsComplete retrieves all the results into a single object -func (c TuningOptionsClient) ListRecommendationsComplete(ctx context.Context, id TuningOptionId, options ListRecommendationsOperationOptions) (ListRecommendationsCompleteResult, error) { - return c.ListRecommendationsCompleteMatchingPredicate(ctx, id, options, ObjectRecommendationOperationPredicate{}) -} - -// ListRecommendationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c TuningOptionsClient) ListRecommendationsCompleteMatchingPredicate(ctx context.Context, id TuningOptionId, options ListRecommendationsOperationOptions, predicate ObjectRecommendationOperationPredicate) (result ListRecommendationsCompleteResult, err error) { - items := make([]ObjectRecommendation, 0) - - resp, err := c.ListRecommendations(ctx, id, options) - if err != nil { - result.LatestHttpResponse = resp.HttpResponse - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListRecommendationsCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/version.go b/resource-manager/postgresql/2025-08-01/tuningoptions/version.go deleted file mode 100644 index c855823a713..00000000000 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/version.go +++ /dev/null @@ -1,10 +0,0 @@ -package tuningoptions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2025-08-01" - -func userAgent() string { - return "hashicorp/go-azure-sdk/tuningoptions/2025-08-01" -} diff --git a/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/README.md b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/README.md new file mode 100644 index 00000000000..31669dff492 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/README.md @@ -0,0 +1,70 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup` Documentation + +The `tuningoptionsoperationgroup` SDK allows for interaction with Azure Resource Manager `postgresql` (API Version `2025-08-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/postgresql/2025-08-01/tuningoptionsoperationgroup" +``` + + +### Client Initialization + +```go +client := tuningoptionsoperationgroup.NewTuningOptionsOperationGroupClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `TuningOptionsOperationGroupClient.TuningOptionsGet` + +```go +ctx := context.TODO() +id := tuningoptionsoperationgroup.NewTuningOptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "index") + +read, err := client.TuningOptionsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `TuningOptionsOperationGroupClient.TuningOptionsListByServer` + +```go +ctx := context.TODO() +id := tuningoptionsoperationgroup.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.TuningOptionsListByServer(ctx, id)` can be used to do batched pagination +items, err := client.TuningOptionsListByServerComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `TuningOptionsOperationGroupClient.TuningOptionsListRecommendations` + +```go +ctx := context.TODO() +id := tuningoptionsoperationgroup.NewTuningOptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "index") + +// alternatively `client.TuningOptionsListRecommendations(ctx, id, tuningoptionsoperationgroup.DefaultTuningOptionsListRecommendationsOperationOptions())` can be used to do batched pagination +items, err := client.TuningOptionsListRecommendationsComplete(ctx, id, tuningoptionsoperationgroup.DefaultTuningOptionsListRecommendationsOperationOptions()) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/client.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/client.go new file mode 100644 index 00000000000..a9785554da4 --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/client.go @@ -0,0 +1,26 @@ +package tuningoptionsoperationgroup + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "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 TuningOptionsOperationGroupClient struct { + Client *resourcemanager.Client +} + +func NewTuningOptionsOperationGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*TuningOptionsOperationGroupClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "tuningoptionsoperationgroup", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating TuningOptionsOperationGroupClient: %+v", err) + } + + return &TuningOptionsOperationGroupClient{ + Client: client, + }, nil +} diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/constants.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/constants.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/tuningoptions/constants.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/constants.go index e4eec5e2899..eed9dfde137 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/constants.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/constants.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "encoding/json" diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/id_flexibleserver.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_flexibleserver.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/id_flexibleserver.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_flexibleserver.go index fb0c6e5f037..cdfebd9f06f 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/id_flexibleserver.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_flexibleserver.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package tuningoptionsoperationgroup import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/id_flexibleserver_test.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_flexibleserver_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/id_flexibleserver_test.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_flexibleserver_test.go index bdc3d58adcc..a637a874077 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/id_flexibleserver_test.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_flexibleserver_test.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package tuningoptionsoperationgroup import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/id_tuningoption.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_tuningoption.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/tuningoptions/id_tuningoption.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_tuningoption.go index f9952a3378e..03647df072b 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/id_tuningoption.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_tuningoption.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "fmt" diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/id_tuningoption_test.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_tuningoption_test.go similarity index 99% rename from resource-manager/postgresql/2025-08-01/tuningoptions/id_tuningoption_test.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_tuningoption_test.go index 7514c10256a..51116e7ec9b 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/id_tuningoption_test.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/id_tuningoption_test.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "testing" diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/method_get.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionsget.go similarity index 77% rename from resource-manager/postgresql/2025-08-01/tuningoptions/method_get.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionsget.go index 8598e9f6689..02b486fa63b 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/method_get.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionsget.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "context" @@ -11,14 +11,14 @@ import ( // 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 { +type TuningOptionsGetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *Resource } -// Get ... -func (c TuningOptionsClient) Get(ctx context.Context, id TuningOptionId) (result GetOperationResponse, err error) { +// TuningOptionsGet ... +func (c TuningOptionsOperationGroupClient) TuningOptionsGet(ctx context.Context, id TuningOptionId) (result TuningOptionsGetOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/method_listbyserver.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionslistbyserver.go similarity index 53% rename from resource-manager/postgresql/2025-08-01/tuningoptions/method_listbyserver.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionslistbyserver.go index 31f4a65f479..a025133a7fd 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/method_listbyserver.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionslistbyserver.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "context" @@ -12,22 +12,22 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ListByServerOperationResponse struct { +type TuningOptionsListByServerOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Resource } -type ListByServerCompleteResult struct { +type TuningOptionsListByServerCompleteResult struct { LatestHttpResponse *http.Response Items []Resource } -type ListByServerCustomPager struct { +type TuningOptionsListByServerCustomPager struct { NextLink *odata.Link `json:"nextLink"` } -func (p *ListByServerCustomPager) NextPageLink() *odata.Link { +func (p *TuningOptionsListByServerCustomPager) NextPageLink() *odata.Link { defer func() { p.NextLink = nil }() @@ -35,15 +35,15 @@ func (p *ListByServerCustomPager) NextPageLink() *odata.Link { return p.NextLink } -// ListByServer ... -func (c TuningOptionsClient) ListByServer(ctx context.Context, id FlexibleServerId) (result ListByServerOperationResponse, err error) { +// TuningOptionsListByServer ... +func (c TuningOptionsOperationGroupClient) TuningOptionsListByServer(ctx context.Context, id FlexibleServerId) (result TuningOptionsListByServerOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ http.StatusOK, }, HttpMethod: http.MethodGet, - Pager: &ListByServerCustomPager{}, + Pager: &TuningOptionsListByServerCustomPager{}, Path: fmt.Sprintf("%s/tuningOptions", id.ID()), } @@ -74,16 +74,16 @@ func (c TuningOptionsClient) ListByServer(ctx context.Context, id FlexibleServer return } -// ListByServerComplete retrieves all the results into a single object -func (c TuningOptionsClient) ListByServerComplete(ctx context.Context, id FlexibleServerId) (ListByServerCompleteResult, error) { - return c.ListByServerCompleteMatchingPredicate(ctx, id, ResourceOperationPredicate{}) +// TuningOptionsListByServerComplete retrieves all the results into a single object +func (c TuningOptionsOperationGroupClient) TuningOptionsListByServerComplete(ctx context.Context, id FlexibleServerId) (TuningOptionsListByServerCompleteResult, error) { + return c.TuningOptionsListByServerCompleteMatchingPredicate(ctx, id, ResourceOperationPredicate{}) } -// ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c TuningOptionsClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ResourceOperationPredicate) (result ListByServerCompleteResult, err error) { +// TuningOptionsListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c TuningOptionsOperationGroupClient) TuningOptionsListByServerCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ResourceOperationPredicate) (result TuningOptionsListByServerCompleteResult, err error) { items := make([]Resource, 0) - resp, err := c.ListByServer(ctx, id) + resp, err := c.TuningOptionsListByServer(ctx, id) if err != nil { result.LatestHttpResponse = resp.HttpResponse err = fmt.Errorf("loading results: %+v", err) @@ -97,7 +97,7 @@ func (c TuningOptionsClient) ListByServerCompleteMatchingPredicate(ctx context.C } } - result = ListByServerCompleteResult{ + result = TuningOptionsListByServerCompleteResult{ LatestHttpResponse: resp.HttpResponse, Items: items, } diff --git a/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionslistrecommendations.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionslistrecommendations.go new file mode 100644 index 00000000000..bf5990c9dac --- /dev/null +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/method_tuningoptionslistrecommendations.go @@ -0,0 +1,134 @@ +package tuningoptionsoperationgroup + +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 TuningOptionsListRecommendationsOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ObjectRecommendation +} + +type TuningOptionsListRecommendationsCompleteResult struct { + LatestHttpResponse *http.Response + Items []ObjectRecommendation +} + +type TuningOptionsListRecommendationsOperationOptions struct { + RecommendationType *RecommendationTypeParameterEnum +} + +func DefaultTuningOptionsListRecommendationsOperationOptions() TuningOptionsListRecommendationsOperationOptions { + return TuningOptionsListRecommendationsOperationOptions{} +} + +func (o TuningOptionsListRecommendationsOperationOptions) ToHeaders() *client.Headers { + out := client.Headers{} + + return &out +} + +func (o TuningOptionsListRecommendationsOperationOptions) ToOData() *odata.Query { + out := odata.Query{} + + return &out +} + +func (o TuningOptionsListRecommendationsOperationOptions) ToQuery() *client.QueryParams { + out := client.QueryParams{} + if o.RecommendationType != nil { + out.Append("recommendationType", fmt.Sprintf("%v", *o.RecommendationType)) + } + return &out +} + +type TuningOptionsListRecommendationsCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *TuningOptionsListRecommendationsCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// TuningOptionsListRecommendations ... +func (c TuningOptionsOperationGroupClient) TuningOptionsListRecommendations(ctx context.Context, id TuningOptionId, options TuningOptionsListRecommendationsOperationOptions) (result TuningOptionsListRecommendationsOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + OptionsObject: options, + Pager: &TuningOptionsListRecommendationsCustomPager{}, + Path: fmt.Sprintf("%s/recommendations", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ObjectRecommendation `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// TuningOptionsListRecommendationsComplete retrieves all the results into a single object +func (c TuningOptionsOperationGroupClient) TuningOptionsListRecommendationsComplete(ctx context.Context, id TuningOptionId, options TuningOptionsListRecommendationsOperationOptions) (TuningOptionsListRecommendationsCompleteResult, error) { + return c.TuningOptionsListRecommendationsCompleteMatchingPredicate(ctx, id, options, ObjectRecommendationOperationPredicate{}) +} + +// TuningOptionsListRecommendationsCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c TuningOptionsOperationGroupClient) TuningOptionsListRecommendationsCompleteMatchingPredicate(ctx context.Context, id TuningOptionId, options TuningOptionsListRecommendationsOperationOptions, predicate ObjectRecommendationOperationPredicate) (result TuningOptionsListRecommendationsCompleteResult, err error) { + items := make([]ObjectRecommendation, 0) + + resp, err := c.TuningOptionsListRecommendations(ctx, id, options) + if err != nil { + result.LatestHttpResponse = resp.HttpResponse + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = TuningOptionsListRecommendationsCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/model_impactrecord.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_impactrecord.go similarity index 91% rename from resource-manager/postgresql/2025-08-01/tuningoptions/model_impactrecord.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_impactrecord.go index 4ccd9a248f4..11cf29579da 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/model_impactrecord.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_impactrecord.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendation.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendation.go similarity index 95% rename from resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendation.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendation.go index fcc827f7bf4..81985656095 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendation.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendation.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationdetails.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationdetails.go similarity index 94% rename from resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationdetails.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationdetails.go index 4f50a670dc4..8bd086af4d2 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationdetails.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationdetails.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationproperties.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationproperties.go similarity index 98% rename from resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationproperties.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationproperties.go index aa1aa19cf40..ad21ed13645 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationproperties.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationproperties.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "time" diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationpropertiesanalyzedworkload.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationpropertiesanalyzedworkload.go similarity index 97% rename from resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationpropertiesanalyzedworkload.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationpropertiesanalyzedworkload.go index b0d7cc99404..eee2a79c7e7 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationpropertiesanalyzedworkload.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationpropertiesanalyzedworkload.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "time" diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationpropertiesimplementationdetails.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationpropertiesimplementationdetails.go similarity index 89% rename from resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationpropertiesimplementationdetails.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationpropertiesimplementationdetails.go index 2ebd16876c9..5202cd7663b 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/model_objectrecommendationpropertiesimplementationdetails.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_objectrecommendationpropertiesimplementationdetails.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/model_resource.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_resource.go similarity index 93% rename from resource-manager/postgresql/2025-08-01/tuningoptions/model_resource.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_resource.go index bc1bb62c49e..c60818dcd1c 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/model_resource.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/model_resource.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" diff --git a/resource-manager/postgresql/2025-08-01/tuningoptions/predicates.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/predicates.go similarity index 96% rename from resource-manager/postgresql/2025-08-01/tuningoptions/predicates.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/predicates.go index 2e0e037d9a5..78d6779ee76 100644 --- a/resource-manager/postgresql/2025-08-01/tuningoptions/predicates.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/predicates.go @@ -1,4 +1,4 @@ -package tuningoptions +package tuningoptionsoperationgroup // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/version.go b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/version.go similarity index 67% rename from resource-manager/postgresql/2025-08-01/capabilitiesbyserver/version.go rename to resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/version.go index 592bf4cd721..bb72ea1e23a 100644 --- a/resource-manager/postgresql/2025-08-01/capabilitiesbyserver/version.go +++ b/resource-manager/postgresql/2025-08-01/tuningoptionsoperationgroup/version.go @@ -1,4 +1,4 @@ -package capabilitiesbyserver +package tuningoptionsoperationgroup // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. @@ -6,5 +6,5 @@ package capabilitiesbyserver const defaultApiVersion = "2025-08-01" func userAgent() string { - return "hashicorp/go-azure-sdk/capabilitiesbyserver/2025-08-01" + return "hashicorp/go-azure-sdk/tuningoptionsoperationgroup/2025-08-01" } diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectableitems/model_erroradditionalinfo.go b/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectableitems/model_erroradditionalinfo.go deleted file mode 100644 index f35071cbfae..00000000000 --- a/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectableitems/model_erroradditionalinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package backupprotectableitems - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ErrorAdditionalInfo struct { - Info *interface{} `json:"info,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectableitems/model_errordetail.go b/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectableitems/model_errordetail.go index 6a8923d264f..1c3fd85652e 100644 --- a/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectableitems/model_errordetail.go +++ b/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectableitems/model_errordetail.go @@ -4,9 +4,7 @@ package backupprotectableitems // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ErrorDetail struct { - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` - Code *string `json:"code,omitempty"` - Details *[]ErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Recommendations *[]string `json:"recommendations,omitempty"` } diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectioncontainers/model_erroradditionalinfo.go b/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectioncontainers/model_erroradditionalinfo.go deleted file mode 100644 index 6d8100b64e9..00000000000 --- a/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectioncontainers/model_erroradditionalinfo.go +++ /dev/null @@ -1,9 +0,0 @@ -package backupprotectioncontainers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ErrorAdditionalInfo struct { - Info *interface{} `json:"info,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectioncontainers/model_errordetail.go b/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectioncontainers/model_errordetail.go index 01bc67ec3f4..86008b3edcb 100644 --- a/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectioncontainers/model_errordetail.go +++ b/resource-manager/recoveryservicesbackup/2025-02-01/backupprotectioncontainers/model_errordetail.go @@ -4,9 +4,7 @@ package backupprotectioncontainers // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ErrorDetail struct { - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` - Code *string `json:"code,omitempty"` - Details *[]ErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Recommendations *[]string `json:"recommendations,omitempty"` } diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/protecteditems/model_errordetail.go b/resource-manager/recoveryservicesbackup/2025-02-01/protecteditems/model_errordetail.go index cbf15d6fb2c..e3fa04c50a3 100644 --- a/resource-manager/recoveryservicesbackup/2025-02-01/protecteditems/model_errordetail.go +++ b/resource-manager/recoveryservicesbackup/2025-02-01/protecteditems/model_errordetail.go @@ -4,9 +4,7 @@ package protecteditems // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ErrorDetail struct { - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` - Code *string `json:"code,omitempty"` - Details *[]ErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Recommendations *[]string `json:"recommendations,omitempty"` } diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/protectioncontainers/model_errordetail.go b/resource-manager/recoveryservicesbackup/2025-02-01/protectioncontainers/model_errordetail.go index 44feb059e5d..6eac856c404 100644 --- a/resource-manager/recoveryservicesbackup/2025-02-01/protectioncontainers/model_errordetail.go +++ b/resource-manager/recoveryservicesbackup/2025-02-01/protectioncontainers/model_errordetail.go @@ -4,9 +4,7 @@ package protectioncontainers // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ErrorDetail struct { - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` - Code *string `json:"code,omitempty"` - Details *[]ErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Recommendations *[]string `json:"recommendations,omitempty"` } diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/softdeletedcontainers/model_errordetail.go b/resource-manager/recoveryservicesbackup/2025-02-01/softdeletedcontainers/model_errordetail.go index 017103a66c3..b76617c0e57 100644 --- a/resource-manager/recoveryservicesbackup/2025-02-01/softdeletedcontainers/model_errordetail.go +++ b/resource-manager/recoveryservicesbackup/2025-02-01/softdeletedcontainers/model_errordetail.go @@ -4,9 +4,7 @@ package softdeletedcontainers // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ErrorDetail struct { - AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` - Code *string `json:"code,omitempty"` - Details *[]ErrorDetail `json:"details,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Recommendations *[]string `json:"recommendations,omitempty"` } diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/protectioncontainers/model_erroradditionalinfo.go b/resource-manager/recoveryservicesbackup/2025-08-01/operation/model_erroradditionalinfo.go similarity index 90% rename from resource-manager/recoveryservicesbackup/2025-02-01/protectioncontainers/model_erroradditionalinfo.go rename to resource-manager/recoveryservicesbackup/2025-08-01/operation/model_erroradditionalinfo.go index 8e24f9a7b12..9ab2947bdeb 100644 --- a/resource-manager/recoveryservicesbackup/2025-02-01/protectioncontainers/model_erroradditionalinfo.go +++ b/resource-manager/recoveryservicesbackup/2025-08-01/operation/model_erroradditionalinfo.go @@ -1,4 +1,4 @@ -package protectioncontainers +package operation // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. diff --git a/resource-manager/recoveryservicesbackup/2025-08-01/operation/model_errordetail.go b/resource-manager/recoveryservicesbackup/2025-08-01/operation/model_errordetail.go index 2c609c87024..aed79a5ae3b 100644 --- a/resource-manager/recoveryservicesbackup/2025-08-01/operation/model_errordetail.go +++ b/resource-manager/recoveryservicesbackup/2025-08-01/operation/model_errordetail.go @@ -4,7 +4,9 @@ package operation // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ErrorDetail struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Recommendations *[]string `json:"recommendations,omitempty"` + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` } diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/protecteditems/model_erroradditionalinfo.go b/resource-manager/recoveryservicesbackup/2025-08-01/protecteditems/model_erroradditionalinfo.go similarity index 100% rename from resource-manager/recoveryservicesbackup/2025-02-01/protecteditems/model_erroradditionalinfo.go rename to resource-manager/recoveryservicesbackup/2025-08-01/protecteditems/model_erroradditionalinfo.go diff --git a/resource-manager/recoveryservicesbackup/2025-08-01/protecteditems/model_errordetail.go b/resource-manager/recoveryservicesbackup/2025-08-01/protecteditems/model_errordetail.go index e3fa04c50a3..cbf15d6fb2c 100644 --- a/resource-manager/recoveryservicesbackup/2025-08-01/protecteditems/model_errordetail.go +++ b/resource-manager/recoveryservicesbackup/2025-08-01/protecteditems/model_errordetail.go @@ -4,7 +4,9 @@ package protecteditems // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ErrorDetail struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Recommendations *[]string `json:"recommendations,omitempty"` + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` } diff --git a/resource-manager/recoveryservicesbackup/2025-02-01/softdeletedcontainers/model_erroradditionalinfo.go b/resource-manager/recoveryservicesbackup/2025-08-01/softdeletedcontainers/model_erroradditionalinfo.go similarity index 100% rename from resource-manager/recoveryservicesbackup/2025-02-01/softdeletedcontainers/model_erroradditionalinfo.go rename to resource-manager/recoveryservicesbackup/2025-08-01/softdeletedcontainers/model_erroradditionalinfo.go diff --git a/resource-manager/recoveryservicesbackup/2025-08-01/softdeletedcontainers/model_errordetail.go b/resource-manager/recoveryservicesbackup/2025-08-01/softdeletedcontainers/model_errordetail.go index b76617c0e57..017103a66c3 100644 --- a/resource-manager/recoveryservicesbackup/2025-08-01/softdeletedcontainers/model_errordetail.go +++ b/resource-manager/recoveryservicesbackup/2025-08-01/softdeletedcontainers/model_errordetail.go @@ -4,7 +4,9 @@ package softdeletedcontainers // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ErrorDetail struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Recommendations *[]string `json:"recommendations,omitempty"` + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_aaddataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_aaddataconnectorproperties.go index eed0b8838ed..d5c4227265d 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_aaddataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_aaddataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type AADDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_aatpdataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_aatpdataconnectorproperties.go index 5f2791c58d2..4886a4a09b5 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_aatpdataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_aatpdataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type AATPDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_alertsdatatypeofdataconnector.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_alertsdatatypeofdataconnector.go index b61a1a7a196..828c4e8fdcc 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_alertsdatatypeofdataconnector.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_alertsdatatypeofdataconnector.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertsDataTypeOfDataConnector struct { - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` + Alerts DataConnectorDataTypeCommon `json:"alerts"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go index 9d19a2feb9c..f3be18e87d9 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AwsCloudTrailDataConnectorDataTypes struct { - Logs *DataConnectorDataTypeCommon `json:"logs,omitempty"` + Logs DataConnectorDataTypeCommon `json:"logs"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_awscloudtraildataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_awscloudtraildataconnectorproperties.go index 42ac71deeca..c9fe4b9a3e5 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_awscloudtraildataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_awscloudtraildataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AwsCloudTrailDataConnectorProperties struct { - AwsRoleArn *string `json:"awsRoleArn,omitempty"` - DataTypes *AwsCloudTrailDataConnectorDataTypes `json:"dataTypes,omitempty"` + AwsRoleArn *string `json:"awsRoleArn,omitempty"` + DataTypes AwsCloudTrailDataConnectorDataTypes `json:"dataTypes"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_dataconnectordatatypecommon.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_dataconnectordatatypecommon.go index acf362026c4..806cc9a7617 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_dataconnectordatatypecommon.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_dataconnectordatatypecommon.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnectorDataTypeCommon struct { - State *DataTypeState `json:"state,omitempty"` + State DataTypeState `json:"state"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mcasdataconnectordatatypes.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mcasdataconnectordatatypes.go index 95d056b9518..f633e0281ca 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mcasdataconnectordatatypes.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mcasdataconnectordatatypes.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MCASDataConnectorDataTypes struct { - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` + Alerts DataConnectorDataTypeCommon `json:"alerts"` DiscoveryLogs *DataConnectorDataTypeCommon `json:"discoveryLogs,omitempty"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mcasdataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mcasdataconnectorproperties.go index c4145588ffe..0eac613483f 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mcasdataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mcasdataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MCASDataConnectorProperties struct { - DataTypes *MCASDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + DataTypes MCASDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mdatpdataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mdatpdataconnectorproperties.go index b0d40d216ac..bc07670068a 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mdatpdataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mdatpdataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type MDATPDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mstidataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mstidataconnectorproperties.go index 7a463744194..6c3df2d05af 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mstidataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_mstidataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type MSTIDataConnectorProperties struct { DataTypes MSTIDataConnectorDataTypes `json:"dataTypes"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_officedataconnectordatatypes.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_officedataconnectordatatypes.go index 5b562d09575..c0d05c1618a 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_officedataconnectordatatypes.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_officedataconnectordatatypes.go @@ -4,7 +4,7 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OfficeDataConnectorDataTypes struct { - Exchange *DataConnectorDataTypeCommon `json:"exchange,omitempty"` - SharePoint *DataConnectorDataTypeCommon `json:"sharePoint,omitempty"` - Teams *DataConnectorDataTypeCommon `json:"teams,omitempty"` + Exchange DataConnectorDataTypeCommon `json:"exchange"` + SharePoint DataConnectorDataTypeCommon `json:"sharePoint"` + Teams DataConnectorDataTypeCommon `json:"teams"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_officedataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_officedataconnectorproperties.go index bf8da2781c8..a135cc86148 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_officedataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_officedataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OfficeDataConnectorProperties struct { - DataTypes *OfficeDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + DataTypes OfficeDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_premiummdtidataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_premiummdtidataconnectorproperties.go index 05e32be05fd..9ce693c2d4a 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_premiummdtidataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_premiummdtidataconnectorproperties.go @@ -13,7 +13,7 @@ type PremiumMdtiDataConnectorProperties struct { DataTypes PremiumMdtiDataConnectorDataTypes `json:"dataTypes"` LookbackPeriod string `json:"lookbackPeriod"` RequiredSKUsPresent *bool `json:"requiredSKUsPresent,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } func (o *PremiumMdtiDataConnectorProperties) GetLookbackPeriodAsTime() (*time.Time, error) { diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_tidataconnectordatatypes.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_tidataconnectordatatypes.go index be5cade481c..0efba3951c0 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_tidataconnectordatatypes.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_tidataconnectordatatypes.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TIDataConnectorDataTypes struct { - Indicators *DataConnectorDataTypeCommon `json:"indicators,omitempty"` + Indicators DataConnectorDataTypeCommon `json:"indicators"` } diff --git a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_tidataconnectorproperties.go b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_tidataconnectorproperties.go index 4fce93cbd33..4676a657b95 100644 --- a/resource-manager/securityinsights/2024-09-01/dataconnectors/model_tidataconnectorproperties.go +++ b/resource-manager/securityinsights/2024-09-01/dataconnectors/model_tidataconnectorproperties.go @@ -10,9 +10,9 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TIDataConnectorProperties struct { - DataTypes *TIDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` - TipLookbackPeriod *string `json:"tipLookbackPeriod,omitempty"` + DataTypes TIDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` + TipLookbackPeriod *string `json:"tipLookbackPeriod,omitempty"` } func (o *TIDataConnectorProperties) GetTipLookbackPeriodAsTime() (*time.Time, error) { diff --git a/resource-manager/securityinsights/2024-09-01/metadata/model_metadatapatch.go b/resource-manager/securityinsights/2024-09-01/metadata/model_metadatapatch.go index 91227ebf398..05d052ba996 100644 --- a/resource-manager/securityinsights/2024-09-01/metadata/model_metadatapatch.go +++ b/resource-manager/securityinsights/2024-09-01/metadata/model_metadatapatch.go @@ -1,8 +1,17 @@ package metadata +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 MetadataPatch struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` Properties *MetadataPropertiesPatch `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_aaddataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_aaddataconnectorproperties.go index eed0b8838ed..d5c4227265d 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_aaddataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_aaddataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type AADDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_aatpdataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_aatpdataconnectorproperties.go index 5f2791c58d2..4886a4a09b5 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_aatpdataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_aatpdataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type AATPDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_alertsdatatypeofdataconnector.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_alertsdatatypeofdataconnector.go index b61a1a7a196..828c4e8fdcc 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_alertsdatatypeofdataconnector.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_alertsdatatypeofdataconnector.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertsDataTypeOfDataConnector struct { - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` + Alerts DataConnectorDataTypeCommon `json:"alerts"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go index 9d19a2feb9c..f3be18e87d9 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AwsCloudTrailDataConnectorDataTypes struct { - Logs *DataConnectorDataTypeCommon `json:"logs,omitempty"` + Logs DataConnectorDataTypeCommon `json:"logs"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_awscloudtraildataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_awscloudtraildataconnectorproperties.go index 42ac71deeca..c9fe4b9a3e5 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_awscloudtraildataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_awscloudtraildataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AwsCloudTrailDataConnectorProperties struct { - AwsRoleArn *string `json:"awsRoleArn,omitempty"` - DataTypes *AwsCloudTrailDataConnectorDataTypes `json:"dataTypes,omitempty"` + AwsRoleArn *string `json:"awsRoleArn,omitempty"` + DataTypes AwsCloudTrailDataConnectorDataTypes `json:"dataTypes"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_dataconnectordatatypecommon.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_dataconnectordatatypecommon.go index acf362026c4..806cc9a7617 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_dataconnectordatatypecommon.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_dataconnectordatatypecommon.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnectorDataTypeCommon struct { - State *DataTypeState `json:"state,omitempty"` + State DataTypeState `json:"state"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mcasdataconnectordatatypes.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mcasdataconnectordatatypes.go index 95d056b9518..f633e0281ca 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mcasdataconnectordatatypes.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mcasdataconnectordatatypes.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MCASDataConnectorDataTypes struct { - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` + Alerts DataConnectorDataTypeCommon `json:"alerts"` DiscoveryLogs *DataConnectorDataTypeCommon `json:"discoveryLogs,omitempty"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mcasdataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mcasdataconnectorproperties.go index c4145588ffe..0eac613483f 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mcasdataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mcasdataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MCASDataConnectorProperties struct { - DataTypes *MCASDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + DataTypes MCASDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mdatpdataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mdatpdataconnectorproperties.go index b0d40d216ac..bc07670068a 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mdatpdataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mdatpdataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type MDATPDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mstidataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mstidataconnectorproperties.go index 7a463744194..6c3df2d05af 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mstidataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_mstidataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type MSTIDataConnectorProperties struct { DataTypes MSTIDataConnectorDataTypes `json:"dataTypes"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_officedataconnectordatatypes.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_officedataconnectordatatypes.go index 5b562d09575..c0d05c1618a 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_officedataconnectordatatypes.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_officedataconnectordatatypes.go @@ -4,7 +4,7 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OfficeDataConnectorDataTypes struct { - Exchange *DataConnectorDataTypeCommon `json:"exchange,omitempty"` - SharePoint *DataConnectorDataTypeCommon `json:"sharePoint,omitempty"` - Teams *DataConnectorDataTypeCommon `json:"teams,omitempty"` + Exchange DataConnectorDataTypeCommon `json:"exchange"` + SharePoint DataConnectorDataTypeCommon `json:"sharePoint"` + Teams DataConnectorDataTypeCommon `json:"teams"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_officedataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_officedataconnectorproperties.go index bf8da2781c8..a135cc86148 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_officedataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_officedataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OfficeDataConnectorProperties struct { - DataTypes *OfficeDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + DataTypes OfficeDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_premiummdtidataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_premiummdtidataconnectorproperties.go index 05e32be05fd..9ce693c2d4a 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_premiummdtidataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_premiummdtidataconnectorproperties.go @@ -13,7 +13,7 @@ type PremiumMdtiDataConnectorProperties struct { DataTypes PremiumMdtiDataConnectorDataTypes `json:"dataTypes"` LookbackPeriod string `json:"lookbackPeriod"` RequiredSKUsPresent *bool `json:"requiredSKUsPresent,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } func (o *PremiumMdtiDataConnectorProperties) GetLookbackPeriodAsTime() (*time.Time, error) { diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_tidataconnectordatatypes.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_tidataconnectordatatypes.go index be5cade481c..0efba3951c0 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_tidataconnectordatatypes.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_tidataconnectordatatypes.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TIDataConnectorDataTypes struct { - Indicators *DataConnectorDataTypeCommon `json:"indicators,omitempty"` + Indicators DataConnectorDataTypeCommon `json:"indicators"` } diff --git a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_tidataconnectorproperties.go b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_tidataconnectorproperties.go index 4fce93cbd33..4676a657b95 100644 --- a/resource-manager/securityinsights/2025-06-01/dataconnectors/model_tidataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-06-01/dataconnectors/model_tidataconnectorproperties.go @@ -10,9 +10,9 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TIDataConnectorProperties struct { - DataTypes *TIDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` - TipLookbackPeriod *string `json:"tipLookbackPeriod,omitempty"` + DataTypes TIDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` + TipLookbackPeriod *string `json:"tipLookbackPeriod,omitempty"` } func (o *TIDataConnectorProperties) GetTipLookbackPeriodAsTime() (*time.Time, error) { diff --git a/resource-manager/securityinsights/2025-06-01/metadata/model_metadatapatch.go b/resource-manager/securityinsights/2025-06-01/metadata/model_metadatapatch.go index 91227ebf398..05d052ba996 100644 --- a/resource-manager/securityinsights/2025-06-01/metadata/model_metadatapatch.go +++ b/resource-manager/securityinsights/2025-06-01/metadata/model_metadatapatch.go @@ -1,8 +1,17 @@ package metadata +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 MetadataPatch struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` Properties *MetadataPropertiesPatch `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_aaddataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_aaddataconnectorproperties.go index eed0b8838ed..d5c4227265d 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_aaddataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_aaddataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type AADDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_aatpdataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_aatpdataconnectorproperties.go index 5f2791c58d2..4886a4a09b5 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_aatpdataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_aatpdataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type AATPDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_alertsdatatypeofdataconnector.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_alertsdatatypeofdataconnector.go index b61a1a7a196..828c4e8fdcc 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_alertsdatatypeofdataconnector.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_alertsdatatypeofdataconnector.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AlertsDataTypeOfDataConnector struct { - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` + Alerts DataConnectorDataTypeCommon `json:"alerts"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go index 9d19a2feb9c..f3be18e87d9 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_awscloudtraildataconnectordatatypes.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AwsCloudTrailDataConnectorDataTypes struct { - Logs *DataConnectorDataTypeCommon `json:"logs,omitempty"` + Logs DataConnectorDataTypeCommon `json:"logs"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_awscloudtraildataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_awscloudtraildataconnectorproperties.go index 42ac71deeca..c9fe4b9a3e5 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_awscloudtraildataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_awscloudtraildataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AwsCloudTrailDataConnectorProperties struct { - AwsRoleArn *string `json:"awsRoleArn,omitempty"` - DataTypes *AwsCloudTrailDataConnectorDataTypes `json:"dataTypes,omitempty"` + AwsRoleArn *string `json:"awsRoleArn,omitempty"` + DataTypes AwsCloudTrailDataConnectorDataTypes `json:"dataTypes"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_dataconnectordatatypecommon.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_dataconnectordatatypecommon.go index acf362026c4..806cc9a7617 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_dataconnectordatatypecommon.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_dataconnectordatatypecommon.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type DataConnectorDataTypeCommon struct { - State *DataTypeState `json:"state,omitempty"` + State DataTypeState `json:"state"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mcasdataconnectordatatypes.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mcasdataconnectordatatypes.go index 95d056b9518..f633e0281ca 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mcasdataconnectordatatypes.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mcasdataconnectordatatypes.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MCASDataConnectorDataTypes struct { - Alerts *DataConnectorDataTypeCommon `json:"alerts,omitempty"` + Alerts DataConnectorDataTypeCommon `json:"alerts"` DiscoveryLogs *DataConnectorDataTypeCommon `json:"discoveryLogs,omitempty"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mcasdataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mcasdataconnectorproperties.go index c4145588ffe..0eac613483f 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mcasdataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mcasdataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type MCASDataConnectorProperties struct { - DataTypes *MCASDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + DataTypes MCASDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mdatpdataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mdatpdataconnectorproperties.go index b0d40d216ac..bc07670068a 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mdatpdataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mdatpdataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type MDATPDataConnectorProperties struct { DataTypes *AlertsDataTypeOfDataConnector `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mstidataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mstidataconnectorproperties.go index 7a463744194..6c3df2d05af 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mstidataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_mstidataconnectorproperties.go @@ -5,5 +5,5 @@ package dataconnectors type MSTIDataConnectorProperties struct { DataTypes MSTIDataConnectorDataTypes `json:"dataTypes"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_officedataconnectordatatypes.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_officedataconnectordatatypes.go index 5b562d09575..c0d05c1618a 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_officedataconnectordatatypes.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_officedataconnectordatatypes.go @@ -4,7 +4,7 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OfficeDataConnectorDataTypes struct { - Exchange *DataConnectorDataTypeCommon `json:"exchange,omitempty"` - SharePoint *DataConnectorDataTypeCommon `json:"sharePoint,omitempty"` - Teams *DataConnectorDataTypeCommon `json:"teams,omitempty"` + Exchange DataConnectorDataTypeCommon `json:"exchange"` + SharePoint DataConnectorDataTypeCommon `json:"sharePoint"` + Teams DataConnectorDataTypeCommon `json:"teams"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_officedataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_officedataconnectorproperties.go index bf8da2781c8..a135cc86148 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_officedataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_officedataconnectorproperties.go @@ -4,6 +4,6 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type OfficeDataConnectorProperties struct { - DataTypes *OfficeDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + DataTypes OfficeDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_premiummdtidataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_premiummdtidataconnectorproperties.go index 05e32be05fd..9ce693c2d4a 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_premiummdtidataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_premiummdtidataconnectorproperties.go @@ -13,7 +13,7 @@ type PremiumMdtiDataConnectorProperties struct { DataTypes PremiumMdtiDataConnectorDataTypes `json:"dataTypes"` LookbackPeriod string `json:"lookbackPeriod"` RequiredSKUsPresent *bool `json:"requiredSKUsPresent,omitempty"` - TenantId *string `json:"tenantId,omitempty"` + TenantId string `json:"tenantId"` } func (o *PremiumMdtiDataConnectorProperties) GetLookbackPeriodAsTime() (*time.Time, error) { diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_tidataconnectordatatypes.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_tidataconnectordatatypes.go index be5cade481c..0efba3951c0 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_tidataconnectordatatypes.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_tidataconnectordatatypes.go @@ -4,5 +4,5 @@ package dataconnectors // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TIDataConnectorDataTypes struct { - Indicators *DataConnectorDataTypeCommon `json:"indicators,omitempty"` + Indicators DataConnectorDataTypeCommon `json:"indicators"` } diff --git a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_tidataconnectorproperties.go b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_tidataconnectorproperties.go index 4fce93cbd33..4676a657b95 100644 --- a/resource-manager/securityinsights/2025-09-01/dataconnectors/model_tidataconnectorproperties.go +++ b/resource-manager/securityinsights/2025-09-01/dataconnectors/model_tidataconnectorproperties.go @@ -10,9 +10,9 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type TIDataConnectorProperties struct { - DataTypes *TIDataConnectorDataTypes `json:"dataTypes,omitempty"` - TenantId *string `json:"tenantId,omitempty"` - TipLookbackPeriod *string `json:"tipLookbackPeriod,omitempty"` + DataTypes TIDataConnectorDataTypes `json:"dataTypes"` + TenantId string `json:"tenantId"` + TipLookbackPeriod *string `json:"tipLookbackPeriod,omitempty"` } func (o *TIDataConnectorProperties) GetTipLookbackPeriodAsTime() (*time.Time, error) { diff --git a/resource-manager/securityinsights/2025-09-01/metadata/model_metadatapatch.go b/resource-manager/securityinsights/2025-09-01/metadata/model_metadatapatch.go index 91227ebf398..05d052ba996 100644 --- a/resource-manager/securityinsights/2025-09-01/metadata/model_metadatapatch.go +++ b/resource-manager/securityinsights/2025-09-01/metadata/model_metadatapatch.go @@ -1,8 +1,17 @@ package metadata +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 MetadataPatch struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` Properties *MetadataPropertiesPatch `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` } diff --git a/resource-manager/synapse/2021-06-01/sqlpools/README.md b/resource-manager/synapse/2021-06-01/sqlpools/README.md index f5f96f2ac27..debedbaa250 100644 --- a/resource-manager/synapse/2021-06-01/sqlpools/README.md +++ b/resource-manager/synapse/2021-06-01/sqlpools/README.md @@ -106,43 +106,6 @@ if err := client.ResumeThenPoll(ctx, id); err != nil { ``` -### Example Usage: `SqlPoolsClient.SqlPoolMetadataSyncConfigsCreate` - -```go -ctx := context.TODO() -id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "sqlPoolName") - -payload := sqlpools.MetadataSyncConfig{ - // ... -} - - -read, err := client.SqlPoolMetadataSyncConfigsCreate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SqlPoolsClient.SqlPoolMetadataSyncConfigsGet` - -```go -ctx := context.TODO() -id := sqlpools.NewSqlPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "sqlPoolName") - -read, err := client.SqlPoolMetadataSyncConfigsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - ### Example Usage: `SqlPoolsClient.Update` ```go diff --git a/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigscreate.go b/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigscreate.go deleted file mode 100644 index aae39903246..00000000000 --- a/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigscreate.go +++ /dev/null @@ -1,58 +0,0 @@ -package sqlpools - -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 SqlPoolMetadataSyncConfigsCreateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *MetadataSyncConfig -} - -// SqlPoolMetadataSyncConfigsCreate ... -func (c SqlPoolsClient) SqlPoolMetadataSyncConfigsCreate(ctx context.Context, id SqlPoolId, input MetadataSyncConfig) (result SqlPoolMetadataSyncConfigsCreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: fmt.Sprintf("%s/metadataSync/config", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - 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 model MetadataSyncConfig - result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigsget.go b/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigsget.go deleted file mode 100644 index 2a283bce81b..00000000000 --- a/resource-manager/synapse/2021-06-01/sqlpools/method_sqlpoolmetadatasyncconfigsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package sqlpools - -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 SqlPoolMetadataSyncConfigsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *MetadataSyncConfig -} - -// SqlPoolMetadataSyncConfigsGet ... -func (c SqlPoolsClient) SqlPoolMetadataSyncConfigsGet(ctx context.Context, id SqlPoolId) (result SqlPoolMetadataSyncConfigsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/metadataSync/config", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - 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 model MetadataSyncConfig - result.Model = &model - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/synapse/2021-06-01/sqlpools/model_metadatasyncconfig.go b/resource-manager/synapse/2021-06-01/sqlpools/model_metadatasyncconfig.go deleted file mode 100644 index f1da8adff30..00000000000 --- a/resource-manager/synapse/2021-06-01/sqlpools/model_metadatasyncconfig.go +++ /dev/null @@ -1,11 +0,0 @@ -package sqlpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MetadataSyncConfig struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *MetadataSyncConfigProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/synapse/2021-06-01/sqlpools/model_metadatasyncconfigproperties.go b/resource-manager/synapse/2021-06-01/sqlpools/model_metadatasyncconfigproperties.go deleted file mode 100644 index 990622a3fe1..00000000000 --- a/resource-manager/synapse/2021-06-01/sqlpools/model_metadatasyncconfigproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package sqlpools - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MetadataSyncConfigProperties struct { - Enabled *bool `json:"enabled,omitempty"` - SyncIntervalInMinutes *int64 `json:"syncIntervalInMinutes,omitempty"` -}