From c6afe513c4492d7bdfd3e793a19508cc4adb0c38 Mon Sep 17 00:00:00 2001 From: hc-github-team-tf-azure <> Date: Mon, 24 Jun 2024 11:02:28 +0000 Subject: [PATCH] Updating based on 2ec8bef6 --- .../hdinsight/2024-05-01/client.go | 28 - .../hdinsight/2024-05-01/hdinsights/README.md | 505 ------ .../hdinsight/2024-05-01/hdinsights/client.go | 26 - .../2024-05-01/hdinsights/constants.go | 1471 ----------------- .../2024-05-01/hdinsights/id_cluster.go | 139 -- .../2024-05-01/hdinsights/id_cluster_test.go | 327 ---- .../2024-05-01/hdinsights/id_clusterpool.go | 130 -- .../hdinsights/id_clusterpool_test.go | 282 ---- .../2024-05-01/hdinsights/id_location.go | 121 -- .../2024-05-01/hdinsights/id_location_test.go | 237 --- ...ilableclusterpoolversionslistbylocation.go | 92 -- ..._availableclusterversionslistbylocation.go | 92 -- .../method_clusteravailableupgradeslist.go | 92 -- .../hdinsights/method_clusterjobslist.go | 120 -- .../hdinsights/method_clusterjobsrunjob.go | 75 - .../hdinsights/method_clusterlibrarieslist.go | 120 -- .../method_clusterlibrariesmanagelibraries.go | 73 - ...method_clusterpoolavailableupgradeslist.go | 92 -- .../method_clusterpoolscreateorupdate.go | 75 - .../hdinsights/method_clusterpoolsdelete.go | 71 - .../hdinsights/method_clusterpoolsget.go | 54 - .../method_clusterpoolslistbyresourcegroup.go | 93 -- .../method_clusterpoolslistbysubscription.go | 93 -- .../method_clusterpoolsupdatetags.go | 75 - .../hdinsights/method_clusterpoolsupgrade.go | 75 - .../method_clusterpoolupgradehistorieslist.go | 92 -- .../hdinsights/method_clusterscreate.go | 75 - .../hdinsights/method_clustersdelete.go | 71 - .../hdinsights/method_clustersget.go | 54 - .../method_clustersgetinstanceview.go | 55 - .../method_clusterslistbyclusterpoolname.go | 92 -- .../method_clusterslistinstanceviews.go | 92 -- .../method_clusterslistserviceconfigs.go | 92 -- .../hdinsights/method_clustersresize.go | 75 - .../hdinsights/method_clustersupdate.go | 75 - .../hdinsights/method_clustersupgrade.go | 75 - .../method_clustersupgrademanualrollback.go | 75 - .../method_clusterupgradehistorieslist.go | 92 -- .../method_locationschecknameavailability.go | 59 - .../hdinsights/model_aksclusterprofile.go | 10 - .../hdinsights/model_authorizationprofile.go | 9 - .../hdinsights/model_autoscaleprofile.go | 12 - .../hdinsights/model_catalogoptions.go | 8 - .../2024-05-01/hdinsights/model_cluster.go | 18 - .../hdinsights/model_clusteraccessprofile.go | 9 - ...clusterakspatchupgradehistoryproperties.go | 44 - ...clusterakspatchversionupgradeproperties.go | 40 - .../model_clusteravailableupgrade.go | 48 - ...ailableupgradeakspatchupgradeproperties.go | 43 - ...availableupgradehotfixupgradeproperties.go | 51 - ...bleupgradepatchversionupgradeproperties.go | 51 - ...model_clusteravailableupgradeproperties.go | 69 - ...odel_clustercomponentscomponentsinlined.go | 9 - .../hdinsights/model_clusterconfigfile.go | 12 - ...l_clusterhotfixupgradehistoryproperties.go | 50 - .../model_clusterhotfixupgradeproperties.go | 44 - ...rhotfixupgraderollbackhistoryproperties.go | 50 - .../model_clusterinstanceviewproperties.go | 9 - .../model_clusterinstanceviewresult.go | 9 - .../model_clusterinstanceviewstatus.go | 10 - .../2024-05-01/hdinsights/model_clusterjob.go | 48 - .../hdinsights/model_clusterjobproperties.go | 53 - .../hdinsights/model_clusterlibrary.go | 48 - ...model_clusterlibrarymanagementoperation.go | 16 - ...terlibrarymanagementoperationproperties.go | 9 - .../model_clusterlibraryproperties.go | 61 - ...odel_clusterloganalyticsapplicationlogs.go | 9 - .../model_clusterloganalyticsprofile.go | 10 - .../hdinsights/model_clusterpatch.go | 9 - .../model_clusterpatchproperties.go | 8 - ...terpatchversionupgradehistoryproperties.go | 50 - ...el_clusterpatchversionupgradeproperties.go | 44 - ...versionupgraderollbackhistoryproperties.go | 50 - .../hdinsights/model_clusterpool.go | 18 - ...terpoolakspatchupgradehistoryproperties.go | 46 - ...terpoolakspatchversionupgradeproperties.go | 43 - .../model_clusterpoolavailableupgrade.go | 48 - ...ailableupgradeakspatchupgradeproperties.go | 43 - ...availableupgradenodeosupgradeproperties.go | 41 - ...l_clusterpoolavailableupgradeproperties.go | 61 - .../model_clusterpoolcomputeprofile.go | 14 - .../model_clusterpoolloganalyticsprofile.go | 9 - .../model_clusterpoolnetworkprofile.go | 11 - ..._clusterpoolnodeosimageupdateproperties.go | 40 - ...usterpoolnodeosupgradehistoryproperties.go | 43 - .../hdinsights/model_clusterpoolprofile.go | 8 - .../model_clusterpoolresourceproperties.go | 17 - .../hdinsights/model_clusterpoolupgrade.go | 32 - .../model_clusterpoolupgradehistory.go | 48 - ...del_clusterpoolupgradehistoryproperties.go | 61 - .../model_clusterpoolupgradeproperties.go | 61 - .../hdinsights/model_clusterpoolversion.go | 16 - .../model_clusterpoolversionproperties.go | 10 - .../hdinsights/model_clusterprofile.go | 30 - .../model_clusterprometheusprofile.go | 8 - .../model_clusterrangerpluginprofile.go | 8 - .../hdinsights/model_clusterresizedata.go | 18 - .../model_clusterresizeproperties.go | 8 - .../model_clusterresourceproperties.go | 13 - .../hdinsights/model_clusterserviceconfig.go | 9 - .../model_clusterserviceconfigsprofile.go | 9 - .../hdinsights/model_clusterupgrade.go | 32 - .../hdinsights/model_clusterupgradehistory.go | 48 - .../model_clusterupgradehistoryproperties.go | 85 - .../model_clusterupgradeproperties.go | 69 - .../model_clusterupgraderollback.go | 8 - .../model_clusterupgraderollbackproperties.go | 8 - .../hdinsights/model_clusterversion.go | 16 - .../model_clusterversionproperties.go | 13 - .../hdinsights/model_comparisonrule.go | 9 - .../hdinsights/model_computeprofile.go | 13 - .../model_computeresourcedefinition.go | 9 - .../hdinsights/model_connectivityprofile.go | 9 - .../hdinsights/model_diskstorageprofile.go | 9 - .../hdinsights/model_flinkcatalogoptions.go | 8 - .../model_flinkhivecatalogoption.go | 11 - .../hdinsights/model_flinkjobprofile.go | 13 - .../hdinsights/model_flinkjobproperties.go | 54 - .../hdinsights/model_flinkprofile.go | 15 - .../hdinsights/model_flinkstorageprofile.go | 9 - .../hdinsights/model_hivecatalogoption.go | 13 - .../hdinsights/model_identityprofile.go | 10 - .../model_kafkaconnectivityendpoints.go | 9 - .../hdinsights/model_kafkaprofile.go | 12 - .../hdinsights/model_loadbasedconfig.go | 12 - .../model_managedidentityprofile.go | 8 - .../hdinsights/model_managedidentityspec.go | 11 - .../model_mavenlibraryproperties.go | 62 - .../model_nameavailabilityparameters.go | 9 - .../model_nameavailabilityresult.go | 10 - .../hdinsights/model_nodeprofile.go | 10 - .../hdinsights/model_pypilibraryproperties.go | 61 - .../hdinsights/model_rangeradminspec.go | 9 - .../model_rangeradminspecdatabase.go | 11 - .../hdinsights/model_rangerauditspec.go | 8 - .../hdinsights/model_rangerprofile.go | 10 - .../hdinsights/model_rangerusersyncspec.go | 12 - .../hdinsights/model_scalingrule.go | 11 - .../2024-05-01/hdinsights/model_schedule.go | 11 - .../hdinsights/model_schedulebasedconfig.go | 10 - .../hdinsights/model_scriptactionprofile.go | 14 - .../hdinsights/model_secretreference.go | 11 - .../hdinsights/model_secretsprofile.go | 9 - ...model_serviceconfiglistresultproperties.go | 15 - ...odel_serviceconfiglistresultvalueentity.go | 9 - .../hdinsights/model_serviceconfigresult.go | 8 - .../hdinsights/model_servicestatus.go | 10 - .../hdinsights/model_sparkmetastorespec.go | 14 - .../hdinsights/model_sparkprofile.go | 10 - .../hdinsights/model_sparkuserplugin.go | 8 - .../hdinsights/model_sparkuserplugins.go | 8 - .../model_sshconnectivityendpoint.go | 9 - .../2024-05-01/hdinsights/model_sshprofile.go | 10 - .../2024-05-01/hdinsights/model_tagsobject.go | 8 - .../hdinsights/model_trinocoordinator.go | 9 - .../hdinsights/model_trinodebugconfig.go | 10 - .../hdinsights/model_trinoprofile.go | 12 - .../hdinsights/model_trinotelemetryconfig.go | 11 - .../hdinsights/model_trinouserplugin.go | 10 - .../hdinsights/model_trinouserplugins.go | 8 - .../hdinsights/model_trinousertelemetry.go | 8 - .../hdinsights/model_trinoworker.go | 8 - .../model_updatableclusterprofile.go | 18 - .../model_webconnectivityendpoint.go | 9 - .../2024-05-01/hdinsights/predicates.go | 265 --- .../2024-05-01/hdinsights/version.go | 12 - 166 files changed, 8695 deletions(-) delete mode 100644 resource-manager/hdinsight/2024-05-01/client.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/README.md delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/client.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/constants.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/id_cluster.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/id_cluster_test.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/id_clusterpool.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/id_clusterpool_test.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/id_location.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/id_location_test.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_availableclusterpoolversionslistbylocation.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_availableclusterversionslistbylocation.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusteravailableupgradeslist.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterjobslist.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterjobsrunjob.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterlibrarieslist.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterlibrariesmanagelibraries.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolavailableupgradeslist.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolscreateorupdate.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsdelete.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsget.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolslistbyresourcegroup.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolslistbysubscription.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsupdatetags.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsupgrade.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolupgradehistorieslist.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterscreate.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersdelete.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersget.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersgetinstanceview.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistbyclusterpoolname.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistinstanceviews.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistserviceconfigs.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersresize.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupdate.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupgrade.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupgrademanualrollback.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterupgradehistorieslist.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/method_locationschecknameavailability.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_aksclusterprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_authorizationprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_autoscaleprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_catalogoptions.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_cluster.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteraccessprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterakspatchupgradehistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterakspatchversionupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgrade.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradeakspatchupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradehotfixupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradepatchversionupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clustercomponentscomponentsinlined.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterconfigfile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgradehistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgraderollbackhistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewresult.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewstatus.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterjob.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterjobproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrary.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrarymanagementoperation.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrarymanagementoperationproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibraryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterloganalyticsapplicationlogs.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterloganalyticsprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatch.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgradehistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgraderollbackhistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpool.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolakspatchupgradehistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolakspatchversionupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgrade.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradeakspatchupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradenodeosupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolcomputeprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolloganalyticsprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnetworkprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnodeosimageupdateproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnodeosupgradehistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolresourceproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgrade.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradehistory.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradehistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolversion.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolversionproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterprometheusprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterrangerpluginprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresizedata.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresizeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresourceproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterserviceconfig.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterserviceconfigsprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgrade.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradehistory.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradehistoryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradeproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgraderollback.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgraderollbackproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterversion.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterversionproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_comparisonrule.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_computeprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_computeresourcedefinition.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_connectivityprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_diskstorageprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkcatalogoptions.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkhivecatalogoption.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkjobprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkjobproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkstorageprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_hivecatalogoption.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_identityprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_kafkaconnectivityendpoints.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_kafkaprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_loadbasedconfig.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_managedidentityprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_managedidentityspec.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_mavenlibraryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_nameavailabilityparameters.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_nameavailabilityresult.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_nodeprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_pypilibraryproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_rangeradminspec.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_rangeradminspecdatabase.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerauditspec.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerusersyncspec.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_scalingrule.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_schedule.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_schedulebasedconfig.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_scriptactionprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_secretreference.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_secretsprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfiglistresultproperties.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfiglistresultvalueentity.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfigresult.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_servicestatus.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkmetastorespec.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkuserplugin.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkuserplugins.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_sshconnectivityendpoint.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_sshprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_tagsobject.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_trinocoordinator.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_trinodebugconfig.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_trinoprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_trinotelemetryconfig.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_trinouserplugin.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_trinouserplugins.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_trinousertelemetry.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_trinoworker.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_updatableclusterprofile.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/model_webconnectivityendpoint.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/predicates.go delete mode 100644 resource-manager/hdinsight/2024-05-01/hdinsights/version.go diff --git a/resource-manager/hdinsight/2024-05-01/client.go b/resource-manager/hdinsight/2024-05-01/client.go deleted file mode 100644 index 792f4bf0839..00000000000 --- a/resource-manager/hdinsight/2024-05-01/client.go +++ /dev/null @@ -1,28 +0,0 @@ -package v2024_05_01 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2024-05-01/hdinsights" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - Hdinsights *hdinsights.HdinsightsClient -} - -func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - hdinsightsClient, err := hdinsights.NewHdinsightsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Hdinsights client: %+v", err) - } - configureFunc(hdinsightsClient.Client) - - return &Client{ - Hdinsights: hdinsightsClient, - }, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/README.md b/resource-manager/hdinsight/2024-05-01/hdinsights/README.md deleted file mode 100644 index 789b4af8a96..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/README.md +++ /dev/null @@ -1,505 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2024-05-01/hdinsights` Documentation - -The `hdinsights` SDK allows for interaction with the Azure Resource Manager Service `hdinsight` (API Version `2024-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-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2024-05-01/hdinsights" -``` - - -### Client Initialization - -```go -client := hdinsights.NewHdinsightsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `HdinsightsClient.AvailableClusterPoolVersionsListByLocation` - -```go -ctx := context.TODO() -id := hdinsights.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailableClusterPoolVersionsListByLocation(ctx, id)` can be used to do batched pagination -items, err := client.AvailableClusterPoolVersionsListByLocationComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.AvailableClusterVersionsListByLocation` - -```go -ctx := context.TODO() -id := hdinsights.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailableClusterVersionsListByLocation(ctx, id)` can be used to do batched pagination -items, err := client.AvailableClusterVersionsListByLocationComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClusterAvailableUpgradesList` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -// alternatively `client.ClusterAvailableUpgradesList(ctx, id)` can be used to do batched pagination -items, err := client.ClusterAvailableUpgradesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClusterJobsList` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -// alternatively `client.ClusterJobsList(ctx, id, hdinsights.DefaultClusterJobsListOperationOptions())` can be used to do batched pagination -items, err := client.ClusterJobsListComplete(ctx, id, hdinsights.DefaultClusterJobsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClusterJobsRunJob` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -payload := hdinsights.ClusterJob{ - // ... -} - - -if err := client.ClusterJobsRunJobThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClusterLibrariesList` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -// alternatively `client.ClusterLibrariesList(ctx, id, hdinsights.DefaultClusterLibrariesListOperationOptions())` can be used to do batched pagination -items, err := client.ClusterLibrariesListComplete(ctx, id, hdinsights.DefaultClusterLibrariesListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClusterLibrariesManageLibraries` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -payload := hdinsights.ClusterLibraryManagementOperation{ - // ... -} - - -if err := client.ClusterLibrariesManageLibrariesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolAvailableUpgradesList` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - -// alternatively `client.ClusterPoolAvailableUpgradesList(ctx, id)` can be used to do batched pagination -items, err := client.ClusterPoolAvailableUpgradesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolUpgradeHistoriesList` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - -// alternatively `client.ClusterPoolUpgradeHistoriesList(ctx, id)` can be used to do batched pagination -items, err := client.ClusterPoolUpgradeHistoriesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolsCreateOrUpdate` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - -payload := hdinsights.ClusterPool{ - // ... -} - - -if err := client.ClusterPoolsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolsDelete` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - -if err := client.ClusterPoolsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolsGet` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - -read, err := client.ClusterPoolsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolsListByResourceGroup` - -```go -ctx := context.TODO() -id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ClusterPoolsListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ClusterPoolsListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolsListBySubscription` - -```go -ctx := context.TODO() -id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ClusterPoolsListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ClusterPoolsListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolsUpdateTags` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - -payload := hdinsights.TagsObject{ - // ... -} - - -if err := client.ClusterPoolsUpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClusterPoolsUpgrade` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - -payload := hdinsights.ClusterPoolUpgrade{ - // ... -} - - -if err := client.ClusterPoolsUpgradeThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClusterUpgradeHistoriesList` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -// alternatively `client.ClusterUpgradeHistoriesList(ctx, id)` can be used to do batched pagination -items, err := client.ClusterUpgradeHistoriesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClustersCreate` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -payload := hdinsights.Cluster{ - // ... -} - - -if err := client.ClustersCreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClustersDelete` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -if err := client.ClustersDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClustersGet` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -read, err := client.ClustersGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `HdinsightsClient.ClustersGetInstanceView` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -read, err := client.ClustersGetInstanceView(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `HdinsightsClient.ClustersListByClusterPoolName` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - -// alternatively `client.ClustersListByClusterPoolName(ctx, id)` can be used to do batched pagination -items, err := client.ClustersListByClusterPoolNameComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClustersListInstanceViews` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -// alternatively `client.ClustersListInstanceViews(ctx, id)` can be used to do batched pagination -items, err := client.ClustersListInstanceViewsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClustersListServiceConfigs` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -// alternatively `client.ClustersListServiceConfigs(ctx, id)` can be used to do batched pagination -items, err := client.ClustersListServiceConfigsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `HdinsightsClient.ClustersResize` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -payload := hdinsights.ClusterResizeData{ - // ... -} - - -if err := client.ClustersResizeThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClustersUpdate` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -payload := hdinsights.ClusterPatch{ - // ... -} - - -if err := client.ClustersUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClustersUpgrade` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -payload := hdinsights.ClusterUpgrade{ - // ... -} - - -if err := client.ClustersUpgradeThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.ClustersUpgradeManualRollback` - -```go -ctx := context.TODO() -id := hdinsights.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - -payload := hdinsights.ClusterUpgradeRollback{ - // ... -} - - -if err := client.ClustersUpgradeManualRollbackThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `HdinsightsClient.LocationsCheckNameAvailability` - -```go -ctx := context.TODO() -id := hdinsights.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -payload := hdinsights.NameAvailabilityParameters{ - // ... -} - - -read, err := client.LocationsCheckNameAvailability(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/hdinsight/2024-05-01/hdinsights/client.go b/resource-manager/hdinsight/2024-05-01/hdinsights/client.go deleted file mode 100644 index 889d9e08e72..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package hdinsights - -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 HdinsightsClient struct { - Client *resourcemanager.Client -} - -func NewHdinsightsClientWithBaseURI(sdkApi sdkEnv.Api) (*HdinsightsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(sdkApi, "hdinsights", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating HdinsightsClient: %+v", err) - } - - return &HdinsightsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/constants.go b/resource-manager/hdinsight/2024-05-01/hdinsights/constants.go deleted file mode 100644 index 34273c08491..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/constants.go +++ /dev/null @@ -1,1471 +0,0 @@ -package hdinsights - -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 Action string - -const ( - ActionCANCEL Action = "CANCEL" - ActionDELETE Action = "DELETE" - ActionLASTSTATEUPDATE Action = "LAST_STATE_UPDATE" - ActionLISTSAVEPOINT Action = "LIST_SAVEPOINT" - ActionNEW Action = "NEW" - ActionRELAUNCH Action = "RE_LAUNCH" - ActionSAVEPOINT Action = "SAVEPOINT" - ActionSTART Action = "START" - ActionSTATELESSUPDATE Action = "STATELESS_UPDATE" - ActionSTOP Action = "STOP" - ActionUPDATE Action = "UPDATE" -) - -func PossibleValuesForAction() []string { - return []string{ - string(ActionCANCEL), - string(ActionDELETE), - string(ActionLASTSTATEUPDATE), - string(ActionLISTSAVEPOINT), - string(ActionNEW), - string(ActionRELAUNCH), - string(ActionSAVEPOINT), - string(ActionSTART), - string(ActionSTATELESSUPDATE), - string(ActionSTOP), - string(ActionUPDATE), - } -} - -func (s *Action) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAction(input string) (*Action, error) { - vals := map[string]Action{ - "cancel": ActionCANCEL, - "delete": ActionDELETE, - "last_state_update": ActionLASTSTATEUPDATE, - "list_savepoint": ActionLISTSAVEPOINT, - "new": ActionNEW, - "re_launch": ActionRELAUNCH, - "savepoint": ActionSAVEPOINT, - "start": ActionSTART, - "stateless_update": ActionSTATELESSUPDATE, - "stop": ActionSTOP, - "update": ActionUPDATE, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Action(input) - return &out, nil -} - -type AutoscaleType string - -const ( - AutoscaleTypeLoadBased AutoscaleType = "LoadBased" - AutoscaleTypeScheduleBased AutoscaleType = "ScheduleBased" -) - -func PossibleValuesForAutoscaleType() []string { - return []string{ - string(AutoscaleTypeLoadBased), - string(AutoscaleTypeScheduleBased), - } -} - -func (s *AutoscaleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAutoscaleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAutoscaleType(input string) (*AutoscaleType, error) { - vals := map[string]AutoscaleType{ - "loadbased": AutoscaleTypeLoadBased, - "schedulebased": AutoscaleTypeScheduleBased, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AutoscaleType(input) - return &out, nil -} - -type Category string - -const ( - CategoryCustom Category = "custom" - CategoryPredefined Category = "predefined" -) - -func PossibleValuesForCategory() []string { - return []string{ - string(CategoryCustom), - string(CategoryPredefined), - } -} - -func (s *Category) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCategory(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCategory(input string) (*Category, error) { - vals := map[string]Category{ - "custom": CategoryCustom, - "predefined": CategoryPredefined, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Category(input) - return &out, nil -} - -type ClusterAvailableUpgradeType string - -const ( - ClusterAvailableUpgradeTypeAKSPatchUpgrade ClusterAvailableUpgradeType = "AKSPatchUpgrade" - ClusterAvailableUpgradeTypeHotfixUpgrade ClusterAvailableUpgradeType = "HotfixUpgrade" - ClusterAvailableUpgradeTypePatchVersionUpgrade ClusterAvailableUpgradeType = "PatchVersionUpgrade" -) - -func PossibleValuesForClusterAvailableUpgradeType() []string { - return []string{ - string(ClusterAvailableUpgradeTypeAKSPatchUpgrade), - string(ClusterAvailableUpgradeTypeHotfixUpgrade), - string(ClusterAvailableUpgradeTypePatchVersionUpgrade), - } -} - -func (s *ClusterAvailableUpgradeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterAvailableUpgradeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterAvailableUpgradeType(input string) (*ClusterAvailableUpgradeType, error) { - vals := map[string]ClusterAvailableUpgradeType{ - "akspatchupgrade": ClusterAvailableUpgradeTypeAKSPatchUpgrade, - "hotfixupgrade": ClusterAvailableUpgradeTypeHotfixUpgrade, - "patchversionupgrade": ClusterAvailableUpgradeTypePatchVersionUpgrade, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterAvailableUpgradeType(input) - return &out, nil -} - -type ClusterPoolAvailableUpgradeType string - -const ( - ClusterPoolAvailableUpgradeTypeAKSPatchUpgrade ClusterPoolAvailableUpgradeType = "AKSPatchUpgrade" - ClusterPoolAvailableUpgradeTypeNodeOsUpgrade ClusterPoolAvailableUpgradeType = "NodeOsUpgrade" -) - -func PossibleValuesForClusterPoolAvailableUpgradeType() []string { - return []string{ - string(ClusterPoolAvailableUpgradeTypeAKSPatchUpgrade), - string(ClusterPoolAvailableUpgradeTypeNodeOsUpgrade), - } -} - -func (s *ClusterPoolAvailableUpgradeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterPoolAvailableUpgradeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterPoolAvailableUpgradeType(input string) (*ClusterPoolAvailableUpgradeType, error) { - vals := map[string]ClusterPoolAvailableUpgradeType{ - "akspatchupgrade": ClusterPoolAvailableUpgradeTypeAKSPatchUpgrade, - "nodeosupgrade": ClusterPoolAvailableUpgradeTypeNodeOsUpgrade, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterPoolAvailableUpgradeType(input) - return &out, nil -} - -type ClusterPoolUpgradeHistoryType string - -const ( - ClusterPoolUpgradeHistoryTypeAKSPatchUpgrade ClusterPoolUpgradeHistoryType = "AKSPatchUpgrade" - ClusterPoolUpgradeHistoryTypeNodeOsUpgrade ClusterPoolUpgradeHistoryType = "NodeOsUpgrade" -) - -func PossibleValuesForClusterPoolUpgradeHistoryType() []string { - return []string{ - string(ClusterPoolUpgradeHistoryTypeAKSPatchUpgrade), - string(ClusterPoolUpgradeHistoryTypeNodeOsUpgrade), - } -} - -func (s *ClusterPoolUpgradeHistoryType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterPoolUpgradeHistoryType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterPoolUpgradeHistoryType(input string) (*ClusterPoolUpgradeHistoryType, error) { - vals := map[string]ClusterPoolUpgradeHistoryType{ - "akspatchupgrade": ClusterPoolUpgradeHistoryTypeAKSPatchUpgrade, - "nodeosupgrade": ClusterPoolUpgradeHistoryTypeNodeOsUpgrade, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterPoolUpgradeHistoryType(input) - return &out, nil -} - -type ClusterPoolUpgradeHistoryUpgradeResultType string - -const ( - ClusterPoolUpgradeHistoryUpgradeResultTypeFailed ClusterPoolUpgradeHistoryUpgradeResultType = "Failed" - ClusterPoolUpgradeHistoryUpgradeResultTypeSucceed ClusterPoolUpgradeHistoryUpgradeResultType = "Succeed" -) - -func PossibleValuesForClusterPoolUpgradeHistoryUpgradeResultType() []string { - return []string{ - string(ClusterPoolUpgradeHistoryUpgradeResultTypeFailed), - string(ClusterPoolUpgradeHistoryUpgradeResultTypeSucceed), - } -} - -func (s *ClusterPoolUpgradeHistoryUpgradeResultType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterPoolUpgradeHistoryUpgradeResultType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterPoolUpgradeHistoryUpgradeResultType(input string) (*ClusterPoolUpgradeHistoryUpgradeResultType, error) { - vals := map[string]ClusterPoolUpgradeHistoryUpgradeResultType{ - "failed": ClusterPoolUpgradeHistoryUpgradeResultTypeFailed, - "succeed": ClusterPoolUpgradeHistoryUpgradeResultTypeSucceed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterPoolUpgradeHistoryUpgradeResultType(input) - return &out, nil -} - -type ClusterPoolUpgradeType string - -const ( - ClusterPoolUpgradeTypeAKSPatchUpgrade ClusterPoolUpgradeType = "AKSPatchUpgrade" - ClusterPoolUpgradeTypeNodeOsUpgrade ClusterPoolUpgradeType = "NodeOsUpgrade" -) - -func PossibleValuesForClusterPoolUpgradeType() []string { - return []string{ - string(ClusterPoolUpgradeTypeAKSPatchUpgrade), - string(ClusterPoolUpgradeTypeNodeOsUpgrade), - } -} - -func (s *ClusterPoolUpgradeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterPoolUpgradeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterPoolUpgradeType(input string) (*ClusterPoolUpgradeType, error) { - vals := map[string]ClusterPoolUpgradeType{ - "akspatchupgrade": ClusterPoolUpgradeTypeAKSPatchUpgrade, - "nodeosupgrade": ClusterPoolUpgradeTypeNodeOsUpgrade, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterPoolUpgradeType(input) - return &out, nil -} - -type ClusterUpgradeHistorySeverityType string - -const ( - ClusterUpgradeHistorySeverityTypeCritical ClusterUpgradeHistorySeverityType = "critical" - ClusterUpgradeHistorySeverityTypeHigh ClusterUpgradeHistorySeverityType = "high" - ClusterUpgradeHistorySeverityTypeLow ClusterUpgradeHistorySeverityType = "low" - ClusterUpgradeHistorySeverityTypeMedium ClusterUpgradeHistorySeverityType = "medium" -) - -func PossibleValuesForClusterUpgradeHistorySeverityType() []string { - return []string{ - string(ClusterUpgradeHistorySeverityTypeCritical), - string(ClusterUpgradeHistorySeverityTypeHigh), - string(ClusterUpgradeHistorySeverityTypeLow), - string(ClusterUpgradeHistorySeverityTypeMedium), - } -} - -func (s *ClusterUpgradeHistorySeverityType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterUpgradeHistorySeverityType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterUpgradeHistorySeverityType(input string) (*ClusterUpgradeHistorySeverityType, error) { - vals := map[string]ClusterUpgradeHistorySeverityType{ - "critical": ClusterUpgradeHistorySeverityTypeCritical, - "high": ClusterUpgradeHistorySeverityTypeHigh, - "low": ClusterUpgradeHistorySeverityTypeLow, - "medium": ClusterUpgradeHistorySeverityTypeMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterUpgradeHistorySeverityType(input) - return &out, nil -} - -type ClusterUpgradeHistoryType string - -const ( - ClusterUpgradeHistoryTypeAKSPatchUpgrade ClusterUpgradeHistoryType = "AKSPatchUpgrade" - ClusterUpgradeHistoryTypeHotfixUpgrade ClusterUpgradeHistoryType = "HotfixUpgrade" - ClusterUpgradeHistoryTypeHotfixUpgradeRollback ClusterUpgradeHistoryType = "HotfixUpgradeRollback" - ClusterUpgradeHistoryTypePatchVersionUpgrade ClusterUpgradeHistoryType = "PatchVersionUpgrade" - ClusterUpgradeHistoryTypePatchVersionUpgradeRollback ClusterUpgradeHistoryType = "PatchVersionUpgradeRollback" -) - -func PossibleValuesForClusterUpgradeHistoryType() []string { - return []string{ - string(ClusterUpgradeHistoryTypeAKSPatchUpgrade), - string(ClusterUpgradeHistoryTypeHotfixUpgrade), - string(ClusterUpgradeHistoryTypeHotfixUpgradeRollback), - string(ClusterUpgradeHistoryTypePatchVersionUpgrade), - string(ClusterUpgradeHistoryTypePatchVersionUpgradeRollback), - } -} - -func (s *ClusterUpgradeHistoryType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterUpgradeHistoryType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterUpgradeHistoryType(input string) (*ClusterUpgradeHistoryType, error) { - vals := map[string]ClusterUpgradeHistoryType{ - "akspatchupgrade": ClusterUpgradeHistoryTypeAKSPatchUpgrade, - "hotfixupgrade": ClusterUpgradeHistoryTypeHotfixUpgrade, - "hotfixupgraderollback": ClusterUpgradeHistoryTypeHotfixUpgradeRollback, - "patchversionupgrade": ClusterUpgradeHistoryTypePatchVersionUpgrade, - "patchversionupgraderollback": ClusterUpgradeHistoryTypePatchVersionUpgradeRollback, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterUpgradeHistoryType(input) - return &out, nil -} - -type ClusterUpgradeHistoryUpgradeResultType string - -const ( - ClusterUpgradeHistoryUpgradeResultTypeFailed ClusterUpgradeHistoryUpgradeResultType = "Failed" - ClusterUpgradeHistoryUpgradeResultTypeSucceed ClusterUpgradeHistoryUpgradeResultType = "Succeed" -) - -func PossibleValuesForClusterUpgradeHistoryUpgradeResultType() []string { - return []string{ - string(ClusterUpgradeHistoryUpgradeResultTypeFailed), - string(ClusterUpgradeHistoryUpgradeResultTypeSucceed), - } -} - -func (s *ClusterUpgradeHistoryUpgradeResultType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterUpgradeHistoryUpgradeResultType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterUpgradeHistoryUpgradeResultType(input string) (*ClusterUpgradeHistoryUpgradeResultType, error) { - vals := map[string]ClusterUpgradeHistoryUpgradeResultType{ - "failed": ClusterUpgradeHistoryUpgradeResultTypeFailed, - "succeed": ClusterUpgradeHistoryUpgradeResultTypeSucceed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterUpgradeHistoryUpgradeResultType(input) - return &out, nil -} - -type ClusterUpgradeType string - -const ( - ClusterUpgradeTypeAKSPatchUpgrade ClusterUpgradeType = "AKSPatchUpgrade" - ClusterUpgradeTypeHotfixUpgrade ClusterUpgradeType = "HotfixUpgrade" - ClusterUpgradeTypePatchVersionUpgrade ClusterUpgradeType = "PatchVersionUpgrade" -) - -func PossibleValuesForClusterUpgradeType() []string { - return []string{ - string(ClusterUpgradeTypeAKSPatchUpgrade), - string(ClusterUpgradeTypeHotfixUpgrade), - string(ClusterUpgradeTypePatchVersionUpgrade), - } -} - -func (s *ClusterUpgradeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseClusterUpgradeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseClusterUpgradeType(input string) (*ClusterUpgradeType, error) { - vals := map[string]ClusterUpgradeType{ - "akspatchupgrade": ClusterUpgradeTypeAKSPatchUpgrade, - "hotfixupgrade": ClusterUpgradeTypeHotfixUpgrade, - "patchversionupgrade": ClusterUpgradeTypePatchVersionUpgrade, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ClusterUpgradeType(input) - return &out, nil -} - -type ComparisonOperator string - -const ( - ComparisonOperatorGreaterThan ComparisonOperator = "greaterThan" - ComparisonOperatorGreaterThanOrEqual ComparisonOperator = "greaterThanOrEqual" - ComparisonOperatorLessThan ComparisonOperator = "lessThan" - ComparisonOperatorLessThanOrEqual ComparisonOperator = "lessThanOrEqual" -) - -func PossibleValuesForComparisonOperator() []string { - return []string{ - string(ComparisonOperatorGreaterThan), - string(ComparisonOperatorGreaterThanOrEqual), - string(ComparisonOperatorLessThan), - string(ComparisonOperatorLessThanOrEqual), - } -} - -func (s *ComparisonOperator) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseComparisonOperator(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseComparisonOperator(input string) (*ComparisonOperator, error) { - vals := map[string]ComparisonOperator{ - "greaterthan": ComparisonOperatorGreaterThan, - "greaterthanorequal": ComparisonOperatorGreaterThanOrEqual, - "lessthan": ComparisonOperatorLessThan, - "lessthanorequal": ComparisonOperatorLessThanOrEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ComparisonOperator(input) - return &out, nil -} - -type ContentEncoding string - -const ( - ContentEncodingBaseSixFour ContentEncoding = "Base64" - ContentEncodingNone ContentEncoding = "None" -) - -func PossibleValuesForContentEncoding() []string { - return []string{ - string(ContentEncodingBaseSixFour), - string(ContentEncodingNone), - } -} - -func (s *ContentEncoding) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseContentEncoding(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseContentEncoding(input string) (*ContentEncoding, error) { - vals := map[string]ContentEncoding{ - "base64": ContentEncodingBaseSixFour, - "none": ContentEncodingNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ContentEncoding(input) - return &out, nil -} - -type CurrentClusterAksVersionStatus string - -const ( - CurrentClusterAksVersionStatusDeprecated CurrentClusterAksVersionStatus = "Deprecated" - CurrentClusterAksVersionStatusSupported CurrentClusterAksVersionStatus = "Supported" -) - -func PossibleValuesForCurrentClusterAksVersionStatus() []string { - return []string{ - string(CurrentClusterAksVersionStatusDeprecated), - string(CurrentClusterAksVersionStatusSupported), - } -} - -func (s *CurrentClusterAksVersionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCurrentClusterAksVersionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCurrentClusterAksVersionStatus(input string) (*CurrentClusterAksVersionStatus, error) { - vals := map[string]CurrentClusterAksVersionStatus{ - "deprecated": CurrentClusterAksVersionStatusDeprecated, - "supported": CurrentClusterAksVersionStatusSupported, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CurrentClusterAksVersionStatus(input) - return &out, nil -} - -type CurrentClusterPoolAksVersionStatus string - -const ( - CurrentClusterPoolAksVersionStatusDeprecated CurrentClusterPoolAksVersionStatus = "Deprecated" - CurrentClusterPoolAksVersionStatusSupported CurrentClusterPoolAksVersionStatus = "Supported" -) - -func PossibleValuesForCurrentClusterPoolAksVersionStatus() []string { - return []string{ - string(CurrentClusterPoolAksVersionStatusDeprecated), - string(CurrentClusterPoolAksVersionStatusSupported), - } -} - -func (s *CurrentClusterPoolAksVersionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCurrentClusterPoolAksVersionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCurrentClusterPoolAksVersionStatus(input string) (*CurrentClusterPoolAksVersionStatus, error) { - vals := map[string]CurrentClusterPoolAksVersionStatus{ - "deprecated": CurrentClusterPoolAksVersionStatusDeprecated, - "supported": CurrentClusterPoolAksVersionStatusSupported, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CurrentClusterPoolAksVersionStatus(input) - return &out, nil -} - -type DataDiskType string - -const ( - DataDiskTypePremiumSSDLRS DataDiskType = "Premium_SSD_LRS" - DataDiskTypePremiumSSDVTwoLRS DataDiskType = "Premium_SSD_v2_LRS" - DataDiskTypePremiumSSDZRS DataDiskType = "Premium_SSD_ZRS" - DataDiskTypeStandardHDDLRS DataDiskType = "Standard_HDD_LRS" - DataDiskTypeStandardSSDLRS DataDiskType = "Standard_SSD_LRS" - DataDiskTypeStandardSSDZRS DataDiskType = "Standard_SSD_ZRS" -) - -func PossibleValuesForDataDiskType() []string { - return []string{ - string(DataDiskTypePremiumSSDLRS), - string(DataDiskTypePremiumSSDVTwoLRS), - string(DataDiskTypePremiumSSDZRS), - string(DataDiskTypeStandardHDDLRS), - string(DataDiskTypeStandardSSDLRS), - string(DataDiskTypeStandardSSDZRS), - } -} - -func (s *DataDiskType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDataDiskType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDataDiskType(input string) (*DataDiskType, error) { - vals := map[string]DataDiskType{ - "premium_ssd_lrs": DataDiskTypePremiumSSDLRS, - "premium_ssd_v2_lrs": DataDiskTypePremiumSSDVTwoLRS, - "premium_ssd_zrs": DataDiskTypePremiumSSDZRS, - "standard_hdd_lrs": DataDiskTypeStandardHDDLRS, - "standard_ssd_lrs": DataDiskTypeStandardSSDLRS, - "standard_ssd_zrs": DataDiskTypeStandardSSDZRS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DataDiskType(input) - return &out, nil -} - -type DbConnectionAuthenticationMode string - -const ( - DbConnectionAuthenticationModeIdentityAuth DbConnectionAuthenticationMode = "IdentityAuth" - DbConnectionAuthenticationModeSqlAuth DbConnectionAuthenticationMode = "SqlAuth" -) - -func PossibleValuesForDbConnectionAuthenticationMode() []string { - return []string{ - string(DbConnectionAuthenticationModeIdentityAuth), - string(DbConnectionAuthenticationModeSqlAuth), - } -} - -func (s *DbConnectionAuthenticationMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDbConnectionAuthenticationMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDbConnectionAuthenticationMode(input string) (*DbConnectionAuthenticationMode, error) { - vals := map[string]DbConnectionAuthenticationMode{ - "identityauth": DbConnectionAuthenticationModeIdentityAuth, - "sqlauth": DbConnectionAuthenticationModeSqlAuth, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DbConnectionAuthenticationMode(input) - return &out, nil -} - -type DeploymentMode string - -const ( - DeploymentModeApplication DeploymentMode = "Application" - DeploymentModeSession DeploymentMode = "Session" -) - -func PossibleValuesForDeploymentMode() []string { - return []string{ - string(DeploymentModeApplication), - string(DeploymentModeSession), - } -} - -func (s *DeploymentMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeploymentMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeploymentMode(input string) (*DeploymentMode, error) { - vals := map[string]DeploymentMode{ - "application": DeploymentModeApplication, - "session": DeploymentModeSession, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeploymentMode(input) - return &out, nil -} - -type JobType string - -const ( - JobTypeFlinkJob JobType = "FlinkJob" -) - -func PossibleValuesForJobType() []string { - return []string{ - string(JobTypeFlinkJob), - } -} - -func (s *JobType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseJobType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseJobType(input string) (*JobType, error) { - vals := map[string]JobType{ - "flinkjob": JobTypeFlinkJob, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := JobType(input) - return &out, nil -} - -type KeyVaultObjectType string - -const ( - KeyVaultObjectTypeCertificate KeyVaultObjectType = "Certificate" - KeyVaultObjectTypeKey KeyVaultObjectType = "Key" - KeyVaultObjectTypeSecret KeyVaultObjectType = "Secret" -) - -func PossibleValuesForKeyVaultObjectType() []string { - return []string{ - string(KeyVaultObjectTypeCertificate), - string(KeyVaultObjectTypeKey), - string(KeyVaultObjectTypeSecret), - } -} - -func (s *KeyVaultObjectType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseKeyVaultObjectType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseKeyVaultObjectType(input string) (*KeyVaultObjectType, error) { - vals := map[string]KeyVaultObjectType{ - "certificate": KeyVaultObjectTypeCertificate, - "key": KeyVaultObjectTypeKey, - "secret": KeyVaultObjectTypeSecret, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := KeyVaultObjectType(input) - return &out, nil -} - -type LibraryManagementAction string - -const ( - LibraryManagementActionInstall LibraryManagementAction = "Install" - LibraryManagementActionUninstall LibraryManagementAction = "Uninstall" -) - -func PossibleValuesForLibraryManagementAction() []string { - return []string{ - string(LibraryManagementActionInstall), - string(LibraryManagementActionUninstall), - } -} - -func (s *LibraryManagementAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLibraryManagementAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLibraryManagementAction(input string) (*LibraryManagementAction, error) { - vals := map[string]LibraryManagementAction{ - "install": LibraryManagementActionInstall, - "uninstall": LibraryManagementActionUninstall, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LibraryManagementAction(input) - return &out, nil -} - -type ManagedIdentityType string - -const ( - ManagedIdentityTypeCluster ManagedIdentityType = "cluster" - ManagedIdentityTypeInternal ManagedIdentityType = "internal" - ManagedIdentityTypeUser ManagedIdentityType = "user" -) - -func PossibleValuesForManagedIdentityType() []string { - return []string{ - string(ManagedIdentityTypeCluster), - string(ManagedIdentityTypeInternal), - string(ManagedIdentityTypeUser), - } -} - -func (s *ManagedIdentityType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedIdentityType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedIdentityType(input string) (*ManagedIdentityType, error) { - vals := map[string]ManagedIdentityType{ - "cluster": ManagedIdentityTypeCluster, - "internal": ManagedIdentityTypeInternal, - "user": ManagedIdentityTypeUser, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedIdentityType(input) - return &out, nil -} - -type MetastoreDbConnectionAuthenticationMode string - -const ( - MetastoreDbConnectionAuthenticationModeIdentityAuth MetastoreDbConnectionAuthenticationMode = "IdentityAuth" - MetastoreDbConnectionAuthenticationModeSqlAuth MetastoreDbConnectionAuthenticationMode = "SqlAuth" -) - -func PossibleValuesForMetastoreDbConnectionAuthenticationMode() []string { - return []string{ - string(MetastoreDbConnectionAuthenticationModeIdentityAuth), - string(MetastoreDbConnectionAuthenticationModeSqlAuth), - } -} - -func (s *MetastoreDbConnectionAuthenticationMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseMetastoreDbConnectionAuthenticationMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseMetastoreDbConnectionAuthenticationMode(input string) (*MetastoreDbConnectionAuthenticationMode, error) { - vals := map[string]MetastoreDbConnectionAuthenticationMode{ - "identityauth": MetastoreDbConnectionAuthenticationModeIdentityAuth, - "sqlauth": MetastoreDbConnectionAuthenticationModeSqlAuth, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := MetastoreDbConnectionAuthenticationMode(input) - return &out, nil -} - -type OutboundType string - -const ( - OutboundTypeLoadBalancer OutboundType = "loadBalancer" - OutboundTypeUserDefinedRouting OutboundType = "userDefinedRouting" -) - -func PossibleValuesForOutboundType() []string { - return []string{ - string(OutboundTypeLoadBalancer), - string(OutboundTypeUserDefinedRouting), - } -} - -func (s *OutboundType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOutboundType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOutboundType(input string) (*OutboundType, error) { - vals := map[string]OutboundType{ - "loadbalancer": OutboundTypeLoadBalancer, - "userdefinedrouting": OutboundTypeUserDefinedRouting, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OutboundType(input) - return &out, nil -} - -type ProvisioningStatus string - -const ( - ProvisioningStatusAccepted ProvisioningStatus = "Accepted" - ProvisioningStatusCanceled ProvisioningStatus = "Canceled" - ProvisioningStatusFailed ProvisioningStatus = "Failed" - ProvisioningStatusSucceeded ProvisioningStatus = "Succeeded" -) - -func PossibleValuesForProvisioningStatus() []string { - return []string{ - string(ProvisioningStatusAccepted), - string(ProvisioningStatusCanceled), - string(ProvisioningStatusFailed), - string(ProvisioningStatusSucceeded), - } -} - -func (s *ProvisioningStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningStatus(input string) (*ProvisioningStatus, error) { - vals := map[string]ProvisioningStatus{ - "accepted": ProvisioningStatusAccepted, - "canceled": ProvisioningStatusCanceled, - "failed": ProvisioningStatusFailed, - "succeeded": ProvisioningStatusSucceeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningStatus(input) - return &out, nil -} - -type RangerUsersyncMode string - -const ( - RangerUsersyncModeAutomatic RangerUsersyncMode = "automatic" - RangerUsersyncModeStatic RangerUsersyncMode = "static" -) - -func PossibleValuesForRangerUsersyncMode() []string { - return []string{ - string(RangerUsersyncModeAutomatic), - string(RangerUsersyncModeStatic), - } -} - -func (s *RangerUsersyncMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRangerUsersyncMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRangerUsersyncMode(input string) (*RangerUsersyncMode, error) { - vals := map[string]RangerUsersyncMode{ - "automatic": RangerUsersyncModeAutomatic, - "static": RangerUsersyncModeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RangerUsersyncMode(input) - return &out, nil -} - -type ScaleActionType string - -const ( - ScaleActionTypeScaledown ScaleActionType = "scaledown" - ScaleActionTypeScaleup ScaleActionType = "scaleup" -) - -func PossibleValuesForScaleActionType() []string { - return []string{ - string(ScaleActionTypeScaledown), - string(ScaleActionTypeScaleup), - } -} - -func (s *ScaleActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScaleActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScaleActionType(input string) (*ScaleActionType, error) { - vals := map[string]ScaleActionType{ - "scaledown": ScaleActionTypeScaledown, - "scaleup": ScaleActionTypeScaleup, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScaleActionType(input) - return &out, nil -} - -type ScheduleDay string - -const ( - ScheduleDayFriday ScheduleDay = "Friday" - ScheduleDayMonday ScheduleDay = "Monday" - ScheduleDaySaturday ScheduleDay = "Saturday" - ScheduleDaySunday ScheduleDay = "Sunday" - ScheduleDayThursday ScheduleDay = "Thursday" - ScheduleDayTuesday ScheduleDay = "Tuesday" - ScheduleDayWednesday ScheduleDay = "Wednesday" -) - -func PossibleValuesForScheduleDay() []string { - return []string{ - string(ScheduleDayFriday), - string(ScheduleDayMonday), - string(ScheduleDaySaturday), - string(ScheduleDaySunday), - string(ScheduleDayThursday), - string(ScheduleDayTuesday), - string(ScheduleDayWednesday), - } -} - -func (s *ScheduleDay) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScheduleDay(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScheduleDay(input string) (*ScheduleDay, error) { - vals := map[string]ScheduleDay{ - "friday": ScheduleDayFriday, - "monday": ScheduleDayMonday, - "saturday": ScheduleDaySaturday, - "sunday": ScheduleDaySunday, - "thursday": ScheduleDayThursday, - "tuesday": ScheduleDayTuesday, - "wednesday": ScheduleDayWednesday, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScheduleDay(input) - return &out, nil -} - -type Severity string - -const ( - SeverityCritical Severity = "critical" - SeverityHigh Severity = "high" - SeverityLow Severity = "low" - SeverityMedium Severity = "medium" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeverityCritical), - string(SeverityHigh), - string(SeverityLow), - string(SeverityMedium), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "critical": SeverityCritical, - "high": SeverityHigh, - "low": SeverityLow, - "medium": SeverityMedium, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} - -type Status string - -const ( - StatusINSTALLED Status = "INSTALLED" - StatusINSTALLFAILED Status = "INSTALL_FAILED" - StatusINSTALLING Status = "INSTALLING" - StatusUNINSTALLFAILED Status = "UNINSTALL_FAILED" - StatusUNINSTALLING Status = "UNINSTALLING" -) - -func PossibleValuesForStatus() []string { - return []string{ - string(StatusINSTALLED), - string(StatusINSTALLFAILED), - string(StatusINSTALLING), - string(StatusUNINSTALLFAILED), - string(StatusUNINSTALLING), - } -} - -func (s *Status) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseStatus(input string) (*Status, error) { - vals := map[string]Status{ - "installed": StatusINSTALLED, - "install_failed": StatusINSTALLFAILED, - "installing": StatusINSTALLING, - "uninstall_failed": StatusUNINSTALLFAILED, - "uninstalling": StatusUNINSTALLING, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Status(input) - return &out, nil -} - -type Type string - -const ( - TypeMaven Type = "maven" - TypePypi Type = "pypi" -) - -func PossibleValuesForType() []string { - return []string{ - string(TypeMaven), - string(TypePypi), - } -} - -func (s *Type) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseType(input string) (*Type, error) { - vals := map[string]Type{ - "maven": TypeMaven, - "pypi": TypePypi, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Type(input) - return &out, nil -} - -type UpgradeMode string - -const ( - UpgradeModeLASTSTATEUPDATE UpgradeMode = "LAST_STATE_UPDATE" - UpgradeModeSTATELESSUPDATE UpgradeMode = "STATELESS_UPDATE" - UpgradeModeUPDATE UpgradeMode = "UPDATE" -) - -func PossibleValuesForUpgradeMode() []string { - return []string{ - string(UpgradeModeLASTSTATEUPDATE), - string(UpgradeModeSTATELESSUPDATE), - string(UpgradeModeUPDATE), - } -} - -func (s *UpgradeMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUpgradeMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUpgradeMode(input string) (*UpgradeMode, error) { - vals := map[string]UpgradeMode{ - "last_state_update": UpgradeModeLASTSTATEUPDATE, - "stateless_update": UpgradeModeSTATELESSUPDATE, - "update": UpgradeModeUPDATE, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UpgradeMode(input) - return &out, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/id_cluster.go b/resource-manager/hdinsight/2024-05-01/hdinsights/id_cluster.go deleted file mode 100644 index 838bcc9d92a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/id_cluster.go +++ /dev/null @@ -1,139 +0,0 @@ -package hdinsights - -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(&ClusterId{}) -} - -var _ resourceids.ResourceId = &ClusterId{} - -// ClusterId is a struct representing the Resource ID for a Cluster -type ClusterId struct { - SubscriptionId string - ResourceGroupName string - ClusterPoolName string - ClusterName string -} - -// NewClusterID returns a new ClusterId struct -func NewClusterID(subscriptionId string, resourceGroupName string, clusterPoolName string, clusterName string) ClusterId { - return ClusterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterPoolName: clusterPoolName, - ClusterName: clusterName, - } -} - -// ParseClusterID parses 'input' into a ClusterId -func ParseClusterID(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(&ClusterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId -// note: this method should only be used for API response data and not user input -func ParseClusterIDInsensitively(input string) (*ClusterId, error) { - parser := resourceids.NewParserFromResourceIdType(&ClusterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ClusterId) 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.ClusterPoolName, ok = input.Parsed["clusterPoolName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterPoolName", input) - } - - if id.ClusterName, ok = input.Parsed["clusterName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterName", input) - } - - return nil -} - -// ValidateClusterID checks that 'input' can be parsed as a Cluster ID -func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseClusterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cluster ID -func (id ClusterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HDInsight/clusterPools/%s/clusters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterPoolName, id.ClusterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cluster ID -func (id ClusterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftHDInsight", "Microsoft.HDInsight", "Microsoft.HDInsight"), - resourceids.StaticSegment("staticClusterPools", "clusterPools", "clusterPools"), - resourceids.UserSpecifiedSegment("clusterPoolName", "clusterPoolValue"), - resourceids.StaticSegment("staticClusters", "clusters", "clusters"), - resourceids.UserSpecifiedSegment("clusterName", "clusterValue"), - } -} - -// String returns a human-readable description of this Cluster ID -func (id ClusterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Pool Name: %q", id.ClusterPoolName), - fmt.Sprintf("Cluster Name: %q", id.ClusterName), - } - return fmt.Sprintf("Cluster (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/id_cluster_test.go b/resource-manager/hdinsight/2024-05-01/hdinsights/id_cluster_test.go deleted file mode 100644 index 0232380fe70..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/id_cluster_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package hdinsights - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &ClusterId{} - -func TestNewClusterID(t *testing.T) { - id := NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ClusterPoolName != "clusterPoolValue" { - t.Fatalf("Expected %q but got %q for Segment 'ClusterPoolName'", id.ClusterPoolName, "clusterPoolValue") - } - - if id.ClusterName != "clusterValue" { - t.Fatalf("Expected %q but got %q for Segment 'ClusterName'", id.ClusterName, "clusterValue") - } -} - -func TestFormatClusterID(t *testing.T) { - actual := NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue", "clusterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/clusters/clusterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseClusterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ClusterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/clusters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/clusters/clusterValue", - Expected: &ClusterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ClusterPoolName: "clusterPoolValue", - ClusterName: "clusterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/clusters/clusterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseClusterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ClusterPoolName != v.Expected.ClusterPoolName { - t.Fatalf("Expected %q but got %q for ClusterPoolName", v.Expected.ClusterPoolName, actual.ClusterPoolName) - } - - if actual.ClusterName != v.Expected.ClusterName { - t.Fatalf("Expected %q but got %q for ClusterName", v.Expected.ClusterName, actual.ClusterName) - } - - } -} - -func TestParseClusterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ClusterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/cLuStErPoOlS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/cLuStErPoOlS/cLuStErPoOlVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/clusters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/cLuStErPoOlS/cLuStErPoOlVaLuE/cLuStErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/clusters/clusterValue", - Expected: &ClusterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ClusterPoolName: "clusterPoolValue", - ClusterName: "clusterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/clusters/clusterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/cLuStErPoOlS/cLuStErPoOlVaLuE/cLuStErS/cLuStErVaLuE", - Expected: &ClusterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ClusterPoolName: "cLuStErPoOlVaLuE", - ClusterName: "cLuStErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/cLuStErPoOlS/cLuStErPoOlVaLuE/cLuStErS/cLuStErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseClusterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ClusterPoolName != v.Expected.ClusterPoolName { - t.Fatalf("Expected %q but got %q for ClusterPoolName", v.Expected.ClusterPoolName, actual.ClusterPoolName) - } - - if actual.ClusterName != v.Expected.ClusterName { - t.Fatalf("Expected %q but got %q for ClusterName", v.Expected.ClusterName, actual.ClusterName) - } - - } -} - -func TestSegmentsForClusterId(t *testing.T) { - segments := ClusterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ClusterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/id_clusterpool.go b/resource-manager/hdinsight/2024-05-01/hdinsights/id_clusterpool.go deleted file mode 100644 index 2beedab67dd..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/id_clusterpool.go +++ /dev/null @@ -1,130 +0,0 @@ -package hdinsights - -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(&ClusterPoolId{}) -} - -var _ resourceids.ResourceId = &ClusterPoolId{} - -// ClusterPoolId is a struct representing the Resource ID for a Cluster Pool -type ClusterPoolId struct { - SubscriptionId string - ResourceGroupName string - ClusterPoolName string -} - -// NewClusterPoolID returns a new ClusterPoolId struct -func NewClusterPoolID(subscriptionId string, resourceGroupName string, clusterPoolName string) ClusterPoolId { - return ClusterPoolId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ClusterPoolName: clusterPoolName, - } -} - -// ParseClusterPoolID parses 'input' into a ClusterPoolId -func ParseClusterPoolID(input string) (*ClusterPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(&ClusterPoolId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterPoolId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -// ParseClusterPoolIDInsensitively parses 'input' case-insensitively into a ClusterPoolId -// note: this method should only be used for API response data and not user input -func ParseClusterPoolIDInsensitively(input string) (*ClusterPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(&ClusterPoolId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - id := ClusterPoolId{} - if err := id.FromParseResult(*parsed); err != nil { - return nil, err - } - - return &id, nil -} - -func (id *ClusterPoolId) 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.ClusterPoolName, ok = input.Parsed["clusterPoolName"]; !ok { - return resourceids.NewSegmentNotSpecifiedError(id, "clusterPoolName", input) - } - - return nil -} - -// ValidateClusterPoolID checks that 'input' can be parsed as a Cluster Pool ID -func ValidateClusterPoolID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseClusterPoolID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cluster Pool ID -func (id ClusterPoolId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.HDInsight/clusterPools/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ClusterPoolName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cluster Pool ID -func (id ClusterPoolId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftHDInsight", "Microsoft.HDInsight", "Microsoft.HDInsight"), - resourceids.StaticSegment("staticClusterPools", "clusterPools", "clusterPools"), - resourceids.UserSpecifiedSegment("clusterPoolName", "clusterPoolValue"), - } -} - -// String returns a human-readable description of this Cluster Pool ID -func (id ClusterPoolId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cluster Pool Name: %q", id.ClusterPoolName), - } - return fmt.Sprintf("Cluster Pool (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/id_clusterpool_test.go b/resource-manager/hdinsight/2024-05-01/hdinsights/id_clusterpool_test.go deleted file mode 100644 index 925f924ff77..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/id_clusterpool_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package hdinsights - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &ClusterPoolId{} - -func TestNewClusterPoolID(t *testing.T) { - id := NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ClusterPoolName != "clusterPoolValue" { - t.Fatalf("Expected %q but got %q for Segment 'ClusterPoolName'", id.ClusterPoolName, "clusterPoolValue") - } -} - -func TestFormatClusterPoolID(t *testing.T) { - actual := NewClusterPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterPoolValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseClusterPoolID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ClusterPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue", - Expected: &ClusterPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ClusterPoolName: "clusterPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseClusterPoolID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ClusterPoolName != v.Expected.ClusterPoolName { - t.Fatalf("Expected %q but got %q for ClusterPoolName", v.Expected.ClusterPoolName, actual.ClusterPoolName) - } - - } -} - -func TestParseClusterPoolIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ClusterPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/cLuStErPoOlS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue", - Expected: &ClusterPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ClusterPoolName: "clusterPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.HDInsight/clusterPools/clusterPoolValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/cLuStErPoOlS/cLuStErPoOlVaLuE", - Expected: &ClusterPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ClusterPoolName: "cLuStErPoOlVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/cLuStErPoOlS/cLuStErPoOlVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseClusterPoolIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ClusterPoolName != v.Expected.ClusterPoolName { - t.Fatalf("Expected %q but got %q for ClusterPoolName", v.Expected.ClusterPoolName, actual.ClusterPoolName) - } - - } -} - -func TestSegmentsForClusterPoolId(t *testing.T) { - segments := ClusterPoolId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ClusterPoolId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/id_location.go b/resource-manager/hdinsight/2024-05-01/hdinsights/id_location.go deleted file mode 100644 index dc1e2cb9cfe..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/id_location.go +++ /dev/null @@ -1,121 +0,0 @@ -package hdinsights - -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.HDInsight/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("staticMicrosoftHDInsight", "Microsoft.HDInsight", "Microsoft.HDInsight"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/id_location_test.go b/resource-manager/hdinsight/2024-05-01/hdinsights/id_location_test.go deleted file mode 100644 index a4b1173e0b2..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package hdinsights - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = &LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.hDiNsIgHt", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.HDInsight/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.hDiNsIgHt/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_availableclusterpoolversionslistbylocation.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_availableclusterpoolversionslistbylocation.go deleted file mode 100644 index a3020bc75a1..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_availableclusterpoolversionslistbylocation.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 AvailableClusterPoolVersionsListByLocationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterPoolVersion -} - -type AvailableClusterPoolVersionsListByLocationCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterPoolVersion -} - -// AvailableClusterPoolVersionsListByLocation ... -func (c HdinsightsClient) AvailableClusterPoolVersionsListByLocation(ctx context.Context, id LocationId) (result AvailableClusterPoolVersionsListByLocationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableClusterPoolVersions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterPoolVersion `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableClusterPoolVersionsListByLocationComplete retrieves all the results into a single object -func (c HdinsightsClient) AvailableClusterPoolVersionsListByLocationComplete(ctx context.Context, id LocationId) (AvailableClusterPoolVersionsListByLocationCompleteResult, error) { - return c.AvailableClusterPoolVersionsListByLocationCompleteMatchingPredicate(ctx, id, ClusterPoolVersionOperationPredicate{}) -} - -// AvailableClusterPoolVersionsListByLocationCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) AvailableClusterPoolVersionsListByLocationCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate ClusterPoolVersionOperationPredicate) (result AvailableClusterPoolVersionsListByLocationCompleteResult, err error) { - items := make([]ClusterPoolVersion, 0) - - resp, err := c.AvailableClusterPoolVersionsListByLocation(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 = AvailableClusterPoolVersionsListByLocationCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_availableclusterversionslistbylocation.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_availableclusterversionslistbylocation.go deleted file mode 100644 index c67a29928e6..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_availableclusterversionslistbylocation.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 AvailableClusterVersionsListByLocationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterVersion -} - -type AvailableClusterVersionsListByLocationCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterVersion -} - -// AvailableClusterVersionsListByLocation ... -func (c HdinsightsClient) AvailableClusterVersionsListByLocation(ctx context.Context, id LocationId) (result AvailableClusterVersionsListByLocationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableClusterVersions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterVersion `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableClusterVersionsListByLocationComplete retrieves all the results into a single object -func (c HdinsightsClient) AvailableClusterVersionsListByLocationComplete(ctx context.Context, id LocationId) (AvailableClusterVersionsListByLocationCompleteResult, error) { - return c.AvailableClusterVersionsListByLocationCompleteMatchingPredicate(ctx, id, ClusterVersionOperationPredicate{}) -} - -// AvailableClusterVersionsListByLocationCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) AvailableClusterVersionsListByLocationCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate ClusterVersionOperationPredicate) (result AvailableClusterVersionsListByLocationCompleteResult, err error) { - items := make([]ClusterVersion, 0) - - resp, err := c.AvailableClusterVersionsListByLocation(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 = AvailableClusterVersionsListByLocationCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusteravailableupgradeslist.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusteravailableupgradeslist.go deleted file mode 100644 index 526fbe78a87..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusteravailableupgradeslist.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 ClusterAvailableUpgradesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterAvailableUpgrade -} - -type ClusterAvailableUpgradesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterAvailableUpgrade -} - -// ClusterAvailableUpgradesList ... -func (c HdinsightsClient) ClusterAvailableUpgradesList(ctx context.Context, id ClusterId) (result ClusterAvailableUpgradesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableUpgrades", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterAvailableUpgrade `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClusterAvailableUpgradesListComplete retrieves all the results into a single object -func (c HdinsightsClient) ClusterAvailableUpgradesListComplete(ctx context.Context, id ClusterId) (ClusterAvailableUpgradesListCompleteResult, error) { - return c.ClusterAvailableUpgradesListCompleteMatchingPredicate(ctx, id, ClusterAvailableUpgradeOperationPredicate{}) -} - -// ClusterAvailableUpgradesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClusterAvailableUpgradesListCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate ClusterAvailableUpgradeOperationPredicate) (result ClusterAvailableUpgradesListCompleteResult, err error) { - items := make([]ClusterAvailableUpgrade, 0) - - resp, err := c.ClusterAvailableUpgradesList(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 = ClusterAvailableUpgradesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterjobslist.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterjobslist.go deleted file mode 100644 index b36018c92b1..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterjobslist.go +++ /dev/null @@ -1,120 +0,0 @@ -package hdinsights - -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 ClusterJobsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterJob -} - -type ClusterJobsListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterJob -} - -type ClusterJobsListOperationOptions struct { - Filter *string -} - -func DefaultClusterJobsListOperationOptions() ClusterJobsListOperationOptions { - return ClusterJobsListOperationOptions{} -} - -func (o ClusterJobsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ClusterJobsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ClusterJobsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - return &out -} - -// ClusterJobsList ... -func (c HdinsightsClient) ClusterJobsList(ctx context.Context, id ClusterId, options ClusterJobsListOperationOptions) (result ClusterJobsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/jobs", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterJob `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClusterJobsListComplete retrieves all the results into a single object -func (c HdinsightsClient) ClusterJobsListComplete(ctx context.Context, id ClusterId, options ClusterJobsListOperationOptions) (ClusterJobsListCompleteResult, error) { - return c.ClusterJobsListCompleteMatchingPredicate(ctx, id, options, ClusterJobOperationPredicate{}) -} - -// ClusterJobsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClusterJobsListCompleteMatchingPredicate(ctx context.Context, id ClusterId, options ClusterJobsListOperationOptions, predicate ClusterJobOperationPredicate) (result ClusterJobsListCompleteResult, err error) { - items := make([]ClusterJob, 0) - - resp, err := c.ClusterJobsList(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 = ClusterJobsListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterjobsrunjob.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterjobsrunjob.go deleted file mode 100644 index 8cb0b836527..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterjobsrunjob.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterJobsRunJobOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *ClusterJob -} - -// ClusterJobsRunJob ... -func (c HdinsightsClient) ClusterJobsRunJob(ctx context.Context, id ClusterId, input ClusterJob) (result ClusterJobsRunJobOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/runJob", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClusterJobsRunJobThenPoll performs ClusterJobsRunJob then polls until it's completed -func (c HdinsightsClient) ClusterJobsRunJobThenPoll(ctx context.Context, id ClusterId, input ClusterJob) error { - result, err := c.ClusterJobsRunJob(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClusterJobsRunJob: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClusterJobsRunJob: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterlibrarieslist.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterlibrarieslist.go deleted file mode 100644 index 8b659dc4c09..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterlibrarieslist.go +++ /dev/null @@ -1,120 +0,0 @@ -package hdinsights - -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 ClusterLibrariesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterLibrary -} - -type ClusterLibrariesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterLibrary -} - -type ClusterLibrariesListOperationOptions struct { - Category *Category -} - -func DefaultClusterLibrariesListOperationOptions() ClusterLibrariesListOperationOptions { - return ClusterLibrariesListOperationOptions{} -} - -func (o ClusterLibrariesListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ClusterLibrariesListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ClusterLibrariesListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Category != nil { - out.Append("$category", fmt.Sprintf("%v", *o.Category)) - } - return &out -} - -// ClusterLibrariesList ... -func (c HdinsightsClient) ClusterLibrariesList(ctx context.Context, id ClusterId, options ClusterLibrariesListOperationOptions) (result ClusterLibrariesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/libraries", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterLibrary `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClusterLibrariesListComplete retrieves all the results into a single object -func (c HdinsightsClient) ClusterLibrariesListComplete(ctx context.Context, id ClusterId, options ClusterLibrariesListOperationOptions) (ClusterLibrariesListCompleteResult, error) { - return c.ClusterLibrariesListCompleteMatchingPredicate(ctx, id, options, ClusterLibraryOperationPredicate{}) -} - -// ClusterLibrariesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClusterLibrariesListCompleteMatchingPredicate(ctx context.Context, id ClusterId, options ClusterLibrariesListOperationOptions, predicate ClusterLibraryOperationPredicate) (result ClusterLibrariesListCompleteResult, err error) { - items := make([]ClusterLibrary, 0) - - resp, err := c.ClusterLibrariesList(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 = ClusterLibrariesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterlibrariesmanagelibraries.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterlibrariesmanagelibraries.go deleted file mode 100644 index 356c435a7e4..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterlibrariesmanagelibraries.go +++ /dev/null @@ -1,73 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterLibrariesManageLibrariesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ClusterLibrariesManageLibraries ... -func (c HdinsightsClient) ClusterLibrariesManageLibraries(ctx context.Context, id ClusterId, input ClusterLibraryManagementOperation) (result ClusterLibrariesManageLibrariesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/manageLibraries", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClusterLibrariesManageLibrariesThenPoll performs ClusterLibrariesManageLibraries then polls until it's completed -func (c HdinsightsClient) ClusterLibrariesManageLibrariesThenPoll(ctx context.Context, id ClusterId, input ClusterLibraryManagementOperation) error { - result, err := c.ClusterLibrariesManageLibraries(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClusterLibrariesManageLibraries: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClusterLibrariesManageLibraries: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolavailableupgradeslist.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolavailableupgradeslist.go deleted file mode 100644 index 416330b1be1..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolavailableupgradeslist.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 ClusterPoolAvailableUpgradesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterPoolAvailableUpgrade -} - -type ClusterPoolAvailableUpgradesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterPoolAvailableUpgrade -} - -// ClusterPoolAvailableUpgradesList ... -func (c HdinsightsClient) ClusterPoolAvailableUpgradesList(ctx context.Context, id ClusterPoolId) (result ClusterPoolAvailableUpgradesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableUpgrades", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterPoolAvailableUpgrade `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClusterPoolAvailableUpgradesListComplete retrieves all the results into a single object -func (c HdinsightsClient) ClusterPoolAvailableUpgradesListComplete(ctx context.Context, id ClusterPoolId) (ClusterPoolAvailableUpgradesListCompleteResult, error) { - return c.ClusterPoolAvailableUpgradesListCompleteMatchingPredicate(ctx, id, ClusterPoolAvailableUpgradeOperationPredicate{}) -} - -// ClusterPoolAvailableUpgradesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClusterPoolAvailableUpgradesListCompleteMatchingPredicate(ctx context.Context, id ClusterPoolId, predicate ClusterPoolAvailableUpgradeOperationPredicate) (result ClusterPoolAvailableUpgradesListCompleteResult, err error) { - items := make([]ClusterPoolAvailableUpgrade, 0) - - resp, err := c.ClusterPoolAvailableUpgradesList(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 = ClusterPoolAvailableUpgradesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolscreateorupdate.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolscreateorupdate.go deleted file mode 100644 index 87418dfa671..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolscreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *ClusterPool -} - -// ClusterPoolsCreateOrUpdate ... -func (c HdinsightsClient) ClusterPoolsCreateOrUpdate(ctx context.Context, id ClusterPoolId, input ClusterPool) (result ClusterPoolsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClusterPoolsCreateOrUpdateThenPoll performs ClusterPoolsCreateOrUpdate then polls until it's completed -func (c HdinsightsClient) ClusterPoolsCreateOrUpdateThenPoll(ctx context.Context, id ClusterPoolId, input ClusterPool) error { - result, err := c.ClusterPoolsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClusterPoolsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClusterPoolsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsdelete.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsdelete.go deleted file mode 100644 index bed6128986f..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ClusterPoolsDelete ... -func (c HdinsightsClient) ClusterPoolsDelete(ctx context.Context, id ClusterPoolId) (result ClusterPoolsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClusterPoolsDeleteThenPoll performs ClusterPoolsDelete then polls until it's completed -func (c HdinsightsClient) ClusterPoolsDeleteThenPoll(ctx context.Context, id ClusterPoolId) error { - result, err := c.ClusterPoolsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing ClusterPoolsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClusterPoolsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsget.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsget.go deleted file mode 100644 index cae158d84f2..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsget.go +++ /dev/null @@ -1,54 +0,0 @@ -package hdinsights - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ClusterPool -} - -// ClusterPoolsGet ... -func (c HdinsightsClient) ClusterPoolsGet(ctx context.Context, id ClusterPoolId) (result ClusterPoolsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ClusterPool - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolslistbyresourcegroup.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolslistbyresourcegroup.go deleted file mode 100644 index 66d2107bf4a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolslistbyresourcegroup.go +++ /dev/null @@ -1,93 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolsListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterPool -} - -type ClusterPoolsListByResourceGroupCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterPool -} - -// ClusterPoolsListByResourceGroup ... -func (c HdinsightsClient) ClusterPoolsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ClusterPoolsListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.HDInsight/clusterPools", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterPool `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClusterPoolsListByResourceGroupComplete retrieves all the results into a single object -func (c HdinsightsClient) ClusterPoolsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ClusterPoolsListByResourceGroupCompleteResult, error) { - return c.ClusterPoolsListByResourceGroupCompleteMatchingPredicate(ctx, id, ClusterPoolOperationPredicate{}) -} - -// ClusterPoolsListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClusterPoolsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterPoolOperationPredicate) (result ClusterPoolsListByResourceGroupCompleteResult, err error) { - items := make([]ClusterPool, 0) - - resp, err := c.ClusterPoolsListByResourceGroup(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 = ClusterPoolsListByResourceGroupCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolslistbysubscription.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolslistbysubscription.go deleted file mode 100644 index e73e3df7641..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolslistbysubscription.go +++ /dev/null @@ -1,93 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolsListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterPool -} - -type ClusterPoolsListBySubscriptionCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterPool -} - -// ClusterPoolsListBySubscription ... -func (c HdinsightsClient) ClusterPoolsListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ClusterPoolsListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.HDInsight/clusterPools", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterPool `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClusterPoolsListBySubscriptionComplete retrieves all the results into a single object -func (c HdinsightsClient) ClusterPoolsListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ClusterPoolsListBySubscriptionCompleteResult, error) { - return c.ClusterPoolsListBySubscriptionCompleteMatchingPredicate(ctx, id, ClusterPoolOperationPredicate{}) -} - -// ClusterPoolsListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClusterPoolsListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterPoolOperationPredicate) (result ClusterPoolsListBySubscriptionCompleteResult, err error) { - items := make([]ClusterPool, 0) - - resp, err := c.ClusterPoolsListBySubscription(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 = ClusterPoolsListBySubscriptionCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsupdatetags.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsupdatetags.go deleted file mode 100644 index f9cad6f0f9e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsupdatetags.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolsUpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *ClusterPool -} - -// ClusterPoolsUpdateTags ... -func (c HdinsightsClient) ClusterPoolsUpdateTags(ctx context.Context, id ClusterPoolId, input TagsObject) (result ClusterPoolsUpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClusterPoolsUpdateTagsThenPoll performs ClusterPoolsUpdateTags then polls until it's completed -func (c HdinsightsClient) ClusterPoolsUpdateTagsThenPoll(ctx context.Context, id ClusterPoolId, input TagsObject) error { - result, err := c.ClusterPoolsUpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClusterPoolsUpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClusterPoolsUpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsupgrade.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsupgrade.go deleted file mode 100644 index 531ec4096a6..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolsupgrade.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolsUpgradeOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *ClusterPool -} - -// ClusterPoolsUpgrade ... -func (c HdinsightsClient) ClusterPoolsUpgrade(ctx context.Context, id ClusterPoolId, input ClusterPoolUpgrade) (result ClusterPoolsUpgradeOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/upgrade", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClusterPoolsUpgradeThenPoll performs ClusterPoolsUpgrade then polls until it's completed -func (c HdinsightsClient) ClusterPoolsUpgradeThenPoll(ctx context.Context, id ClusterPoolId, input ClusterPoolUpgrade) error { - result, err := c.ClusterPoolsUpgrade(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClusterPoolsUpgrade: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClusterPoolsUpgrade: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolupgradehistorieslist.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolupgradehistorieslist.go deleted file mode 100644 index 33a4378fe83..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterpoolupgradehistorieslist.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 ClusterPoolUpgradeHistoriesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterPoolUpgradeHistory -} - -type ClusterPoolUpgradeHistoriesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterPoolUpgradeHistory -} - -// ClusterPoolUpgradeHistoriesList ... -func (c HdinsightsClient) ClusterPoolUpgradeHistoriesList(ctx context.Context, id ClusterPoolId) (result ClusterPoolUpgradeHistoriesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/upgradeHistories", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterPoolUpgradeHistory `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClusterPoolUpgradeHistoriesListComplete retrieves all the results into a single object -func (c HdinsightsClient) ClusterPoolUpgradeHistoriesListComplete(ctx context.Context, id ClusterPoolId) (ClusterPoolUpgradeHistoriesListCompleteResult, error) { - return c.ClusterPoolUpgradeHistoriesListCompleteMatchingPredicate(ctx, id, ClusterPoolUpgradeHistoryOperationPredicate{}) -} - -// ClusterPoolUpgradeHistoriesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClusterPoolUpgradeHistoriesListCompleteMatchingPredicate(ctx context.Context, id ClusterPoolId, predicate ClusterPoolUpgradeHistoryOperationPredicate) (result ClusterPoolUpgradeHistoriesListCompleteResult, err error) { - items := make([]ClusterPoolUpgradeHistory, 0) - - resp, err := c.ClusterPoolUpgradeHistoriesList(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 = ClusterPoolUpgradeHistoriesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterscreate.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterscreate.go deleted file mode 100644 index 0253bcc95e2..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterscreate.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClustersCreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Cluster -} - -// ClustersCreate ... -func (c HdinsightsClient) ClustersCreate(ctx context.Context, id ClusterId, input Cluster) (result ClustersCreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClustersCreateThenPoll performs ClustersCreate then polls until it's completed -func (c HdinsightsClient) ClustersCreateThenPoll(ctx context.Context, id ClusterId, input Cluster) error { - result, err := c.ClustersCreate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClustersCreate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClustersCreate: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersdelete.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersdelete.go deleted file mode 100644 index 238ddf71419..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClustersDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ClustersDelete ... -func (c HdinsightsClient) ClustersDelete(ctx context.Context, id ClusterId) (result ClustersDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClustersDeleteThenPoll performs ClustersDelete then polls until it's completed -func (c HdinsightsClient) ClustersDeleteThenPoll(ctx context.Context, id ClusterId) error { - result, err := c.ClustersDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing ClustersDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClustersDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersget.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersget.go deleted file mode 100644 index d38f3d7a77e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersget.go +++ /dev/null @@ -1,54 +0,0 @@ -package hdinsights - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClustersGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Cluster -} - -// ClustersGet ... -func (c HdinsightsClient) ClustersGet(ctx context.Context, id ClusterId) (result ClustersGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model Cluster - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersgetinstanceview.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersgetinstanceview.go deleted file mode 100644 index 44b87c6005d..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersgetinstanceview.go +++ /dev/null @@ -1,55 +0,0 @@ -package hdinsights - -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 ClustersGetInstanceViewOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ClusterInstanceViewResult -} - -// ClustersGetInstanceView ... -func (c HdinsightsClient) ClustersGetInstanceView(ctx context.Context, id ClusterId) (result ClustersGetInstanceViewOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/instanceViews/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var model ClusterInstanceViewResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistbyclusterpoolname.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistbyclusterpoolname.go deleted file mode 100644 index 9fbd7386d93..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistbyclusterpoolname.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 ClustersListByClusterPoolNameOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Cluster -} - -type ClustersListByClusterPoolNameCompleteResult struct { - LatestHttpResponse *http.Response - Items []Cluster -} - -// ClustersListByClusterPoolName ... -func (c HdinsightsClient) ClustersListByClusterPoolName(ctx context.Context, id ClusterPoolId) (result ClustersListByClusterPoolNameOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/clusters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Cluster `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClustersListByClusterPoolNameComplete retrieves all the results into a single object -func (c HdinsightsClient) ClustersListByClusterPoolNameComplete(ctx context.Context, id ClusterPoolId) (ClustersListByClusterPoolNameCompleteResult, error) { - return c.ClustersListByClusterPoolNameCompleteMatchingPredicate(ctx, id, ClusterOperationPredicate{}) -} - -// ClustersListByClusterPoolNameCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClustersListByClusterPoolNameCompleteMatchingPredicate(ctx context.Context, id ClusterPoolId, predicate ClusterOperationPredicate) (result ClustersListByClusterPoolNameCompleteResult, err error) { - items := make([]Cluster, 0) - - resp, err := c.ClustersListByClusterPoolName(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 = ClustersListByClusterPoolNameCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistinstanceviews.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistinstanceviews.go deleted file mode 100644 index c3bf5fe7232..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistinstanceviews.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 ClustersListInstanceViewsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterInstanceViewResult -} - -type ClustersListInstanceViewsCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterInstanceViewResult -} - -// ClustersListInstanceViews ... -func (c HdinsightsClient) ClustersListInstanceViews(ctx context.Context, id ClusterId) (result ClustersListInstanceViewsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/instanceViews", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterInstanceViewResult `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClustersListInstanceViewsComplete retrieves all the results into a single object -func (c HdinsightsClient) ClustersListInstanceViewsComplete(ctx context.Context, id ClusterId) (ClustersListInstanceViewsCompleteResult, error) { - return c.ClustersListInstanceViewsCompleteMatchingPredicate(ctx, id, ClusterInstanceViewResultOperationPredicate{}) -} - -// ClustersListInstanceViewsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClustersListInstanceViewsCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate ClusterInstanceViewResultOperationPredicate) (result ClustersListInstanceViewsCompleteResult, err error) { - items := make([]ClusterInstanceViewResult, 0) - - resp, err := c.ClustersListInstanceViews(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 = ClustersListInstanceViewsCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistserviceconfigs.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistserviceconfigs.go deleted file mode 100644 index eacdb69c17e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterslistserviceconfigs.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 ClustersListServiceConfigsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceConfigResult -} - -type ClustersListServiceConfigsCompleteResult struct { - LatestHttpResponse *http.Response - Items []ServiceConfigResult -} - -// ClustersListServiceConfigs ... -func (c HdinsightsClient) ClustersListServiceConfigs(ctx context.Context, id ClusterId) (result ClustersListServiceConfigsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceConfigs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceConfigResult `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClustersListServiceConfigsComplete retrieves all the results into a single object -func (c HdinsightsClient) ClustersListServiceConfigsComplete(ctx context.Context, id ClusterId) (ClustersListServiceConfigsCompleteResult, error) { - return c.ClustersListServiceConfigsCompleteMatchingPredicate(ctx, id, ServiceConfigResultOperationPredicate{}) -} - -// ClustersListServiceConfigsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClustersListServiceConfigsCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate ServiceConfigResultOperationPredicate) (result ClustersListServiceConfigsCompleteResult, err error) { - items := make([]ServiceConfigResult, 0) - - resp, err := c.ClustersListServiceConfigs(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 = ClustersListServiceConfigsCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersresize.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersresize.go deleted file mode 100644 index 57787fbfc8a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersresize.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClustersResizeOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Cluster -} - -// ClustersResize ... -func (c HdinsightsClient) ClustersResize(ctx context.Context, id ClusterId, input ClusterResizeData) (result ClustersResizeOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resize", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClustersResizeThenPoll performs ClustersResize then polls until it's completed -func (c HdinsightsClient) ClustersResizeThenPoll(ctx context.Context, id ClusterId, input ClusterResizeData) error { - result, err := c.ClustersResize(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClustersResize: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClustersResize: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupdate.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupdate.go deleted file mode 100644 index ea9e7bc5bbf..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClustersUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Cluster -} - -// ClustersUpdate ... -func (c HdinsightsClient) ClustersUpdate(ctx context.Context, id ClusterId, input ClusterPatch) (result ClustersUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClustersUpdateThenPoll performs ClustersUpdate then polls until it's completed -func (c HdinsightsClient) ClustersUpdateThenPoll(ctx context.Context, id ClusterId, input ClusterPatch) error { - result, err := c.ClustersUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClustersUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClustersUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupgrade.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupgrade.go deleted file mode 100644 index c1dad094835..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupgrade.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClustersUpgradeOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Cluster -} - -// ClustersUpgrade ... -func (c HdinsightsClient) ClustersUpgrade(ctx context.Context, id ClusterId, input ClusterUpgrade) (result ClustersUpgradeOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/upgrade", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClustersUpgradeThenPoll performs ClustersUpgrade then polls until it's completed -func (c HdinsightsClient) ClustersUpgradeThenPoll(ctx context.Context, id ClusterId, input ClusterUpgrade) error { - result, err := c.ClustersUpgrade(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClustersUpgrade: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClustersUpgrade: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupgrademanualrollback.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupgrademanualrollback.go deleted file mode 100644 index 706e95c716c..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clustersupgrademanualrollback.go +++ /dev/null @@ -1,75 +0,0 @@ -package hdinsights - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClustersUpgradeManualRollbackOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *Cluster -} - -// ClustersUpgradeManualRollback ... -func (c HdinsightsClient) ClustersUpgradeManualRollback(ctx context.Context, id ClusterId, input ClusterUpgradeRollback) (result ClustersUpgradeManualRollbackOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/rollback", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ClustersUpgradeManualRollbackThenPoll performs ClustersUpgradeManualRollback then polls until it's completed -func (c HdinsightsClient) ClustersUpgradeManualRollbackThenPoll(ctx context.Context, id ClusterId, input ClusterUpgradeRollback) error { - result, err := c.ClustersUpgradeManualRollback(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ClustersUpgradeManualRollback: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ClustersUpgradeManualRollback: %+v", err) - } - - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterupgradehistorieslist.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterupgradehistorieslist.go deleted file mode 100644 index 82d183afbb5..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_clusterupgradehistorieslist.go +++ /dev/null @@ -1,92 +0,0 @@ -package hdinsights - -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 ClusterUpgradeHistoriesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ClusterUpgradeHistory -} - -type ClusterUpgradeHistoriesListCompleteResult struct { - LatestHttpResponse *http.Response - Items []ClusterUpgradeHistory -} - -// ClusterUpgradeHistoriesList ... -func (c HdinsightsClient) ClusterUpgradeHistoriesList(ctx context.Context, id ClusterId) (result ClusterUpgradeHistoriesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/upgradeHistories", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ClusterUpgradeHistory `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ClusterUpgradeHistoriesListComplete retrieves all the results into a single object -func (c HdinsightsClient) ClusterUpgradeHistoriesListComplete(ctx context.Context, id ClusterId) (ClusterUpgradeHistoriesListCompleteResult, error) { - return c.ClusterUpgradeHistoriesListCompleteMatchingPredicate(ctx, id, ClusterUpgradeHistoryOperationPredicate{}) -} - -// ClusterUpgradeHistoriesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c HdinsightsClient) ClusterUpgradeHistoriesListCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate ClusterUpgradeHistoryOperationPredicate) (result ClusterUpgradeHistoriesListCompleteResult, err error) { - items := make([]ClusterUpgradeHistory, 0) - - resp, err := c.ClusterUpgradeHistoriesList(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 = ClusterUpgradeHistoriesListCompleteResult{ - LatestHttpResponse: resp.HttpResponse, - Items: items, - } - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/method_locationschecknameavailability.go b/resource-manager/hdinsight/2024-05-01/hdinsights/method_locationschecknameavailability.go deleted file mode 100644 index cffddc9496a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/method_locationschecknameavailability.go +++ /dev/null @@ -1,59 +0,0 @@ -package hdinsights - -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 LocationsCheckNameAvailabilityOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NameAvailabilityResult -} - -// LocationsCheckNameAvailability ... -func (c HdinsightsClient) LocationsCheckNameAvailability(ctx context.Context, id LocationId, input NameAvailabilityParameters) (result LocationsCheckNameAvailabilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/checkNameAvailability", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - 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 NameAvailabilityResult - result.Model = &model - - if err = resp.Unmarshal(result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_aksclusterprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_aksclusterprofile.go deleted file mode 100644 index fc47692ac51..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_aksclusterprofile.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AksClusterProfile struct { - AksClusterAgentPoolIdentityProfile *IdentityProfile `json:"aksClusterAgentPoolIdentityProfile,omitempty"` - AksClusterResourceId *string `json:"aksClusterResourceId,omitempty"` - AksVersion *string `json:"aksVersion,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_authorizationprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_authorizationprofile.go deleted file mode 100644 index 45454a28509..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_authorizationprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationProfile struct { - GroupIds *[]string `json:"groupIds,omitempty"` - UserIds *[]string `json:"userIds,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_autoscaleprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_autoscaleprofile.go deleted file mode 100644 index b279fbd5305..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_autoscaleprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoscaleProfile struct { - AutoscaleType *AutoscaleType `json:"autoscaleType,omitempty"` - Enabled bool `json:"enabled"` - GracefulDecommissionTimeout *int64 `json:"gracefulDecommissionTimeout,omitempty"` - LoadBasedConfig *LoadBasedConfig `json:"loadBasedConfig,omitempty"` - ScheduleBasedConfig *ScheduleBasedConfig `json:"scheduleBasedConfig,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_catalogoptions.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_catalogoptions.go deleted file mode 100644 index 62ba01e4de4..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_catalogoptions.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CatalogOptions struct { - Hive *[]HiveCatalogOption `json:"hive,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_cluster.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_cluster.go deleted file mode 100644 index 8b6ab5fa77b..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_cluster.go +++ /dev/null @@ -1,18 +0,0 @@ -package hdinsights - -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 Cluster struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *ClusterResourceProperties `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/hdinsight/2024-05-01/hdinsights/model_clusteraccessprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteraccessprofile.go deleted file mode 100644 index 0b5a7c0606a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteraccessprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterAccessProfile struct { - EnableInternalIngress bool `json:"enableInternalIngress"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterakspatchupgradehistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterakspatchupgradehistoryproperties.go deleted file mode 100644 index 5c108c15cc9..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterakspatchupgradehistoryproperties.go +++ /dev/null @@ -1,44 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterUpgradeHistoryProperties = ClusterAksPatchUpgradeHistoryProperties{} - -type ClusterAksPatchUpgradeHistoryProperties struct { - NewVersion *string `json:"newVersion,omitempty"` - OriginalVersion *string `json:"originalVersion,omitempty"` - - // Fields inherited from ClusterUpgradeHistoryProperties - UpgradeResult ClusterUpgradeHistoryUpgradeResultType `json:"upgradeResult"` - UtcTime string `json:"utcTime"` -} - -var _ json.Marshaler = ClusterAksPatchUpgradeHistoryProperties{} - -func (s ClusterAksPatchUpgradeHistoryProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterAksPatchUpgradeHistoryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterAksPatchUpgradeHistoryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterAksPatchUpgradeHistoryProperties: %+v", err) - } - decoded["upgradeType"] = "AKSPatchUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterAksPatchUpgradeHistoryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterakspatchversionupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterakspatchversionupgradeproperties.go deleted file mode 100644 index 10fd1641cc4..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterakspatchversionupgradeproperties.go +++ /dev/null @@ -1,40 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterUpgradeProperties = ClusterAKSPatchVersionUpgradeProperties{} - -type ClusterAKSPatchVersionUpgradeProperties struct { - - // Fields inherited from ClusterUpgradeProperties -} - -var _ json.Marshaler = ClusterAKSPatchVersionUpgradeProperties{} - -func (s ClusterAKSPatchVersionUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterAKSPatchVersionUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterAKSPatchVersionUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterAKSPatchVersionUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "AKSPatchUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterAKSPatchVersionUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgrade.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgrade.go deleted file mode 100644 index b0788bf8653..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgrade.go +++ /dev/null @@ -1,48 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterAvailableUpgrade struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties ClusterAvailableUpgradeProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Unmarshaler = &ClusterAvailableUpgrade{} - -func (s *ClusterAvailableUpgrade) UnmarshalJSON(bytes []byte) error { - type alias ClusterAvailableUpgrade - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ClusterAvailableUpgrade: %+v", err) - } - - s.Id = decoded.Id - s.Name = decoded.Name - s.SystemData = decoded.SystemData - s.Type = decoded.Type - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ClusterAvailableUpgrade into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalClusterAvailableUpgradePropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ClusterAvailableUpgrade': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradeakspatchupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradeakspatchupgradeproperties.go deleted file mode 100644 index 161473b338e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradeakspatchupgradeproperties.go +++ /dev/null @@ -1,43 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterAvailableUpgradeProperties = ClusterAvailableUpgradeAksPatchUpgradeProperties{} - -type ClusterAvailableUpgradeAksPatchUpgradeProperties struct { - CurrentVersion *string `json:"currentVersion,omitempty"` - CurrentVersionStatus *CurrentClusterAksVersionStatus `json:"currentVersionStatus,omitempty"` - LatestVersion *string `json:"latestVersion,omitempty"` - - // Fields inherited from ClusterAvailableUpgradeProperties -} - -var _ json.Marshaler = ClusterAvailableUpgradeAksPatchUpgradeProperties{} - -func (s ClusterAvailableUpgradeAksPatchUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterAvailableUpgradeAksPatchUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterAvailableUpgradeAksPatchUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterAvailableUpgradeAksPatchUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "AKSPatchUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterAvailableUpgradeAksPatchUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradehotfixupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradehotfixupgradeproperties.go deleted file mode 100644 index 9b0edf566d4..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradehotfixupgradeproperties.go +++ /dev/null @@ -1,51 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterAvailableUpgradeProperties = ClusterAvailableUpgradeHotfixUpgradeProperties{} - -type ClusterAvailableUpgradeHotfixUpgradeProperties struct { - ComponentName *string `json:"componentName,omitempty"` - CreatedTime *string `json:"createdTime,omitempty"` - Description *string `json:"description,omitempty"` - ExtendedProperties *string `json:"extendedProperties,omitempty"` - Severity *Severity `json:"severity,omitempty"` - SourceBuildNumber *string `json:"sourceBuildNumber,omitempty"` - SourceClusterVersion *string `json:"sourceClusterVersion,omitempty"` - SourceOssVersion *string `json:"sourceOssVersion,omitempty"` - TargetBuildNumber *string `json:"targetBuildNumber,omitempty"` - TargetClusterVersion *string `json:"targetClusterVersion,omitempty"` - TargetOssVersion *string `json:"targetOssVersion,omitempty"` - - // Fields inherited from ClusterAvailableUpgradeProperties -} - -var _ json.Marshaler = ClusterAvailableUpgradeHotfixUpgradeProperties{} - -func (s ClusterAvailableUpgradeHotfixUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterAvailableUpgradeHotfixUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterAvailableUpgradeHotfixUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterAvailableUpgradeHotfixUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "HotfixUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterAvailableUpgradeHotfixUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradepatchversionupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradepatchversionupgradeproperties.go deleted file mode 100644 index 4cf64b01e36..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradepatchversionupgradeproperties.go +++ /dev/null @@ -1,51 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterAvailableUpgradeProperties = ClusterAvailableUpgradePatchVersionUpgradeProperties{} - -type ClusterAvailableUpgradePatchVersionUpgradeProperties struct { - ComponentName *string `json:"componentName,omitempty"` - CreatedTime *string `json:"createdTime,omitempty"` - Description *string `json:"description,omitempty"` - ExtendedProperties *string `json:"extendedProperties,omitempty"` - Severity *Severity `json:"severity,omitempty"` - SourceBuildNumber *string `json:"sourceBuildNumber,omitempty"` - SourceClusterVersion *string `json:"sourceClusterVersion,omitempty"` - SourceOssVersion *string `json:"sourceOssVersion,omitempty"` - TargetBuildNumber *string `json:"targetBuildNumber,omitempty"` - TargetClusterVersion *string `json:"targetClusterVersion,omitempty"` - TargetOssVersion *string `json:"targetOssVersion,omitempty"` - - // Fields inherited from ClusterAvailableUpgradeProperties -} - -var _ json.Marshaler = ClusterAvailableUpgradePatchVersionUpgradeProperties{} - -func (s ClusterAvailableUpgradePatchVersionUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterAvailableUpgradePatchVersionUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterAvailableUpgradePatchVersionUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterAvailableUpgradePatchVersionUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "PatchVersionUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterAvailableUpgradePatchVersionUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradeproperties.go deleted file mode 100644 index b64fb74340b..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusteravailableupgradeproperties.go +++ /dev/null @@ -1,69 +0,0 @@ -package hdinsights - -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 ClusterAvailableUpgradeProperties interface { -} - -// RawClusterAvailableUpgradePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClusterAvailableUpgradePropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClusterAvailableUpgradePropertiesImplementation(input []byte) (ClusterAvailableUpgradeProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterAvailableUpgradeProperties into map[string]interface: %+v", err) - } - - value, ok := temp["upgradeType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AKSPatchUpgrade") { - var out ClusterAvailableUpgradeAksPatchUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterAvailableUpgradeAksPatchUpgradeProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "HotfixUpgrade") { - var out ClusterAvailableUpgradeHotfixUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterAvailableUpgradeHotfixUpgradeProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PatchVersionUpgrade") { - var out ClusterAvailableUpgradePatchVersionUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterAvailableUpgradePatchVersionUpgradeProperties: %+v", err) - } - return out, nil - } - - out := RawClusterAvailableUpgradePropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clustercomponentscomponentsinlined.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clustercomponentscomponentsinlined.go deleted file mode 100644 index 303f607a612..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clustercomponentscomponentsinlined.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterComponentsComponentsInlined struct { - Name *string `json:"name,omitempty"` - Version *string `json:"version,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterconfigfile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterconfigfile.go deleted file mode 100644 index 8a26042b173..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterconfigfile.go +++ /dev/null @@ -1,12 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterConfigFile struct { - Content *string `json:"content,omitempty"` - Encoding *ContentEncoding `json:"encoding,omitempty"` - FileName string `json:"fileName"` - Path *string `json:"path,omitempty"` - Values *map[string]string `json:"values,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgradehistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgradehistoryproperties.go deleted file mode 100644 index 46ffd148dd4..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgradehistoryproperties.go +++ /dev/null @@ -1,50 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterUpgradeHistoryProperties = ClusterHotfixUpgradeHistoryProperties{} - -type ClusterHotfixUpgradeHistoryProperties struct { - ComponentName *string `json:"componentName,omitempty"` - Severity *ClusterUpgradeHistorySeverityType `json:"severity,omitempty"` - SourceBuildNumber *string `json:"sourceBuildNumber,omitempty"` - SourceClusterVersion *string `json:"sourceClusterVersion,omitempty"` - SourceOssVersion *string `json:"sourceOssVersion,omitempty"` - TargetBuildNumber *string `json:"targetBuildNumber,omitempty"` - TargetClusterVersion *string `json:"targetClusterVersion,omitempty"` - TargetOssVersion *string `json:"targetOssVersion,omitempty"` - - // Fields inherited from ClusterUpgradeHistoryProperties - UpgradeResult ClusterUpgradeHistoryUpgradeResultType `json:"upgradeResult"` - UtcTime string `json:"utcTime"` -} - -var _ json.Marshaler = ClusterHotfixUpgradeHistoryProperties{} - -func (s ClusterHotfixUpgradeHistoryProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterHotfixUpgradeHistoryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterHotfixUpgradeHistoryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterHotfixUpgradeHistoryProperties: %+v", err) - } - decoded["upgradeType"] = "HotfixUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterHotfixUpgradeHistoryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgradeproperties.go deleted file mode 100644 index 5ca374b432f..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgradeproperties.go +++ /dev/null @@ -1,44 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterUpgradeProperties = ClusterHotfixUpgradeProperties{} - -type ClusterHotfixUpgradeProperties struct { - ComponentName *string `json:"componentName,omitempty"` - TargetBuildNumber *string `json:"targetBuildNumber,omitempty"` - TargetClusterVersion *string `json:"targetClusterVersion,omitempty"` - TargetOssVersion *string `json:"targetOssVersion,omitempty"` - - // Fields inherited from ClusterUpgradeProperties -} - -var _ json.Marshaler = ClusterHotfixUpgradeProperties{} - -func (s ClusterHotfixUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterHotfixUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterHotfixUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterHotfixUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "HotfixUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterHotfixUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgraderollbackhistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgraderollbackhistoryproperties.go deleted file mode 100644 index fea1d9620ed..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterhotfixupgraderollbackhistoryproperties.go +++ /dev/null @@ -1,50 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterUpgradeHistoryProperties = ClusterHotfixUpgradeRollbackHistoryProperties{} - -type ClusterHotfixUpgradeRollbackHistoryProperties struct { - ComponentName *string `json:"componentName,omitempty"` - Severity *ClusterUpgradeHistorySeverityType `json:"severity,omitempty"` - SourceBuildNumber *string `json:"sourceBuildNumber,omitempty"` - SourceClusterVersion *string `json:"sourceClusterVersion,omitempty"` - SourceOssVersion *string `json:"sourceOssVersion,omitempty"` - TargetBuildNumber *string `json:"targetBuildNumber,omitempty"` - TargetClusterVersion *string `json:"targetClusterVersion,omitempty"` - TargetOssVersion *string `json:"targetOssVersion,omitempty"` - - // Fields inherited from ClusterUpgradeHistoryProperties - UpgradeResult ClusterUpgradeHistoryUpgradeResultType `json:"upgradeResult"` - UtcTime string `json:"utcTime"` -} - -var _ json.Marshaler = ClusterHotfixUpgradeRollbackHistoryProperties{} - -func (s ClusterHotfixUpgradeRollbackHistoryProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterHotfixUpgradeRollbackHistoryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterHotfixUpgradeRollbackHistoryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterHotfixUpgradeRollbackHistoryProperties: %+v", err) - } - decoded["upgradeType"] = "HotfixUpgradeRollback" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterHotfixUpgradeRollbackHistoryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewproperties.go deleted file mode 100644 index 240b0f0719b..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterInstanceViewProperties struct { - ServiceStatuses []ServiceStatus `json:"serviceStatuses"` - Status ClusterInstanceViewStatus `json:"status"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewresult.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewresult.go deleted file mode 100644 index 45dd431b982..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterInstanceViewResult struct { - Name string `json:"name"` - Properties ClusterInstanceViewProperties `json:"properties"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewstatus.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewstatus.go deleted file mode 100644 index b3673800c1c..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterinstanceviewstatus.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterInstanceViewStatus struct { - Message *string `json:"message,omitempty"` - Ready string `json:"ready"` - Reason *string `json:"reason,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterjob.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterjob.go deleted file mode 100644 index 940c6adafc0..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterjob.go +++ /dev/null @@ -1,48 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterJob struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties ClusterJobProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Unmarshaler = &ClusterJob{} - -func (s *ClusterJob) UnmarshalJSON(bytes []byte) error { - type alias ClusterJob - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ClusterJob: %+v", err) - } - - s.Id = decoded.Id - s.Name = decoded.Name - s.SystemData = decoded.SystemData - s.Type = decoded.Type - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ClusterJob into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalClusterJobPropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ClusterJob': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterjobproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterjobproperties.go deleted file mode 100644 index 28ccc111fe3..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterjobproperties.go +++ /dev/null @@ -1,53 +0,0 @@ -package hdinsights - -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 ClusterJobProperties interface { -} - -// RawClusterJobPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClusterJobPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClusterJobPropertiesImplementation(input []byte) (ClusterJobProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterJobProperties into map[string]interface: %+v", err) - } - - value, ok := temp["jobType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "FlinkJob") { - var out FlinkJobProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FlinkJobProperties: %+v", err) - } - return out, nil - } - - out := RawClusterJobPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrary.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrary.go deleted file mode 100644 index 0d7fa3095d3..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrary.go +++ /dev/null @@ -1,48 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterLibrary struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties ClusterLibraryProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Unmarshaler = &ClusterLibrary{} - -func (s *ClusterLibrary) UnmarshalJSON(bytes []byte) error { - type alias ClusterLibrary - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ClusterLibrary: %+v", err) - } - - s.Id = decoded.Id - s.Name = decoded.Name - s.SystemData = decoded.SystemData - s.Type = decoded.Type - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ClusterLibrary into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalClusterLibraryPropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ClusterLibrary': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrarymanagementoperation.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrarymanagementoperation.go deleted file mode 100644 index d5696a3732e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrarymanagementoperation.go +++ /dev/null @@ -1,16 +0,0 @@ -package hdinsights - -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 ClusterLibraryManagementOperation struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties ClusterLibraryManagementOperationProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrarymanagementoperationproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrarymanagementoperationproperties.go deleted file mode 100644 index 457881bb87b..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibrarymanagementoperationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterLibraryManagementOperationProperties struct { - Action LibraryManagementAction `json:"action"` - Libraries []ClusterLibrary `json:"libraries"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibraryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibraryproperties.go deleted file mode 100644 index be46b55aa0a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterlibraryproperties.go +++ /dev/null @@ -1,61 +0,0 @@ -package hdinsights - -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 ClusterLibraryProperties interface { -} - -// RawClusterLibraryPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClusterLibraryPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClusterLibraryPropertiesImplementation(input []byte) (ClusterLibraryProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterLibraryProperties into map[string]interface: %+v", err) - } - - value, ok := temp["type"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "maven") { - var out MavenLibraryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into MavenLibraryProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "pypi") { - var out PyPiLibraryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into PyPiLibraryProperties: %+v", err) - } - return out, nil - } - - out := RawClusterLibraryPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterloganalyticsapplicationlogs.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterloganalyticsapplicationlogs.go deleted file mode 100644 index 3e4f66994ee..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterloganalyticsapplicationlogs.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterLogAnalyticsApplicationLogs struct { - StdErrorEnabled *bool `json:"stdErrorEnabled,omitempty"` - StdOutEnabled *bool `json:"stdOutEnabled,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterloganalyticsprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterloganalyticsprofile.go deleted file mode 100644 index 0f01876bab7..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterloganalyticsprofile.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterLogAnalyticsProfile struct { - ApplicationLogs *ClusterLogAnalyticsApplicationLogs `json:"applicationLogs,omitempty"` - Enabled bool `json:"enabled"` - MetricsEnabled *bool `json:"metricsEnabled,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatch.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatch.go deleted file mode 100644 index cc10e8e4679..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatch.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPatch struct { - Properties *ClusterPatchProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchproperties.go deleted file mode 100644 index 23f927742e9..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPatchProperties struct { - ClusterProfile *UpdatableClusterProfile `json:"clusterProfile,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgradehistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgradehistoryproperties.go deleted file mode 100644 index 7ac26a583a1..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgradehistoryproperties.go +++ /dev/null @@ -1,50 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterUpgradeHistoryProperties = ClusterPatchVersionUpgradeHistoryProperties{} - -type ClusterPatchVersionUpgradeHistoryProperties struct { - ComponentName *string `json:"componentName,omitempty"` - Severity *ClusterUpgradeHistorySeverityType `json:"severity,omitempty"` - SourceBuildNumber *string `json:"sourceBuildNumber,omitempty"` - SourceClusterVersion *string `json:"sourceClusterVersion,omitempty"` - SourceOssVersion *string `json:"sourceOssVersion,omitempty"` - TargetBuildNumber *string `json:"targetBuildNumber,omitempty"` - TargetClusterVersion *string `json:"targetClusterVersion,omitempty"` - TargetOssVersion *string `json:"targetOssVersion,omitempty"` - - // Fields inherited from ClusterUpgradeHistoryProperties - UpgradeResult ClusterUpgradeHistoryUpgradeResultType `json:"upgradeResult"` - UtcTime string `json:"utcTime"` -} - -var _ json.Marshaler = ClusterPatchVersionUpgradeHistoryProperties{} - -func (s ClusterPatchVersionUpgradeHistoryProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPatchVersionUpgradeHistoryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPatchVersionUpgradeHistoryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPatchVersionUpgradeHistoryProperties: %+v", err) - } - decoded["upgradeType"] = "PatchVersionUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPatchVersionUpgradeHistoryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgradeproperties.go deleted file mode 100644 index 5fb9eb471b1..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgradeproperties.go +++ /dev/null @@ -1,44 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterUpgradeProperties = ClusterPatchVersionUpgradeProperties{} - -type ClusterPatchVersionUpgradeProperties struct { - ComponentName *string `json:"componentName,omitempty"` - TargetBuildNumber *string `json:"targetBuildNumber,omitempty"` - TargetClusterVersion *string `json:"targetClusterVersion,omitempty"` - TargetOssVersion *string `json:"targetOssVersion,omitempty"` - - // Fields inherited from ClusterUpgradeProperties -} - -var _ json.Marshaler = ClusterPatchVersionUpgradeProperties{} - -func (s ClusterPatchVersionUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPatchVersionUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPatchVersionUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPatchVersionUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "PatchVersionUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPatchVersionUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgraderollbackhistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgraderollbackhistoryproperties.go deleted file mode 100644 index 092c5c31145..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpatchversionupgraderollbackhistoryproperties.go +++ /dev/null @@ -1,50 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterUpgradeHistoryProperties = ClusterPatchVersionUpgradeRollbackHistoryProperties{} - -type ClusterPatchVersionUpgradeRollbackHistoryProperties struct { - ComponentName *string `json:"componentName,omitempty"` - Severity *ClusterUpgradeHistorySeverityType `json:"severity,omitempty"` - SourceBuildNumber *string `json:"sourceBuildNumber,omitempty"` - SourceClusterVersion *string `json:"sourceClusterVersion,omitempty"` - SourceOssVersion *string `json:"sourceOssVersion,omitempty"` - TargetBuildNumber *string `json:"targetBuildNumber,omitempty"` - TargetClusterVersion *string `json:"targetClusterVersion,omitempty"` - TargetOssVersion *string `json:"targetOssVersion,omitempty"` - - // Fields inherited from ClusterUpgradeHistoryProperties - UpgradeResult ClusterUpgradeHistoryUpgradeResultType `json:"upgradeResult"` - UtcTime string `json:"utcTime"` -} - -var _ json.Marshaler = ClusterPatchVersionUpgradeRollbackHistoryProperties{} - -func (s ClusterPatchVersionUpgradeRollbackHistoryProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPatchVersionUpgradeRollbackHistoryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPatchVersionUpgradeRollbackHistoryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPatchVersionUpgradeRollbackHistoryProperties: %+v", err) - } - decoded["upgradeType"] = "PatchVersionUpgradeRollback" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPatchVersionUpgradeRollbackHistoryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpool.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpool.go deleted file mode 100644 index c48e37e8c8d..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpool.go +++ /dev/null @@ -1,18 +0,0 @@ -package hdinsights - -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 ClusterPool struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *ClusterPoolResourceProperties `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/hdinsight/2024-05-01/hdinsights/model_clusterpoolakspatchupgradehistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolakspatchupgradehistoryproperties.go deleted file mode 100644 index cf8663e44a3..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolakspatchupgradehistoryproperties.go +++ /dev/null @@ -1,46 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterPoolUpgradeHistoryProperties = ClusterPoolAksPatchUpgradeHistoryProperties{} - -type ClusterPoolAksPatchUpgradeHistoryProperties struct { - NewVersion *string `json:"newVersion,omitempty"` - OriginalVersion *string `json:"originalVersion,omitempty"` - UpgradeAllClusterNodes *bool `json:"upgradeAllClusterNodes,omitempty"` - UpgradeClusterPool *bool `json:"upgradeClusterPool,omitempty"` - - // Fields inherited from ClusterPoolUpgradeHistoryProperties - UpgradeResult ClusterPoolUpgradeHistoryUpgradeResultType `json:"upgradeResult"` - UtcTime string `json:"utcTime"` -} - -var _ json.Marshaler = ClusterPoolAksPatchUpgradeHistoryProperties{} - -func (s ClusterPoolAksPatchUpgradeHistoryProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPoolAksPatchUpgradeHistoryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPoolAksPatchUpgradeHistoryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolAksPatchUpgradeHistoryProperties: %+v", err) - } - decoded["upgradeType"] = "AKSPatchUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPoolAksPatchUpgradeHistoryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolakspatchversionupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolakspatchversionupgradeproperties.go deleted file mode 100644 index f005ddafaef..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolakspatchversionupgradeproperties.go +++ /dev/null @@ -1,43 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterPoolUpgradeProperties = ClusterPoolAKSPatchVersionUpgradeProperties{} - -type ClusterPoolAKSPatchVersionUpgradeProperties struct { - TargetAksVersion *string `json:"targetAksVersion,omitempty"` - UpgradeAllClusterNodes *bool `json:"upgradeAllClusterNodes,omitempty"` - UpgradeClusterPool *bool `json:"upgradeClusterPool,omitempty"` - - // Fields inherited from ClusterPoolUpgradeProperties -} - -var _ json.Marshaler = ClusterPoolAKSPatchVersionUpgradeProperties{} - -func (s ClusterPoolAKSPatchVersionUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPoolAKSPatchVersionUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPoolAKSPatchVersionUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolAKSPatchVersionUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "AKSPatchUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPoolAKSPatchVersionUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgrade.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgrade.go deleted file mode 100644 index 6b9d124d518..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgrade.go +++ /dev/null @@ -1,48 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolAvailableUpgrade struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties ClusterPoolAvailableUpgradeProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Unmarshaler = &ClusterPoolAvailableUpgrade{} - -func (s *ClusterPoolAvailableUpgrade) UnmarshalJSON(bytes []byte) error { - type alias ClusterPoolAvailableUpgrade - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ClusterPoolAvailableUpgrade: %+v", err) - } - - s.Id = decoded.Id - s.Name = decoded.Name - s.SystemData = decoded.SystemData - s.Type = decoded.Type - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ClusterPoolAvailableUpgrade into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalClusterPoolAvailableUpgradePropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ClusterPoolAvailableUpgrade': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradeakspatchupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradeakspatchupgradeproperties.go deleted file mode 100644 index 37dacb30a4f..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradeakspatchupgradeproperties.go +++ /dev/null @@ -1,43 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterPoolAvailableUpgradeProperties = ClusterPoolAvailableUpgradeAksPatchUpgradeProperties{} - -type ClusterPoolAvailableUpgradeAksPatchUpgradeProperties struct { - CurrentVersion *string `json:"currentVersion,omitempty"` - CurrentVersionStatus *CurrentClusterPoolAksVersionStatus `json:"currentVersionStatus,omitempty"` - LatestVersion *string `json:"latestVersion,omitempty"` - - // Fields inherited from ClusterPoolAvailableUpgradeProperties -} - -var _ json.Marshaler = ClusterPoolAvailableUpgradeAksPatchUpgradeProperties{} - -func (s ClusterPoolAvailableUpgradeAksPatchUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPoolAvailableUpgradeAksPatchUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPoolAvailableUpgradeAksPatchUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolAvailableUpgradeAksPatchUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "AKSPatchUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPoolAvailableUpgradeAksPatchUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradenodeosupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradenodeosupgradeproperties.go deleted file mode 100644 index 68b49b86548..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradenodeosupgradeproperties.go +++ /dev/null @@ -1,41 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterPoolAvailableUpgradeProperties = ClusterPoolAvailableUpgradeNodeOsUpgradeProperties{} - -type ClusterPoolAvailableUpgradeNodeOsUpgradeProperties struct { - LatestVersion *string `json:"latestVersion,omitempty"` - - // Fields inherited from ClusterPoolAvailableUpgradeProperties -} - -var _ json.Marshaler = ClusterPoolAvailableUpgradeNodeOsUpgradeProperties{} - -func (s ClusterPoolAvailableUpgradeNodeOsUpgradeProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPoolAvailableUpgradeNodeOsUpgradeProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPoolAvailableUpgradeNodeOsUpgradeProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolAvailableUpgradeNodeOsUpgradeProperties: %+v", err) - } - decoded["upgradeType"] = "NodeOsUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPoolAvailableUpgradeNodeOsUpgradeProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradeproperties.go deleted file mode 100644 index 4cefc05b96a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolavailableupgradeproperties.go +++ /dev/null @@ -1,61 +0,0 @@ -package hdinsights - -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 ClusterPoolAvailableUpgradeProperties interface { -} - -// RawClusterPoolAvailableUpgradePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClusterPoolAvailableUpgradePropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClusterPoolAvailableUpgradePropertiesImplementation(input []byte) (ClusterPoolAvailableUpgradeProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolAvailableUpgradeProperties into map[string]interface: %+v", err) - } - - value, ok := temp["upgradeType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AKSPatchUpgrade") { - var out ClusterPoolAvailableUpgradeAksPatchUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPoolAvailableUpgradeAksPatchUpgradeProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "NodeOsUpgrade") { - var out ClusterPoolAvailableUpgradeNodeOsUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPoolAvailableUpgradeNodeOsUpgradeProperties: %+v", err) - } - return out, nil - } - - out := RawClusterPoolAvailableUpgradePropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolcomputeprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolcomputeprofile.go deleted file mode 100644 index 81433b098c7..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolcomputeprofile.go +++ /dev/null @@ -1,14 +0,0 @@ -package hdinsights - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolComputeProfile struct { - AvailabilityZones *zones.Schema `json:"availabilityZones,omitempty"` - Count *int64 `json:"count,omitempty"` - VMSize string `json:"vmSize"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolloganalyticsprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolloganalyticsprofile.go deleted file mode 100644 index 85de6637a4a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolloganalyticsprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolLogAnalyticsProfile struct { - Enabled bool `json:"enabled"` - WorkspaceId *string `json:"workspaceId,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnetworkprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnetworkprofile.go deleted file mode 100644 index 0c3bced1e36..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnetworkprofile.go +++ /dev/null @@ -1,11 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolNetworkProfile struct { - ApiServerAuthorizedIPRanges *[]string `json:"apiServerAuthorizedIpRanges,omitempty"` - EnablePrivateApiServer *bool `json:"enablePrivateApiServer,omitempty"` - OutboundType *OutboundType `json:"outboundType,omitempty"` - SubnetId string `json:"subnetId"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnodeosimageupdateproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnodeosimageupdateproperties.go deleted file mode 100644 index 3db894ddc47..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnodeosimageupdateproperties.go +++ /dev/null @@ -1,40 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterPoolUpgradeProperties = ClusterPoolNodeOsImageUpdateProperties{} - -type ClusterPoolNodeOsImageUpdateProperties struct { - - // Fields inherited from ClusterPoolUpgradeProperties -} - -var _ json.Marshaler = ClusterPoolNodeOsImageUpdateProperties{} - -func (s ClusterPoolNodeOsImageUpdateProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPoolNodeOsImageUpdateProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPoolNodeOsImageUpdateProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolNodeOsImageUpdateProperties: %+v", err) - } - decoded["upgradeType"] = "NodeOsUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPoolNodeOsImageUpdateProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnodeosupgradehistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnodeosupgradehistoryproperties.go deleted file mode 100644 index b60679dceed..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolnodeosupgradehistoryproperties.go +++ /dev/null @@ -1,43 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterPoolUpgradeHistoryProperties = ClusterPoolNodeOsUpgradeHistoryProperties{} - -type ClusterPoolNodeOsUpgradeHistoryProperties struct { - NewNodeOs *string `json:"newNodeOs,omitempty"` - - // Fields inherited from ClusterPoolUpgradeHistoryProperties - UpgradeResult ClusterPoolUpgradeHistoryUpgradeResultType `json:"upgradeResult"` - UtcTime string `json:"utcTime"` -} - -var _ json.Marshaler = ClusterPoolNodeOsUpgradeHistoryProperties{} - -func (s ClusterPoolNodeOsUpgradeHistoryProperties) MarshalJSON() ([]byte, error) { - type wrapper ClusterPoolNodeOsUpgradeHistoryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ClusterPoolNodeOsUpgradeHistoryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolNodeOsUpgradeHistoryProperties: %+v", err) - } - decoded["upgradeType"] = "NodeOsUpgrade" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ClusterPoolNodeOsUpgradeHistoryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolprofile.go deleted file mode 100644 index c15e6891cd5..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolProfile struct { - ClusterPoolVersion string `json:"clusterPoolVersion"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolresourceproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolresourceproperties.go deleted file mode 100644 index c7c30874ee8..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolresourceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolResourceProperties struct { - AksClusterProfile *AksClusterProfile `json:"aksClusterProfile,omitempty"` - AksManagedResourceGroupName *string `json:"aksManagedResourceGroupName,omitempty"` - ClusterPoolProfile *ClusterPoolProfile `json:"clusterPoolProfile,omitempty"` - ComputeProfile ClusterPoolComputeProfile `json:"computeProfile"` - DeploymentId *string `json:"deploymentId,omitempty"` - LogAnalyticsProfile *ClusterPoolLogAnalyticsProfile `json:"logAnalyticsProfile,omitempty"` - ManagedResourceGroupName *string `json:"managedResourceGroupName,omitempty"` - NetworkProfile *ClusterPoolNetworkProfile `json:"networkProfile,omitempty"` - ProvisioningState *ProvisioningStatus `json:"provisioningState,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgrade.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgrade.go deleted file mode 100644 index d0de912e386..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgrade.go +++ /dev/null @@ -1,32 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolUpgrade struct { - Properties ClusterPoolUpgradeProperties `json:"properties"` -} - -var _ json.Unmarshaler = &ClusterPoolUpgrade{} - -func (s *ClusterPoolUpgrade) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ClusterPoolUpgrade into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalClusterPoolUpgradePropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ClusterPoolUpgrade': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradehistory.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradehistory.go deleted file mode 100644 index ed7e4162f70..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradehistory.go +++ /dev/null @@ -1,48 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolUpgradeHistory struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties ClusterPoolUpgradeHistoryProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Unmarshaler = &ClusterPoolUpgradeHistory{} - -func (s *ClusterPoolUpgradeHistory) UnmarshalJSON(bytes []byte) error { - type alias ClusterPoolUpgradeHistory - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ClusterPoolUpgradeHistory: %+v", err) - } - - s.Id = decoded.Id - s.Name = decoded.Name - s.SystemData = decoded.SystemData - s.Type = decoded.Type - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ClusterPoolUpgradeHistory into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalClusterPoolUpgradeHistoryPropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ClusterPoolUpgradeHistory': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradehistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradehistoryproperties.go deleted file mode 100644 index c952042032c..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradehistoryproperties.go +++ /dev/null @@ -1,61 +0,0 @@ -package hdinsights - -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 ClusterPoolUpgradeHistoryProperties interface { -} - -// RawClusterPoolUpgradeHistoryPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClusterPoolUpgradeHistoryPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClusterPoolUpgradeHistoryPropertiesImplementation(input []byte) (ClusterPoolUpgradeHistoryProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolUpgradeHistoryProperties into map[string]interface: %+v", err) - } - - value, ok := temp["upgradeType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AKSPatchUpgrade") { - var out ClusterPoolAksPatchUpgradeHistoryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPoolAksPatchUpgradeHistoryProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "NodeOsUpgrade") { - var out ClusterPoolNodeOsUpgradeHistoryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPoolNodeOsUpgradeHistoryProperties: %+v", err) - } - return out, nil - } - - out := RawClusterPoolUpgradeHistoryPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradeproperties.go deleted file mode 100644 index c444d09be25..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolupgradeproperties.go +++ /dev/null @@ -1,61 +0,0 @@ -package hdinsights - -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 ClusterPoolUpgradeProperties interface { -} - -// RawClusterPoolUpgradePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClusterPoolUpgradePropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClusterPoolUpgradePropertiesImplementation(input []byte) (ClusterPoolUpgradeProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterPoolUpgradeProperties into map[string]interface: %+v", err) - } - - value, ok := temp["upgradeType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AKSPatchUpgrade") { - var out ClusterPoolAKSPatchVersionUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPoolAKSPatchVersionUpgradeProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "NodeOsUpgrade") { - var out ClusterPoolNodeOsImageUpdateProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPoolNodeOsImageUpdateProperties: %+v", err) - } - return out, nil - } - - out := RawClusterPoolUpgradePropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolversion.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolversion.go deleted file mode 100644 index 105feba1701..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolversion.go +++ /dev/null @@ -1,16 +0,0 @@ -package hdinsights - -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 ClusterPoolVersion struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ClusterPoolVersionProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolversionproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolversionproperties.go deleted file mode 100644 index 1dfb2c6f686..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterpoolversionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPoolVersionProperties struct { - AksVersion *string `json:"aksVersion,omitempty"` - ClusterPoolVersion *string `json:"clusterPoolVersion,omitempty"` - IsPreview *bool `json:"isPreview,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterprofile.go deleted file mode 100644 index b54feb673ce..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterprofile.go +++ /dev/null @@ -1,30 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterProfile struct { - AuthorizationProfile AuthorizationProfile `json:"authorizationProfile"` - AutoscaleProfile *AutoscaleProfile `json:"autoscaleProfile,omitempty"` - ClusterAccessProfile *ClusterAccessProfile `json:"clusterAccessProfile,omitempty"` - ClusterVersion string `json:"clusterVersion"` - Components *[]ClusterComponentsComponentsInlined `json:"components,omitempty"` - ConnectivityProfile *ConnectivityProfile `json:"connectivityProfile,omitempty"` - FlinkProfile *FlinkProfile `json:"flinkProfile,omitempty"` - IdentityProfile *IdentityProfile `json:"identityProfile,omitempty"` - KafkaProfile *KafkaProfile `json:"kafkaProfile,omitempty"` - LlapProfile *interface{} `json:"llapProfile,omitempty"` - LogAnalyticsProfile *ClusterLogAnalyticsProfile `json:"logAnalyticsProfile,omitempty"` - ManagedIdentityProfile *ManagedIdentityProfile `json:"managedIdentityProfile,omitempty"` - OssVersion string `json:"ossVersion"` - PrometheusProfile *ClusterPrometheusProfile `json:"prometheusProfile,omitempty"` - RangerPluginProfile *ClusterRangerPluginProfile `json:"rangerPluginProfile,omitempty"` - RangerProfile *RangerProfile `json:"rangerProfile,omitempty"` - ScriptActionProfiles *[]ScriptActionProfile `json:"scriptActionProfiles,omitempty"` - SecretsProfile *SecretsProfile `json:"secretsProfile,omitempty"` - ServiceConfigsProfiles *[]ClusterServiceConfigsProfile `json:"serviceConfigsProfiles,omitempty"` - SparkProfile *SparkProfile `json:"sparkProfile,omitempty"` - SshProfile *SshProfile `json:"sshProfile,omitempty"` - StubProfile *interface{} `json:"stubProfile,omitempty"` - TrinoProfile *TrinoProfile `json:"trinoProfile,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterprometheusprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterprometheusprofile.go deleted file mode 100644 index 1cfb01e4a7d..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterprometheusprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterPrometheusProfile struct { - Enabled bool `json:"enabled"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterrangerpluginprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterrangerpluginprofile.go deleted file mode 100644 index cbffe2d4913..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterrangerpluginprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterRangerPluginProfile struct { - Enabled bool `json:"enabled"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresizedata.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresizedata.go deleted file mode 100644 index 7d354c24c6d..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresizedata.go +++ /dev/null @@ -1,18 +0,0 @@ -package hdinsights - -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 ClusterResizeData struct { - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *ClusterResizeProperties `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/hdinsight/2024-05-01/hdinsights/model_clusterresizeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresizeproperties.go deleted file mode 100644 index c78b3bf3677..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresizeproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterResizeProperties struct { - TargetWorkerNodeCount int64 `json:"targetWorkerNodeCount"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresourceproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresourceproperties.go deleted file mode 100644 index 80711e54b48..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterresourceproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterResourceProperties struct { - ClusterProfile ClusterProfile `json:"clusterProfile"` - ClusterType string `json:"clusterType"` - ComputeProfile ComputeProfile `json:"computeProfile"` - DeploymentId *string `json:"deploymentId,omitempty"` - ProvisioningState *ProvisioningStatus `json:"provisioningState,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterserviceconfig.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterserviceconfig.go deleted file mode 100644 index 31a4e0c3454..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterserviceconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterServiceConfig struct { - Component string `json:"component"` - Files []ClusterConfigFile `json:"files"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterserviceconfigsprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterserviceconfigsprofile.go deleted file mode 100644 index 52703080768..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterserviceconfigsprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterServiceConfigsProfile struct { - Configs []ClusterServiceConfig `json:"configs"` - ServiceName string `json:"serviceName"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgrade.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgrade.go deleted file mode 100644 index 5cd7c3a0321..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgrade.go +++ /dev/null @@ -1,32 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterUpgrade struct { - Properties ClusterUpgradeProperties `json:"properties"` -} - -var _ json.Unmarshaler = &ClusterUpgrade{} - -func (s *ClusterUpgrade) UnmarshalJSON(bytes []byte) error { - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ClusterUpgrade into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalClusterUpgradePropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ClusterUpgrade': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradehistory.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradehistory.go deleted file mode 100644 index 6bd7d5aa368..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradehistory.go +++ /dev/null @@ -1,48 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterUpgradeHistory struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties ClusterUpgradeHistoryProperties `json:"properties"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Unmarshaler = &ClusterUpgradeHistory{} - -func (s *ClusterUpgradeHistory) UnmarshalJSON(bytes []byte) error { - type alias ClusterUpgradeHistory - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ClusterUpgradeHistory: %+v", err) - } - - s.Id = decoded.Id - s.Name = decoded.Name - s.SystemData = decoded.SystemData - s.Type = decoded.Type - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ClusterUpgradeHistory into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["properties"]; ok { - impl, err := unmarshalClusterUpgradeHistoryPropertiesImplementation(v) - if err != nil { - return fmt.Errorf("unmarshaling field 'Properties' for 'ClusterUpgradeHistory': %+v", err) - } - s.Properties = impl - } - return nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradehistoryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradehistoryproperties.go deleted file mode 100644 index e12aead629d..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradehistoryproperties.go +++ /dev/null @@ -1,85 +0,0 @@ -package hdinsights - -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 ClusterUpgradeHistoryProperties interface { -} - -// RawClusterUpgradeHistoryPropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClusterUpgradeHistoryPropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClusterUpgradeHistoryPropertiesImplementation(input []byte) (ClusterUpgradeHistoryProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterUpgradeHistoryProperties into map[string]interface: %+v", err) - } - - value, ok := temp["upgradeType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AKSPatchUpgrade") { - var out ClusterAksPatchUpgradeHistoryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterAksPatchUpgradeHistoryProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "HotfixUpgrade") { - var out ClusterHotfixUpgradeHistoryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterHotfixUpgradeHistoryProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "HotfixUpgradeRollback") { - var out ClusterHotfixUpgradeRollbackHistoryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterHotfixUpgradeRollbackHistoryProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PatchVersionUpgrade") { - var out ClusterPatchVersionUpgradeHistoryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPatchVersionUpgradeHistoryProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PatchVersionUpgradeRollback") { - var out ClusterPatchVersionUpgradeRollbackHistoryProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPatchVersionUpgradeRollbackHistoryProperties: %+v", err) - } - return out, nil - } - - out := RawClusterUpgradeHistoryPropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradeproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradeproperties.go deleted file mode 100644 index 5f9f7066294..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgradeproperties.go +++ /dev/null @@ -1,69 +0,0 @@ -package hdinsights - -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 ClusterUpgradeProperties interface { -} - -// RawClusterUpgradePropertiesImpl is returned when the Discriminated Value -// doesn't match any of the defined types -// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) -// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). -type RawClusterUpgradePropertiesImpl struct { - Type string - Values map[string]interface{} -} - -func unmarshalClusterUpgradePropertiesImplementation(input []byte) (ClusterUpgradeProperties, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ClusterUpgradeProperties into map[string]interface: %+v", err) - } - - value, ok := temp["upgradeType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "AKSPatchUpgrade") { - var out ClusterAKSPatchVersionUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterAKSPatchVersionUpgradeProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "HotfixUpgrade") { - var out ClusterHotfixUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterHotfixUpgradeProperties: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "PatchVersionUpgrade") { - var out ClusterPatchVersionUpgradeProperties - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ClusterPatchVersionUpgradeProperties: %+v", err) - } - return out, nil - } - - out := RawClusterUpgradePropertiesImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgraderollback.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgraderollback.go deleted file mode 100644 index 7d9286fc46f..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgraderollback.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterUpgradeRollback struct { - Properties ClusterUpgradeRollbackProperties `json:"properties"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgraderollbackproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgraderollbackproperties.go deleted file mode 100644 index 58cd5a0bd9a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterupgraderollbackproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterUpgradeRollbackProperties struct { - UpgradeHistory string `json:"upgradeHistory"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterversion.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterversion.go deleted file mode 100644 index a88913df28e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterversion.go +++ /dev/null @@ -1,16 +0,0 @@ -package hdinsights - -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 ClusterVersion struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ClusterVersionProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterversionproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterversionproperties.go deleted file mode 100644 index 7e0bc05059e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_clusterversionproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterVersionProperties struct { - ClusterPoolVersion *string `json:"clusterPoolVersion,omitempty"` - ClusterType *string `json:"clusterType,omitempty"` - ClusterVersion *string `json:"clusterVersion,omitempty"` - Components *[]ClusterComponentsComponentsInlined `json:"components,omitempty"` - IsPreview *bool `json:"isPreview,omitempty"` - OssVersion *string `json:"ossVersion,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_comparisonrule.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_comparisonrule.go deleted file mode 100644 index 5b122f53b00..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_comparisonrule.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ComparisonRule struct { - Operator ComparisonOperator `json:"operator"` - Threshold float64 `json:"threshold"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_computeprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_computeprofile.go deleted file mode 100644 index ccba11c47f0..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_computeprofile.go +++ /dev/null @@ -1,13 +0,0 @@ -package hdinsights - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ComputeProfile struct { - AvailabilityZones *zones.Schema `json:"availabilityZones,omitempty"` - Nodes []NodeProfile `json:"nodes"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_computeresourcedefinition.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_computeresourcedefinition.go deleted file mode 100644 index bbee9356524..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_computeresourcedefinition.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ComputeResourceDefinition struct { - Cpu float64 `json:"cpu"` - Memory int64 `json:"memory"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_connectivityprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_connectivityprofile.go deleted file mode 100644 index 4ab92056283..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_connectivityprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityProfile struct { - Ssh *[]SshConnectivityEndpoint `json:"ssh,omitempty"` - Web WebConnectivityEndpoint `json:"web"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_diskstorageprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_diskstorageprofile.go deleted file mode 100644 index 537587d0de0..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_diskstorageprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DiskStorageProfile struct { - DataDiskSize int64 `json:"dataDiskSize"` - DataDiskType DataDiskType `json:"dataDiskType"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkcatalogoptions.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkcatalogoptions.go deleted file mode 100644 index f2bdef2eb70..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkcatalogoptions.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlinkCatalogOptions struct { - Hive *FlinkHiveCatalogOption `json:"hive,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkhivecatalogoption.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkhivecatalogoption.go deleted file mode 100644 index 9794658c1b5..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkhivecatalogoption.go +++ /dev/null @@ -1,11 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlinkHiveCatalogOption struct { - MetastoreDbConnectionAuthenticationMode *MetastoreDbConnectionAuthenticationMode `json:"metastoreDbConnectionAuthenticationMode,omitempty"` - MetastoreDbConnectionPasswordSecret *string `json:"metastoreDbConnectionPasswordSecret,omitempty"` - MetastoreDbConnectionURL string `json:"metastoreDbConnectionURL"` - MetastoreDbConnectionUserName *string `json:"metastoreDbConnectionUserName,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkjobprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkjobprofile.go deleted file mode 100644 index 76a41e0cb5e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkjobprofile.go +++ /dev/null @@ -1,13 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlinkJobProfile struct { - Args *string `json:"args,omitempty"` - EntryClass *string `json:"entryClass,omitempty"` - JarName string `json:"jarName"` - JobJarDirectory string `json:"jobJarDirectory"` - SavePointName *string `json:"savePointName,omitempty"` - UpgradeMode UpgradeMode `json:"upgradeMode"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkjobproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkjobproperties.go deleted file mode 100644 index 64d94feb6a3..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkjobproperties.go +++ /dev/null @@ -1,54 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterJobProperties = FlinkJobProperties{} - -type FlinkJobProperties struct { - Action *Action `json:"action,omitempty"` - ActionResult *string `json:"actionResult,omitempty"` - Args *string `json:"args,omitempty"` - EntryClass *string `json:"entryClass,omitempty"` - FlinkConfiguration *map[string]string `json:"flinkConfiguration,omitempty"` - JarName *string `json:"jarName,omitempty"` - JobId *string `json:"jobId,omitempty"` - JobJarDirectory *string `json:"jobJarDirectory,omitempty"` - JobName *string `json:"jobName,omitempty"` - JobOutput *string `json:"jobOutput,omitempty"` - LastSavePoint *string `json:"lastSavePoint,omitempty"` - RunId *string `json:"runId,omitempty"` - SavePointName *string `json:"savePointName,omitempty"` - Status *string `json:"status,omitempty"` - - // Fields inherited from ClusterJobProperties -} - -var _ json.Marshaler = FlinkJobProperties{} - -func (s FlinkJobProperties) MarshalJSON() ([]byte, error) { - type wrapper FlinkJobProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FlinkJobProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FlinkJobProperties: %+v", err) - } - decoded["jobType"] = "FlinkJob" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FlinkJobProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkprofile.go deleted file mode 100644 index 204b6b89964..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkprofile.go +++ /dev/null @@ -1,15 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlinkProfile struct { - CatalogOptions *FlinkCatalogOptions `json:"catalogOptions,omitempty"` - DeploymentMode *DeploymentMode `json:"deploymentMode,omitempty"` - HistoryServer *ComputeResourceDefinition `json:"historyServer,omitempty"` - JobManager ComputeResourceDefinition `json:"jobManager"` - JobSpec *FlinkJobProfile `json:"jobSpec,omitempty"` - NumReplicas *int64 `json:"numReplicas,omitempty"` - Storage FlinkStorageProfile `json:"storage"` - TaskManager ComputeResourceDefinition `json:"taskManager"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkstorageprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkstorageprofile.go deleted file mode 100644 index a42a43f26c3..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_flinkstorageprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlinkStorageProfile struct { - StorageUri string `json:"storageUri"` - Storagekey *string `json:"storagekey,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_hivecatalogoption.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_hivecatalogoption.go deleted file mode 100644 index 69c7ff71ff7..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_hivecatalogoption.go +++ /dev/null @@ -1,13 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HiveCatalogOption struct { - CatalogName string `json:"catalogName"` - MetastoreDbConnectionAuthenticationMode *MetastoreDbConnectionAuthenticationMode `json:"metastoreDbConnectionAuthenticationMode,omitempty"` - MetastoreDbConnectionPasswordSecret *string `json:"metastoreDbConnectionPasswordSecret,omitempty"` - MetastoreDbConnectionURL string `json:"metastoreDbConnectionURL"` - MetastoreDbConnectionUserName *string `json:"metastoreDbConnectionUserName,omitempty"` - MetastoreWarehouseDir string `json:"metastoreWarehouseDir"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_identityprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_identityprofile.go deleted file mode 100644 index b97ff7d5eac..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_identityprofile.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IdentityProfile struct { - MsiClientId string `json:"msiClientId"` - MsiObjectId string `json:"msiObjectId"` - MsiResourceId string `json:"msiResourceId"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_kafkaconnectivityendpoints.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_kafkaconnectivityendpoints.go deleted file mode 100644 index c8a0bdfc071..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_kafkaconnectivityendpoints.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type KafkaConnectivityEndpoints struct { - BootstrapServerEndpoint *string `json:"bootstrapServerEndpoint,omitempty"` - BrokerEndpoints *[]string `json:"brokerEndpoints,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_kafkaprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_kafkaprofile.go deleted file mode 100644 index b5233a52f94..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_kafkaprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type KafkaProfile struct { - ConnectivityEndpoints *KafkaConnectivityEndpoints `json:"connectivityEndpoints,omitempty"` - DiskStorage DiskStorageProfile `json:"diskStorage"` - EnableKRaft *bool `json:"enableKRaft,omitempty"` - EnablePublicEndpoints *bool `json:"enablePublicEndpoints,omitempty"` - RemoteStorageUri *string `json:"remoteStorageUri,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_loadbasedconfig.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_loadbasedconfig.go deleted file mode 100644 index b4f09bce5e2..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_loadbasedconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBasedConfig struct { - CooldownPeriod *int64 `json:"cooldownPeriod,omitempty"` - MaxNodes int64 `json:"maxNodes"` - MinNodes int64 `json:"minNodes"` - PollInterval *int64 `json:"pollInterval,omitempty"` - ScalingRules []ScalingRule `json:"scalingRules"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_managedidentityprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_managedidentityprofile.go deleted file mode 100644 index 177384cd86c..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_managedidentityprofile.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedIdentityProfile struct { - IdentityList []ManagedIdentitySpec `json:"identityList"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_managedidentityspec.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_managedidentityspec.go deleted file mode 100644 index 7b940f288f3..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_managedidentityspec.go +++ /dev/null @@ -1,11 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedIdentitySpec struct { - ClientId string `json:"clientId"` - ObjectId string `json:"objectId"` - ResourceId string `json:"resourceId"` - Type ManagedIdentityType `json:"type"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_mavenlibraryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_mavenlibraryproperties.go deleted file mode 100644 index 3d5df1938a8..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_mavenlibraryproperties.go +++ /dev/null @@ -1,62 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterLibraryProperties = MavenLibraryProperties{} - -type MavenLibraryProperties struct { - GroupId string `json:"groupId"` - Name string `json:"name"` - Version *string `json:"version,omitempty"` - - // Fields inherited from ClusterLibraryProperties - Message *string `json:"message,omitempty"` - Remarks *string `json:"remarks,omitempty"` - Status *Status `json:"status,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -func (o *MavenLibraryProperties) GetTimestampAsTime() (*time.Time, error) { - if o.Timestamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Timestamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *MavenLibraryProperties) SetTimestampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Timestamp = &formatted -} - -var _ json.Marshaler = MavenLibraryProperties{} - -func (s MavenLibraryProperties) MarshalJSON() ([]byte, error) { - type wrapper MavenLibraryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling MavenLibraryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling MavenLibraryProperties: %+v", err) - } - decoded["type"] = "maven" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling MavenLibraryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_nameavailabilityparameters.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_nameavailabilityparameters.go deleted file mode 100644 index ac59a1a31fb..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_nameavailabilityparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NameAvailabilityParameters struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_nameavailabilityresult.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_nameavailabilityresult.go deleted file mode 100644 index c9e9ff1c6c4..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_nameavailabilityresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NameAvailabilityResult struct { - Message *string `json:"message,omitempty"` - NameAvailable *bool `json:"nameAvailable,omitempty"` - Reason *string `json:"reason,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_nodeprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_nodeprofile.go deleted file mode 100644 index fe96f4438fc..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_nodeprofile.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NodeProfile struct { - Count int64 `json:"count"` - Type string `json:"type"` - VMSize string `json:"vmSize"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_pypilibraryproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_pypilibraryproperties.go deleted file mode 100644 index 501a1045768..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_pypilibraryproperties.go +++ /dev/null @@ -1,61 +0,0 @@ -package hdinsights - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ClusterLibraryProperties = PyPiLibraryProperties{} - -type PyPiLibraryProperties struct { - Name string `json:"name"` - Version *string `json:"version,omitempty"` - - // Fields inherited from ClusterLibraryProperties - Message *string `json:"message,omitempty"` - Remarks *string `json:"remarks,omitempty"` - Status *Status `json:"status,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` -} - -func (o *PyPiLibraryProperties) GetTimestampAsTime() (*time.Time, error) { - if o.Timestamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.Timestamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *PyPiLibraryProperties) SetTimestampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.Timestamp = &formatted -} - -var _ json.Marshaler = PyPiLibraryProperties{} - -func (s PyPiLibraryProperties) MarshalJSON() ([]byte, error) { - type wrapper PyPiLibraryProperties - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling PyPiLibraryProperties: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling PyPiLibraryProperties: %+v", err) - } - decoded["type"] = "pypi" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling PyPiLibraryProperties: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangeradminspec.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangeradminspec.go deleted file mode 100644 index cbda9776e8f..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangeradminspec.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RangerAdminSpec struct { - Admins []string `json:"admins"` - Database RangerAdminSpecDatabase `json:"database"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangeradminspecdatabase.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangeradminspecdatabase.go deleted file mode 100644 index 950f0b0874a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangeradminspecdatabase.go +++ /dev/null @@ -1,11 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RangerAdminSpecDatabase struct { - Host string `json:"host"` - Name string `json:"name"` - PasswordSecretRef *string `json:"passwordSecretRef,omitempty"` - Username *string `json:"username,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerauditspec.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerauditspec.go deleted file mode 100644 index 5ed6c56c39f..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerauditspec.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RangerAuditSpec struct { - StorageAccount *string `json:"storageAccount,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerprofile.go deleted file mode 100644 index 2569b74a563..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerprofile.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RangerProfile struct { - RangerAdmin RangerAdminSpec `json:"rangerAdmin"` - RangerAudit *RangerAuditSpec `json:"rangerAudit,omitempty"` - RangerUsersync RangerUsersyncSpec `json:"rangerUsersync"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerusersyncspec.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerusersyncspec.go deleted file mode 100644 index 619562a8bd2..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_rangerusersyncspec.go +++ /dev/null @@ -1,12 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RangerUsersyncSpec struct { - Enabled *bool `json:"enabled,omitempty"` - Groups *[]string `json:"groups,omitempty"` - Mode *RangerUsersyncMode `json:"mode,omitempty"` - UserMappingLocation *string `json:"userMappingLocation,omitempty"` - Users *[]string `json:"users,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_scalingrule.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_scalingrule.go deleted file mode 100644 index 42ac004d527..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_scalingrule.go +++ /dev/null @@ -1,11 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScalingRule struct { - ActionType ScaleActionType `json:"actionType"` - ComparisonRule ComparisonRule `json:"comparisonRule"` - EvaluationCount int64 `json:"evaluationCount"` - ScalingMetric string `json:"scalingMetric"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_schedule.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_schedule.go deleted file mode 100644 index cd9b92eb657..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_schedule.go +++ /dev/null @@ -1,11 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Schedule struct { - Count int64 `json:"count"` - Days []ScheduleDay `json:"days"` - EndTime string `json:"endTime"` - StartTime string `json:"startTime"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_schedulebasedconfig.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_schedulebasedconfig.go deleted file mode 100644 index dc6aa759b97..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_schedulebasedconfig.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScheduleBasedConfig struct { - DefaultCount int64 `json:"defaultCount"` - Schedules []Schedule `json:"schedules"` - TimeZone string `json:"timeZone"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_scriptactionprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_scriptactionprofile.go deleted file mode 100644 index de937ddb267..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_scriptactionprofile.go +++ /dev/null @@ -1,14 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScriptActionProfile struct { - Name string `json:"name"` - Parameters *string `json:"parameters,omitempty"` - Services []string `json:"services"` - ShouldPersist *bool `json:"shouldPersist,omitempty"` - TimeoutInMinutes *int64 `json:"timeoutInMinutes,omitempty"` - Type string `json:"type"` - Url string `json:"url"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_secretreference.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_secretreference.go deleted file mode 100644 index 4939216b9eb..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_secretreference.go +++ /dev/null @@ -1,11 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecretReference struct { - KeyVaultObjectName string `json:"keyVaultObjectName"` - ReferenceName string `json:"referenceName"` - Type KeyVaultObjectType `json:"type"` - Version *string `json:"version,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_secretsprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_secretsprofile.go deleted file mode 100644 index 4256220f428..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_secretsprofile.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecretsProfile struct { - KeyVaultResourceId string `json:"keyVaultResourceId"` - Secrets *[]SecretReference `json:"secrets,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfiglistresultproperties.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfiglistresultproperties.go deleted file mode 100644 index 668d8d3396c..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfiglistresultproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceConfigListResultProperties struct { - ComponentName string `json:"componentName"` - Content *string `json:"content,omitempty"` - CustomKeys *map[string]string `json:"customKeys,omitempty"` - DefaultKeys *map[string]ServiceConfigListResultValueEntity `json:"defaultKeys,omitempty"` - FileName string `json:"fileName"` - Path *string `json:"path,omitempty"` - ServiceName string `json:"serviceName"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfiglistresultvalueentity.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfiglistresultvalueentity.go deleted file mode 100644 index a714004a92d..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfiglistresultvalueentity.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceConfigListResultValueEntity struct { - Description *string `json:"description,omitempty"` - Value string `json:"value"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfigresult.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfigresult.go deleted file mode 100644 index f62f4b32505..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_serviceconfigresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceConfigResult struct { - Properties *ServiceConfigListResultProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_servicestatus.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_servicestatus.go deleted file mode 100644 index 60b91c19fa5..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_servicestatus.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceStatus struct { - Kind string `json:"kind"` - Message *string `json:"message,omitempty"` - Ready string `json:"ready"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkmetastorespec.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkmetastorespec.go deleted file mode 100644 index 0f4f1e5faa5..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkmetastorespec.go +++ /dev/null @@ -1,14 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SparkMetastoreSpec struct { - DbConnectionAuthenticationMode *DbConnectionAuthenticationMode `json:"dbConnectionAuthenticationMode,omitempty"` - DbName string `json:"dbName"` - DbPasswordSecretName *string `json:"dbPasswordSecretName,omitempty"` - DbServerHost string `json:"dbServerHost"` - DbUserName *string `json:"dbUserName,omitempty"` - KeyVaultId *string `json:"keyVaultId,omitempty"` - ThriftUrl *string `json:"thriftUrl,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkprofile.go deleted file mode 100644 index eb7dcf5586a..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkprofile.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SparkProfile struct { - DefaultStorageUrl *string `json:"defaultStorageUrl,omitempty"` - MetastoreSpec *SparkMetastoreSpec `json:"metastoreSpec,omitempty"` - UserPluginsSpec *SparkUserPlugins `json:"userPluginsSpec,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkuserplugin.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkuserplugin.go deleted file mode 100644 index 4ca213c492d..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkuserplugin.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SparkUserPlugin struct { - Path string `json:"path"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkuserplugins.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkuserplugins.go deleted file mode 100644 index efad120f188..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sparkuserplugins.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SparkUserPlugins struct { - Plugins *[]SparkUserPlugin `json:"plugins,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sshconnectivityendpoint.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_sshconnectivityendpoint.go deleted file mode 100644 index c02d8aceb70..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sshconnectivityendpoint.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SshConnectivityEndpoint struct { - Endpoint string `json:"endpoint"` - PrivateSshEndpoint *string `json:"privateSshEndpoint,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sshprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_sshprofile.go deleted file mode 100644 index 565961a32f4..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_sshprofile.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SshProfile struct { - Count int64 `json:"count"` - PodPrefix *string `json:"podPrefix,omitempty"` - VMSize *string `json:"vmSize,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_tagsobject.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_tagsobject.go deleted file mode 100644 index 01c6624701b..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinocoordinator.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinocoordinator.go deleted file mode 100644 index e3ccf15e51e..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinocoordinator.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrinoCoordinator struct { - Debug *TrinoDebugConfig `json:"debug,omitempty"` - HighAvailabilityEnabled *bool `json:"highAvailabilityEnabled,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinodebugconfig.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinodebugconfig.go deleted file mode 100644 index 3f049766688..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinodebugconfig.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrinoDebugConfig struct { - Enable *bool `json:"enable,omitempty"` - Port *int64 `json:"port,omitempty"` - Suspend *bool `json:"suspend,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinoprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinoprofile.go deleted file mode 100644 index 01845c9f621..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinoprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrinoProfile struct { - CatalogOptions *CatalogOptions `json:"catalogOptions,omitempty"` - Coordinator *TrinoCoordinator `json:"coordinator,omitempty"` - UserPluginsSpec *TrinoUserPlugins `json:"userPluginsSpec,omitempty"` - UserTelemetrySpec *TrinoUserTelemetry `json:"userTelemetrySpec,omitempty"` - Worker *TrinoWorker `json:"worker,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinotelemetryconfig.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinotelemetryconfig.go deleted file mode 100644 index 16e47ef03a9..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinotelemetryconfig.go +++ /dev/null @@ -1,11 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrinoTelemetryConfig struct { - HivecatalogName *string `json:"hivecatalogName,omitempty"` - HivecatalogSchema *string `json:"hivecatalogSchema,omitempty"` - PartitionRetentionInDays *int64 `json:"partitionRetentionInDays,omitempty"` - Path *string `json:"path,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinouserplugin.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinouserplugin.go deleted file mode 100644 index 687061549f5..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinouserplugin.go +++ /dev/null @@ -1,10 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrinoUserPlugin struct { - Enabled *bool `json:"enabled,omitempty"` - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinouserplugins.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinouserplugins.go deleted file mode 100644 index 943388c0430..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinouserplugins.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrinoUserPlugins struct { - Plugins *[]TrinoUserPlugin `json:"plugins,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinousertelemetry.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinousertelemetry.go deleted file mode 100644 index cae3ab104b5..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinousertelemetry.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrinoUserTelemetry struct { - Storage *TrinoTelemetryConfig `json:"storage,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinoworker.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinoworker.go deleted file mode 100644 index 28afe0313d0..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_trinoworker.go +++ /dev/null @@ -1,8 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrinoWorker struct { - Debug *TrinoDebugConfig `json:"debug,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_updatableclusterprofile.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_updatableclusterprofile.go deleted file mode 100644 index b703c72733d..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_updatableclusterprofile.go +++ /dev/null @@ -1,18 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdatableClusterProfile struct { - AuthorizationProfile *AuthorizationProfile `json:"authorizationProfile,omitempty"` - AutoscaleProfile *AutoscaleProfile `json:"autoscaleProfile,omitempty"` - LogAnalyticsProfile *ClusterLogAnalyticsProfile `json:"logAnalyticsProfile,omitempty"` - PrometheusProfile *ClusterPrometheusProfile `json:"prometheusProfile,omitempty"` - RangerPluginProfile *ClusterRangerPluginProfile `json:"rangerPluginProfile,omitempty"` - RangerProfile *RangerProfile `json:"rangerProfile,omitempty"` - ScriptActionProfiles *[]ScriptActionProfile `json:"scriptActionProfiles,omitempty"` - SecretsProfile *SecretsProfile `json:"secretsProfile,omitempty"` - ServiceConfigsProfiles *[]ClusterServiceConfigsProfile `json:"serviceConfigsProfiles,omitempty"` - SshProfile *SshProfile `json:"sshProfile,omitempty"` - TrinoProfile *TrinoProfile `json:"trinoProfile,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/model_webconnectivityendpoint.go b/resource-manager/hdinsight/2024-05-01/hdinsights/model_webconnectivityendpoint.go deleted file mode 100644 index 693f951d9d6..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/model_webconnectivityendpoint.go +++ /dev/null @@ -1,9 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebConnectivityEndpoint struct { - Fqdn string `json:"fqdn"` - PrivateFqdn *string `json:"privateFqdn,omitempty"` -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/predicates.go b/resource-manager/hdinsight/2024-05-01/hdinsights/predicates.go deleted file mode 100644 index b1f9f1a2151..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/predicates.go +++ /dev/null @@ -1,265 +0,0 @@ -package hdinsights - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ClusterOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ClusterOperationPredicate) Matches(input Cluster) 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 -} - -type ClusterAvailableUpgradeOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ClusterAvailableUpgradeOperationPredicate) Matches(input ClusterAvailableUpgrade) 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 ClusterInstanceViewResultOperationPredicate struct { - Name *string -} - -func (p ClusterInstanceViewResultOperationPredicate) Matches(input ClusterInstanceViewResult) bool { - - if p.Name != nil && *p.Name != input.Name { - return false - } - - return true -} - -type ClusterJobOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ClusterJobOperationPredicate) Matches(input ClusterJob) 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 ClusterLibraryOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ClusterLibraryOperationPredicate) Matches(input ClusterLibrary) 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 ClusterPoolOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ClusterPoolOperationPredicate) Matches(input ClusterPool) 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 -} - -type ClusterPoolAvailableUpgradeOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ClusterPoolAvailableUpgradeOperationPredicate) Matches(input ClusterPoolAvailableUpgrade) 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 ClusterPoolUpgradeHistoryOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ClusterPoolUpgradeHistoryOperationPredicate) Matches(input ClusterPoolUpgradeHistory) 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 ClusterPoolVersionOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ClusterPoolVersionOperationPredicate) Matches(input ClusterPoolVersion) 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 ClusterUpgradeHistoryOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ClusterUpgradeHistoryOperationPredicate) Matches(input ClusterUpgradeHistory) 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 ClusterVersionOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ClusterVersionOperationPredicate) Matches(input ClusterVersion) 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 ServiceConfigResultOperationPredicate struct { -} - -func (p ServiceConfigResultOperationPredicate) Matches(input ServiceConfigResult) bool { - - return true -} diff --git a/resource-manager/hdinsight/2024-05-01/hdinsights/version.go b/resource-manager/hdinsight/2024-05-01/hdinsights/version.go deleted file mode 100644 index 1da5591ea32..00000000000 --- a/resource-manager/hdinsight/2024-05-01/hdinsights/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package hdinsights - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2024-05-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/hdinsights/%s", defaultApiVersion) -}