From da66254107d6f2be5908f99551bb36ad84677f1d Mon Sep 17 00:00:00 2001 From: neil-yechenwei Date: Fri, 25 Oct 2024 19:46:08 +0800 Subject: [PATCH] Upgrade MySQL API version from 2022-11-01 to 2023-12-30 --- internal/services/mysql/client/client.go | 8 +- .../mysql/mysql_flexible_database_resource.go | 2 +- .../mysql_flexible_database_resource_test.go | 2 +- ...xible_server_aad_administrator_resource.go | 2 +- ..._server_aad_administrator_resource_test.go | 2 +- ..._flexible_server_configuration_resource.go | 2 +- ...ible_server_configuration_resource_test.go | 4 +- .../mysql_flexible_server_data_source.go | 10 +- ..._flexible_server_firewall_rule_resource.go | 2 +- ...ible_server_firewall_rule_resource_test.go | 2 +- .../mysql/mysql_flexible_server_resource.go | 30 +- .../mysql_flexible_server_resource_test.go | 2 +- ...ng_cloud_app_mysql_association_resource.go | 2 +- .../mysql/2022-01-01/client.go | 145 ----- .../servers/model_serverproperties.go | 42 -- .../README.md | 87 +++ .../client.go | 26 + .../constants.go | 98 +++ .../id_flexibleserver.go | 130 ++++ .../method_get.go | 54 ++ .../method_list.go | 105 ++++ .../method_update.go | 75 +++ .../method_updateput.go | 76 +++ .../model_advancedthreatprotection.go | 16 + ...model_advancedthreatprotectionforupdate.go | 8 + ...odel_advancedthreatprotectionproperties.go | 28 + ...dvancedthreatprotectionupdateproperties.go | 8 + .../predicates.go | 27 + .../version.go | 10 + .../azureadadministrators/README.md | 6 +- .../azureadadministrators/client.go | 0 .../azureadadministrators/constants.go | 0 .../id_flexibleserver.go | 0 .../method_createorupdate.go | 0 .../azureadadministrators/method_delete.go | 0 .../azureadadministrators/method_get.go | 0 .../method_listbyserver.go | 0 .../model_administratorproperties.go | 0 .../model_azureadadministrator.go | 0 .../azureadadministrators/predicates.go | 0 .../azureadadministrators/version.go | 4 +- .../2023-12-30/backupandexport/README.md | 53 ++ .../2023-12-30/backupandexport/client.go | 26 + .../2023-12-30/backupandexport/constants.go | 104 ++++ .../backupandexport/id_flexibleserver.go | 130 ++++ .../backupandexport/method_create.go | 75 +++ .../backupandexport/method_validatebackup.go | 54 ++ .../model_backupandexportrequest.go | 42 ++ .../model_backupandexportresponse.go | 48 ++ ...model_backupandexportresponseproperties.go | 10 + .../backupandexport/model_backupsettings.go | 9 + .../model_backupstoredetails.go | 75 +++ .../model_erroradditionalinfo.go | 9 + .../backupandexport/model_errordetail.go | 12 + .../model_fullbackupstoredetails.go | 50 ++ .../model_validatebackupresponse.go | 8 + .../model_validatebackupresponseproperties.go | 8 + .../2023-12-30/backupandexport/version.go | 10 + .../backups/README.md | 6 +- .../backups/client.go | 0 .../backups/id_backup.go | 0 .../backups/id_flexibleserver.go | 0 .../backups/method_get.go | 0 .../backups/method_listbyserver.go | 0 .../backups/method_put.go | 0 .../backups/model_serverbackup.go | 0 .../backups/model_serverbackupproperties.go | 0 .../backups/predicates.go | 0 .../backups/version.go | 4 +- .../mysql/2023-12-30/backupsv2/README.md | 70 +++ .../mysql/2023-12-30/backupsv2/client.go | 26 + .../mysql/2023-12-30/backupsv2/constants.go | 98 +++ .../2023-12-30/backupsv2/id_backupsv2.go | 139 +++++ .../2023-12-30/backupsv2/id_flexibleserver.go | 130 ++++ .../method_longrunningbackupcreate.go | 76 +++ .../backupsv2/method_longrunningbackupsget.go | 53 ++ .../method_longrunningbackupslist.go | 105 ++++ .../model_serverbackuppropertiesv2.go | 30 + .../backupsv2/model_serverbackupv2.go | 16 + .../mysql/2023-12-30/backupsv2/predicates.go | 27 + .../mysql/2023-12-30/backupsv2/version.go | 10 + .../checknameavailability/README.md | 6 +- .../checknameavailability/client.go | 0 .../checknameavailability/id_location.go | 0 .../checknameavailability/method_execute.go | 0 .../method_withoutlocationexecute.go | 0 .../model_nameavailability.go | 0 .../model_nameavailabilityrequest.go | 0 .../checknameavailability/version.go | 4 +- .../mysql/2023-12-30/client.go | 226 +++++++ .../configurations/README.md | 6 +- .../configurations/client.go | 0 .../configurations/constants.go | 0 .../configurations/id_configuration.go | 0 .../configurations/id_flexibleserver.go | 0 .../configurations/method_batchupdate.go | 0 .../configurations/method_createorupdate.go | 0 .../configurations/method_get.go | 0 .../configurations/method_listbyserver.go | 0 .../configurations/method_update.go | 0 .../configurations/model_configuration.go | 0 .../model_configurationforbatchupdate.go | 0 ...l_configurationforbatchupdateproperties.go | 0 .../model_configurationlistforbatchupdate.go | 0 .../model_configurationproperties.go | 0 .../configurations/predicates.go | 0 .../configurations/version.go | 4 +- .../databases/README.md | 6 +- .../databases/client.go | 0 .../databases/id_database.go | 0 .../databases/id_flexibleserver.go | 0 .../databases/method_createorupdate.go | 0 .../databases/method_delete.go | 0 .../databases/method_get.go | 0 .../databases/method_listbyserver.go | 0 .../databases/model_database.go | 0 .../databases/model_databaseproperties.go | 0 .../databases/predicates.go | 0 .../databases/version.go | 4 +- .../firewallrules/README.md | 6 +- .../firewallrules/client.go | 0 .../firewallrules/id_firewallrule.go | 0 .../firewallrules/id_flexibleserver.go | 0 .../firewallrules/method_createorupdate.go | 0 .../firewallrules/method_delete.go | 0 .../firewallrules/method_get.go | 0 .../firewallrules/method_listbyserver.go | 0 .../firewallrules/model_firewallrule.go | 0 .../model_firewallruleproperties.go | 0 .../firewallrules/predicates.go | 0 .../firewallrules/version.go | 4 +- .../getprivatednszonesuffix/README.md | 6 +- .../getprivatednszonesuffix/client.go | 0 .../getprivatednszonesuffix/method_execute.go | 0 .../model_getprivatednszonesuffixresponse.go | 0 .../getprivatednszonesuffix/version.go | 4 +- .../locationbasedcapabilities/README.md | 6 +- .../locationbasedcapabilities/client.go | 0 .../locationbasedcapabilities/id_location.go | 0 .../locationbasedcapabilities/method_list.go | 0 .../model_capabilityproperties.go | 0 .../model_servereditioncapability.go | 0 .../model_serverversioncapability.go | 0 .../model_skucapability.go | 0 .../model_storageeditioncapability.go | 2 + .../locationbasedcapabilities/predicates.go | 0 .../locationbasedcapabilities/version.go | 4 +- .../locationbasedcapability/README.md | 53 ++ .../locationbasedcapability/client.go | 26 + .../id_capabilityset.go | 130 ++++ .../locationbasedcapability/id_location.go | 121 ++++ .../locationbasedcapability/method_setget.go | 53 ++ .../locationbasedcapability/method_setlist.go | 105 ++++ .../model_capability.go | 16 + .../model_capabilitypropertiesv2.go | 10 + .../model_servereditioncapabilityv2.go | 12 + .../model_serverversioncapabilityv2.go | 8 + .../model_skucapabilityv2.go | 13 + .../model_storageeditioncapability.go | 14 + .../locationbasedcapability/predicates.go | 27 + .../locationbasedcapability/version.go | 10 + .../logfiles/README.md | 6 +- .../logfiles/client.go | 0 .../logfiles/id_flexibleserver.go | 0 .../logfiles/method_listbyserver.go | 0 .../logfiles/model_logfile.go | 0 .../logfiles/model_logfileproperties.go | 0 .../logfiles/predicates.go | 0 .../logfiles/version.go | 4 +- .../mysql/2023-12-30/maintenances/README.md | 70 +++ .../mysql/2023-12-30/maintenances/client.go | 26 + .../2023-12-30/maintenances/constants.go | 157 +++++ .../maintenances/id_flexibleserver.go | 130 ++++ .../2023-12-30/maintenances/id_maintenance.go | 139 +++++ .../2023-12-30/maintenances/method_list.go | 105 ++++ .../2023-12-30/maintenances/method_read.go | 53 ++ .../2023-12-30/maintenances/method_update.go | 75 +++ .../maintenances/model_maintenance.go | 16 + .../model_maintenanceproperties.go | 96 +++ .../model_maintenancepropertiesforupdate.go | 26 + .../maintenances/model_maintenanceupdate.go | 8 + .../2023-12-30/maintenances/predicates.go | 27 + .../mysql/2023-12-30/maintenances/version.go | 10 + .../2023-12-30/operationprogress/README.md | 36 ++ .../2023-12-30/operationprogress/client.go | 26 + .../2023-12-30/operationprogress/constants.go | 51 ++ .../operationprogress/id_operationprogress.go | 130 ++++ .../operationprogress/method_get.go | 53 ++ .../model_backupandexportresponsetype.go | 52 ++ .../model_erroradditionalinfo.go | 9 + .../operationprogress/model_errordetail.go | 12 + .../model_importfromstorageresponsetype.go | 50 ++ .../model_operationprogressresponsetype.go | 83 +++ .../model_operationprogressresult.go | 93 +++ .../model_operationstatusresult.go | 46 ++ .../2023-12-30/operationprogress/version.go | 10 + .../serverfailover/client.go | 0 .../serverfailover/id_flexibleserver.go | 0 .../serverfailover/method_serversfailover.go | 0 .../serverfailover/version.go | 4 +- .../2023-12-30/servermigration/README.md | 32 + .../2023-12-30/servermigration/client.go | 26 + .../2023-12-30/servermigration/constants.go | 585 ++++++++++++++++++ .../servermigration/id_flexibleserver.go | 130 ++++ ...method_serversmigrationcutovermigration.go | 71 +++ .../servermigration/model_backup.go | 29 + .../servermigration/model_dataencryption.go | 12 + .../servermigration/model_highavailability.go | 10 + .../model_importsourceproperties.go | 11 + .../model_maintenancewindow.go | 11 + .../model_mysqlserveridentity.go | 11 + .../servermigration/model_mysqlserversku.go | 9 + .../servermigration/model_network.go | 10 + .../servermigration/model_privateendpoint.go | 8 + .../model_privateendpointconnection.go | 16 + ...del_privateendpointconnectionproperties.go | 11 + ...model_privatelinkserviceconnectionstate.go | 10 + .../servermigration/model_server.go | 20 + .../servermigration/model_serverproperties.go | 44 ++ .../servermigration/model_storage.go | 13 + .../2023-12-30/servermigration/version.go | 10 + .../2023-12-30/serverresetgtid/README.md | 37 ++ .../2023-12-30/serverresetgtid/client.go | 26 + .../serverresetgtid/id_flexibleserver.go | 130 ++++ .../method_serversresetgtid.go | 74 +++ .../model_servergtidsetparameter.go | 8 + .../2023-12-30/serverresetgtid/version.go | 10 + .../serverrestart/README.md | 6 +- .../serverrestart/client.go | 0 .../serverrestart/constants.go | 0 .../serverrestart/id_flexibleserver.go | 0 .../serverrestart/method_serversrestart.go | 0 .../model_serverrestartparameter.go | 0 .../serverrestart/version.go | 4 +- .../servers/README.md | 6 +- .../servers/client.go | 0 .../servers/constants.go | 217 +++++-- .../servers/id_flexibleserver.go | 0 .../servers/method_create.go | 0 .../servers/method_delete.go | 0 .../servers/method_get.go | 0 .../servers/method_list.go | 0 .../servers/method_listbyresourcegroup.go | 0 .../servers/method_replicaslistbyserver.go | 0 .../servers/method_update.go | 0 .../servers/model_backup.go | 1 + .../servers/model_dataencryption.go | 0 .../servers/model_highavailability.go | 0 .../servers/model_importsourceproperties.go | 11 + .../servers/model_maintenancewindow.go | 0 .../servers/model_mysqlserveridentity.go} | 2 +- .../servers/model_mysqlserversku.go | 9 + .../servers/model_network.go | 0 .../servers/model_privateendpoint.go} | 5 +- .../model_privateendpointconnection.go | 16 + ...del_privateendpointconnectionproperties.go | 11 + ...model_privatelinkserviceconnectionstate.go | 10 + .../servers/model_server.go | 4 +- .../servers/model_serverforupdate.go | 4 +- .../servers/model_serverproperties.go | 44 ++ .../model_serverpropertiesforupdate.go | 1 + .../servers/model_storage.go | 0 .../servers/predicates.go | 0 .../servers/version.go | 4 +- .../serverstart/client.go | 0 .../serverstart/id_flexibleserver.go | 0 .../serverstart/method_serversstart.go | 0 .../serverstart/version.go | 4 +- .../serverstop/client.go | 0 .../serverstop/id_flexibleserver.go | 0 .../serverstop/method_serversstop.go | 0 .../serverstop/version.go | 4 +- .../README.md | 41 ++ .../client.go | 26 + .../id_flexibleserver.go | 130 ++++ ...serversvalidateestimatehighavailability.go | 58 ++ ...el_highavailabilityvalidationestimation.go | 10 + .../version.go | 10 + vendor/modules.txt | 39 +- 279 files changed, 6708 insertions(+), 350 deletions(-) delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/client.go delete mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/id_flexibleserver.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_updateput.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionforupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionupdateproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/README.md (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/method_listbyserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/model_administratorproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/model_azureadadministrator.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/azureadadministrators/version.go (68%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/id_flexibleserver.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/method_create.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/method_validatebackup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportrequest.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportresponse.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportresponseproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupsettings.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupstoredetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_erroradditionalinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_errordetail.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_fullbackupstoredetails.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_validatebackupresponse.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_validatebackupresponseproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/README.md (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/id_backup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/method_listbyserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/method_put.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/model_serverbackup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/model_serverbackupproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/backups/version.go (69%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/id_backupsv2.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/id_flexibleserver.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupcreate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupsget.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupslist.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/model_serverbackuppropertiesv2.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/model_serverbackupv2.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/checknameavailability/README.md (91%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/checknameavailability/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/checknameavailability/id_location.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/checknameavailability/method_execute.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/checknameavailability/method_withoutlocationexecute.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/checknameavailability/model_nameavailability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/checknameavailability/model_nameavailabilityrequest.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/checknameavailability/version.go (68%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/client.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/README.md (96%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/id_configuration.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/method_batchupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/method_listbyserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/model_configuration.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/model_configurationforbatchupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/model_configurationforbatchupdateproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/model_configurationlistforbatchupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/model_configurationproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/configurations/version.go (68%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/README.md (95%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/id_database.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/method_listbyserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/model_database.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/model_databaseproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/databases/version.go (68%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/README.md (94%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/id_firewallrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/method_createorupdate.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/method_listbyserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/model_firewallrule.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/model_firewallruleproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/firewallrules/version.go (68%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/getprivatednszonesuffix/README.md (85%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/getprivatednszonesuffix/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/getprivatednszonesuffix/method_execute.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/getprivatednszonesuffix/model_getprivatednszonesuffixresponse.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/getprivatednszonesuffix/version.go (67%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/README.md (87%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/id_location.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/model_capabilityproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/model_servereditioncapability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/model_serverversioncapability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/model_skucapability.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/model_storageeditioncapability.go (79%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/locationbasedcapabilities/version.go (66%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/id_capabilityset.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/id_location.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setget.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setlist.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_capability.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_capabilitypropertiesv2.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_servereditioncapabilityv2.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_serverversioncapabilityv2.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_skucapabilityv2.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_storageeditioncapability.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/logfiles/README.md (91%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/logfiles/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/logfiles/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/logfiles/method_listbyserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/logfiles/model_logfile.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/logfiles/model_logfileproperties.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/logfiles/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/logfiles/version.go (68%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/id_flexibleserver.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/id_maintenance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_list.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_read.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_update.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenance.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenanceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenancepropertiesforupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenanceupdate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/predicates.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/id_operationprogress.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/method_get.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_backupandexportresponsetype.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_erroradditionalinfo.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_errordetail.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_importfromstorageresponsetype.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationprogressresponsetype.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationprogressresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationstatusresult.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverfailover/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverfailover/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverfailover/method_serversfailover.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverfailover/version.go (68%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/constants.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/id_flexibleserver.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/method_serversmigrationcutovermigration.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_backup.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_dataencryption.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_highavailability.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_importsourceproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_maintenancewindow.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_mysqlserveridentity.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_mysqlserversku.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_network.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpoint.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpointconnection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpointconnectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privatelinkserviceconnectionstate.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_server.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_serverproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_storage.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/version.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/id_flexibleserver.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/method_serversresetgtid.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/model_servergtidsetparameter.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/version.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverrestart/README.md (89%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverrestart/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverrestart/constants.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverrestart/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverrestart/method_serversrestart.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverrestart/model_serverrestartparameter.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverrestart/version.go (68%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/README.md (97%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/constants.go (68%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/method_create.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/method_delete.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/method_get.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/method_list.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/method_listbyresourcegroup.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/method_replicaslistbyserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/method_update.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_backup.go (91%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_dataencryption.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_highavailability.go (100%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_importsourceproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_maintenancewindow.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01/servers/model_identity.go => 2023-12-30/servers/model_mysqlserveridentity.go} (93%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_mysqlserversku.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_network.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01/servers/model_sku.go => 2023-12-30/servers/model_privateendpoint.go} (70%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpointconnection.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpointconnectionproperties.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privatelinkserviceconnectionstate.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_server.go (85%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_serverforupdate.go (73%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverproperties.go rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_serverpropertiesforupdate.go (92%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/model_storage.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/predicates.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/servers/version.go (69%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverstart/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverstart/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverstart/method_serversstart.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverstart/version.go (68%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverstop/client.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverstop/id_flexibleserver.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverstop/method_serversstop.go (100%) rename vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/{2022-01-01 => 2023-12-30}/serverstop/version.go (68%) create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/README.md create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/client.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/id_flexibleserver.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/method_serversvalidateestimatehighavailability.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/model_highavailabilityvalidationestimation.go create mode 100644 vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/version.go diff --git a/internal/services/mysql/client/client.go b/internal/services/mysql/client/client.go index 1a16b6afa4d2..fdc91c228fac 100644 --- a/internal/services/mysql/client/client.go +++ b/internal/services/mysql/client/client.go @@ -6,22 +6,22 @@ package client import ( "fmt" - flexibleServers_v2022_01_01 "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators" + flexibleServers_v2023_12_30 "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) type Client struct { - FlexibleServers *flexibleServers_v2022_01_01.Client + FlexibleServers *flexibleServers_v2023_12_30.Client // TODO: port over to using the Meta Client (which involves bumping the API Version) AzureADAdministratorsClient *azureadadministrators.AzureADAdministratorsClient } func NewClient(o *common.ClientOptions) (*Client, error) { - flexibleServersMetaClient, err := flexibleServers_v2022_01_01.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { + flexibleServersMetaClient, err := flexibleServers_v2023_12_30.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { o.Configure(c, o.Authorizers.ResourceManager) }) if err != nil { diff --git a/internal/services/mysql/mysql_flexible_database_resource.go b/internal/services/mysql/mysql_flexible_database_resource.go index 7bfbc55adaf1..dac5036c03ea 100644 --- a/internal/services/mysql/mysql_flexible_database_resource.go +++ b/internal/services/mysql/mysql_flexible_database_resource.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mysql/validate" diff --git a/internal/services/mysql/mysql_flexible_database_resource_test.go b/internal/services/mysql/mysql_flexible_database_resource_test.go index 03a8b3fd5861..500dfa6ca9ce 100644 --- a/internal/services/mysql/mysql_flexible_database_resource_test.go +++ b/internal/services/mysql/mysql_flexible_database_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/mysql/mysql_flexible_server_aad_administrator_resource.go b/internal/services/mysql/mysql_flexible_server_aad_administrator_resource.go index db83406d8475..bd34de5fc0ae 100644 --- a/internal/services/mysql/mysql_flexible_server_aad_administrator_resource.go +++ b/internal/services/mysql/mysql_flexible_server_aad_administrator_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators" "github.com/hashicorp/terraform-provider-azurerm/internal/sdk" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mysql/parse" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mysql/validate" diff --git a/internal/services/mysql/mysql_flexible_server_aad_administrator_resource_test.go b/internal/services/mysql/mysql_flexible_server_aad_administrator_resource_test.go index 78791ee3449f..d12b0b7ae9fc 100644 --- a/internal/services/mysql/mysql_flexible_server_aad_administrator_resource_test.go +++ b/internal/services/mysql/mysql_flexible_server_aad_administrator_resource_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/mysql/mysql_flexible_server_configuration_resource.go b/internal/services/mysql/mysql_flexible_server_configuration_resource.go index b41eb751d10e..75e1b48e2e6b 100644 --- a/internal/services/mysql/mysql_flexible_server_configuration_resource.go +++ b/internal/services/mysql/mysql_flexible_server_configuration_resource.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/locks" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mysql/validate" diff --git a/internal/services/mysql/mysql_flexible_server_configuration_resource_test.go b/internal/services/mysql/mysql_flexible_server_configuration_resource_test.go index c8a20487dcba..8d06cfca5916 100644 --- a/internal/services/mysql/mysql_flexible_server_configuration_resource_test.go +++ b/internal/services/mysql/mysql_flexible_server_configuration_resource_test.go @@ -10,8 +10,8 @@ import ( "time" "github.com/hashicorp/go-azure-helpers/lang/response" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/mysql/mysql_flexible_server_data_source.go b/internal/services/mysql/mysql_flexible_server_data_source.go index 2bbeb2e7eec1..f5b8aa8f1138 100644 --- a/internal/services/mysql/mysql_flexible_server_data_source.go +++ b/internal/services/mysql/mysql_flexible_server_data_source.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/mysql/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -264,18 +264,18 @@ func flattenDataSourceArmServerStorage(storage *servers.Storage) []interface{} { } } -func flattenDataSourceFlexibleServerSku(sku *servers.Sku) (string, error) { +func flattenDataSourceFlexibleServerSku(sku *servers.MySQLServerSku) (string, error) { if sku == nil || sku.Name == "" || sku.Tier == "" { return "", nil } var tier string switch sku.Tier { - case servers.SkuTierBurstable: + case servers.ServerSkuTierBurstable: tier = "B" - case servers.SkuTierGeneralPurpose: + case servers.ServerSkuTierGeneralPurpose: tier = "GP" - case servers.SkuTierMemoryOptimized: + case servers.ServerSkuTierMemoryOptimized: tier = "MO" default: return "", fmt.Errorf("sku_name has unknown sku tier %s", sku.Tier) diff --git a/internal/services/mysql/mysql_flexible_server_firewall_rule_resource.go b/internal/services/mysql/mysql_flexible_server_firewall_rule_resource.go index 26f14891a88c..fdcc8a1cb51a 100644 --- a/internal/services/mysql/mysql_flexible_server_firewall_rule_resource.go +++ b/internal/services/mysql/mysql_flexible_server_firewall_rule_resource.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/mysql/mysql_flexible_server_firewall_rule_resource_test.go b/internal/services/mysql/mysql_flexible_server_firewall_rule_resource_test.go index afee7905c39b..5b36f3fe7826 100644 --- a/internal/services/mysql/mysql_flexible_server_firewall_rule_resource_test.go +++ b/internal/services/mysql/mysql_flexible_server_firewall_rule_resource_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/mysql/mysql_flexible_server_resource.go b/internal/services/mysql/mysql_flexible_server_resource.go index 63571300f0db..76117a579afd 100644 --- a/internal/services/mysql/mysql_flexible_server_resource.go +++ b/internal/services/mysql/mysql_flexible_server_resource.go @@ -17,8 +17,8 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers" "github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/privatezones" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -847,42 +847,42 @@ func expandArmServerBackup(d *pluginsdk.ResourceData) *servers.Backup { return &backup } -func expandFlexibleServerSku(name string) (*servers.Sku, error) { +func expandFlexibleServerSku(name string) (*servers.MySQLServerSku, error) { if name == "" { return nil, nil } parts := strings.SplitAfterN(name, "_", 2) - var tier servers.SkuTier + var tier servers.ServerSkuTier switch strings.TrimSuffix(parts[0], "_") { case "B": - tier = servers.SkuTierBurstable + tier = servers.ServerSkuTierBurstable case "GP": - tier = servers.SkuTierGeneralPurpose + tier = servers.ServerSkuTierGeneralPurpose case "MO": - tier = servers.SkuTierMemoryOptimized + tier = servers.ServerSkuTierMemoryOptimized default: return nil, fmt.Errorf("sku_name %s has unknown sku tier %s", name, parts[0]) } - return &servers.Sku{ + return &servers.MySQLServerSku{ Name: parts[1], Tier: tier, }, nil } -func flattenFlexibleServerSku(sku *servers.Sku) (string, error) { +func flattenFlexibleServerSku(sku *servers.MySQLServerSku) (string, error) { if sku == nil || sku.Name == "" || sku.Tier == "" { return "", nil } var tier string switch sku.Tier { - case servers.SkuTierBurstable: + case servers.ServerSkuTierBurstable: tier = "B" - case servers.SkuTierGeneralPurpose: + case servers.ServerSkuTierGeneralPurpose: tier = "GP" - case servers.SkuTierMemoryOptimized: + case servers.ServerSkuTierMemoryOptimized: tier = "MO" default: return "", fmt.Errorf("sku_name has unknown sku tier %s", sku.Tier) @@ -1028,14 +1028,14 @@ func flattenFlexibleServerDataEncryption(de *servers.DataEncryption) ([]interfac return []interface{}{item}, nil } -func expandFlexibleServerIdentity(input []interface{}) (*servers.Identity, error) { +func expandFlexibleServerIdentity(input []interface{}) (*servers.MySQLServerIdentity, error) { expanded, err := identity.ExpandUserAssignedMap(input) if err != nil { return nil, err } identityType := servers.ManagedServiceIdentityType(string(expanded.Type)) - out := servers.Identity{ + out := servers.MySQLServerIdentity{ Type: &identityType, } if expanded.Type == identity.TypeUserAssigned { @@ -1049,7 +1049,7 @@ func expandFlexibleServerIdentity(input []interface{}) (*servers.Identity, error return &out, nil } -func flattenFlexibleServerIdentity(input *servers.Identity) (*[]interface{}, error) { +func flattenFlexibleServerIdentity(input *servers.MySQLServerIdentity) (*[]interface{}, error) { var transform *identity.UserAssignedMap if input != nil { diff --git a/internal/services/mysql/mysql_flexible_server_resource_test.go b/internal/services/mysql/mysql_flexible_server_resource_test.go index 9f0d095ccb04..af3fcddfa6fd 100644 --- a/internal/services/mysql/mysql_flexible_server_resource_test.go +++ b/internal/services/mysql/mysql_flexible_server_resource_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance" "github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/springcloud/spring_cloud_app_mysql_association_resource.go b/internal/services/springcloud/spring_cloud_app_mysql_association_resource.go index a392434b7d87..239afbc722b9 100644 --- a/internal/services/springcloud/spring_cloud_app_mysql_association_resource.go +++ b/internal/services/springcloud/spring_cloud_app_mysql_association_resource.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/servers" - flexibleServers "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers" + flexibleServers "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/springcloud/migration" diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/client.go deleted file mode 100644 index 68a55624f0cd..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/client.go +++ /dev/null @@ -1,145 +0,0 @@ -package v2022_01_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/mysql/2022-01-01/azureadadministrators" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart" - "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - AzureADAdministrators *azureadadministrators.AzureADAdministratorsClient - Backups *backups.BackupsClient - CheckNameAvailability *checknameavailability.CheckNameAvailabilityClient - Configurations *configurations.ConfigurationsClient - Databases *databases.DatabasesClient - FirewallRules *firewallrules.FirewallRulesClient - GetPrivateDnsZoneSuffix *getprivatednszonesuffix.GetPrivateDnsZoneSuffixClient - LocationBasedCapabilities *locationbasedcapabilities.LocationBasedCapabilitiesClient - LogFiles *logfiles.LogFilesClient - ServerFailover *serverfailover.ServerFailoverClient - ServerRestart *serverrestart.ServerRestartClient - ServerStart *serverstart.ServerStartClient - ServerStop *serverstop.ServerStopClient - Servers *servers.ServersClient -} - -func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - azureADAdministratorsClient, err := azureadadministrators.NewAzureADAdministratorsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building AzureADAdministrators client: %+v", err) - } - configureFunc(azureADAdministratorsClient.Client) - - backupsClient, err := backups.NewBackupsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Backups client: %+v", err) - } - configureFunc(backupsClient.Client) - - checkNameAvailabilityClient, err := checknameavailability.NewCheckNameAvailabilityClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building CheckNameAvailability client: %+v", err) - } - configureFunc(checkNameAvailabilityClient.Client) - - configurationsClient, err := configurations.NewConfigurationsClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Configurations client: %+v", err) - } - configureFunc(configurationsClient.Client) - - databasesClient, err := databases.NewDatabasesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Databases client: %+v", err) - } - configureFunc(databasesClient.Client) - - firewallRulesClient, err := firewallrules.NewFirewallRulesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building FirewallRules client: %+v", err) - } - configureFunc(firewallRulesClient.Client) - - getPrivateDnsZoneSuffixClient, err := getprivatednszonesuffix.NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building GetPrivateDnsZoneSuffix client: %+v", err) - } - configureFunc(getPrivateDnsZoneSuffixClient.Client) - - locationBasedCapabilitiesClient, err := locationbasedcapabilities.NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building LocationBasedCapabilities client: %+v", err) - } - configureFunc(locationBasedCapabilitiesClient.Client) - - logFilesClient, err := logfiles.NewLogFilesClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building LogFiles client: %+v", err) - } - configureFunc(logFilesClient.Client) - - serverFailoverClient, err := serverfailover.NewServerFailoverClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ServerFailover client: %+v", err) - } - configureFunc(serverFailoverClient.Client) - - serverRestartClient, err := serverrestart.NewServerRestartClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ServerRestart client: %+v", err) - } - configureFunc(serverRestartClient.Client) - - serverStartClient, err := serverstart.NewServerStartClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ServerStart client: %+v", err) - } - configureFunc(serverStartClient.Client) - - serverStopClient, err := serverstop.NewServerStopClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building ServerStop client: %+v", err) - } - configureFunc(serverStopClient.Client) - - serversClient, err := servers.NewServersClientWithBaseURI(sdkApi) - if err != nil { - return nil, fmt.Errorf("building Servers client: %+v", err) - } - configureFunc(serversClient.Client) - - return &Client{ - AzureADAdministrators: azureADAdministratorsClient, - Backups: backupsClient, - CheckNameAvailability: checkNameAvailabilityClient, - Configurations: configurationsClient, - Databases: databasesClient, - FirewallRules: firewallRulesClient, - GetPrivateDnsZoneSuffix: getPrivateDnsZoneSuffixClient, - LocationBasedCapabilities: locationBasedCapabilitiesClient, - LogFiles: logFilesClient, - ServerFailover: serverFailoverClient, - ServerRestart: serverRestartClient, - ServerStart: serverStartClient, - ServerStop: serverStopClient, - Servers: serversClient, - }, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverproperties.go deleted file mode 100644 index c5e3bd0ae84a..000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverproperties.go +++ /dev/null @@ -1,42 +0,0 @@ -package servers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServerProperties struct { - AdministratorLogin *string `json:"administratorLogin,omitempty"` - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - AvailabilityZone *string `json:"availabilityZone,omitempty"` - Backup *Backup `json:"backup,omitempty"` - CreateMode *CreateMode `json:"createMode,omitempty"` - DataEncryption *DataEncryption `json:"dataEncryption,omitempty"` - FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` - HighAvailability *HighAvailability `json:"highAvailability,omitempty"` - MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` - Network *Network `json:"network,omitempty"` - ReplicaCapacity *int64 `json:"replicaCapacity,omitempty"` - ReplicationRole *ReplicationRole `json:"replicationRole,omitempty"` - RestorePointInTime *string `json:"restorePointInTime,omitempty"` - SourceServerResourceId *string `json:"sourceServerResourceId,omitempty"` - State *ServerState `json:"state,omitempty"` - Storage *Storage `json:"storage,omitempty"` - Version *ServerVersion `json:"version,omitempty"` -} - -func (o *ServerProperties) GetRestorePointInTimeAsTime() (*time.Time, error) { - if o.RestorePointInTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.RestorePointInTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ServerProperties) SetRestorePointInTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.RestorePointInTime = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/README.md new file mode 100644 index 000000000000..b86e3f54f116 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/README.md @@ -0,0 +1,87 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings` Documentation + +The `advancedthreatprotectionsettings` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings" +``` + + +### Client Initialization + +```go +client := advancedthreatprotectionsettings.NewAdvancedThreatProtectionSettingsClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `AdvancedThreatProtectionSettingsClient.Get` + +```go +ctx := context.TODO() +id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `AdvancedThreatProtectionSettingsClient.List` + +```go +ctx := context.TODO() +id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `AdvancedThreatProtectionSettingsClient.Update` + +```go +ctx := context.TODO() +id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := advancedthreatprotectionsettings.AdvancedThreatProtectionForUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `AdvancedThreatProtectionSettingsClient.UpdatePut` + +```go +ctx := context.TODO() +id := advancedthreatprotectionsettings.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := advancedthreatprotectionsettings.AdvancedThreatProtection{ + // ... +} + + +if err := client.UpdatePutThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/client.go new file mode 100644 index 000000000000..e7a35ff187ef --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/client.go @@ -0,0 +1,26 @@ +package advancedthreatprotectionsettings + +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 AdvancedThreatProtectionSettingsClient struct { + Client *resourcemanager.Client +} + +func NewAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*AdvancedThreatProtectionSettingsClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "advancedthreatprotectionsettings", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating AdvancedThreatProtectionSettingsClient: %+v", err) + } + + return &AdvancedThreatProtectionSettingsClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/constants.go new file mode 100644 index 000000000000..c590a7f52ab4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/constants.go @@ -0,0 +1,98 @@ +package advancedthreatprotectionsettings + +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 AdvancedThreatProtectionProvisioningState string + +const ( + AdvancedThreatProtectionProvisioningStateCanceled AdvancedThreatProtectionProvisioningState = "Canceled" + AdvancedThreatProtectionProvisioningStateFailed AdvancedThreatProtectionProvisioningState = "Failed" + AdvancedThreatProtectionProvisioningStateSucceeded AdvancedThreatProtectionProvisioningState = "Succeeded" + AdvancedThreatProtectionProvisioningStateUpdating AdvancedThreatProtectionProvisioningState = "Updating" +) + +func PossibleValuesForAdvancedThreatProtectionProvisioningState() []string { + return []string{ + string(AdvancedThreatProtectionProvisioningStateCanceled), + string(AdvancedThreatProtectionProvisioningStateFailed), + string(AdvancedThreatProtectionProvisioningStateSucceeded), + string(AdvancedThreatProtectionProvisioningStateUpdating), + } +} + +func (s *AdvancedThreatProtectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAdvancedThreatProtectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAdvancedThreatProtectionProvisioningState(input string) (*AdvancedThreatProtectionProvisioningState, error) { + vals := map[string]AdvancedThreatProtectionProvisioningState{ + "canceled": AdvancedThreatProtectionProvisioningStateCanceled, + "failed": AdvancedThreatProtectionProvisioningStateFailed, + "succeeded": AdvancedThreatProtectionProvisioningStateSucceeded, + "updating": AdvancedThreatProtectionProvisioningStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AdvancedThreatProtectionProvisioningState(input) + return &out, nil +} + +type AdvancedThreatProtectionState string + +const ( + AdvancedThreatProtectionStateDisabled AdvancedThreatProtectionState = "Disabled" + AdvancedThreatProtectionStateEnabled AdvancedThreatProtectionState = "Enabled" +) + +func PossibleValuesForAdvancedThreatProtectionState() []string { + return []string{ + string(AdvancedThreatProtectionStateDisabled), + string(AdvancedThreatProtectionStateEnabled), + } +} + +func (s *AdvancedThreatProtectionState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseAdvancedThreatProtectionState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseAdvancedThreatProtectionState(input string) (*AdvancedThreatProtectionState, error) { + vals := map[string]AdvancedThreatProtectionState{ + "disabled": AdvancedThreatProtectionStateDisabled, + "enabled": AdvancedThreatProtectionStateEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := AdvancedThreatProtectionState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/id_flexibleserver.go new file mode 100644 index 000000000000..297e4313c407 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/id_flexibleserver.go @@ -0,0 +1,130 @@ +package advancedthreatprotectionsettings + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FlexibleServerId{}) +} + +var _ resourceids.ResourceId = &FlexibleServerId{} + +// FlexibleServerId is a struct representing the Resource ID for a Flexible Server +type FlexibleServerId struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string +} + +// NewFlexibleServerID returns a new FlexibleServerId struct +func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { + return FlexibleServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + } +} + +// ParseFlexibleServerID parses 'input' into a FlexibleServerId +func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId +// note: this method should only be used for API response data and not user input +func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + return nil +} + +// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID +func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFlexibleServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Flexible Server ID +func (id FlexibleServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID +func (id FlexibleServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + } +} + +// String returns a human-readable description of this Flexible Server ID +func (id FlexibleServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + } + return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_get.go new file mode 100644 index 000000000000..da0e2fc8abb7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_get.go @@ -0,0 +1,54 @@ +package advancedthreatprotectionsettings + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *AdvancedThreatProtection +} + +// Get ... +func (c AdvancedThreatProtectionSettingsClient) Get(ctx context.Context, id FlexibleServerId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/advancedThreatProtectionSettings/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 AdvancedThreatProtection + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_list.go new file mode 100644 index 000000000000..0a3f4043f93d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_list.go @@ -0,0 +1,105 @@ +package advancedthreatprotectionsettings + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]AdvancedThreatProtection +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []AdvancedThreatProtection +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c AdvancedThreatProtectionSettingsClient) List(ctx context.Context, id FlexibleServerId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/advancedThreatProtectionSettings", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]AdvancedThreatProtection `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c AdvancedThreatProtectionSettingsClient) ListComplete(ctx context.Context, id FlexibleServerId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, AdvancedThreatProtectionOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c AdvancedThreatProtectionSettingsClient) ListCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate AdvancedThreatProtectionOperationPredicate) (result ListCompleteResult, err error) { + items := make([]AdvancedThreatProtection, 0) + + resp, err := c.List(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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_update.go new file mode 100644 index 000000000000..28917c5ee489 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_update.go @@ -0,0 +1,75 @@ +package advancedthreatprotectionsettings + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AdvancedThreatProtection +} + +// Update ... +func (c AdvancedThreatProtectionSettingsClient) Update(ctx context.Context, id FlexibleServerId, input AdvancedThreatProtectionForUpdate) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: fmt.Sprintf("%s/advancedThreatProtectionSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c AdvancedThreatProtectionSettingsClient) UpdateThenPoll(ctx context.Context, id FlexibleServerId, input AdvancedThreatProtectionForUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_updateput.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_updateput.go new file mode 100644 index 000000000000..4b495289c2bc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/method_updateput.go @@ -0,0 +1,76 @@ +package advancedthreatprotectionsettings + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdatePutOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *AdvancedThreatProtection +} + +// UpdatePut ... +func (c AdvancedThreatProtectionSettingsClient) UpdatePut(ctx context.Context, id FlexibleServerId, input AdvancedThreatProtection) (result UpdatePutOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: fmt.Sprintf("%s/advancedThreatProtectionSettings/default", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// UpdatePutThenPoll performs UpdatePut then polls until it's completed +func (c AdvancedThreatProtectionSettingsClient) UpdatePutThenPoll(ctx context.Context, id FlexibleServerId, input AdvancedThreatProtection) error { + result, err := c.UpdatePut(ctx, id, input) + if err != nil { + return fmt.Errorf("performing UpdatePut: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after UpdatePut: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotection.go new file mode 100644 index 000000000000..ec209c1cc140 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotection.go @@ -0,0 +1,16 @@ +package advancedthreatprotectionsettings + +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 AdvancedThreatProtection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *AdvancedThreatProtectionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionforupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionforupdate.go new file mode 100644 index 000000000000..21770477a6cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionforupdate.go @@ -0,0 +1,8 @@ +package advancedthreatprotectionsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdvancedThreatProtectionForUpdate struct { + Properties *AdvancedThreatProtectionUpdateProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionproperties.go new file mode 100644 index 000000000000..fa706079869e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionproperties.go @@ -0,0 +1,28 @@ +package advancedthreatprotectionsettings + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdvancedThreatProtectionProperties struct { + CreationTime *string `json:"creationTime,omitempty"` + ProvisioningState *AdvancedThreatProtectionProvisioningState `json:"provisioningState,omitempty"` + State *AdvancedThreatProtectionState `json:"state,omitempty"` +} + +func (o *AdvancedThreatProtectionProperties) GetCreationTimeAsTime() (*time.Time, error) { + if o.CreationTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CreationTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *AdvancedThreatProtectionProperties) SetCreationTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CreationTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionupdateproperties.go new file mode 100644 index 000000000000..0ee05627e5b0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/model_advancedthreatprotectionupdateproperties.go @@ -0,0 +1,8 @@ +package advancedthreatprotectionsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdvancedThreatProtectionUpdateProperties struct { + State AdvancedThreatProtectionState `json:"state"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/predicates.go new file mode 100644 index 000000000000..3ae1bf20e899 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/predicates.go @@ -0,0 +1,27 @@ +package advancedthreatprotectionsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AdvancedThreatProtectionOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p AdvancedThreatProtectionOperationPredicate) Matches(input AdvancedThreatProtection) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/version.go new file mode 100644 index 000000000000..30cad3e63a88 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings/version.go @@ -0,0 +1,10 @@ +package advancedthreatprotectionsettings + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/advancedthreatprotectionsettings/2023-12-30" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/README.md index 4ce557909292..8966006a9d42 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators` Documentation -The `azureadadministrators` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `azureadadministrators` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/model_administratorproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/model_administratorproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/model_administratorproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/model_administratorproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/model_azureadadministrator.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/model_azureadadministrator.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/model_azureadadministrator.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/model_azureadadministrator.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/version.go index 397f8090aa1a..9c660ab53890 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators/version.go @@ -3,8 +3,8 @@ package azureadadministrators // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/azureadadministrators/2022-01-01" + return "hashicorp/go-azure-sdk/azureadadministrators/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/README.md new file mode 100644 index 000000000000..ce1926f27078 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/README.md @@ -0,0 +1,53 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport` Documentation + +The `backupandexport` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport" +``` + + +### Client Initialization + +```go +client := backupandexport.NewBackupAndExportClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BackupAndExportClient.Create` + +```go +ctx := context.TODO() +id := backupandexport.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := backupandexport.BackupAndExportRequest{ + // ... +} + + +if err := client.CreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupAndExportClient.ValidateBackup` + +```go +ctx := context.TODO() +id := backupandexport.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +read, err := client.ValidateBackup(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/client.go new file mode 100644 index 000000000000..b05c3ad7f0fb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/client.go @@ -0,0 +1,26 @@ +package backupandexport + +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 BackupAndExportClient struct { + Client *resourcemanager.Client +} + +func NewBackupAndExportClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupAndExportClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "backupandexport", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating BackupAndExportClient: %+v", err) + } + + return &BackupAndExportClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/constants.go new file mode 100644 index 000000000000..2afb6fcce068 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/constants.go @@ -0,0 +1,104 @@ +package backupandexport + +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 BackupFormat string + +const ( + BackupFormatCollatedFormat BackupFormat = "CollatedFormat" + BackupFormatRaw BackupFormat = "Raw" +) + +func PossibleValuesForBackupFormat() []string { + return []string{ + string(BackupFormatCollatedFormat), + string(BackupFormatRaw), + } +} + +func (s *BackupFormat) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBackupFormat(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBackupFormat(input string) (*BackupFormat, error) { + vals := map[string]BackupFormat{ + "collatedformat": BackupFormatCollatedFormat, + "raw": BackupFormatRaw, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BackupFormat(input) + return &out, nil +} + +type OperationStatus string + +const ( + OperationStatusCancelInProgress OperationStatus = "CancelInProgress" + OperationStatusCanceled OperationStatus = "Canceled" + OperationStatusFailed OperationStatus = "Failed" + OperationStatusInProgress OperationStatus = "InProgress" + OperationStatusPending OperationStatus = "Pending" + OperationStatusSucceeded OperationStatus = "Succeeded" +) + +func PossibleValuesForOperationStatus() []string { + return []string{ + string(OperationStatusCancelInProgress), + string(OperationStatusCanceled), + string(OperationStatusFailed), + string(OperationStatusInProgress), + string(OperationStatusPending), + string(OperationStatusSucceeded), + } +} + +func (s *OperationStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseOperationStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseOperationStatus(input string) (*OperationStatus, error) { + vals := map[string]OperationStatus{ + "cancelinprogress": OperationStatusCancelInProgress, + "canceled": OperationStatusCanceled, + "failed": OperationStatusFailed, + "inprogress": OperationStatusInProgress, + "pending": OperationStatusPending, + "succeeded": OperationStatusSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := OperationStatus(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/id_flexibleserver.go new file mode 100644 index 000000000000..593e5b519027 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/id_flexibleserver.go @@ -0,0 +1,130 @@ +package backupandexport + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FlexibleServerId{}) +} + +var _ resourceids.ResourceId = &FlexibleServerId{} + +// FlexibleServerId is a struct representing the Resource ID for a Flexible Server +type FlexibleServerId struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string +} + +// NewFlexibleServerID returns a new FlexibleServerId struct +func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { + return FlexibleServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + } +} + +// ParseFlexibleServerID parses 'input' into a FlexibleServerId +func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId +// note: this method should only be used for API response data and not user input +func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + return nil +} + +// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID +func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFlexibleServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Flexible Server ID +func (id FlexibleServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID +func (id FlexibleServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + } +} + +// String returns a human-readable description of this Flexible Server ID +func (id FlexibleServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + } + return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/method_create.go new file mode 100644 index 000000000000..81bcd699f7ab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/method_create.go @@ -0,0 +1,75 @@ +package backupandexport + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *BackupAndExportResponse +} + +// Create ... +func (c BackupAndExportClient) Create(ctx context.Context, id FlexibleServerId, input BackupAndExportRequest) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/backupAndExport", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// CreateThenPoll performs Create then polls until it's completed +func (c BackupAndExportClient) CreateThenPoll(ctx context.Context, id FlexibleServerId, input BackupAndExportRequest) error { + result, err := c.Create(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Create: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Create: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/method_validatebackup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/method_validatebackup.go new file mode 100644 index 000000000000..326579372b7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/method_validatebackup.go @@ -0,0 +1,54 @@ +package backupandexport + +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 ValidateBackupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ValidateBackupResponse +} + +// ValidateBackup ... +func (c BackupAndExportClient) ValidateBackup(ctx context.Context, id FlexibleServerId) (result ValidateBackupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/validateBackup", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + 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 ValidateBackupResponse + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportrequest.go new file mode 100644 index 000000000000..33e915fb8f1b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportrequest.go @@ -0,0 +1,42 @@ +package backupandexport + +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 BackupAndExportRequest struct { + BackupSettings BackupSettings `json:"backupSettings"` + TargetDetails BackupStoreDetails `json:"targetDetails"` +} + +var _ json.Unmarshaler = &BackupAndExportRequest{} + +func (s *BackupAndExportRequest) UnmarshalJSON(bytes []byte) error { + var decoded struct { + BackupSettings BackupSettings `json:"backupSettings"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.BackupSettings = decoded.BackupSettings + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BackupAndExportRequest into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["targetDetails"]; ok { + impl, err := UnmarshalBackupStoreDetailsImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'TargetDetails' for 'BackupAndExportRequest': %+v", err) + } + s.TargetDetails = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportresponse.go new file mode 100644 index 000000000000..768c96e25d17 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportresponse.go @@ -0,0 +1,48 @@ +package backupandexport + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" + "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 BackupAndExportResponse struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + Properties *BackupAndExportResponseProperties `json:"properties,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status *OperationStatus `json:"status,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +func (o *BackupAndExportResponse) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *BackupAndExportResponse) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *BackupAndExportResponse) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *BackupAndExportResponse) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportresponseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportresponseproperties.go new file mode 100644 index 000000000000..660505032be3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupandexportresponseproperties.go @@ -0,0 +1,10 @@ +package backupandexport + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupAndExportResponseProperties struct { + BackupMetadata *string `json:"backupMetadata,omitempty"` + DataTransferredInBytes *int64 `json:"dataTransferredInBytes,omitempty"` + DatasourceSizeInBytes *int64 `json:"datasourceSizeInBytes,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupsettings.go new file mode 100644 index 000000000000..7d4676155512 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupsettings.go @@ -0,0 +1,9 @@ +package backupandexport + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BackupSettings struct { + BackupFormat *BackupFormat `json:"backupFormat,omitempty"` + BackupName string `json:"backupName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupstoredetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupstoredetails.go new file mode 100644 index 000000000000..a0b53ecf6f9d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_backupstoredetails.go @@ -0,0 +1,75 @@ +package backupandexport + +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 BackupStoreDetails interface { + BackupStoreDetails() BaseBackupStoreDetailsImpl +} + +var _ BackupStoreDetails = BaseBackupStoreDetailsImpl{} + +type BaseBackupStoreDetailsImpl struct { + ObjectType string `json:"objectType"` +} + +func (s BaseBackupStoreDetailsImpl) BackupStoreDetails() BaseBackupStoreDetailsImpl { + return s +} + +var _ BackupStoreDetails = RawBackupStoreDetailsImpl{} + +// RawBackupStoreDetailsImpl 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 RawBackupStoreDetailsImpl struct { + backupStoreDetails BaseBackupStoreDetailsImpl + Type string + Values map[string]interface{} +} + +func (s RawBackupStoreDetailsImpl) BackupStoreDetails() BaseBackupStoreDetailsImpl { + return s.backupStoreDetails +} + +func UnmarshalBackupStoreDetailsImplementation(input []byte) (BackupStoreDetails, 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 BackupStoreDetails into map[string]interface: %+v", err) + } + + var value string + if v, ok := temp["objectType"]; ok { + value = fmt.Sprintf("%v", v) + } + + if strings.EqualFold(value, "FullBackupStoreDetails") { + var out FullBackupStoreDetails + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FullBackupStoreDetails: %+v", err) + } + return out, nil + } + + var parent BaseBackupStoreDetailsImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseBackupStoreDetailsImpl: %+v", err) + } + + return RawBackupStoreDetailsImpl{ + backupStoreDetails: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_erroradditionalinfo.go new file mode 100644 index 000000000000..eeff28323b19 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package backupandexport + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_errordetail.go new file mode 100644 index 000000000000..4009077d49da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_errordetail.go @@ -0,0 +1,12 @@ +package backupandexport + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_fullbackupstoredetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_fullbackupstoredetails.go new file mode 100644 index 000000000000..fa77f9126733 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_fullbackupstoredetails.go @@ -0,0 +1,50 @@ +package backupandexport + +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 _ BackupStoreDetails = FullBackupStoreDetails{} + +type FullBackupStoreDetails struct { + SasUriList []string `json:"sasUriList"` + + // Fields inherited from BackupStoreDetails + + ObjectType string `json:"objectType"` +} + +func (s FullBackupStoreDetails) BackupStoreDetails() BaseBackupStoreDetailsImpl { + return BaseBackupStoreDetailsImpl{ + ObjectType: s.ObjectType, + } +} + +var _ json.Marshaler = FullBackupStoreDetails{} + +func (s FullBackupStoreDetails) MarshalJSON() ([]byte, error) { + type wrapper FullBackupStoreDetails + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FullBackupStoreDetails: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FullBackupStoreDetails: %+v", err) + } + + decoded["objectType"] = "FullBackupStoreDetails" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FullBackupStoreDetails: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_validatebackupresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_validatebackupresponse.go new file mode 100644 index 000000000000..7a32cbf85b45 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_validatebackupresponse.go @@ -0,0 +1,8 @@ +package backupandexport + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateBackupResponse struct { + Properties *ValidateBackupResponseProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_validatebackupresponseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_validatebackupresponseproperties.go new file mode 100644 index 000000000000..08ab3f29af76 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/model_validatebackupresponseproperties.go @@ -0,0 +1,8 @@ +package backupandexport + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ValidateBackupResponseProperties struct { + NumberOfContainers *int64 `json:"numberOfContainers,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/version.go new file mode 100644 index 000000000000..ec83f205948c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport/version.go @@ -0,0 +1,10 @@ +package backupandexport + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/backupandexport/2023-12-30" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/README.md index bde206849008..1e812cff92d7 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups` Documentation -The `backups` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `backups` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/id_backup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_backup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/id_backup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/method_put.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/method_put.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/method_put.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/method_put.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/model_serverbackup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/model_serverbackup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/model_serverbackup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/model_serverbackup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/model_serverbackupproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/model_serverbackupproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/model_serverbackupproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/model_serverbackupproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/version.go similarity index 69% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/version.go index 2ce3b030269d..72e1293154b3 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups/version.go @@ -3,8 +3,8 @@ package backups // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/backups/2022-01-01" + return "hashicorp/go-azure-sdk/backups/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/README.md new file mode 100644 index 000000000000..2e60466b8d8c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/README.md @@ -0,0 +1,70 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2` Documentation + +The `backupsv2` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2" +``` + + +### Client Initialization + +```go +client := backupsv2.NewBackupsV2ClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `BackupsV2Client.LongRunningBackupCreate` + +```go +ctx := context.TODO() +id := backupsv2.NewBackupsV2ID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "backupsV2Name") + +payload := backupsv2.ServerBackupV2{ + // ... +} + + +if err := client.LongRunningBackupCreateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` + + +### Example Usage: `BackupsV2Client.LongRunningBackupsGet` + +```go +ctx := context.TODO() +id := backupsv2.NewBackupsV2ID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "backupsV2Name") + +read, err := client.LongRunningBackupsGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `BackupsV2Client.LongRunningBackupsList` + +```go +ctx := context.TODO() +id := backupsv2.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.LongRunningBackupsList(ctx, id)` can be used to do batched pagination +items, err := client.LongRunningBackupsListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/client.go new file mode 100644 index 000000000000..1a4eca1f6e83 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/client.go @@ -0,0 +1,26 @@ +package backupsv2 + +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 BackupsV2Client struct { + Client *resourcemanager.Client +} + +func NewBackupsV2ClientWithBaseURI(sdkApi sdkEnv.Api) (*BackupsV2Client, error) { + client, err := resourcemanager.NewClient(sdkApi, "backupsv2", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating BackupsV2Client: %+v", err) + } + + return &BackupsV2Client{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/constants.go new file mode 100644 index 000000000000..764da0bee228 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/constants.go @@ -0,0 +1,98 @@ +package backupsv2 + +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 BackupType string + +const ( + BackupTypeFULL BackupType = "FULL" +) + +func PossibleValuesForBackupType() []string { + return []string{ + string(BackupTypeFULL), + } +} + +func (s *BackupType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBackupType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBackupType(input string) (*BackupType, error) { + vals := map[string]BackupType{ + "full": BackupTypeFULL, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BackupType(input) + return &out, nil +} + +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +func PossibleValuesForProvisioningState() []string { + return []string{ + string(ProvisioningStateCanceled), + string(ProvisioningStateCreating), + string(ProvisioningStateDeleting), + string(ProvisioningStateFailed), + string(ProvisioningStateSucceeded), + } +} + +func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseProvisioningState(input string) (*ProvisioningState, error) { + vals := map[string]ProvisioningState{ + "canceled": ProvisioningStateCanceled, + "creating": ProvisioningStateCreating, + "deleting": ProvisioningStateDeleting, + "failed": ProvisioningStateFailed, + "succeeded": ProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ProvisioningState(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/id_backupsv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/id_backupsv2.go new file mode 100644 index 000000000000..e50e063e1405 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/id_backupsv2.go @@ -0,0 +1,139 @@ +package backupsv2 + +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(&BackupsV2Id{}) +} + +var _ resourceids.ResourceId = &BackupsV2Id{} + +// BackupsV2Id is a struct representing the Resource ID for a Backups V 2 +type BackupsV2Id struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string + BackupsV2Name string +} + +// NewBackupsV2ID returns a new BackupsV2Id struct +func NewBackupsV2ID(subscriptionId string, resourceGroupName string, flexibleServerName string, backupsV2Name string) BackupsV2Id { + return BackupsV2Id{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + BackupsV2Name: backupsV2Name, + } +} + +// ParseBackupsV2ID parses 'input' into a BackupsV2Id +func ParseBackupsV2ID(input string) (*BackupsV2Id, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupsV2Id{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupsV2Id{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseBackupsV2IDInsensitively parses 'input' case-insensitively into a BackupsV2Id +// note: this method should only be used for API response data and not user input +func ParseBackupsV2IDInsensitively(input string) (*BackupsV2Id, error) { + parser := resourceids.NewParserFromResourceIdType(&BackupsV2Id{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := BackupsV2Id{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *BackupsV2Id) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + if id.BackupsV2Name, ok = input.Parsed["backupsV2Name"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "backupsV2Name", input) + } + + return nil +} + +// ValidateBackupsV2ID checks that 'input' can be parsed as a Backups V 2 ID +func ValidateBackupsV2ID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseBackupsV2ID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Backups V 2 ID +func (id BackupsV2Id) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s/backupsV2/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName, id.BackupsV2Name) +} + +// Segments returns a slice of Resource ID Segments which comprise this Backups V 2 ID +func (id BackupsV2Id) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + resourceids.StaticSegment("staticBackupsV2", "backupsV2", "backupsV2"), + resourceids.UserSpecifiedSegment("backupsV2Name", "backupsV2Name"), + } +} + +// String returns a human-readable description of this Backups V 2 ID +func (id BackupsV2Id) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + fmt.Sprintf("Backups V 2 Name: %q", id.BackupsV2Name), + } + return fmt.Sprintf("Backups V 2 (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/id_flexibleserver.go new file mode 100644 index 000000000000..9c1e371a991b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/id_flexibleserver.go @@ -0,0 +1,130 @@ +package backupsv2 + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FlexibleServerId{}) +} + +var _ resourceids.ResourceId = &FlexibleServerId{} + +// FlexibleServerId is a struct representing the Resource ID for a Flexible Server +type FlexibleServerId struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string +} + +// NewFlexibleServerID returns a new FlexibleServerId struct +func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { + return FlexibleServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + } +} + +// ParseFlexibleServerID parses 'input' into a FlexibleServerId +func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId +// note: this method should only be used for API response data and not user input +func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + return nil +} + +// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID +func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFlexibleServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Flexible Server ID +func (id FlexibleServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID +func (id FlexibleServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + } +} + +// String returns a human-readable description of this Flexible Server ID +func (id FlexibleServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + } + return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupcreate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupcreate.go new file mode 100644 index 000000000000..3885075c3a6a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupcreate.go @@ -0,0 +1,76 @@ +package backupsv2 + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LongRunningBackupCreateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *ServerBackupV2 +} + +// LongRunningBackupCreate ... +func (c BackupsV2Client) LongRunningBackupCreate(ctx context.Context, id BackupsV2Id, input ServerBackupV2) (result LongRunningBackupCreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// LongRunningBackupCreateThenPoll performs LongRunningBackupCreate then polls until it's completed +func (c BackupsV2Client) LongRunningBackupCreateThenPoll(ctx context.Context, id BackupsV2Id, input ServerBackupV2) error { + result, err := c.LongRunningBackupCreate(ctx, id, input) + if err != nil { + return fmt.Errorf("performing LongRunningBackupCreate: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after LongRunningBackupCreate: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupsget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupsget.go new file mode 100644 index 000000000000..a15e75406545 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupsget.go @@ -0,0 +1,53 @@ +package backupsv2 + +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 LongRunningBackupsGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ServerBackupV2 +} + +// LongRunningBackupsGet ... +func (c BackupsV2Client) LongRunningBackupsGet(ctx context.Context, id BackupsV2Id) (result LongRunningBackupsGetOperationResponse, 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 ServerBackupV2 + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupslist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupslist.go new file mode 100644 index 000000000000..26f132b0a08a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/method_longrunningbackupslist.go @@ -0,0 +1,105 @@ +package backupsv2 + +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 LongRunningBackupsListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]ServerBackupV2 +} + +type LongRunningBackupsListCompleteResult struct { + LatestHttpResponse *http.Response + Items []ServerBackupV2 +} + +type LongRunningBackupsListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *LongRunningBackupsListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// LongRunningBackupsList ... +func (c BackupsV2Client) LongRunningBackupsList(ctx context.Context, id FlexibleServerId) (result LongRunningBackupsListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &LongRunningBackupsListCustomPager{}, + Path: fmt.Sprintf("%s/backupsV2", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]ServerBackupV2 `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// LongRunningBackupsListComplete retrieves all the results into a single object +func (c BackupsV2Client) LongRunningBackupsListComplete(ctx context.Context, id FlexibleServerId) (LongRunningBackupsListCompleteResult, error) { + return c.LongRunningBackupsListCompleteMatchingPredicate(ctx, id, ServerBackupV2OperationPredicate{}) +} + +// LongRunningBackupsListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c BackupsV2Client) LongRunningBackupsListCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate ServerBackupV2OperationPredicate) (result LongRunningBackupsListCompleteResult, err error) { + items := make([]ServerBackupV2, 0) + + resp, err := c.LongRunningBackupsList(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 = LongRunningBackupsListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/model_serverbackuppropertiesv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/model_serverbackuppropertiesv2.go new file mode 100644 index 000000000000..74adf4f088eb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/model_serverbackuppropertiesv2.go @@ -0,0 +1,30 @@ +package backupsv2 + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerBackupPropertiesV2 struct { + BackupNameV2 *string `json:"backupNameV2,omitempty"` + BackupType *BackupType `json:"backupType,omitempty"` + CompletedTime *string `json:"completedTime,omitempty"` + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` + Source *string `json:"source,omitempty"` +} + +func (o *ServerBackupPropertiesV2) GetCompletedTimeAsTime() (*time.Time, error) { + if o.CompletedTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.CompletedTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ServerBackupPropertiesV2) SetCompletedTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.CompletedTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/model_serverbackupv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/model_serverbackupv2.go new file mode 100644 index 000000000000..9573444a04ce --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/model_serverbackupv2.go @@ -0,0 +1,16 @@ +package backupsv2 + +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 ServerBackupV2 struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ServerBackupPropertiesV2 `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/predicates.go new file mode 100644 index 000000000000..92711a6c0253 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/predicates.go @@ -0,0 +1,27 @@ +package backupsv2 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerBackupV2OperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p ServerBackupV2OperationPredicate) Matches(input ServerBackupV2) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/version.go new file mode 100644 index 000000000000..b5a24d5c5bb4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2/version.go @@ -0,0 +1,10 @@ +package backupsv2 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/backupsv2/2023-12-30" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/README.md similarity index 91% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/README.md index 3c36f60a77c6..fe57c0b70165 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability` Documentation -The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `checknameavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/id_location.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/id_location.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/id_location.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/method_execute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/method_execute.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/method_execute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/method_execute.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/method_withoutlocationexecute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/method_withoutlocationexecute.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/method_withoutlocationexecute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/method_withoutlocationexecute.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/model_nameavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/model_nameavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/model_nameavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/model_nameavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/model_nameavailabilityrequest.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/model_nameavailabilityrequest.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/model_nameavailabilityrequest.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/model_nameavailabilityrequest.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/version.go index d551067987e6..2497ca423925 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability/version.go @@ -3,8 +3,8 @@ package checknameavailability // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/checknameavailability/2022-01-01" + return "hashicorp/go-azure-sdk/checknameavailability/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/client.go new file mode 100644 index 000000000000..f79c0da7dd1c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/client.go @@ -0,0 +1,226 @@ +package v2023_12_30 + +// 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/mysql/2023-12-30/advancedthreatprotectionsettings" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop" + "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +type Client struct { + AdvancedThreatProtectionSettings *advancedthreatprotectionsettings.AdvancedThreatProtectionSettingsClient + AzureADAdministrators *azureadadministrators.AzureADAdministratorsClient + BackupAndExport *backupandexport.BackupAndExportClient + Backups *backups.BackupsClient + BackupsV2 *backupsv2.BackupsV2Client + CheckNameAvailability *checknameavailability.CheckNameAvailabilityClient + Configurations *configurations.ConfigurationsClient + Databases *databases.DatabasesClient + FirewallRules *firewallrules.FirewallRulesClient + GetPrivateDnsZoneSuffix *getprivatednszonesuffix.GetPrivateDnsZoneSuffixClient + LocationBasedCapabilities *locationbasedcapabilities.LocationBasedCapabilitiesClient + LocationBasedCapability *locationbasedcapability.LocationBasedCapabilityClient + LogFiles *logfiles.LogFilesClient + Maintenances *maintenances.MaintenancesClient + OperationProgress *operationprogress.OperationProgressClient + ServerFailover *serverfailover.ServerFailoverClient + ServerMigration *servermigration.ServerMigrationClient + ServerResetGtid *serverresetgtid.ServerResetGtidClient + ServerRestart *serverrestart.ServerRestartClient + ServerStart *serverstart.ServerStartClient + ServerStop *serverstop.ServerStopClient + ServerValidateEstimateHighAvailability *servervalidateestimatehighavailability.ServerValidateEstimateHighAvailabilityClient + Servers *servers.ServersClient +} + +func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { + advancedThreatProtectionSettingsClient, err := advancedthreatprotectionsettings.NewAdvancedThreatProtectionSettingsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building AdvancedThreatProtectionSettings client: %+v", err) + } + configureFunc(advancedThreatProtectionSettingsClient.Client) + + azureADAdministratorsClient, err := azureadadministrators.NewAzureADAdministratorsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building AzureADAdministrators client: %+v", err) + } + configureFunc(azureADAdministratorsClient.Client) + + backupAndExportClient, err := backupandexport.NewBackupAndExportClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building BackupAndExport client: %+v", err) + } + configureFunc(backupAndExportClient.Client) + + backupsClient, err := backups.NewBackupsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Backups client: %+v", err) + } + configureFunc(backupsClient.Client) + + backupsV2Client, err := backupsv2.NewBackupsV2ClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building BackupsV2 client: %+v", err) + } + configureFunc(backupsV2Client.Client) + + checkNameAvailabilityClient, err := checknameavailability.NewCheckNameAvailabilityClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building CheckNameAvailability client: %+v", err) + } + configureFunc(checkNameAvailabilityClient.Client) + + configurationsClient, err := configurations.NewConfigurationsClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Configurations client: %+v", err) + } + configureFunc(configurationsClient.Client) + + databasesClient, err := databases.NewDatabasesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Databases client: %+v", err) + } + configureFunc(databasesClient.Client) + + firewallRulesClient, err := firewallrules.NewFirewallRulesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building FirewallRules client: %+v", err) + } + configureFunc(firewallRulesClient.Client) + + getPrivateDnsZoneSuffixClient, err := getprivatednszonesuffix.NewGetPrivateDnsZoneSuffixClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building GetPrivateDnsZoneSuffix client: %+v", err) + } + configureFunc(getPrivateDnsZoneSuffixClient.Client) + + locationBasedCapabilitiesClient, err := locationbasedcapabilities.NewLocationBasedCapabilitiesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building LocationBasedCapabilities client: %+v", err) + } + configureFunc(locationBasedCapabilitiesClient.Client) + + locationBasedCapabilityClient, err := locationbasedcapability.NewLocationBasedCapabilityClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building LocationBasedCapability client: %+v", err) + } + configureFunc(locationBasedCapabilityClient.Client) + + logFilesClient, err := logfiles.NewLogFilesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building LogFiles client: %+v", err) + } + configureFunc(logFilesClient.Client) + + maintenancesClient, err := maintenances.NewMaintenancesClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Maintenances client: %+v", err) + } + configureFunc(maintenancesClient.Client) + + operationProgressClient, err := operationprogress.NewOperationProgressClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building OperationProgress client: %+v", err) + } + configureFunc(operationProgressClient.Client) + + serverFailoverClient, err := serverfailover.NewServerFailoverClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ServerFailover client: %+v", err) + } + configureFunc(serverFailoverClient.Client) + + serverMigrationClient, err := servermigration.NewServerMigrationClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ServerMigration client: %+v", err) + } + configureFunc(serverMigrationClient.Client) + + serverResetGtidClient, err := serverresetgtid.NewServerResetGtidClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ServerResetGtid client: %+v", err) + } + configureFunc(serverResetGtidClient.Client) + + serverRestartClient, err := serverrestart.NewServerRestartClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ServerRestart client: %+v", err) + } + configureFunc(serverRestartClient.Client) + + serverStartClient, err := serverstart.NewServerStartClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ServerStart client: %+v", err) + } + configureFunc(serverStartClient.Client) + + serverStopClient, err := serverstop.NewServerStopClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ServerStop client: %+v", err) + } + configureFunc(serverStopClient.Client) + + serverValidateEstimateHighAvailabilityClient, err := servervalidateestimatehighavailability.NewServerValidateEstimateHighAvailabilityClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building ServerValidateEstimateHighAvailability client: %+v", err) + } + configureFunc(serverValidateEstimateHighAvailabilityClient.Client) + + serversClient, err := servers.NewServersClientWithBaseURI(sdkApi) + if err != nil { + return nil, fmt.Errorf("building Servers client: %+v", err) + } + configureFunc(serversClient.Client) + + return &Client{ + AdvancedThreatProtectionSettings: advancedThreatProtectionSettingsClient, + AzureADAdministrators: azureADAdministratorsClient, + BackupAndExport: backupAndExportClient, + Backups: backupsClient, + BackupsV2: backupsV2Client, + CheckNameAvailability: checkNameAvailabilityClient, + Configurations: configurationsClient, + Databases: databasesClient, + FirewallRules: firewallRulesClient, + GetPrivateDnsZoneSuffix: getPrivateDnsZoneSuffixClient, + LocationBasedCapabilities: locationBasedCapabilitiesClient, + LocationBasedCapability: locationBasedCapabilityClient, + LogFiles: logFilesClient, + Maintenances: maintenancesClient, + OperationProgress: operationProgressClient, + ServerFailover: serverFailoverClient, + ServerMigration: serverMigrationClient, + ServerResetGtid: serverResetGtidClient, + ServerRestart: serverRestartClient, + ServerStart: serverStartClient, + ServerStop: serverStopClient, + ServerValidateEstimateHighAvailability: serverValidateEstimateHighAvailabilityClient, + Servers: serversClient, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/README.md similarity index 96% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/README.md index 5f120d1257cc..e07b3ad20b13 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations` Documentation -The `configurations` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `configurations` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/id_configuration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_configuration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/id_configuration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_batchupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_batchupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_batchupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_batchupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configuration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configuration.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configuration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configuration.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configurationforbatchupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configurationforbatchupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configurationforbatchupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configurationforbatchupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configurationforbatchupdateproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configurationforbatchupdateproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configurationforbatchupdateproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configurationforbatchupdateproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configurationlistforbatchupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configurationlistforbatchupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configurationlistforbatchupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configurationlistforbatchupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configurationproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configurationproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/model_configurationproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/model_configurationproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/version.go index 76611e0f07eb..eb7a17ff37aa 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations/version.go @@ -3,8 +3,8 @@ package configurations // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/configurations/2022-01-01" + return "hashicorp/go-azure-sdk/configurations/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/README.md similarity index 95% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/README.md index c09e800f36b6..2e5068bf3eab 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases` Documentation -The `databases` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `databases` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/id_database.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_database.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/id_database.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/model_database.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/model_database.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/model_database.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/model_database.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/model_databaseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/model_databaseproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/model_databaseproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/model_databaseproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/version.go index 4db681f665c2..fdd580a63285 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases/version.go @@ -3,8 +3,8 @@ package databases // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/databases/2022-01-01" + return "hashicorp/go-azure-sdk/databases/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/README.md similarity index 94% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/README.md index ed31f4108ed3..f7cb0f815686 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules` Documentation -The `firewallrules` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `firewallrules` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/id_firewallrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_firewallrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/id_firewallrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/model_firewallrule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/model_firewallrule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/model_firewallrule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/model_firewallrule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/model_firewallruleproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/model_firewallruleproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/model_firewallruleproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/model_firewallruleproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/version.go index 086290b4d014..b898eef78717 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules/version.go @@ -3,8 +3,8 @@ package firewallrules // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/firewallrules/2022-01-01" + return "hashicorp/go-azure-sdk/firewallrules/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/README.md similarity index 85% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/README.md index ddf9c6f83792..495df3df5f5e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix` Documentation -The `getprivatednszonesuffix` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `getprivatednszonesuffix` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/method_execute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/method_execute.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/method_execute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/method_execute.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/model_getprivatednszonesuffixresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/model_getprivatednszonesuffixresponse.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/model_getprivatednszonesuffixresponse.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/model_getprivatednszonesuffixresponse.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/version.go similarity index 67% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/version.go index d6e350b825e0..5a77516c8f45 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix/version.go @@ -3,8 +3,8 @@ package getprivatednszonesuffix // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2022-01-01" + return "hashicorp/go-azure-sdk/getprivatednszonesuffix/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/README.md similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/README.md index b85d169036f6..ccc5a17a2056 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities` Documentation -The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `locationbasedcapabilities` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/id_location.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/id_location.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/id_location.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_capabilityproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_capabilityproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_capabilityproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_capabilityproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_servereditioncapability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_servereditioncapability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_servereditioncapability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_servereditioncapability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_serverversioncapability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_serverversioncapability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_serverversioncapability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_serverversioncapability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_skucapability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_skucapability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_skucapability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_skucapability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_storageeditioncapability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_storageeditioncapability.go similarity index 79% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_storageeditioncapability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_storageeditioncapability.go index 51b5e0dd2a04..eec8c34c448d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/model_storageeditioncapability.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/model_storageeditioncapability.go @@ -4,8 +4,10 @@ package locationbasedcapabilities // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type StorageEditionCapability struct { + MaxBackupIntervalHours *int64 `json:"maxBackupIntervalHours,omitempty"` MaxBackupRetentionDays *int64 `json:"maxBackupRetentionDays,omitempty"` MaxStorageSize *int64 `json:"maxStorageSize,omitempty"` + MinBackupIntervalHours *int64 `json:"minBackupIntervalHours,omitempty"` MinBackupRetentionDays *int64 `json:"minBackupRetentionDays,omitempty"` MinStorageSize *int64 `json:"minStorageSize,omitempty"` Name *string `json:"name,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/version.go similarity index 66% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/version.go index 3dbfeafab2e9..9971bc5f35fb 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities/version.go @@ -3,8 +3,8 @@ package locationbasedcapabilities // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/locationbasedcapabilities/2022-01-01" + return "hashicorp/go-azure-sdk/locationbasedcapabilities/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/README.md new file mode 100644 index 000000000000..d7c77d383e46 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/README.md @@ -0,0 +1,53 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability` Documentation + +The `locationbasedcapability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability" +``` + + +### Client Initialization + +```go +client := locationbasedcapability.NewLocationBasedCapabilityClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `LocationBasedCapabilityClient.SetGet` + +```go +ctx := context.TODO() +id := locationbasedcapability.NewCapabilitySetID("12345678-1234-9876-4563-123456789012", "locationName", "capabilitySetName") + +read, err := client.SetGet(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `LocationBasedCapabilityClient.SetList` + +```go +ctx := context.TODO() +id := locationbasedcapability.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName") + +// alternatively `client.SetList(ctx, id)` can be used to do batched pagination +items, err := client.SetListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/client.go new file mode 100644 index 000000000000..09a9c2a8336c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/client.go @@ -0,0 +1,26 @@ +package locationbasedcapability + +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 LocationBasedCapabilityClient struct { + Client *resourcemanager.Client +} + +func NewLocationBasedCapabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*LocationBasedCapabilityClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "locationbasedcapability", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating LocationBasedCapabilityClient: %+v", err) + } + + return &LocationBasedCapabilityClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/id_capabilityset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/id_capabilityset.go new file mode 100644 index 000000000000..7ed4f0a9a102 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/id_capabilityset.go @@ -0,0 +1,130 @@ +package locationbasedcapability + +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(&CapabilitySetId{}) +} + +var _ resourceids.ResourceId = &CapabilitySetId{} + +// CapabilitySetId is a struct representing the Resource ID for a Capability Set +type CapabilitySetId struct { + SubscriptionId string + LocationName string + CapabilitySetName string +} + +// NewCapabilitySetID returns a new CapabilitySetId struct +func NewCapabilitySetID(subscriptionId string, locationName string, capabilitySetName string) CapabilitySetId { + return CapabilitySetId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + CapabilitySetName: capabilitySetName, + } +} + +// ParseCapabilitySetID parses 'input' into a CapabilitySetId +func ParseCapabilitySetID(input string) (*CapabilitySetId, error) { + parser := resourceids.NewParserFromResourceIdType(&CapabilitySetId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CapabilitySetId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseCapabilitySetIDInsensitively parses 'input' case-insensitively into a CapabilitySetId +// note: this method should only be used for API response data and not user input +func ParseCapabilitySetIDInsensitively(input string) (*CapabilitySetId, error) { + parser := resourceids.NewParserFromResourceIdType(&CapabilitySetId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := CapabilitySetId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *CapabilitySetId) 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) + } + + if id.CapabilitySetName, ok = input.Parsed["capabilitySetName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "capabilitySetName", input) + } + + return nil +} + +// ValidateCapabilitySetID checks that 'input' can be parsed as a Capability Set ID +func ValidateCapabilitySetID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseCapabilitySetID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Capability Set ID +func (id CapabilitySetId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.DBforMySQL/locations/%s/capabilitySets/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName, id.CapabilitySetName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Capability Set ID +func (id CapabilitySetId) 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("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationName"), + resourceids.StaticSegment("staticCapabilitySets", "capabilitySets", "capabilitySets"), + resourceids.UserSpecifiedSegment("capabilitySetName", "capabilitySetName"), + } +} + +// String returns a human-readable description of this Capability Set ID +func (id CapabilitySetId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + fmt.Sprintf("Capability Set Name: %q", id.CapabilitySetName), + } + return fmt.Sprintf("Capability Set (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/id_location.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/id_location.go new file mode 100644 index 000000000000..fa71d06dfa32 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/id_location.go @@ -0,0 +1,121 @@ +package locationbasedcapability + +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.DBforMySQL/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("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationName"), + } +} + +// String returns a human-readable description of this Location ID +func (id LocationId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + } + return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setget.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setget.go new file mode 100644 index 000000000000..e30a08c9c434 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setget.go @@ -0,0 +1,53 @@ +package locationbasedcapability + +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 SetGetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Capability +} + +// SetGet ... +func (c LocationBasedCapabilityClient) SetGet(ctx context.Context, id CapabilitySetId) (result SetGetOperationResponse, 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 Capability + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setlist.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setlist.go new file mode 100644 index 000000000000..a942983ba91d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/method_setlist.go @@ -0,0 +1,105 @@ +package locationbasedcapability + +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 SetListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Capability +} + +type SetListCompleteResult struct { + LatestHttpResponse *http.Response + Items []Capability +} + +type SetListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *SetListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// SetList ... +func (c LocationBasedCapabilityClient) SetList(ctx context.Context, id LocationId) (result SetListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &SetListCustomPager{}, + Path: fmt.Sprintf("%s/capabilitySets", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Capability `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// SetListComplete retrieves all the results into a single object +func (c LocationBasedCapabilityClient) SetListComplete(ctx context.Context, id LocationId) (SetListCompleteResult, error) { + return c.SetListCompleteMatchingPredicate(ctx, id, CapabilityOperationPredicate{}) +} + +// SetListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c LocationBasedCapabilityClient) SetListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate CapabilityOperationPredicate) (result SetListCompleteResult, err error) { + items := make([]Capability, 0) + + resp, err := c.SetList(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 = SetListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_capability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_capability.go new file mode 100644 index 000000000000..7c8e20be62c5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_capability.go @@ -0,0 +1,16 @@ +package locationbasedcapability + +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 Capability struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *CapabilityPropertiesV2 `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_capabilitypropertiesv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_capabilitypropertiesv2.go new file mode 100644 index 000000000000..225e59fb99bc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_capabilitypropertiesv2.go @@ -0,0 +1,10 @@ +package locationbasedcapability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CapabilityPropertiesV2 struct { + SupportedFlexibleServerEditions *[]ServerEditionCapabilityV2 `json:"supportedFlexibleServerEditions,omitempty"` + SupportedGeoBackupRegions *[]string `json:"supportedGeoBackupRegions,omitempty"` + SupportedServerVersions *[]ServerVersionCapabilityV2 `json:"supportedServerVersions,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_servereditioncapabilityv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_servereditioncapabilityv2.go new file mode 100644 index 000000000000..0af2925e0dc1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_servereditioncapabilityv2.go @@ -0,0 +1,12 @@ +package locationbasedcapability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerEditionCapabilityV2 struct { + DefaultSku *string `json:"defaultSku,omitempty"` + DefaultStorageSize *int64 `json:"defaultStorageSize,omitempty"` + Name *string `json:"name,omitempty"` + SupportedSkus *[]SkuCapabilityV2 `json:"supportedSkus,omitempty"` + SupportedStorageEditions *[]StorageEditionCapability `json:"supportedStorageEditions,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_serverversioncapabilityv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_serverversioncapabilityv2.go new file mode 100644 index 000000000000..360447828486 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_serverversioncapabilityv2.go @@ -0,0 +1,8 @@ +package locationbasedcapability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerVersionCapabilityV2 struct { + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_skucapabilityv2.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_skucapabilityv2.go new file mode 100644 index 000000000000..688045a0f859 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_skucapabilityv2.go @@ -0,0 +1,13 @@ +package locationbasedcapability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkuCapabilityV2 struct { + Name *string `json:"name,omitempty"` + SupportedHAMode *[]string `json:"supportedHAMode,omitempty"` + SupportedIops *int64 `json:"supportedIops,omitempty"` + SupportedMemoryPerVCoreMB *int64 `json:"supportedMemoryPerVCoreMB,omitempty"` + SupportedZones *[]string `json:"supportedZones,omitempty"` + VCores *int64 `json:"vCores,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_storageeditioncapability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_storageeditioncapability.go new file mode 100644 index 000000000000..f795f9800ef5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/model_storageeditioncapability.go @@ -0,0 +1,14 @@ +package locationbasedcapability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type StorageEditionCapability struct { + MaxBackupIntervalHours *int64 `json:"maxBackupIntervalHours,omitempty"` + MaxBackupRetentionDays *int64 `json:"maxBackupRetentionDays,omitempty"` + MaxStorageSize *int64 `json:"maxStorageSize,omitempty"` + MinBackupIntervalHours *int64 `json:"minBackupIntervalHours,omitempty"` + MinBackupRetentionDays *int64 `json:"minBackupRetentionDays,omitempty"` + MinStorageSize *int64 `json:"minStorageSize,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/predicates.go new file mode 100644 index 000000000000..c12b4684c6f5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/predicates.go @@ -0,0 +1,27 @@ +package locationbasedcapability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CapabilityOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p CapabilityOperationPredicate) Matches(input Capability) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/version.go new file mode 100644 index 000000000000..c037ec027245 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability/version.go @@ -0,0 +1,10 @@ +package locationbasedcapability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/locationbasedcapability/2023-12-30" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/README.md similarity index 91% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/README.md index ca63e6b18ba6..61382d47f89a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles` Documentation -The `logfiles` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `logfiles` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/method_listbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/method_listbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/method_listbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/method_listbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/model_logfile.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/model_logfile.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/model_logfile.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/model_logfile.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/model_logfileproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/model_logfileproperties.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/model_logfileproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/model_logfileproperties.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/version.go index f579fd4b1c62..a819927acb32 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles/version.go @@ -3,8 +3,8 @@ package logfiles // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/logfiles/2022-01-01" + return "hashicorp/go-azure-sdk/logfiles/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/README.md new file mode 100644 index 000000000000..b68e36f7b701 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/README.md @@ -0,0 +1,70 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances` Documentation + +The `maintenances` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances" +``` + + +### Client Initialization + +```go +client := maintenances.NewMaintenancesClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `MaintenancesClient.List` + +```go +ctx := context.TODO() +id := maintenances.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +// alternatively `client.List(ctx, id)` can be used to do batched pagination +items, err := client.ListComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `MaintenancesClient.Read` + +```go +ctx := context.TODO() +id := maintenances.NewMaintenanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "maintenanceName") + +read, err := client.Read(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `MaintenancesClient.Update` + +```go +ctx := context.TODO() +id := maintenances.NewMaintenanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName", "maintenanceName") + +payload := maintenances.MaintenanceUpdate{ + // ... +} + + +if err := client.UpdateThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/client.go new file mode 100644 index 000000000000..447a530851ca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/client.go @@ -0,0 +1,26 @@ +package maintenances + +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 MaintenancesClient struct { + Client *resourcemanager.Client +} + +func NewMaintenancesClientWithBaseURI(sdkApi sdkEnv.Api) (*MaintenancesClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "maintenances", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating MaintenancesClient: %+v", err) + } + + return &MaintenancesClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/constants.go new file mode 100644 index 000000000000..150947ebddf0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/constants.go @@ -0,0 +1,157 @@ +package maintenances + +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 MaintenanceProvisioningState string + +const ( + MaintenanceProvisioningStateCreating MaintenanceProvisioningState = "Creating" + MaintenanceProvisioningStateDeleting MaintenanceProvisioningState = "Deleting" + MaintenanceProvisioningStateFailed MaintenanceProvisioningState = "Failed" + MaintenanceProvisioningStateSucceeded MaintenanceProvisioningState = "Succeeded" +) + +func PossibleValuesForMaintenanceProvisioningState() []string { + return []string{ + string(MaintenanceProvisioningStateCreating), + string(MaintenanceProvisioningStateDeleting), + string(MaintenanceProvisioningStateFailed), + string(MaintenanceProvisioningStateSucceeded), + } +} + +func (s *MaintenanceProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMaintenanceProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMaintenanceProvisioningState(input string) (*MaintenanceProvisioningState, error) { + vals := map[string]MaintenanceProvisioningState{ + "creating": MaintenanceProvisioningStateCreating, + "deleting": MaintenanceProvisioningStateDeleting, + "failed": MaintenanceProvisioningStateFailed, + "succeeded": MaintenanceProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MaintenanceProvisioningState(input) + return &out, nil +} + +type MaintenanceState string + +const ( + MaintenanceStateCanceled MaintenanceState = "Canceled" + MaintenanceStateCompleted MaintenanceState = "Completed" + MaintenanceStateInPreparation MaintenanceState = "InPreparation" + MaintenanceStateProcessing MaintenanceState = "Processing" + MaintenanceStateReScheduled MaintenanceState = "ReScheduled" + MaintenanceStateScheduled MaintenanceState = "Scheduled" +) + +func PossibleValuesForMaintenanceState() []string { + return []string{ + string(MaintenanceStateCanceled), + string(MaintenanceStateCompleted), + string(MaintenanceStateInPreparation), + string(MaintenanceStateProcessing), + string(MaintenanceStateReScheduled), + string(MaintenanceStateScheduled), + } +} + +func (s *MaintenanceState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMaintenanceState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMaintenanceState(input string) (*MaintenanceState, error) { + vals := map[string]MaintenanceState{ + "canceled": MaintenanceStateCanceled, + "completed": MaintenanceStateCompleted, + "inpreparation": MaintenanceStateInPreparation, + "processing": MaintenanceStateProcessing, + "rescheduled": MaintenanceStateReScheduled, + "scheduled": MaintenanceStateScheduled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MaintenanceState(input) + return &out, nil +} + +type MaintenanceType string + +const ( + MaintenanceTypeHotFixes MaintenanceType = "HotFixes" + MaintenanceTypeMinorVersionUpgrade MaintenanceType = "MinorVersionUpgrade" + MaintenanceTypeRoutineMaintenance MaintenanceType = "RoutineMaintenance" + MaintenanceTypeSecurityPatches MaintenanceType = "SecurityPatches" +) + +func PossibleValuesForMaintenanceType() []string { + return []string{ + string(MaintenanceTypeHotFixes), + string(MaintenanceTypeMinorVersionUpgrade), + string(MaintenanceTypeRoutineMaintenance), + string(MaintenanceTypeSecurityPatches), + } +} + +func (s *MaintenanceType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseMaintenanceType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseMaintenanceType(input string) (*MaintenanceType, error) { + vals := map[string]MaintenanceType{ + "hotfixes": MaintenanceTypeHotFixes, + "minorversionupgrade": MaintenanceTypeMinorVersionUpgrade, + "routinemaintenance": MaintenanceTypeRoutineMaintenance, + "securitypatches": MaintenanceTypeSecurityPatches, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := MaintenanceType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/id_flexibleserver.go new file mode 100644 index 000000000000..ef2adbe3118a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/id_flexibleserver.go @@ -0,0 +1,130 @@ +package maintenances + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FlexibleServerId{}) +} + +var _ resourceids.ResourceId = &FlexibleServerId{} + +// FlexibleServerId is a struct representing the Resource ID for a Flexible Server +type FlexibleServerId struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string +} + +// NewFlexibleServerID returns a new FlexibleServerId struct +func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { + return FlexibleServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + } +} + +// ParseFlexibleServerID parses 'input' into a FlexibleServerId +func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId +// note: this method should only be used for API response data and not user input +func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + return nil +} + +// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID +func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFlexibleServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Flexible Server ID +func (id FlexibleServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID +func (id FlexibleServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + } +} + +// String returns a human-readable description of this Flexible Server ID +func (id FlexibleServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + } + return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/id_maintenance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/id_maintenance.go new file mode 100644 index 000000000000..0d3dd77afc8d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/id_maintenance.go @@ -0,0 +1,139 @@ +package maintenances + +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(&MaintenanceId{}) +} + +var _ resourceids.ResourceId = &MaintenanceId{} + +// MaintenanceId is a struct representing the Resource ID for a Maintenance +type MaintenanceId struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string + MaintenanceName string +} + +// NewMaintenanceID returns a new MaintenanceId struct +func NewMaintenanceID(subscriptionId string, resourceGroupName string, flexibleServerName string, maintenanceName string) MaintenanceId { + return MaintenanceId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + MaintenanceName: maintenanceName, + } +} + +// ParseMaintenanceID parses 'input' into a MaintenanceId +func ParseMaintenanceID(input string) (*MaintenanceId, error) { + parser := resourceids.NewParserFromResourceIdType(&MaintenanceId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MaintenanceId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseMaintenanceIDInsensitively parses 'input' case-insensitively into a MaintenanceId +// note: this method should only be used for API response data and not user input +func ParseMaintenanceIDInsensitively(input string) (*MaintenanceId, error) { + parser := resourceids.NewParserFromResourceIdType(&MaintenanceId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := MaintenanceId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *MaintenanceId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + if id.MaintenanceName, ok = input.Parsed["maintenanceName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "maintenanceName", input) + } + + return nil +} + +// ValidateMaintenanceID checks that 'input' can be parsed as a Maintenance ID +func ValidateMaintenanceID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseMaintenanceID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Maintenance ID +func (id MaintenanceId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s/maintenances/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName, id.MaintenanceName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Maintenance ID +func (id MaintenanceId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + resourceids.StaticSegment("staticMaintenances", "maintenances", "maintenances"), + resourceids.UserSpecifiedSegment("maintenanceName", "maintenanceName"), + } +} + +// String returns a human-readable description of this Maintenance ID +func (id MaintenanceId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + fmt.Sprintf("Maintenance Name: %q", id.MaintenanceName), + } + return fmt.Sprintf("Maintenance (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_list.go new file mode 100644 index 000000000000..3d3ccac95ebb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_list.go @@ -0,0 +1,105 @@ +package maintenances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]Maintenance +} + +type ListCompleteResult struct { + LatestHttpResponse *http.Response + Items []Maintenance +} + +type ListCustomPager struct { + NextLink *odata.Link `json:"nextLink"` +} + +func (p *ListCustomPager) NextPageLink() *odata.Link { + defer func() { + p.NextLink = nil + }() + + return p.NextLink +} + +// List ... +func (c MaintenancesClient) List(ctx context.Context, id FlexibleServerId) (result ListOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Pager: &ListCustomPager{}, + Path: fmt.Sprintf("%s/maintenances", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]Maintenance `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListComplete retrieves all the results into a single object +func (c MaintenancesClient) ListComplete(ctx context.Context, id FlexibleServerId) (ListCompleteResult, error) { + return c.ListCompleteMatchingPredicate(ctx, id, MaintenanceOperationPredicate{}) +} + +// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c MaintenancesClient) ListCompleteMatchingPredicate(ctx context.Context, id FlexibleServerId, predicate MaintenanceOperationPredicate) (result ListCompleteResult, err error) { + items := make([]Maintenance, 0) + + resp, err := c.List(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 = ListCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_read.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_read.go new file mode 100644 index 000000000000..25424ecdaf5b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_read.go @@ -0,0 +1,53 @@ +package maintenances + +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 ReadOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *Maintenance +} + +// Read ... +func (c MaintenancesClient) Read(ctx context.Context, id MaintenanceId) (result ReadOperationResponse, 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 Maintenance + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_update.go new file mode 100644 index 000000000000..f95777d0d492 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/method_update.go @@ -0,0 +1,75 @@ +package maintenances + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Maintenance +} + +// Update ... +func (c MaintenancesClient) Update(ctx context.Context, id MaintenanceId, input MaintenanceUpdate) (result UpdateOperationResponse, 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 +} + +// UpdateThenPoll performs Update then polls until it's completed +func (c MaintenancesClient) UpdateThenPoll(ctx context.Context, id MaintenanceId, input MaintenanceUpdate) error { + result, err := c.Update(ctx, id, input) + if err != nil { + return fmt.Errorf("performing Update: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after Update: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenance.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenance.go new file mode 100644 index 000000000000..526c79cedda4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenance.go @@ -0,0 +1,16 @@ +package maintenances + +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 Maintenance struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties MaintenanceProperties `json:"properties"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenanceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenanceproperties.go new file mode 100644 index 000000000000..f32451e3bc2a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenanceproperties.go @@ -0,0 +1,96 @@ +package maintenances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenanceProperties struct { + MaintenanceAvailableScheduleMaxTime *string `json:"maintenanceAvailableScheduleMaxTime,omitempty"` + MaintenanceAvailableScheduleMinTime *string `json:"maintenanceAvailableScheduleMinTime,omitempty"` + MaintenanceDescription *string `json:"maintenanceDescription,omitempty"` + MaintenanceEndTime *string `json:"maintenanceEndTime,omitempty"` + MaintenanceExecutionEndTime *string `json:"maintenanceExecutionEndTime,omitempty"` + MaintenanceExecutionStartTime *string `json:"maintenanceExecutionStartTime,omitempty"` + MaintenanceStartTime *string `json:"maintenanceStartTime,omitempty"` + MaintenanceState *MaintenanceState `json:"maintenanceState,omitempty"` + MaintenanceTitle *string `json:"maintenanceTitle,omitempty"` + MaintenanceType *MaintenanceType `json:"maintenanceType,omitempty"` + ProvisioningState *MaintenanceProvisioningState `json:"provisioningState,omitempty"` +} + +func (o *MaintenanceProperties) GetMaintenanceAvailableScheduleMaxTimeAsTime() (*time.Time, error) { + if o.MaintenanceAvailableScheduleMaxTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.MaintenanceAvailableScheduleMaxTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MaintenanceProperties) SetMaintenanceAvailableScheduleMaxTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.MaintenanceAvailableScheduleMaxTime = &formatted +} + +func (o *MaintenanceProperties) GetMaintenanceAvailableScheduleMinTimeAsTime() (*time.Time, error) { + if o.MaintenanceAvailableScheduleMinTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.MaintenanceAvailableScheduleMinTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MaintenanceProperties) SetMaintenanceAvailableScheduleMinTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.MaintenanceAvailableScheduleMinTime = &formatted +} + +func (o *MaintenanceProperties) GetMaintenanceEndTimeAsTime() (*time.Time, error) { + if o.MaintenanceEndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.MaintenanceEndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MaintenanceProperties) SetMaintenanceEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.MaintenanceEndTime = &formatted +} + +func (o *MaintenanceProperties) GetMaintenanceExecutionEndTimeAsTime() (*time.Time, error) { + if o.MaintenanceExecutionEndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.MaintenanceExecutionEndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MaintenanceProperties) SetMaintenanceExecutionEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.MaintenanceExecutionEndTime = &formatted +} + +func (o *MaintenanceProperties) GetMaintenanceExecutionStartTimeAsTime() (*time.Time, error) { + if o.MaintenanceExecutionStartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.MaintenanceExecutionStartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MaintenanceProperties) SetMaintenanceExecutionStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.MaintenanceExecutionStartTime = &formatted +} + +func (o *MaintenanceProperties) GetMaintenanceStartTimeAsTime() (*time.Time, error) { + if o.MaintenanceStartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.MaintenanceStartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MaintenanceProperties) SetMaintenanceStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.MaintenanceStartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenancepropertiesforupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenancepropertiesforupdate.go new file mode 100644 index 000000000000..eb9a6c8a99e1 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenancepropertiesforupdate.go @@ -0,0 +1,26 @@ +package maintenances + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenancePropertiesForUpdate struct { + MaintenanceStartTime *string `json:"maintenanceStartTime,omitempty"` +} + +func (o *MaintenancePropertiesForUpdate) GetMaintenanceStartTimeAsTime() (*time.Time, error) { + if o.MaintenanceStartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.MaintenanceStartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *MaintenancePropertiesForUpdate) SetMaintenanceStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.MaintenanceStartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenanceupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenanceupdate.go new file mode 100644 index 000000000000..b183e14aed0b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/model_maintenanceupdate.go @@ -0,0 +1,8 @@ +package maintenances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenanceUpdate struct { + Properties *MaintenancePropertiesForUpdate `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/predicates.go new file mode 100644 index 000000000000..65329b625a43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/predicates.go @@ -0,0 +1,27 @@ +package maintenances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenanceOperationPredicate struct { + Id *string + Name *string + Type *string +} + +func (p MaintenanceOperationPredicate) Matches(input Maintenance) bool { + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/version.go new file mode 100644 index 000000000000..8543c8afc4de --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances/version.go @@ -0,0 +1,10 @@ +package maintenances + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/maintenances/2023-12-30" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/README.md new file mode 100644 index 000000000000..b7db6fb5fff8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/README.md @@ -0,0 +1,36 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress` Documentation + +The `operationprogress` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress" +``` + + +### Client Initialization + +```go +client := operationprogress.NewOperationProgressClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `OperationProgressClient.Get` + +```go +ctx := context.TODO() +id := operationprogress.NewOperationProgressID("12345678-1234-9876-4563-123456789012", "locationName", "operationId") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/client.go new file mode 100644 index 000000000000..920c7279e857 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/client.go @@ -0,0 +1,26 @@ +package operationprogress + +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 OperationProgressClient struct { + Client *resourcemanager.Client +} + +func NewOperationProgressClientWithBaseURI(sdkApi sdkEnv.Api) (*OperationProgressClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "operationprogress", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating OperationProgressClient: %+v", err) + } + + return &OperationProgressClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/constants.go new file mode 100644 index 000000000000..2a187c15bf20 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/constants.go @@ -0,0 +1,51 @@ +package operationprogress + +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 ObjectType string + +const ( + ObjectTypeBackupAndExportResponse ObjectType = "BackupAndExportResponse" + ObjectTypeImportFromStorageResponse ObjectType = "ImportFromStorageResponse" +) + +func PossibleValuesForObjectType() []string { + return []string{ + string(ObjectTypeBackupAndExportResponse), + string(ObjectTypeImportFromStorageResponse), + } +} + +func (s *ObjectType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseObjectType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseObjectType(input string) (*ObjectType, error) { + vals := map[string]ObjectType{ + "backupandexportresponse": ObjectTypeBackupAndExportResponse, + "importfromstorageresponse": ObjectTypeImportFromStorageResponse, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ObjectType(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/id_operationprogress.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/id_operationprogress.go new file mode 100644 index 000000000000..813d3ddd2f7f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/id_operationprogress.go @@ -0,0 +1,130 @@ +package operationprogress + +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(&OperationProgressId{}) +} + +var _ resourceids.ResourceId = &OperationProgressId{} + +// OperationProgressId is a struct representing the Resource ID for a Operation Progress +type OperationProgressId struct { + SubscriptionId string + LocationName string + OperationId string +} + +// NewOperationProgressID returns a new OperationProgressId struct +func NewOperationProgressID(subscriptionId string, locationName string, operationId string) OperationProgressId { + return OperationProgressId{ + SubscriptionId: subscriptionId, + LocationName: locationName, + OperationId: operationId, + } +} + +// ParseOperationProgressID parses 'input' into a OperationProgressId +func ParseOperationProgressID(input string) (*OperationProgressId, error) { + parser := resourceids.NewParserFromResourceIdType(&OperationProgressId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OperationProgressId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseOperationProgressIDInsensitively parses 'input' case-insensitively into a OperationProgressId +// note: this method should only be used for API response data and not user input +func ParseOperationProgressIDInsensitively(input string) (*OperationProgressId, error) { + parser := resourceids.NewParserFromResourceIdType(&OperationProgressId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := OperationProgressId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *OperationProgressId) 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) + } + + if id.OperationId, ok = input.Parsed["operationId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "operationId", input) + } + + return nil +} + +// ValidateOperationProgressID checks that 'input' can be parsed as a Operation Progress ID +func ValidateOperationProgressID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseOperationProgressID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Operation Progress ID +func (id OperationProgressId) ID() string { + fmtString := "/subscriptions/%s/providers/Microsoft.DBforMySQL/locations/%s/operationProgress/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName, id.OperationId) +} + +// Segments returns a slice of Resource ID Segments which comprise this Operation Progress ID +func (id OperationProgressId) 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("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticLocations", "locations", "locations"), + resourceids.UserSpecifiedSegment("locationName", "locationName"), + resourceids.StaticSegment("staticOperationProgress", "operationProgress", "operationProgress"), + resourceids.UserSpecifiedSegment("operationId", "operationId"), + } +} + +// String returns a human-readable description of this Operation Progress ID +func (id OperationProgressId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Location Name: %q", id.LocationName), + fmt.Sprintf("Operation: %q", id.OperationId), + } + return fmt.Sprintf("Operation Progress (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/method_get.go new file mode 100644 index 000000000000..d9ae7079f093 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/method_get.go @@ -0,0 +1,53 @@ +package operationprogress + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *OperationProgressResult +} + +// Get ... +func (c OperationProgressClient) Get(ctx context.Context, id OperationProgressId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var model OperationProgressResult + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_backupandexportresponsetype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_backupandexportresponsetype.go new file mode 100644 index 000000000000..5516c74b03cc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_backupandexportresponsetype.go @@ -0,0 +1,52 @@ +package operationprogress + +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 _ OperationProgressResponseType = BackupAndExportResponseType{} + +type BackupAndExportResponseType struct { + BackupMetadata *string `json:"backupMetadata,omitempty"` + DataTransferredInBytes *int64 `json:"dataTransferredInBytes,omitempty"` + DatasourceSizeInBytes *int64 `json:"datasourceSizeInBytes,omitempty"` + + // Fields inherited from OperationProgressResponseType + + ObjectType ObjectType `json:"objectType"` +} + +func (s BackupAndExportResponseType) OperationProgressResponseType() BaseOperationProgressResponseTypeImpl { + return BaseOperationProgressResponseTypeImpl{ + ObjectType: s.ObjectType, + } +} + +var _ json.Marshaler = BackupAndExportResponseType{} + +func (s BackupAndExportResponseType) MarshalJSON() ([]byte, error) { + type wrapper BackupAndExportResponseType + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling BackupAndExportResponseType: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling BackupAndExportResponseType: %+v", err) + } + + decoded["objectType"] = "BackupAndExportResponse" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling BackupAndExportResponseType: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_erroradditionalinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_erroradditionalinfo.go new file mode 100644 index 000000000000..98323130d670 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_erroradditionalinfo.go @@ -0,0 +1,9 @@ +package operationprogress + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorAdditionalInfo struct { + Info *interface{} `json:"info,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_errordetail.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_errordetail.go new file mode 100644 index 000000000000..1a9c5aa7d013 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_errordetail.go @@ -0,0 +1,12 @@ +package operationprogress + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ErrorDetail struct { + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` + Code *string `json:"code,omitempty"` + Details *[]ErrorDetail `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_importfromstorageresponsetype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_importfromstorageresponsetype.go new file mode 100644 index 000000000000..c50305251311 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_importfromstorageresponsetype.go @@ -0,0 +1,50 @@ +package operationprogress + +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 _ OperationProgressResponseType = ImportFromStorageResponseType{} + +type ImportFromStorageResponseType struct { + EstimatedCompletionTime *string `json:"estimatedCompletionTime,omitempty"` + + // Fields inherited from OperationProgressResponseType + + ObjectType ObjectType `json:"objectType"` +} + +func (s ImportFromStorageResponseType) OperationProgressResponseType() BaseOperationProgressResponseTypeImpl { + return BaseOperationProgressResponseTypeImpl{ + ObjectType: s.ObjectType, + } +} + +var _ json.Marshaler = ImportFromStorageResponseType{} + +func (s ImportFromStorageResponseType) MarshalJSON() ([]byte, error) { + type wrapper ImportFromStorageResponseType + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling ImportFromStorageResponseType: %+v", err) + } + + var decoded map[string]interface{} + if err = json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling ImportFromStorageResponseType: %+v", err) + } + + decoded["objectType"] = "ImportFromStorageResponse" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling ImportFromStorageResponseType: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationprogressresponsetype.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationprogressresponsetype.go new file mode 100644 index 000000000000..b13d561439fa --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationprogressresponsetype.go @@ -0,0 +1,83 @@ +package operationprogress + +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 OperationProgressResponseType interface { + OperationProgressResponseType() BaseOperationProgressResponseTypeImpl +} + +var _ OperationProgressResponseType = BaseOperationProgressResponseTypeImpl{} + +type BaseOperationProgressResponseTypeImpl struct { + ObjectType ObjectType `json:"objectType"` +} + +func (s BaseOperationProgressResponseTypeImpl) OperationProgressResponseType() BaseOperationProgressResponseTypeImpl { + return s +} + +var _ OperationProgressResponseType = RawOperationProgressResponseTypeImpl{} + +// RawOperationProgressResponseTypeImpl 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 RawOperationProgressResponseTypeImpl struct { + operationProgressResponseType BaseOperationProgressResponseTypeImpl + Type string + Values map[string]interface{} +} + +func (s RawOperationProgressResponseTypeImpl) OperationProgressResponseType() BaseOperationProgressResponseTypeImpl { + return s.operationProgressResponseType +} + +func UnmarshalOperationProgressResponseTypeImplementation(input []byte) (OperationProgressResponseType, 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 OperationProgressResponseType into map[string]interface: %+v", err) + } + + var value string + if v, ok := temp["objectType"]; ok { + value = fmt.Sprintf("%v", v) + } + + if strings.EqualFold(value, "BackupAndExportResponse") { + var out BackupAndExportResponseType + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into BackupAndExportResponseType: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "ImportFromStorageResponse") { + var out ImportFromStorageResponseType + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into ImportFromStorageResponseType: %+v", err) + } + return out, nil + } + + var parent BaseOperationProgressResponseTypeImpl + if err := json.Unmarshal(input, &parent); err != nil { + return nil, fmt.Errorf("unmarshaling into BaseOperationProgressResponseTypeImpl: %+v", err) + } + + return RawOperationProgressResponseTypeImpl{ + operationProgressResponseType: parent, + Type: value, + Values: temp, + }, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationprogressresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationprogressresult.go new file mode 100644 index 000000000000..7ced0bd73bde --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationprogressresult.go @@ -0,0 +1,93 @@ +package operationprogress + +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. + +type OperationProgressResult struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + Properties OperationProgressResponseType `json:"properties"` + ResourceId *string `json:"resourceId,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` +} + +func (o *OperationProgressResult) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationProgressResult) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *OperationProgressResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationProgressResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} + +var _ json.Unmarshaler = &OperationProgressResult{} + +func (s *OperationProgressResult) UnmarshalJSON(bytes []byte) error { + var decoded struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` + } + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + + s.EndTime = decoded.EndTime + s.Error = decoded.Error + s.Id = decoded.Id + s.Name = decoded.Name + s.Operations = decoded.Operations + s.PercentComplete = decoded.PercentComplete + s.ResourceId = decoded.ResourceId + s.StartTime = decoded.StartTime + s.Status = decoded.Status + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling OperationProgressResult into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := UnmarshalOperationProgressResponseTypeImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'OperationProgressResult': %+v", err) + } + s.Properties = impl + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationstatusresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationstatusresult.go new file mode 100644 index 000000000000..3eaf964b7368 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/model_operationstatusresult.go @@ -0,0 +1,46 @@ +package operationprogress + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type OperationStatusResult struct { + EndTime *string `json:"endTime,omitempty"` + Error *ErrorDetail `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Operations *[]OperationStatusResult `json:"operations,omitempty"` + PercentComplete *float64 `json:"percentComplete,omitempty"` + ResourceId *string `json:"resourceId,omitempty"` + StartTime *string `json:"startTime,omitempty"` + Status string `json:"status"` +} + +func (o *OperationStatusResult) GetEndTimeAsTime() (*time.Time, error) { + if o.EndTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetEndTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndTime = &formatted +} + +func (o *OperationStatusResult) GetStartTimeAsTime() (*time.Time, error) { + if o.StartTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *OperationStatusResult) SetStartTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/version.go new file mode 100644 index 000000000000..047947250e86 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress/version.go @@ -0,0 +1,10 @@ +package operationprogress + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/operationprogress/2023-12-30" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/method_serversfailover.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/method_serversfailover.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/method_serversfailover.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/method_serversfailover.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/version.go index 96583d28939e..73b6b35ee1cc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover/version.go @@ -3,8 +3,8 @@ package serverfailover // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/serverfailover/2022-01-01" + return "hashicorp/go-azure-sdk/serverfailover/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/README.md new file mode 100644 index 000000000000..830493a827f4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/README.md @@ -0,0 +1,32 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration` Documentation + +The `servermigration` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration" +``` + + +### Client Initialization + +```go +client := servermigration.NewServerMigrationClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerMigrationClient.ServersMigrationCutoverMigration` + +```go +ctx := context.TODO() +id := servermigration.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +if err := client.ServersMigrationCutoverMigrationThenPoll(ctx, id); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/client.go new file mode 100644 index 000000000000..9d82e58ad8b4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/client.go @@ -0,0 +1,26 @@ +package servermigration + +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 ServerMigrationClient struct { + Client *resourcemanager.Client +} + +func NewServerMigrationClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerMigrationClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "servermigration", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ServerMigrationClient: %+v", err) + } + + return &ServerMigrationClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/constants.go new file mode 100644 index 000000000000..79c7b0c65a98 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/constants.go @@ -0,0 +1,585 @@ +package servermigration + +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 CreateMode string + +const ( + CreateModeDefault CreateMode = "Default" + CreateModeGeoRestore CreateMode = "GeoRestore" + CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" + CreateModeReplica CreateMode = "Replica" +) + +func PossibleValuesForCreateMode() []string { + return []string{ + string(CreateModeDefault), + string(CreateModeGeoRestore), + string(CreateModePointInTimeRestore), + string(CreateModeReplica), + } +} + +func (s *CreateMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCreateMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCreateMode(input string) (*CreateMode, error) { + vals := map[string]CreateMode{ + "default": CreateModeDefault, + "georestore": CreateModeGeoRestore, + "pointintimerestore": CreateModePointInTimeRestore, + "replica": CreateModeReplica, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CreateMode(input) + return &out, nil +} + +type DataEncryptionType string + +const ( + DataEncryptionTypeAzureKeyVault DataEncryptionType = "AzureKeyVault" + DataEncryptionTypeSystemManaged DataEncryptionType = "SystemManaged" +) + +func PossibleValuesForDataEncryptionType() []string { + return []string{ + string(DataEncryptionTypeAzureKeyVault), + string(DataEncryptionTypeSystemManaged), + } +} + +func (s *DataEncryptionType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDataEncryptionType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDataEncryptionType(input string) (*DataEncryptionType, error) { + vals := map[string]DataEncryptionType{ + "azurekeyvault": DataEncryptionTypeAzureKeyVault, + "systemmanaged": DataEncryptionTypeSystemManaged, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DataEncryptionType(input) + return &out, nil +} + +type EnableStatusEnum string + +const ( + EnableStatusEnumDisabled EnableStatusEnum = "Disabled" + EnableStatusEnumEnabled EnableStatusEnum = "Enabled" +) + +func PossibleValuesForEnableStatusEnum() []string { + return []string{ + string(EnableStatusEnumDisabled), + string(EnableStatusEnumEnabled), + } +} + +func (s *EnableStatusEnum) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseEnableStatusEnum(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseEnableStatusEnum(input string) (*EnableStatusEnum, error) { + vals := map[string]EnableStatusEnum{ + "disabled": EnableStatusEnumDisabled, + "enabled": EnableStatusEnumEnabled, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := EnableStatusEnum(input) + return &out, nil +} + +type HighAvailabilityMode string + +const ( + HighAvailabilityModeDisabled HighAvailabilityMode = "Disabled" + HighAvailabilityModeSameZone HighAvailabilityMode = "SameZone" + HighAvailabilityModeZoneRedundant HighAvailabilityMode = "ZoneRedundant" +) + +func PossibleValuesForHighAvailabilityMode() []string { + return []string{ + string(HighAvailabilityModeDisabled), + string(HighAvailabilityModeSameZone), + string(HighAvailabilityModeZoneRedundant), + } +} + +func (s *HighAvailabilityMode) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHighAvailabilityMode(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHighAvailabilityMode(input string) (*HighAvailabilityMode, error) { + vals := map[string]HighAvailabilityMode{ + "disabled": HighAvailabilityModeDisabled, + "samezone": HighAvailabilityModeSameZone, + "zoneredundant": HighAvailabilityModeZoneRedundant, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HighAvailabilityMode(input) + return &out, nil +} + +type HighAvailabilityState string + +const ( + HighAvailabilityStateCreatingStandby HighAvailabilityState = "CreatingStandby" + HighAvailabilityStateFailingOver HighAvailabilityState = "FailingOver" + HighAvailabilityStateHealthy HighAvailabilityState = "Healthy" + HighAvailabilityStateNotEnabled HighAvailabilityState = "NotEnabled" + HighAvailabilityStateRemovingStandby HighAvailabilityState = "RemovingStandby" +) + +func PossibleValuesForHighAvailabilityState() []string { + return []string{ + string(HighAvailabilityStateCreatingStandby), + string(HighAvailabilityStateFailingOver), + string(HighAvailabilityStateHealthy), + string(HighAvailabilityStateNotEnabled), + string(HighAvailabilityStateRemovingStandby), + } +} + +func (s *HighAvailabilityState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseHighAvailabilityState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseHighAvailabilityState(input string) (*HighAvailabilityState, error) { + vals := map[string]HighAvailabilityState{ + "creatingstandby": HighAvailabilityStateCreatingStandby, + "failingover": HighAvailabilityStateFailingOver, + "healthy": HighAvailabilityStateHealthy, + "notenabled": HighAvailabilityStateNotEnabled, + "removingstandby": HighAvailabilityStateRemovingStandby, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := HighAvailabilityState(input) + return &out, nil +} + +type ImportSourceStorageType string + +const ( + ImportSourceStorageTypeAzureBlob ImportSourceStorageType = "AzureBlob" +) + +func PossibleValuesForImportSourceStorageType() []string { + return []string{ + string(ImportSourceStorageTypeAzureBlob), + } +} + +func (s *ImportSourceStorageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseImportSourceStorageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseImportSourceStorageType(input string) (*ImportSourceStorageType, error) { + vals := map[string]ImportSourceStorageType{ + "azureblob": ImportSourceStorageTypeAzureBlob, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ImportSourceStorageType(input) + return &out, nil +} + +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +func PossibleValuesForManagedServiceIdentityType() []string { + return []string{ + string(ManagedServiceIdentityTypeUserAssigned), + } +} + +func (s *ManagedServiceIdentityType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseManagedServiceIdentityType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseManagedServiceIdentityType(input string) (*ManagedServiceIdentityType, error) { + vals := map[string]ManagedServiceIdentityType{ + "userassigned": ManagedServiceIdentityTypeUserAssigned, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ManagedServiceIdentityType(input) + return &out, nil +} + +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointConnectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointServiceConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} + +type ReplicationRole string + +const ( + ReplicationRoleNone ReplicationRole = "None" + ReplicationRoleReplica ReplicationRole = "Replica" + ReplicationRoleSource ReplicationRole = "Source" +) + +func PossibleValuesForReplicationRole() []string { + return []string{ + string(ReplicationRoleNone), + string(ReplicationRoleReplica), + string(ReplicationRoleSource), + } +} + +func (s *ReplicationRole) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseReplicationRole(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseReplicationRole(input string) (*ReplicationRole, error) { + vals := map[string]ReplicationRole{ + "none": ReplicationRoleNone, + "replica": ReplicationRoleReplica, + "source": ReplicationRoleSource, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ReplicationRole(input) + return &out, nil +} + +type ServerSkuTier string + +const ( + ServerSkuTierBurstable ServerSkuTier = "Burstable" + ServerSkuTierGeneralPurpose ServerSkuTier = "GeneralPurpose" + ServerSkuTierMemoryOptimized ServerSkuTier = "MemoryOptimized" +) + +func PossibleValuesForServerSkuTier() []string { + return []string{ + string(ServerSkuTierBurstable), + string(ServerSkuTierGeneralPurpose), + string(ServerSkuTierMemoryOptimized), + } +} + +func (s *ServerSkuTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerSkuTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerSkuTier(input string) (*ServerSkuTier, error) { + vals := map[string]ServerSkuTier{ + "burstable": ServerSkuTierBurstable, + "generalpurpose": ServerSkuTierGeneralPurpose, + "memoryoptimized": ServerSkuTierMemoryOptimized, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerSkuTier(input) + return &out, nil +} + +type ServerState string + +const ( + ServerStateDisabled ServerState = "Disabled" + ServerStateDropping ServerState = "Dropping" + ServerStateReady ServerState = "Ready" + ServerStateStarting ServerState = "Starting" + ServerStateStopped ServerState = "Stopped" + ServerStateStopping ServerState = "Stopping" + ServerStateUpdating ServerState = "Updating" +) + +func PossibleValuesForServerState() []string { + return []string{ + string(ServerStateDisabled), + string(ServerStateDropping), + string(ServerStateReady), + string(ServerStateStarting), + string(ServerStateStopped), + string(ServerStateStopping), + string(ServerStateUpdating), + } +} + +func (s *ServerState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerState(input string) (*ServerState, error) { + vals := map[string]ServerState{ + "disabled": ServerStateDisabled, + "dropping": ServerStateDropping, + "ready": ServerStateReady, + "starting": ServerStateStarting, + "stopped": ServerStateStopped, + "stopping": ServerStateStopping, + "updating": ServerStateUpdating, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerState(input) + return &out, nil +} + +type ServerVersion string + +const ( + ServerVersionEightPointZeroPointTwoOne ServerVersion = "8.0.21" + ServerVersionFivePointSeven ServerVersion = "5.7" +) + +func PossibleValuesForServerVersion() []string { + return []string{ + string(ServerVersionEightPointZeroPointTwoOne), + string(ServerVersionFivePointSeven), + } +} + +func (s *ServerVersion) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerVersion(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerVersion(input string) (*ServerVersion, error) { + vals := map[string]ServerVersion{ + "8.0.21": ServerVersionEightPointZeroPointTwoOne, + "5.7": ServerVersionFivePointSeven, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerVersion(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/id_flexibleserver.go new file mode 100644 index 000000000000..f104ff96c6fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/id_flexibleserver.go @@ -0,0 +1,130 @@ +package servermigration + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FlexibleServerId{}) +} + +var _ resourceids.ResourceId = &FlexibleServerId{} + +// FlexibleServerId is a struct representing the Resource ID for a Flexible Server +type FlexibleServerId struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string +} + +// NewFlexibleServerID returns a new FlexibleServerId struct +func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { + return FlexibleServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + } +} + +// ParseFlexibleServerID parses 'input' into a FlexibleServerId +func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId +// note: this method should only be used for API response data and not user input +func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + return nil +} + +// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID +func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFlexibleServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Flexible Server ID +func (id FlexibleServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID +func (id FlexibleServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + } +} + +// String returns a human-readable description of this Flexible Server ID +func (id FlexibleServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + } + return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/method_serversmigrationcutovermigration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/method_serversmigrationcutovermigration.go new file mode 100644 index 000000000000..27ced62ae6e3 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/method_serversmigrationcutovermigration.go @@ -0,0 +1,71 @@ +package servermigration + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServersMigrationCutoverMigrationOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData + Model *Server +} + +// ServersMigrationCutoverMigration ... +func (c ServerMigrationClient) ServersMigrationCutoverMigration(ctx context.Context, id FlexibleServerId) (result ServersMigrationCutoverMigrationOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/cutoverMigration", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ServersMigrationCutoverMigrationThenPoll performs ServersMigrationCutoverMigration then polls until it's completed +func (c ServerMigrationClient) ServersMigrationCutoverMigrationThenPoll(ctx context.Context, id FlexibleServerId) error { + result, err := c.ServersMigrationCutoverMigration(ctx, id) + if err != nil { + return fmt.Errorf("performing ServersMigrationCutoverMigration: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ServersMigrationCutoverMigration: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_backup.go new file mode 100644 index 000000000000..8632d1a659fe --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_backup.go @@ -0,0 +1,29 @@ +package servermigration + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Backup struct { + BackupIntervalHours *int64 `json:"backupIntervalHours,omitempty"` + BackupRetentionDays *int64 `json:"backupRetentionDays,omitempty"` + EarliestRestoreDate *string `json:"earliestRestoreDate,omitempty"` + GeoRedundantBackup *EnableStatusEnum `json:"geoRedundantBackup,omitempty"` +} + +func (o *Backup) GetEarliestRestoreDateAsTime() (*time.Time, error) { + if o.EarliestRestoreDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EarliestRestoreDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *Backup) SetEarliestRestoreDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EarliestRestoreDate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_dataencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_dataencryption.go new file mode 100644 index 000000000000..5b494dbca0e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_dataencryption.go @@ -0,0 +1,12 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DataEncryption struct { + GeoBackupKeyURI *string `json:"geoBackupKeyURI,omitempty"` + GeoBackupUserAssignedIdentityId *string `json:"geoBackupUserAssignedIdentityId,omitempty"` + PrimaryKeyURI *string `json:"primaryKeyURI,omitempty"` + PrimaryUserAssignedIdentityId *string `json:"primaryUserAssignedIdentityId,omitempty"` + Type *DataEncryptionType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_highavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_highavailability.go new file mode 100644 index 000000000000..c4d562c1aae6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_highavailability.go @@ -0,0 +1,10 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HighAvailability struct { + Mode *HighAvailabilityMode `json:"mode,omitempty"` + StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` + State *HighAvailabilityState `json:"state,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_importsourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_importsourceproperties.go new file mode 100644 index 000000000000..ad49643c4eca --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_importsourceproperties.go @@ -0,0 +1,11 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImportSourceProperties struct { + DataDirPath *string `json:"dataDirPath,omitempty"` + SasToken *string `json:"sasToken,omitempty"` + StorageType *ImportSourceStorageType `json:"storageType,omitempty"` + StorageURL *string `json:"storageUrl,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_maintenancewindow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_maintenancewindow.go new file mode 100644 index 000000000000..754a875dbd03 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_maintenancewindow.go @@ -0,0 +1,11 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MaintenanceWindow struct { + CustomWindow *string `json:"customWindow,omitempty"` + DayOfWeek *int64 `json:"dayOfWeek,omitempty"` + StartHour *int64 `json:"startHour,omitempty"` + StartMinute *int64 `json:"startMinute,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_mysqlserveridentity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_mysqlserveridentity.go new file mode 100644 index 000000000000..051f514fc46e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_mysqlserveridentity.go @@ -0,0 +1,11 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MySQLServerIdentity struct { + PrincipalId *string `json:"principalId,omitempty"` + TenantId *string `json:"tenantId,omitempty"` + Type *ManagedServiceIdentityType `json:"type,omitempty"` + UserAssignedIdentities *map[string]interface{} `json:"userAssignedIdentities,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_mysqlserversku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_mysqlserversku.go new file mode 100644 index 000000000000..2a3537b29f9d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_mysqlserversku.go @@ -0,0 +1,9 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MySQLServerSku struct { + Name string `json:"name"` + Tier ServerSkuTier `json:"tier"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_network.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_network.go new file mode 100644 index 000000000000..783a7b4fce43 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_network.go @@ -0,0 +1,10 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Network struct { + DelegatedSubnetResourceId *string `json:"delegatedSubnetResourceId,omitempty"` + PrivateDnsZoneResourceId *string `json:"privateDnsZoneResourceId,omitempty"` + PublicNetworkAccess *EnableStatusEnum `json:"publicNetworkAccess,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpoint.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpoint.go new file mode 100644 index 000000000000..7b5eb12d10c5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpoint.go @@ -0,0 +1,8 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpoint struct { + Id *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpointconnection.go new file mode 100644 index 000000000000..6a2d001560c0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpointconnection.go @@ -0,0 +1,16 @@ +package servermigration + +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 PrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpointconnectionproperties.go new file mode 100644 index 000000000000..34fd9e278a3d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privateendpointconnectionproperties.go @@ -0,0 +1,11 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + GroupIds *[]string `json:"groupIds,omitempty"` + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privatelinkserviceconnectionstate.go new file mode 100644 index 000000000000..989c0f8c3c93 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_server.go new file mode 100644 index 000000000000..3c1d5072d3c4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_server.go @@ -0,0 +1,20 @@ +package servermigration + +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 Server struct { + Id *string `json:"id,omitempty"` + Identity *MySQLServerIdentity `json:"identity,omitempty"` + Location string `json:"location"` + Name *string `json:"name,omitempty"` + Properties *ServerProperties `json:"properties,omitempty"` + Sku *MySQLServerSku `json:"sku,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_serverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_serverproperties.go new file mode 100644 index 000000000000..63fcdd916574 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_serverproperties.go @@ -0,0 +1,44 @@ +package servermigration + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerProperties struct { + AdministratorLogin *string `json:"administratorLogin,omitempty"` + AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` + AvailabilityZone *string `json:"availabilityZone,omitempty"` + Backup *Backup `json:"backup,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DataEncryption *DataEncryption `json:"dataEncryption,omitempty"` + FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` + HighAvailability *HighAvailability `json:"highAvailability,omitempty"` + ImportSourceProperties *ImportSourceProperties `json:"importSourceProperties,omitempty"` + MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` + Network *Network `json:"network,omitempty"` + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + ReplicaCapacity *int64 `json:"replicaCapacity,omitempty"` + ReplicationRole *ReplicationRole `json:"replicationRole,omitempty"` + RestorePointInTime *string `json:"restorePointInTime,omitempty"` + SourceServerResourceId *string `json:"sourceServerResourceId,omitempty"` + State *ServerState `json:"state,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +func (o *ServerProperties) GetRestorePointInTimeAsTime() (*time.Time, error) { + if o.RestorePointInTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.RestorePointInTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ServerProperties) SetRestorePointInTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.RestorePointInTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_storage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_storage.go new file mode 100644 index 000000000000..288181e11627 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/model_storage.go @@ -0,0 +1,13 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Storage struct { + AutoGrow *EnableStatusEnum `json:"autoGrow,omitempty"` + AutoIoScaling *EnableStatusEnum `json:"autoIoScaling,omitempty"` + Iops *int64 `json:"iops,omitempty"` + LogOnDisk *EnableStatusEnum `json:"logOnDisk,omitempty"` + StorageSizeGB *int64 `json:"storageSizeGB,omitempty"` + StorageSku *string `json:"storageSku,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/version.go new file mode 100644 index 000000000000..cdc300f6539e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration/version.go @@ -0,0 +1,10 @@ +package servermigration + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/servermigration/2023-12-30" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/README.md new file mode 100644 index 000000000000..8405dcdb32a4 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/README.md @@ -0,0 +1,37 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid` Documentation + +The `serverresetgtid` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid" +``` + + +### Client Initialization + +```go +client := serverresetgtid.NewServerResetGtidClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerResetGtidClient.ServersResetGtid` + +```go +ctx := context.TODO() +id := serverresetgtid.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := serverresetgtid.ServerGtidSetParameter{ + // ... +} + + +if err := client.ServersResetGtidThenPoll(ctx, id, payload); err != nil { + // handle the error +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/client.go new file mode 100644 index 000000000000..92225aea3ab6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/client.go @@ -0,0 +1,26 @@ +package serverresetgtid + +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 ServerResetGtidClient struct { + Client *resourcemanager.Client +} + +func NewServerResetGtidClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerResetGtidClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "serverresetgtid", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ServerResetGtidClient: %+v", err) + } + + return &ServerResetGtidClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/id_flexibleserver.go new file mode 100644 index 000000000000..eb008ff92071 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/id_flexibleserver.go @@ -0,0 +1,130 @@ +package serverresetgtid + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FlexibleServerId{}) +} + +var _ resourceids.ResourceId = &FlexibleServerId{} + +// FlexibleServerId is a struct representing the Resource ID for a Flexible Server +type FlexibleServerId struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string +} + +// NewFlexibleServerID returns a new FlexibleServerId struct +func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { + return FlexibleServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + } +} + +// ParseFlexibleServerID parses 'input' into a FlexibleServerId +func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId +// note: this method should only be used for API response data and not user input +func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + return nil +} + +// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID +func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFlexibleServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Flexible Server ID +func (id FlexibleServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID +func (id FlexibleServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + } +} + +// String returns a human-readable description of this Flexible Server ID +func (id FlexibleServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + } + return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/method_serversresetgtid.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/method_serversresetgtid.go new file mode 100644 index 000000000000..5b44f151e573 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/method_serversresetgtid.go @@ -0,0 +1,74 @@ +package serverresetgtid + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServersResetGtidOperationResponse struct { + Poller pollers.Poller + HttpResponse *http.Response + OData *odata.OData +} + +// ServersResetGtid ... +func (c ServerResetGtidClient) ServersResetGtid(ctx context.Context, id FlexibleServerId, input ServerGtidSetParameter) (result ServersResetGtidOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusAccepted, + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/resetGtid", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) + if err != nil { + return + } + + return +} + +// ServersResetGtidThenPoll performs ServersResetGtid then polls until it's completed +func (c ServerResetGtidClient) ServersResetGtidThenPoll(ctx context.Context, id FlexibleServerId, input ServerGtidSetParameter) error { + result, err := c.ServersResetGtid(ctx, id, input) + if err != nil { + return fmt.Errorf("performing ServersResetGtid: %+v", err) + } + + if err := result.Poller.PollUntilDone(ctx); err != nil { + return fmt.Errorf("polling after ServersResetGtid: %+v", err) + } + + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/model_servergtidsetparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/model_servergtidsetparameter.go new file mode 100644 index 000000000000..1385c126503f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/model_servergtidsetparameter.go @@ -0,0 +1,8 @@ +package serverresetgtid + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerGtidSetParameter struct { + GtidSet *string `json:"gtidSet,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/version.go new file mode 100644 index 000000000000..c8f23825b379 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid/version.go @@ -0,0 +1,10 @@ +package serverresetgtid + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/serverresetgtid/2023-12-30" +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/README.md similarity index 89% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/README.md index 7f82a46480ab..e78ab1e1db7e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/README.md @@ -1,14 +1,14 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart` Documentation -The `serverrestart` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `serverrestart` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). ### Import Path ```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/constants.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/constants.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/method_serversrestart.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/method_serversrestart.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/method_serversrestart.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/method_serversrestart.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/model_serverrestartparameter.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/model_serverrestartparameter.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/model_serverrestartparameter.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/model_serverrestartparameter.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/version.go index abea028194d4..ee4c7518cb03 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart/version.go @@ -3,8 +3,8 @@ package serverrestart // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/serverrestart/2022-01-01" + return "hashicorp/go-azure-sdk/serverrestart/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/README.md similarity index 97% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/README.md index 236480b5f42b..eb881cff0ebf 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers` Documentation -The `servers` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2022-01-01`). +The `servers` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers" +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers" ``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/constants.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/constants.go index 38f0dee4a21c..17918642fd4d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/constants.go @@ -232,6 +232,44 @@ func parseHighAvailabilityState(input string) (*HighAvailabilityState, error) { return &out, nil } +type ImportSourceStorageType string + +const ( + ImportSourceStorageTypeAzureBlob ImportSourceStorageType = "AzureBlob" +) + +func PossibleValuesForImportSourceStorageType() []string { + return []string{ + string(ImportSourceStorageTypeAzureBlob), + } +} + +func (s *ImportSourceStorageType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseImportSourceStorageType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseImportSourceStorageType(input string) (*ImportSourceStorageType, error) { + vals := map[string]ImportSourceStorageType{ + "azureblob": ImportSourceStorageTypeAzureBlob, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ImportSourceStorageType(input) + return &out, nil +} + type ManagedServiceIdentityType string const ( @@ -270,6 +308,97 @@ func parseManagedServiceIdentityType(input string) (*ManagedServiceIdentityType, return &out, nil } +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string { + return []string{ + string(PrivateEndpointConnectionProvisioningStateCreating), + string(PrivateEndpointConnectionProvisioningStateDeleting), + string(PrivateEndpointConnectionProvisioningStateFailed), + string(PrivateEndpointConnectionProvisioningStateSucceeded), + } +} + +func (s *PrivateEndpointConnectionProvisioningState) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointConnectionProvisioningState(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointConnectionProvisioningState(input string) (*PrivateEndpointConnectionProvisioningState, error) { + vals := map[string]PrivateEndpointConnectionProvisioningState{ + "creating": PrivateEndpointConnectionProvisioningStateCreating, + "deleting": PrivateEndpointConnectionProvisioningStateDeleting, + "failed": PrivateEndpointConnectionProvisioningStateFailed, + "succeeded": PrivateEndpointConnectionProvisioningStateSucceeded, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointConnectionProvisioningState(input) + return &out, nil +} + +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string { + return []string{ + string(PrivateEndpointServiceConnectionStatusApproved), + string(PrivateEndpointServiceConnectionStatusPending), + string(PrivateEndpointServiceConnectionStatusRejected), + } +} + +func (s *PrivateEndpointServiceConnectionStatus) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parsePrivateEndpointServiceConnectionStatus(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parsePrivateEndpointServiceConnectionStatus(input string) (*PrivateEndpointServiceConnectionStatus, error) { + vals := map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatusApproved, + "pending": PrivateEndpointServiceConnectionStatusPending, + "rejected": PrivateEndpointServiceConnectionStatusRejected, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := PrivateEndpointServiceConnectionStatus(input) + return &out, nil +} + type ReplicationRole string const ( @@ -314,6 +443,50 @@ func parseReplicationRole(input string) (*ReplicationRole, error) { return &out, nil } +type ServerSkuTier string + +const ( + ServerSkuTierBurstable ServerSkuTier = "Burstable" + ServerSkuTierGeneralPurpose ServerSkuTier = "GeneralPurpose" + ServerSkuTierMemoryOptimized ServerSkuTier = "MemoryOptimized" +) + +func PossibleValuesForServerSkuTier() []string { + return []string{ + string(ServerSkuTierBurstable), + string(ServerSkuTierGeneralPurpose), + string(ServerSkuTierMemoryOptimized), + } +} + +func (s *ServerSkuTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseServerSkuTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseServerSkuTier(input string) (*ServerSkuTier, error) { + vals := map[string]ServerSkuTier{ + "burstable": ServerSkuTierBurstable, + "generalpurpose": ServerSkuTierGeneralPurpose, + "memoryoptimized": ServerSkuTierMemoryOptimized, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := ServerSkuTier(input) + return &out, nil +} + type ServerState string const ( @@ -410,47 +583,3 @@ func parseServerVersion(input string) (*ServerVersion, error) { out := ServerVersion(input) return &out, nil } - -type SkuTier string - -const ( - SkuTierBurstable SkuTier = "Burstable" - SkuTierGeneralPurpose SkuTier = "GeneralPurpose" - SkuTierMemoryOptimized SkuTier = "MemoryOptimized" -) - -func PossibleValuesForSkuTier() []string { - return []string{ - string(SkuTierBurstable), - string(SkuTierGeneralPurpose), - string(SkuTierMemoryOptimized), - } -} - -func (s *SkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSkuTier(input string) (*SkuTier, error) { - vals := map[string]SkuTier{ - "burstable": SkuTierBurstable, - "generalpurpose": SkuTierGeneralPurpose, - "memoryoptimized": SkuTierMemoryOptimized, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SkuTier(input) - return &out, nil -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_create.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_create.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_create.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_listbyresourcegroup.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_listbyresourcegroup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_listbyresourcegroup.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_replicaslistbyserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_replicaslistbyserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_replicaslistbyserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_replicaslistbyserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_update.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/method_update.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/method_update.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_backup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_backup.go similarity index 91% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_backup.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_backup.go index ed773f8c045c..1b32d064ddec 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_backup.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_backup.go @@ -10,6 +10,7 @@ import ( // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type Backup struct { + BackupIntervalHours *int64 `json:"backupIntervalHours,omitempty"` BackupRetentionDays *int64 `json:"backupRetentionDays,omitempty"` EarliestRestoreDate *string `json:"earliestRestoreDate,omitempty"` GeoRedundantBackup *EnableStatusEnum `json:"geoRedundantBackup,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_dataencryption.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_dataencryption.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_dataencryption.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_dataencryption.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_highavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_highavailability.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_highavailability.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_highavailability.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_importsourceproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_importsourceproperties.go new file mode 100644 index 000000000000..69269b6707fd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_importsourceproperties.go @@ -0,0 +1,11 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ImportSourceProperties struct { + DataDirPath *string `json:"dataDirPath,omitempty"` + SasToken *string `json:"sasToken,omitempty"` + StorageType *ImportSourceStorageType `json:"storageType,omitempty"` + StorageURL *string `json:"storageUrl,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_maintenancewindow.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_maintenancewindow.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_maintenancewindow.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_maintenancewindow.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_identity.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_mysqlserveridentity.go similarity index 93% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_identity.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_mysqlserveridentity.go index 505b3fcb5542..fa31b3a9e3b2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_identity.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_mysqlserveridentity.go @@ -3,7 +3,7 @@ package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type Identity struct { +type MySQLServerIdentity struct { PrincipalId *string `json:"principalId,omitempty"` TenantId *string `json:"tenantId,omitempty"` Type *ManagedServiceIdentityType `json:"type,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_mysqlserversku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_mysqlserversku.go new file mode 100644 index 000000000000..dd4575adc676 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_mysqlserversku.go @@ -0,0 +1,9 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MySQLServerSku struct { + Name string `json:"name"` + Tier ServerSkuTier `json:"tier"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_network.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_network.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_network.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_network.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpoint.go similarity index 70% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_sku.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpoint.go index 6302164cd2e0..edbc5878b033 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_sku.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpoint.go @@ -3,7 +3,6 @@ package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type Sku struct { - Name string `json:"name"` - Tier SkuTier `json:"tier"` +type PrivateEndpoint struct { + Id *string `json:"id,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpointconnection.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpointconnection.go new file mode 100644 index 000000000000..d6ff31c5dad0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpointconnection.go @@ -0,0 +1,16 @@ +package servers + +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 PrivateEndpointConnection struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + SystemData *systemdata.SystemData `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpointconnectionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpointconnectionproperties.go new file mode 100644 index 000000000000..ee2ec79f43b7 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privateendpointconnectionproperties.go @@ -0,0 +1,11 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateEndpointConnectionProperties struct { + GroupIds *[]string `json:"groupIds,omitempty"` + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState"` + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privatelinkserviceconnectionstate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privatelinkserviceconnectionstate.go new file mode 100644 index 000000000000..8a2ade12ed85 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_privatelinkserviceconnectionstate.go @@ -0,0 +1,10 @@ +package servers + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type PrivateLinkServiceConnectionState struct { + ActionsRequired *string `json:"actionsRequired,omitempty"` + Description *string `json:"description,omitempty"` + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_server.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_server.go similarity index 85% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_server.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_server.go index 3dfd49fbcae5..76d9c7b97082 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_server.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_server.go @@ -9,11 +9,11 @@ import ( type Server struct { Id *string `json:"id,omitempty"` - Identity *Identity `json:"identity,omitempty"` + Identity *MySQLServerIdentity `json:"identity,omitempty"` Location string `json:"location"` Name *string `json:"name,omitempty"` Properties *ServerProperties `json:"properties,omitempty"` - Sku *Sku `json:"sku,omitempty"` + Sku *MySQLServerSku `json:"sku,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverforupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverforupdate.go similarity index 73% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverforupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverforupdate.go index 23c929808c17..f13bd7fc7a0f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverforupdate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverforupdate.go @@ -4,8 +4,8 @@ package servers // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ServerForUpdate struct { - Identity *Identity `json:"identity,omitempty"` + Identity *MySQLServerIdentity `json:"identity,omitempty"` Properties *ServerPropertiesForUpdate `json:"properties,omitempty"` - Sku *Sku `json:"sku,omitempty"` + Sku *MySQLServerSku `json:"sku,omitempty"` Tags *map[string]string `json:"tags,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverproperties.go new file mode 100644 index 000000000000..f38682e4e9f2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverproperties.go @@ -0,0 +1,44 @@ +package servers + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ServerProperties struct { + AdministratorLogin *string `json:"administratorLogin,omitempty"` + AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` + AvailabilityZone *string `json:"availabilityZone,omitempty"` + Backup *Backup `json:"backup,omitempty"` + CreateMode *CreateMode `json:"createMode,omitempty"` + DataEncryption *DataEncryption `json:"dataEncryption,omitempty"` + FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` + HighAvailability *HighAvailability `json:"highAvailability,omitempty"` + ImportSourceProperties *ImportSourceProperties `json:"importSourceProperties,omitempty"` + MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` + Network *Network `json:"network,omitempty"` + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + ReplicaCapacity *int64 `json:"replicaCapacity,omitempty"` + ReplicationRole *ReplicationRole `json:"replicationRole,omitempty"` + RestorePointInTime *string `json:"restorePointInTime,omitempty"` + SourceServerResourceId *string `json:"sourceServerResourceId,omitempty"` + State *ServerState `json:"state,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *ServerVersion `json:"version,omitempty"` +} + +func (o *ServerProperties) GetRestorePointInTimeAsTime() (*time.Time, error) { + if o.RestorePointInTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.RestorePointInTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ServerProperties) SetRestorePointInTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.RestorePointInTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverpropertiesforupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverpropertiesforupdate.go similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverpropertiesforupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverpropertiesforupdate.go index a5b79594b3c9..3c4216aa121f 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_serverpropertiesforupdate.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_serverpropertiesforupdate.go @@ -9,6 +9,7 @@ type ServerPropertiesForUpdate struct { DataEncryption *DataEncryption `json:"dataEncryption,omitempty"` HighAvailability *HighAvailability `json:"highAvailability,omitempty"` MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` + Network *Network `json:"network,omitempty"` ReplicationRole *ReplicationRole `json:"replicationRole,omitempty"` Storage *Storage `json:"storage,omitempty"` Version *ServerVersion `json:"version,omitempty"` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_storage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_storage.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/model_storage.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/model_storage.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/predicates.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/predicates.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/predicates.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/version.go similarity index 69% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/version.go index 47918e464a75..5e8a3822067d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers/version.go @@ -3,8 +3,8 @@ package servers // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/servers/2022-01-01" + return "hashicorp/go-azure-sdk/servers/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/method_serversstart.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/method_serversstart.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/method_serversstart.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/method_serversstart.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/version.go index a551280f9ba0..a618c927af8a 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart/version.go @@ -3,8 +3,8 @@ package serverstart // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/serverstart/2022-01-01" + return "hashicorp/go-azure-sdk/serverstart/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/id_flexibleserver.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/id_flexibleserver.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/id_flexibleserver.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/method_serversstop.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/method_serversstop.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/method_serversstop.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/method_serversstop.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/version.go similarity index 68% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/version.go index a96f76fa23c5..116e0a57dfd1 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop/version.go @@ -3,8 +3,8 @@ package serverstop // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2022-01-01" +const defaultApiVersion = "2023-12-30" func userAgent() string { - return "hashicorp/go-azure-sdk/serverstop/2022-01-01" + return "hashicorp/go-azure-sdk/serverstop/2023-12-30" } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/README.md new file mode 100644 index 000000000000..b73dcb83a3ec --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/README.md @@ -0,0 +1,41 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability` Documentation + +The `servervalidateestimatehighavailability` SDK allows for interaction with Azure Resource Manager `mysql` (API Version `2023-12-30`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability" +``` + + +### Client Initialization + +```go +client := servervalidateestimatehighavailability.NewServerValidateEstimateHighAvailabilityClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ServerValidateEstimateHighAvailabilityClient.ServersValidateEstimateHighAvailability` + +```go +ctx := context.TODO() +id := servervalidateestimatehighavailability.NewFlexibleServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "flexibleServerName") + +payload := servervalidateestimatehighavailability.HighAvailabilityValidationEstimation{ + // ... +} + + +read, err := client.ServersValidateEstimateHighAvailability(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/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/client.go new file mode 100644 index 000000000000..b561a8e467d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/client.go @@ -0,0 +1,26 @@ +package servervalidateestimatehighavailability + +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 ServerValidateEstimateHighAvailabilityClient struct { + Client *resourcemanager.Client +} + +func NewServerValidateEstimateHighAvailabilityClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerValidateEstimateHighAvailabilityClient, error) { + client, err := resourcemanager.NewClient(sdkApi, "servervalidateestimatehighavailability", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ServerValidateEstimateHighAvailabilityClient: %+v", err) + } + + return &ServerValidateEstimateHighAvailabilityClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/id_flexibleserver.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/id_flexibleserver.go new file mode 100644 index 000000000000..5a04720a1245 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/id_flexibleserver.go @@ -0,0 +1,130 @@ +package servervalidateestimatehighavailability + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/recaser" + "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +func init() { + recaser.RegisterResourceId(&FlexibleServerId{}) +} + +var _ resourceids.ResourceId = &FlexibleServerId{} + +// FlexibleServerId is a struct representing the Resource ID for a Flexible Server +type FlexibleServerId struct { + SubscriptionId string + ResourceGroupName string + FlexibleServerName string +} + +// NewFlexibleServerID returns a new FlexibleServerId struct +func NewFlexibleServerID(subscriptionId string, resourceGroupName string, flexibleServerName string) FlexibleServerId { + return FlexibleServerId{ + SubscriptionId: subscriptionId, + ResourceGroupName: resourceGroupName, + FlexibleServerName: flexibleServerName, + } +} + +// ParseFlexibleServerID parses 'input' into a FlexibleServerId +func ParseFlexibleServerID(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, false) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +// ParseFlexibleServerIDInsensitively parses 'input' case-insensitively into a FlexibleServerId +// note: this method should only be used for API response data and not user input +func ParseFlexibleServerIDInsensitively(input string) (*FlexibleServerId, error) { + parser := resourceids.NewParserFromResourceIdType(&FlexibleServerId{}) + parsed, err := parser.Parse(input, true) + if err != nil { + return nil, fmt.Errorf("parsing %q: %+v", input, err) + } + + id := FlexibleServerId{} + if err = id.FromParseResult(*parsed); err != nil { + return nil, err + } + + return &id, nil +} + +func (id *FlexibleServerId) FromParseResult(input resourceids.ParseResult) error { + var ok bool + + if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", input) + } + + if id.ResourceGroupName, ok = input.Parsed["resourceGroupName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input) + } + + if id.FlexibleServerName, ok = input.Parsed["flexibleServerName"]; !ok { + return resourceids.NewSegmentNotSpecifiedError(id, "flexibleServerName", input) + } + + return nil +} + +// ValidateFlexibleServerID checks that 'input' can be parsed as a Flexible Server ID +func ValidateFlexibleServerID(input interface{}, key string) (warnings []string, errors []error) { + v, ok := input.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected %q to be a string", key)) + return + } + + if _, err := ParseFlexibleServerID(v); err != nil { + errors = append(errors, err) + } + + return +} + +// ID returns the formatted Flexible Server ID +func (id FlexibleServerId) ID() string { + fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/flexibleServers/%s" + return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FlexibleServerName) +} + +// Segments returns a slice of Resource ID Segments which comprise this Flexible Server ID +func (id FlexibleServerId) Segments() []resourceids.Segment { + return []resourceids.Segment{ + resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), + resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), + resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), + resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), + resourceids.StaticSegment("staticProviders", "providers", "providers"), + resourceids.ResourceProviderSegment("staticMicrosoftDBforMySQL", "Microsoft.DBforMySQL", "Microsoft.DBforMySQL"), + resourceids.StaticSegment("staticFlexibleServers", "flexibleServers", "flexibleServers"), + resourceids.UserSpecifiedSegment("flexibleServerName", "flexibleServerName"), + } +} + +// String returns a human-readable description of this Flexible Server ID +func (id FlexibleServerId) String() string { + components := []string{ + fmt.Sprintf("Subscription: %q", id.SubscriptionId), + fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), + fmt.Sprintf("Flexible Server Name: %q", id.FlexibleServerName), + } + return fmt.Sprintf("Flexible Server (%s)", strings.Join(components, "\n")) +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/method_serversvalidateestimatehighavailability.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/method_serversvalidateestimatehighavailability.go new file mode 100644 index 000000000000..ba715d8cabe9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/method_serversvalidateestimatehighavailability.go @@ -0,0 +1,58 @@ +package servervalidateestimatehighavailability + +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 ServersValidateEstimateHighAvailabilityOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *HighAvailabilityValidationEstimation +} + +// ServersValidateEstimateHighAvailability ... +func (c ServerValidateEstimateHighAvailabilityClient) ServersValidateEstimateHighAvailability(ctx context.Context, id FlexibleServerId, input HighAvailabilityValidationEstimation) (result ServersValidateEstimateHighAvailabilityOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/validateEstimateHighAvailability", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + 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 HighAvailabilityValidationEstimation + result.Model = &model + if err = resp.Unmarshal(result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/model_highavailabilityvalidationestimation.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/model_highavailabilityvalidationestimation.go new file mode 100644 index 000000000000..566953ec3e49 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/model_highavailabilityvalidationestimation.go @@ -0,0 +1,10 @@ +package servervalidateestimatehighavailability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type HighAvailabilityValidationEstimation struct { + EstimatedDowntime *int64 `json:"estimatedDowntime,omitempty"` + ExpectedStandbyAvailabilityZone *string `json:"expectedStandbyAvailabilityZone,omitempty"` + ScheduledStandbyAvailabilityZone *string `json:"scheduledStandbyAvailabilityZone,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/version.go new file mode 100644 index 000000000000..4a5d6cd41432 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability/version.go @@ -0,0 +1,10 @@ +package servervalidateestimatehighavailability + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2023-12-30" + +func userAgent() string { + return "hashicorp/go-azure-sdk/servervalidateestimatehighavailability/2023-12-30" +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 93b602934b9a..0e564e70d525 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -656,21 +656,30 @@ github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simp github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/site github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slice github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2017-12-01/servers -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01 -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/azureadadministrators -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/backups -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/checknameavailability -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/configurations -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/databases -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/firewallrules -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/getprivatednszonesuffix -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/locationbasedcapabilities -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/logfiles -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverfailover -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverrestart -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/servers -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstart -github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2022-01-01/serverstop +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30 +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/advancedthreatprotectionsettings +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/azureadadministrators +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupandexport +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backups +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/backupsv2 +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/checknameavailability +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/configurations +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/databases +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/firewallrules +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/getprivatednszonesuffix +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapabilities +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/locationbasedcapability +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/logfiles +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/maintenances +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/operationprogress +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverfailover +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servermigration +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverresetgtid +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverrestart +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servers +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstart +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/serverstop +github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2023-12-30/servervalidateestimatehighavailability github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/capacitypools github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/netappaccounts github.com/hashicorp/go-azure-sdk/resource-manager/netapp/2023-05-01/snapshotpolicy