From 368a641efdfc0e3628a3ced056c7be26e2a6e3a8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 25 Jan 2023 09:37:06 +0000 Subject: [PATCH] CodeGen from PR 22303 in Azure/azure-rest-api-specs Merge 155d13d6171cb008442178fe844a2276169dc78e into 7b47689d4efc098f25f46781f05f22179c153314 --- .../synapse/armsynapse/CHANGELOG.md | 76 + .../synapse/armsynapse/autorest.md | 6 +- ...o => azureadonlyauthentications_client.go} | 42 +- ...pools_client.go => bigdatapools_client.go} | 63 +- ...zz_generated_constants.go => constants.go} | 97 +- ...lient.go => datamaskingpolicies_client.go} | 29 +- ...s_client.go => datamaskingrules_client.go} | 45 +- ...ndedsqlpoolblobauditingpolicies_client.go} | 43 +- .../synapse/armsynapse/get_client.go | 260 + sdk/resourcemanager/synapse/armsynapse/go.mod | 14 +- sdk/resourcemanager/synapse/armsynapse/go.sum | 24 +- ...o => integrationruntimeauthkeys_client.go} | 31 +- ...tegrationruntimeconnectioninfos_client.go} | 18 +- ...> integrationruntimecredentials_client.go} | 18 +- ...ntegrationruntimemonitoringdata_client.go} | 18 +- ...integrationruntimenodeipaddress_client.go} | 20 +- ...t.go => integrationruntimenodes_client.go} | 48 +- ...ntegrationruntimeobjectmetadata_client.go} | 34 +- ...lient.go => integrationruntimes_client.go} | 139 +- ....go => integrationruntimestatus_client.go} | 18 +- ...es_client.go => ipfirewallrules_client.go} | 64 +- ...enerated_keys_client.go => keys_client.go} | 45 +- ...ns_client.go => kustooperations_client.go} | 10 +- ...lattacheddatabaseconfigurations_client.go} | 62 +- ...nt.go => kustopoolchildresource_client.go} | 20 +- ...ooldatabaseprincipalassignments_client.go} | 85 +- ...client.go => kustopooldatabases_client.go} | 76 +- ....go => kustopooldataconnections_client.go} | 119 +- ...> kustopoolprincipalassignments_client.go} | 75 +- .../kustopoolprivatelinkresources_client.go | 125 + ...topools_client.go => kustopools_client.go} | 172 +- ...ibraries_client.go => libraries_client.go} | 17 +- ...ed_library_client.go => library_client.go} | 16 +- .../{zz_generated_models.go => models.go} | 346 +- .../synapse/armsynapse/models_serde.go | 12707 ++++++++++++++++ ...rations_client.go => operations_client.go} | 39 +- ...phic_helpers.go => polymorphic_helpers.go} | 17 +- ...o => privateendpointconnections_client.go} | 54 +- ...dpointconnectionsprivatelinkhub_client.go} | 28 +- ...vatelinkhubprivatelinkresources_client.go} | 28 +- ...bs_client.go => privatelinkhubs_client.go} | 57 +- ...ient.go => privatelinkresources_client.go} | 28 +- ...ed_response_types.go => response_types.go} | 308 +- ...go => restorabledroppedsqlpools_client.go} | 28 +- ...client.go => sparkconfiguration_client.go} | 16 +- ...lient.go => sparkconfigurations_client.go} | 17 +- ... => sqlpoolblobauditingpolicies_client.go} | 43 +- ...mns_client.go => sqlpoolcolumns_client.go} | 22 +- ...go => sqlpoolconnectionpolicies_client.go} | 20 +- ...pooldatawarehouseuseractivities_client.go} | 20 +- ....go => sqlpoolgeobackuppolicies_client.go} | 47 +- ...sqlpoolmaintenancewindowoptions_client.go} | 20 +- ...go => sqlpoolmaintenancewindows_client.go} | 35 +- ...o => sqlpoolmetadatasyncconfigs_client.go} | 35 +- ...t.go => sqlpooloperationresults_client.go} | 57 +- ..._client.go => sqlpooloperations_client.go} | 18 +- ...oolrecommendedsensitivitylabels_client.go} | 18 +- ...t.go => sqlpoolreplicationlinks_client.go} | 32 +- ...ient.go => sqlpoolrestorepoints_client.go} | 59 +- ..._sqlpools_client.go => sqlpools_client.go} | 129 +- ...mas_client.go => sqlpoolschemas_client.go} | 28 +- ...=> sqlpoolsecurityalertpolicies_client.go} | 47 +- ....go => sqlpoolsensitivitylabels_client.go} | 131 +- ...lient.go => sqlpooltablecolumns_client.go} | 23 +- ...bles_client.go => sqlpooltables_client.go} | 34 +- ...lpooltransparentdataencryptions_client.go} | 47 +- ...ages_client.go => sqlpoolusages_client.go} | 17 +- ...rabilityassessmentrulebaselines_client.go} | 66 +- ...sqlpoolvulnerabilityassessments_client.go} | 60 +- ...oolvulnerabilityassessmentscans_client.go} | 67 +- ...go => sqlpoolworkloadclassifier_client.go} | 70 +- ...ient.go => sqlpoolworkloadgroup_client.go} | 62 +- ...erated_time_rfc3339.go => time_rfc3339.go} | 3 +- ...client.go => workspaceaadadmins_client.go} | 36 +- ...nagedidentitysqlcontrolsettings_client.go} | 28 +- ...edsqlserverblobauditingpolicies_client.go} | 42 +- ...rdedicatedsqlminimaltlssettings_client.go} | 42 +- ...gedsqlserverencryptionprotector_client.go} | 54 +- ...verextendedblobauditingpolicies_client.go} | 42 +- ...gedsqlserverrecoverablesqlpools_client.go} | 28 +- ...gedsqlserversecurityalertpolicy_client.go} | 42 +- ...workspacemanagedsqlserverusages_client.go} | 17 +- ...lservervulnerabilityassessments_client.go} | 52 +- ...kspaces_client.go => workspaces_client.go} | 56 +- ...ent.go => workspacesqlaadadmins_client.go} | 38 +- ..._azureadonlyauthentications_client_test.go | 99 - ...erated_example_bigdatapools_client_test.go | 176 - ...example_datamaskingpolicies_client_test.go | 70 - ...ed_example_datamaskingrules_client_test.go | 76 - ...sqlpoolblobauditingpolicies_client_test.go | 70 - ..._integrationruntimeauthkeys_client_test.go | 67 - ...ationruntimeconnectioninfos_client_test.go | 40 - ...tegrationruntimecredentials_client_test.go | 38 - ...rationruntimemonitoringdata_client_test.go | 40 - ...grationruntimenodeipaddress_client_test.go | 41 - ...ple_integrationruntimenodes_client_test.go | 91 - ...rationruntimeobjectmetadata_client_test.go | 71 - ...example_integrationruntimes_client_test.go | 298 - ...le_integrationruntimestatus_client_test.go | 40 - ...ted_example_ipfirewallrules_client_test.go | 165 - .../ze_generated_example_keys_client_test.go | 119 - ...ted_example_kustooperations_client_test.go | 41 - ...acheddatabaseconfigurations_client_test.go | 145 - ...mple_kustopoolchildresource_client_test.go | 45 - ...atabaseprincipalassignments_client_test.go | 163 - ..._example_kustopooldatabases_client_test.go | 164 - ...le_kustopooldataconnections_client_test.go | 234 - ...stopoolprincipalassignments_client_test.go | 158 - ...enerated_example_kustopools_client_test.go | 395 - ...generated_example_libraries_client_test.go | 43 - ...e_generated_example_library_client_test.go | 40 - ...enerated_example_operations_client_test.go | 106 - ..._privateendpointconnections_client_test.go | 127 - ...ntconnectionsprivatelinkhub_client_test.go | 66 - ...linkhubprivatelinkresources_client_test.go | 66 - ...ted_example_privatelinkhubs_client_test.go | 169 - ...xample_privatelinkresources_client_test.go | 66 - ...e_restorabledroppedsqlpools_client_test.go | 66 - ..._example_sparkconfiguration_client_test.go | 40 - ...example_sparkconfigurations_client_test.go | 43 - ...sqlpoolblobauditingpolicies_client_test.go | 79 - ...ated_example_sqlpoolcolumns_client_test.go | 43 - ...e_sqlpoolconnectionpolicies_client_test.go | 41 - ...datawarehouseuseractivities_client_test.go | 41 - ...le_sqlpoolgeobackuppolicies_client_test.go | 98 - ...oolmaintenancewindowoptions_client_test.go | 41 - ...e_sqlpoolmaintenancewindows_client_test.go | 74 - ..._sqlpoolmetadatasyncconfigs_client_test.go | 69 - ...ple_sqlpooloperationresults_client_test.go | 41 - ...d_example_sqlpooloperations_client_test.go | 44 - ...ecommendedsensitivitylabels_client_test.go | 66 - ...ple_sqlpoolreplicationlinks_client_test.go | 68 - ...xample_sqlpoolrestorepoints_client_test.go | 121 - ..._generated_example_sqlpools_client_test.go | 253 - ...ated_example_sqlpoolschemas_client_test.go | 68 - ...qlpoolsecurityalertpolicies_client_test.go | 108 - ...le_sqlpoolsensitivitylabels_client_test.go | 274 - ...example_sqlpooltablecolumns_client_test.go | 46 - ...rated_example_sqlpooltables_client_test.go | 70 - ...ltransparentdataencryptions_client_test.go | 98 - ...rated_example_sqlpoolusages_client_test.go | 44 - ...lityassessmentrulebaselines_client_test.go | 115 - ...oolvulnerabilityassessments_client_test.go | 129 - ...ulnerabilityassessmentscans_client_test.go | 122 - ...e_sqlpoolworkloadclassifier_client_test.go | 137 - ...xample_sqlpoolworkloadgroup_client_test.go | 133 - ..._example_workspaceaadadmins_client_test.go | 98 - ...didentitysqlcontrolsettings_client_test.go | 73 - ...lserverblobauditingpolicies_client_test.go | 110 - ...icatedsqlminimaltlssettings_client_test.go | 99 - ...qlserverencryptionprotector_client_test.go | 125 - ...xtendedblobauditingpolicies_client_test.go | 110 - ...qlserverrecoverablesqlpools_client_test.go | 66 - ...qlserversecurityalertpolicy_client_test.go | 108 - ...spacemanagedsqlserverusages_client_test.go | 43 - ...vervulnerabilityassessments_client_test.go | 125 - ...enerated_example_workspaces_client_test.go | 261 - ...ample_workspacesqlaadadmins_client_test.go | 98 - .../armsynapse/zz_generated_models_serde.go | 3312 ---- 159 files changed, 15456 insertions(+), 12562 deletions(-) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_azureadonlyauthentications_client.go => azureadonlyauthentications_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_bigdatapools_client.go => bigdatapools_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_constants.go => constants.go} (94%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_datamaskingpolicies_client.go => datamaskingpolicies_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_datamaskingrules_client.go => datamaskingrules_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_extendedsqlpoolblobauditingpolicies_client.go => extendedsqlpoolblobauditingpolicies_client.go} (89%) create mode 100644 sdk/resourcemanager/synapse/armsynapse/get_client.go rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimeauthkeys_client.go => integrationruntimeauthkeys_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimeconnectioninfos_client.go => integrationruntimeconnectioninfos_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimecredentials_client.go => integrationruntimecredentials_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimemonitoringdata_client.go => integrationruntimemonitoringdata_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimenodeipaddress_client.go => integrationruntimenodeipaddress_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimenodes_client.go => integrationruntimenodes_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimeobjectmetadata_client.go => integrationruntimeobjectmetadata_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimes_client.go => integrationruntimes_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimestatus_client.go => integrationruntimestatus_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_ipfirewallrules_client.go => ipfirewallrules_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_keys_client.go => keys_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustooperations_client.go => kustooperations_client.go} (92%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopoolattacheddatabaseconfigurations_client.go => kustopoolattacheddatabaseconfigurations_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopoolchildresource_client.go => kustopoolchildresource_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopooldatabaseprincipalassignments_client.go => kustopooldatabaseprincipalassignments_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopooldatabases_client.go => kustopooldatabases_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopooldataconnections_client.go => kustopooldataconnections_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopoolprincipalassignments_client.go => kustopoolprincipalassignments_client.go} (88%) create mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopools_client.go => kustopools_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_libraries_client.go => libraries_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_library_client.go => library_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_models.go => models.go} (96%) create mode 100644 sdk/resourcemanager/synapse/armsynapse/models_serde.go rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_operations_client.go => operations_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_polymorphic_helpers.go => polymorphic_helpers.go} (96%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privateendpointconnections_client.go => privateendpointconnections_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privateendpointconnectionsprivatelinkhub_client.go => privateendpointconnectionsprivatelinkhub_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privatelinkhubprivatelinkresources_client.go => privatelinkhubprivatelinkresources_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privatelinkhubs_client.go => privatelinkhubs_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privatelinkresources_client.go => privatelinkresources_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_response_types.go => response_types.go} (86%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_restorabledroppedsqlpools_client.go => restorabledroppedsqlpools_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sparkconfiguration_client.go => sparkconfiguration_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sparkconfigurations_client.go => sparkconfigurations_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolblobauditingpolicies_client.go => sqlpoolblobauditingpolicies_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolcolumns_client.go => sqlpoolcolumns_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolconnectionpolicies_client.go => sqlpoolconnectionpolicies_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooldatawarehouseuseractivities_client.go => sqlpooldatawarehouseuseractivities_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolgeobackuppolicies_client.go => sqlpoolgeobackuppolicies_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolmaintenancewindowoptions_client.go => sqlpoolmaintenancewindowoptions_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolmaintenancewindows_client.go => sqlpoolmaintenancewindows_client.go} (87%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolmetadatasyncconfigs_client.go => sqlpoolmetadatasyncconfigs_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooloperationresults_client.go => sqlpooloperationresults_client.go} (68%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooloperations_client.go => sqlpooloperations_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolrecommendedsensitivitylabels_client.go => sqlpoolrecommendedsensitivitylabels_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolreplicationlinks_client.go => sqlpoolreplicationlinks_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolrestorepoints_client.go => sqlpoolrestorepoints_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpools_client.go => sqlpools_client.go} (86%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolschemas_client.go => sqlpoolschemas_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolsecurityalertpolicies_client.go => sqlpoolsecurityalertpolicies_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolsensitivitylabels_client.go => sqlpoolsensitivitylabels_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooltablecolumns_client.go => sqlpooltablecolumns_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooltables_client.go => sqlpooltables_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooltransparentdataencryptions_client.go => sqlpooltransparentdataencryptions_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolusages_client.go => sqlpoolusages_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolvulnerabilityassessmentrulebaselines_client.go => sqlpoolvulnerabilityassessmentrulebaselines_client.go} (85%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolvulnerabilityassessments_client.go => sqlpoolvulnerabilityassessments_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolvulnerabilityassessmentscans_client.go => sqlpoolvulnerabilityassessmentscans_client.go} (88%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolworkloadclassifier_client.go => sqlpoolworkloadclassifier_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolworkloadgroup_client.go => sqlpoolworkloadgroup_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_time_rfc3339.go => time_rfc3339.go} (96%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspaceaadadmins_client.go => workspaceaadadmins_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedidentitysqlcontrolsettings_client.go => workspacemanagedidentitysqlcontrolsettings_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverblobauditingpolicies_client.go => workspacemanagedsqlserverblobauditingpolicies_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go => workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverencryptionprotector_client.go => workspacemanagedsqlserverencryptionprotector_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverextendedblobauditingpolicies_client.go => workspacemanagedsqlserverextendedblobauditingpolicies_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverrecoverablesqlpools_client.go => workspacemanagedsqlserverrecoverablesqlpools_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserversecurityalertpolicy_client.go => workspacemanagedsqlserversecurityalertpolicy_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverusages_client.go => workspacemanagedsqlserverusages_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlservervulnerabilityassessments_client.go => workspacemanagedsqlservervulnerabilityassessments_client.go} (89%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspaces_client.go => workspaces_client.go} (90%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacesqlaadadmins_client.go => workspacesqlaadadmins_client.go} (89%) delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_azureadonlyauthentications_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_bigdatapools_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_datamaskingpolicies_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_datamaskingrules_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_extendedsqlpoolblobauditingpolicies_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeauthkeys_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeconnectioninfos_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimecredentials_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimemonitoringdata_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimenodeipaddress_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimenodes_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeobjectmetadata_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimes_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimestatus_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_ipfirewallrules_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_keys_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustooperations_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolattacheddatabaseconfigurations_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolchildresource_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldatabaseprincipalassignments_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldatabases_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldataconnections_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolprincipalassignments_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopools_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_libraries_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_library_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_operations_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privateendpointconnections_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privateendpointconnectionsprivatelinkhub_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkhubprivatelinkresources_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkhubs_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkresources_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_restorabledroppedsqlpools_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sparkconfiguration_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sparkconfigurations_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolblobauditingpolicies_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolcolumns_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolconnectionpolicies_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooldatawarehouseuseractivities_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolgeobackuppolicies_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmaintenancewindowoptions_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmaintenancewindows_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmetadatasyncconfigs_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooloperationresults_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooloperations_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolrecommendedsensitivitylabels_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolreplicationlinks_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolrestorepoints_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpools_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolschemas_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolsecurityalertpolicies_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolsensitivitylabels_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltablecolumns_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltables_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltransparentdataencryptions_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolusages_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessmentrulebaselines_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessments_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessmentscans_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolworkloadclassifier_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolworkloadgroup_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspaceaadadmins_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedidentitysqlcontrolsettings_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverblobauditingpolicies_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverencryptionprotector_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverextendedblobauditingpolicies_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverrecoverablesqlpools_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserversecurityalertpolicy_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverusages_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlservervulnerabilityassessments_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspaces_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacesqlaadadmins_client_test.go delete mode 100644 sdk/resourcemanager/synapse/armsynapse/zz_generated_models_serde.go diff --git a/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md b/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md index a673ec08da58..96effa0080a0 100644 --- a/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md +++ b/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md @@ -1,5 +1,81 @@ # Release History +## 0.6.0 (2023-01-25) +### Breaking Changes + +- Type of `CmdkeySetupTypeProperties.TargetName` has been changed from `interface{}` to `any` +- Type of `CmdkeySetupTypeProperties.UserName` has been changed from `interface{}` to `any` +- Type of `ErrorAdditionalInfo.Info` has been changed from `interface{}` to `any` +- Type of `IntegrationRuntime.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `IntegrationRuntimeComputeProperties.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `IntegrationRuntimeConnectionInfo.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `IntegrationRuntimeDataFlowProperties.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `IntegrationRuntimeNodeMonitoringData.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `IntegrationRuntimeSsisCatalogInfo.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `IntegrationRuntimeSsisProperties.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `IntegrationRuntimeStatus.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `IntegrationRuntimeVNetProperties.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `KekIdentityProperties.UseSystemAssignedIdentity` has been changed from `interface{}` to `any` +- Type of `ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity.DesiredState` has been changed from `*ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState` to `*DesiredState` +- Type of `ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity.ActualState` has been changed from `*ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState` to `*ActualState` +- Type of `ManagedIntegrationRuntime.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `ManagedIntegrationRuntimeError.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `ManagedIntegrationRuntimeNode.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `ManagedIntegrationRuntimeOperationResult.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `ManagedIntegrationRuntimeStatus.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `Operation.Properties` has been changed from `interface{}` to `any` +- Type of `OperationResource.Properties` has been changed from `interface{}` to `any` +- Type of `SKUDescription.Restrictions` has been changed from `[]interface{}` to `[]any` +- Type of `SelfHostedIntegrationRuntime.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `SelfHostedIntegrationRuntimeNode.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `SelfHostedIntegrationRuntimeStatus.AdditionalProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `WorkspaceProperties.ExtraProperties` has been changed from `map[string]interface{}` to `map[string]any` +- Type of `WorkspaceProperties.Settings` has been changed from `map[string]interface{}` to `map[string]any` +- Type alias `ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState` has been removed +- Type alias `ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState` has been removed +- Operation `*SQLPoolOperationResultsClient.GetLocationHeaderResult` has been changed to LRO, use `*SQLPoolOperationResultsClient.BeginGetLocationHeaderResult` instead. +- Operation `*SQLPoolsClient.Update` has been changed to LRO, use `*SQLPoolsClient.BeginUpdate` instead. +- Field `Interface` of struct `BigDataPoolsClientDeleteResponse` has been removed +- Field `Interface` of struct `IPFirewallRulesClientDeleteResponse` has been removed +- Field `Interface` of struct `SQLPoolsClientDeleteResponse` has been removed +- Field `Interface` of struct `SQLPoolsClientPauseResponse` has been removed +- Field `Interface` of struct `SQLPoolsClientResumeResponse` has been removed +- Field `Interface` of struct `WorkspacesClientDeleteResponse` has been removed + +### Features Added + +- New type alias `ActualState` with values `ActualStateDisabled`, `ActualStateDisabling`, `ActualStateEnabled`, `ActualStateEnabling`, `ActualStateUnknown` +- New type alias `DesiredState` with values `DesiredStateDisabled`, `DesiredStateEnabled` +- New type alias `WorkspaceStatus` with values `WorkspaceStatusFailed`, `WorkspaceStatusInProgress`, `WorkspaceStatusSucceeded` +- New function `NewGetClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GetClient, error)` +- New function `*GetClient.IntegrationRuntimeEnableInteractivequery(context.Context, string, string, string, string, *GetClientIntegrationRuntimeEnableInteractivequeryOptions) (GetClientIntegrationRuntimeEnableInteractivequeryResponse, error)` +- New function `*GetClient.IntegrationRuntimeStart(context.Context, string, string, string, string, *GetClientIntegrationRuntimeStartOptions) (GetClientIntegrationRuntimeStartResponse, error)` +- New function `*GetClient.IntegrationRuntimeStop(context.Context, string, string, string, string, *GetClientIntegrationRuntimeStopOptions) (GetClientIntegrationRuntimeStopResponse, error)` +- New function `NewKustoPoolPrivateLinkResourcesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*KustoPoolPrivateLinkResourcesClient, error)` +- New function `*KustoPoolPrivateLinkResourcesClient.NewListPager(string, string, string, *KustoPoolPrivateLinkResourcesClientListOptions) *runtime.Pager[KustoPoolPrivateLinkResourcesClientListResponse]` +- New struct `ErrorResponseAutoGenerated` +- New struct `GetClient` +- New struct `IntegrationRuntimeEnableinteractivequery` +- New struct `IntegrationRuntimeOperationStatus` +- New struct `IntegrationRuntimeStopOperationStatus` +- New struct `KustoPoolPrivateLinkResources` +- New struct `KustoPoolPrivateLinkResourcesClient` +- New struct `KustoPoolPrivateLinkResourcesClientListResponse` +- New struct `PrivateLinkResources` +- New struct `PrivateLinkResourcesProperties` +- New field `IsAutotuneEnabled` in struct `BigDataPoolResourceProperties` +- New anonymous field `BigDataPoolResourceInfo` in struct `BigDataPoolsClientDeleteResponse` +- New field `AADObjectID` in struct `ClusterPrincipalProperties` +- New field `AADObjectID` in struct `DatabasePrincipalProperties` +- New anonymous field `IPFirewallRuleInfo` in struct `IPFirewallRulesClientDeleteResponse` +- New anonymous field `SQLPool` in struct `SQLPoolOperationResultsClientGetLocationHeaderResultResponse` +- New anonymous field `SQLPool` in struct `SQLPoolsClientDeleteResponse` +- New anonymous field `SQLPool` in struct `SQLPoolsClientPauseResponse` +- New anonymous field `SQLPool` in struct `SQLPoolsClientResumeResponse` +- New field `ConfigMergeRule` in struct `SparkConfigurationInfo` +- New anonymous field `Workspace` in struct `WorkspacesClientDeleteResponse` + + ## 0.5.0 (2022-05-17) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 0.5.0, which contains breaking changes. diff --git a/sdk/resourcemanager/synapse/armsynapse/autorest.md b/sdk/resourcemanager/synapse/armsynapse/autorest.md index 02e8ad77d55a..9b8adbd1d6dd 100644 --- a/sdk/resourcemanager/synapse/armsynapse/autorest.md +++ b/sdk/resourcemanager/synapse/armsynapse/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/synapse/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/synapse/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/synapse/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/synapse/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.5.0 +module-version: 0.6.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_azureadonlyauthentications_client.go b/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_azureadonlyauthentications_client.go rename to sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client.go index 40204f19763d..f098539dda43 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_azureadonlyauthentications_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type AzureADOnlyAuthenticationsClient struct { } // NewAzureADOnlyAuthenticationsClient creates a new instance of AzureADOnlyAuthenticationsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAzureADOnlyAuthenticationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureADOnlyAuthenticationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewAzureADOnlyAuthenticationsClient(subscriptionID string, credential azcor // BeginCreate - Create or Update a Azure Active Directory only authentication property for the workspaces // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// azureADOnlyAuthenticationName - name of the property -// azureADOnlyAuthenticationInfo - Azure Active Directory Property -// options - AzureADOnlyAuthenticationsClientBeginCreateOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.BeginCreate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - azureADOnlyAuthenticationName - name of the property +// - azureADOnlyAuthenticationInfo - Azure Active Directory Property +// - options - AzureADOnlyAuthenticationsClientBeginCreateOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.BeginCreate +// method. func (client *AzureADOnlyAuthenticationsClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, azureADOnlyAuthenticationName AzureADOnlyAuthenticationName, azureADOnlyAuthenticationInfo AzureADOnlyAuthentication, options *AzureADOnlyAuthenticationsClientBeginCreateOptions) (*runtime.Poller[AzureADOnlyAuthenticationsClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, resourceGroupName, workspaceName, azureADOnlyAuthenticationName, azureADOnlyAuthenticationInfo, options) @@ -79,6 +81,7 @@ func (client *AzureADOnlyAuthenticationsClient) BeginCreate(ctx context.Context, // Create - Create or Update a Azure Active Directory only authentication property for the workspaces // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *AzureADOnlyAuthenticationsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, azureADOnlyAuthenticationName AzureADOnlyAuthenticationName, azureADOnlyAuthenticationInfo AzureADOnlyAuthentication, options *AzureADOnlyAuthenticationsClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, workspaceName, azureADOnlyAuthenticationName, azureADOnlyAuthenticationInfo, options) @@ -127,12 +130,13 @@ func (client *AzureADOnlyAuthenticationsClient) createCreateRequest(ctx context. // Get - Gets a Azure Active Directory only authentication property // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// azureADOnlyAuthenticationName - name of the property -// options - AzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - azureADOnlyAuthenticationName - name of the property +// - options - AzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.Get +// method. func (client *AzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, azureADOnlyAuthenticationName AzureADOnlyAuthenticationName, options *AzureADOnlyAuthenticationsClientGetOptions) (AzureADOnlyAuthenticationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, azureADOnlyAuthenticationName, options) if err != nil { @@ -188,12 +192,12 @@ func (client *AzureADOnlyAuthenticationsClient) getHandleResponse(resp *http.Res } // NewListPager - Gets a list of Azure Active Directory only authentication property for a workspace -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - AzureADOnlyAuthenticationsClientListOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - AzureADOnlyAuthenticationsClientListOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.NewListPager +// method. func (client *AzureADOnlyAuthenticationsClient) NewListPager(resourceGroupName string, workspaceName string, options *AzureADOnlyAuthenticationsClientListOptions) *runtime.Pager[AzureADOnlyAuthenticationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AzureADOnlyAuthenticationsClientListResponse]{ More: func(page AzureADOnlyAuthenticationsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_bigdatapools_client.go b/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_bigdatapools_client.go rename to sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go index f65c5b48fdcd..71dd86d492b0 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_bigdatapools_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -32,9 +33,9 @@ type BigDataPoolsClient struct { } // NewBigDataPoolsClient creates a new instance of BigDataPoolsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewBigDataPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BigDataPoolsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +58,14 @@ func NewBigDataPoolsClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Create a new Big Data pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// bigDataPoolName - Big Data pool name -// bigDataPoolInfo - The Big Data pool to create. -// options - BigDataPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the BigDataPoolsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - bigDataPoolName - Big Data pool name +// - bigDataPoolInfo - The Big Data pool to create. +// - options - BigDataPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the BigDataPoolsClient.BeginCreateOrUpdate +// method. func (client *BigDataPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolInfo BigDataPoolResourceInfo, options *BigDataPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BigDataPoolsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, bigDataPoolName, bigDataPoolInfo, options) @@ -80,6 +82,7 @@ func (client *BigDataPoolsClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Create a new Big Data pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *BigDataPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolInfo BigDataPoolResourceInfo, options *BigDataPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, bigDataPoolName, bigDataPoolInfo, options) @@ -131,12 +134,13 @@ func (client *BigDataPoolsClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Delete a Big Data pool from the workspace. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// bigDataPoolName - Big Data pool name -// options - BigDataPoolsClientBeginDeleteOptions contains the optional parameters for the BigDataPoolsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - bigDataPoolName - Big Data pool name +// - options - BigDataPoolsClientBeginDeleteOptions contains the optional parameters for the BigDataPoolsClient.BeginDelete +// method. func (client *BigDataPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, options *BigDataPoolsClientBeginDeleteOptions) (*runtime.Poller[BigDataPoolsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, bigDataPoolName, options) @@ -153,6 +157,7 @@ func (client *BigDataPoolsClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Delete a Big Data pool from the workspace. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *BigDataPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, options *BigDataPoolsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, bigDataPoolName, options) @@ -201,11 +206,12 @@ func (client *BigDataPoolsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get a Big Data pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// bigDataPoolName - Big Data pool name -// options - BigDataPoolsClientGetOptions contains the optional parameters for the BigDataPoolsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - bigDataPoolName - Big Data pool name +// - options - BigDataPoolsClientGetOptions contains the optional parameters for the BigDataPoolsClient.Get method. func (client *BigDataPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, options *BigDataPoolsClientGetOptions) (BigDataPoolsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, bigDataPoolName, options) if err != nil { @@ -261,12 +267,12 @@ func (client *BigDataPoolsClient) getHandleResponse(resp *http.Response) (BigDat } // NewListByWorkspacePager - List Big Data pools in a workspace. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - BigDataPoolsClientListByWorkspaceOptions contains the optional parameters for the BigDataPoolsClient.ListByWorkspace -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - BigDataPoolsClientListByWorkspaceOptions contains the optional parameters for the BigDataPoolsClient.NewListByWorkspacePager +// method. func (client *BigDataPoolsClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *BigDataPoolsClientListByWorkspaceOptions) *runtime.Pager[BigDataPoolsClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[BigDataPoolsClientListByWorkspaceResponse]{ More: func(page BigDataPoolsClientListByWorkspaceResponse) bool { @@ -332,12 +338,13 @@ func (client *BigDataPoolsClient) listByWorkspaceHandleResponse(resp *http.Respo // Update - Patch a Big Data pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// bigDataPoolName - Big Data pool name -// bigDataPoolPatchInfo - The updated Big Data pool properties -// options - BigDataPoolsClientUpdateOptions contains the optional parameters for the BigDataPoolsClient.Update method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - bigDataPoolName - Big Data pool name +// - bigDataPoolPatchInfo - The updated Big Data pool properties +// - options - BigDataPoolsClientUpdateOptions contains the optional parameters for the BigDataPoolsClient.Update method. func (client *BigDataPoolsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, bigDataPoolName string, bigDataPoolPatchInfo BigDataPoolPatchInfo, options *BigDataPoolsClientUpdateOptions) (BigDataPoolsClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, bigDataPoolName, bigDataPoolPatchInfo, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_constants.go b/sdk/resourcemanager/synapse/armsynapse/constants.go similarity index 94% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_constants.go rename to sdk/resourcemanager/synapse/armsynapse/constants.go index 8f0048698a43..a682eb46f4c4 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_constants.go +++ b/sdk/resourcemanager/synapse/armsynapse/constants.go @@ -5,14 +5,37 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse const ( moduleName = "armsynapse" - moduleVersion = "v0.5.0" + moduleVersion = "v0.6.0" ) +// ActualState - Actual state +type ActualState string + +const ( + ActualStateEnabling ActualState = "Enabling" + ActualStateEnabled ActualState = "Enabled" + ActualStateDisabling ActualState = "Disabling" + ActualStateDisabled ActualState = "Disabled" + ActualStateUnknown ActualState = "Unknown" +) + +// PossibleActualStateValues returns the possible values for the ActualState const type. +func PossibleActualStateValues() []ActualState { + return []ActualState{ + ActualStateEnabling, + ActualStateEnabled, + ActualStateDisabling, + ActualStateDisabled, + ActualStateUnknown, + } +} + type AzureADOnlyAuthenticationName string const ( @@ -468,6 +491,22 @@ func PossibleDefaultPrincipalsModificationKindValues() []DefaultPrincipalsModifi } } +// DesiredState - Desired state +type DesiredState string + +const ( + DesiredStateEnabled DesiredState = "Enabled" + DesiredStateDisabled DesiredState = "Disabled" +) + +// PossibleDesiredStateValues returns the possible values for the DesiredState const type. +func PossibleDesiredStateValues() []DesiredState { + return []DesiredState{ + DesiredStateEnabled, + DesiredStateDisabled, + } +} + type EncryptionProtectorName string const ( @@ -860,44 +899,6 @@ func PossibleLanguageExtensionNameValues() []LanguageExtensionName { } } -// ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState - Actual state -type ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState string - -const ( - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateDisabled ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState = "Disabled" - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateDisabling ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState = "Disabling" - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateEnabled ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState = "Enabled" - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateEnabling ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState = "Enabling" - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateUnknown ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState = "Unknown" -) - -// PossibleManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateValues returns the possible values for the ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState const type. -func PossibleManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateValues() []ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState { - return []ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState{ - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateDisabled, - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateDisabling, - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateEnabled, - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateEnabling, - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualStateUnknown, - } -} - -// ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState - Desired state -type ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState string - -const ( - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredStateDisabled ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState = "Disabled" - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredStateEnabled ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState = "Enabled" -) - -// PossibleManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredStateValues returns the possible values for the ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState const type. -func PossibleManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredStateValues() []ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState { - return []ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState{ - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredStateDisabled, - ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredStateEnabled, - } -} - // ManagedIntegrationRuntimeNodeStatus - The managed integration runtime node status. type ManagedIntegrationRuntimeNodeStatus string @@ -1663,3 +1664,21 @@ func PossibleWorkspacePublicNetworkAccessValues() []WorkspacePublicNetworkAccess WorkspacePublicNetworkAccessEnabled, } } + +// WorkspaceStatus - status of Start Integrationruntimes. +type WorkspaceStatus string + +const ( + WorkspaceStatusFailed WorkspaceStatus = "Failed" + WorkspaceStatusInProgress WorkspaceStatus = "InProgress" + WorkspaceStatusSucceeded WorkspaceStatus = "Succeeded" +) + +// PossibleWorkspaceStatusValues returns the possible values for the WorkspaceStatus const type. +func PossibleWorkspaceStatusValues() []WorkspaceStatus { + return []WorkspaceStatus{ + WorkspaceStatusFailed, + WorkspaceStatusInProgress, + WorkspaceStatusSucceeded, + } +} diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client.go index edca8e449b69..7d824debc7f6 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingpolicies_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type DataMaskingPoliciesClient struct { } // NewDataMaskingPoliciesClient creates a new instance of DataMaskingPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDataMaskingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataMaskingPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewDataMaskingPoliciesClient(subscriptionID string, credential azcore.Token // CreateOrUpdate - Creates or updates a Sql pool data masking policy // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// parameters - Parameters for creating or updating a data masking policy. -// options - DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - parameters - Parameters for creating or updating a data masking policy. +// - options - DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate +// method. func (client *DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters DataMaskingPolicy, options *DataMaskingPoliciesClientCreateOrUpdateOptions) (DataMaskingPoliciesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) if err != nil { @@ -120,11 +122,12 @@ func (client *DataMaskingPoliciesClient) createOrUpdateHandleResponse(resp *http // Get - Gets a Sql pool data masking policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method. func (client *DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *DataMaskingPoliciesClientGetOptions) (DataMaskingPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingrules_client.go b/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingrules_client.go rename to sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go index ddb8094cc8aa..bd5da7329dd4 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingrules_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type DataMaskingRulesClient struct { } // NewDataMaskingRulesClient creates a new instance of DataMaskingRulesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDataMaskingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataMaskingRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewDataMaskingRulesClient(subscriptionID string, credential azcore.TokenCre // CreateOrUpdate - Creates or updates a Sql pool data masking rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// dataMaskingRuleName - The name of the data masking rule. -// parameters - The required parameters for creating or updating a data masking rule. -// options - DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - dataMaskingRuleName - The name of the data masking rule. +// - parameters - The required parameters for creating or updating a data masking rule. +// - options - DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate +// method. func (client *DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, dataMaskingRuleName string, parameters DataMaskingRule, options *DataMaskingRulesClientCreateOrUpdateOptions) (DataMaskingRulesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName, parameters, options) if err != nil { @@ -125,12 +127,13 @@ func (client *DataMaskingRulesClient) createOrUpdateHandleResponse(resp *http.Re // Get - Gets the specific Sql pool data masking rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// dataMaskingRuleName - The name of the data masking rule. -// options - DataMaskingRulesClientGetOptions contains the optional parameters for the DataMaskingRulesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - dataMaskingRuleName - The name of the data masking rule. +// - options - DataMaskingRulesClientGetOptions contains the optional parameters for the DataMaskingRulesClient.Get method. func (client *DataMaskingRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, dataMaskingRuleName string, options *DataMaskingRulesClientGetOptions) (DataMaskingRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName, options) if err != nil { @@ -191,13 +194,13 @@ func (client *DataMaskingRulesClient) getHandleResponse(resp *http.Response) (Da } // NewListBySQLPoolPager - Gets a list of Sql pool data masking rules. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - DataMaskingRulesClientListBySQLPoolOptions contains the optional parameters for the DataMaskingRulesClient.ListBySQLPool -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - DataMaskingRulesClientListBySQLPoolOptions contains the optional parameters for the DataMaskingRulesClient.NewListBySQLPoolPager +// method. func (client *DataMaskingRulesClient) NewListBySQLPoolPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *DataMaskingRulesClientListBySQLPoolOptions) *runtime.Pager[DataMaskingRulesClientListBySQLPoolResponse] { return runtime.NewPager(runtime.PagingHandler[DataMaskingRulesClientListBySQLPoolResponse]{ More: func(page DataMaskingRulesClientListBySQLPoolResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_extendedsqlpoolblobauditingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_extendedsqlpoolblobauditingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go index fab321633bb0..8242cfec6fb9 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_extendedsqlpoolblobauditingpolicies_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type ExtendedSQLPoolBlobAuditingPoliciesClient struct { } // NewExtendedSQLPoolBlobAuditingPoliciesClient creates a new instance of ExtendedSQLPoolBlobAuditingPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExtendedSQLPoolBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtendedSQLPoolBlobAuditingPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewExtendedSQLPoolBlobAuditingPoliciesClient(subscriptionID string, credent // CreateOrUpdate - Creates or updates an extended Sql pool's blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// parameters - The extended Sql pool blob auditing policy. -// options - ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - parameters - The extended Sql pool blob auditing policy. +// - options - ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.CreateOrUpdate +// method. func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters ExtendedSQLPoolBlobAuditingPolicy, options *ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions) (ExtendedSQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) if err != nil { @@ -120,12 +122,13 @@ func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) createOrUpdateHandleRes // Get - Gets an extended Sql pool's blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.Get +// method. func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions) (ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) if err != nil { @@ -182,13 +185,13 @@ func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) getHandleResponse(resp } // NewListBySQLPoolPager - Lists extended auditing settings of a Sql pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.ListBySQLPool -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager +// method. func (client *ExtendedSQLPoolBlobAuditingPoliciesClient) NewListBySQLPoolPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions) *runtime.Pager[ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse] { return runtime.NewPager(runtime.PagingHandler[ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse]{ More: func(page ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/get_client.go b/sdk/resourcemanager/synapse/armsynapse/get_client.go new file mode 100644 index 000000000000..dd5a574245e1 --- /dev/null +++ b/sdk/resourcemanager/synapse/armsynapse/get_client.go @@ -0,0 +1,260 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armsynapse + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GetClient contains the methods for the Get group. +// Don't use this type directly, use NewGetClient() instead. +type GetClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewGetClient creates a new instance of GetClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GetClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &GetClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// IntegrationRuntimeEnableInteractivequery - Get an integration runtime enable interactivequery operation status +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - integrationRuntimeOperationID - Integration runtime Operation Id +// - options - GetClientIntegrationRuntimeEnableInteractivequeryOptions contains the optional parameters for the GetClient.IntegrationRuntimeEnableInteractivequery +// method. +func (client *GetClient) IntegrationRuntimeEnableInteractivequery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeEnableInteractivequeryOptions) (GetClientIntegrationRuntimeEnableInteractivequeryResponse, error) { + req, err := client.integrationRuntimeEnableInteractivequeryCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntimeOperationID, options) + if err != nil { + return GetClientIntegrationRuntimeEnableInteractivequeryResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return GetClientIntegrationRuntimeEnableInteractivequeryResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return GetClientIntegrationRuntimeEnableInteractivequeryResponse{}, runtime.NewResponseError(resp) + } + return client.integrationRuntimeEnableInteractivequeryHandleResponse(resp) +} + +// integrationRuntimeEnableInteractivequeryCreateRequest creates the IntegrationRuntimeEnableInteractivequery request. +func (client *GetClient) integrationRuntimeEnableInteractivequeryCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeEnableInteractivequeryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/enableinteractivequery/operationstatuses/{integrationRuntimeOperationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if integrationRuntimeName == "" { + return nil, errors.New("parameter integrationRuntimeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{integrationRuntimeName}", url.PathEscape(integrationRuntimeName)) + if integrationRuntimeOperationID == "" { + return nil, errors.New("parameter integrationRuntimeOperationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{integrationRuntimeOperationId}", url.PathEscape(integrationRuntimeOperationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// integrationRuntimeEnableInteractivequeryHandleResponse handles the IntegrationRuntimeEnableInteractivequery response. +func (client *GetClient) integrationRuntimeEnableInteractivequeryHandleResponse(resp *http.Response) (GetClientIntegrationRuntimeEnableInteractivequeryResponse, error) { + result := GetClientIntegrationRuntimeEnableInteractivequeryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IntegrationRuntimeEnableinteractivequery); err != nil { + return GetClientIntegrationRuntimeEnableInteractivequeryResponse{}, err + } + return result, nil +} + +// IntegrationRuntimeStart - Get an integration runtime start operation status +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - integrationRuntimeOperationID - Integration runtime Operation Id +// - options - GetClientIntegrationRuntimeStartOptions contains the optional parameters for the GetClient.IntegrationRuntimeStart +// method. +func (client *GetClient) IntegrationRuntimeStart(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeStartOptions) (GetClientIntegrationRuntimeStartResponse, error) { + req, err := client.integrationRuntimeStartCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntimeOperationID, options) + if err != nil { + return GetClientIntegrationRuntimeStartResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return GetClientIntegrationRuntimeStartResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return GetClientIntegrationRuntimeStartResponse{}, runtime.NewResponseError(resp) + } + return client.integrationRuntimeStartHandleResponse(resp) +} + +// integrationRuntimeStartCreateRequest creates the IntegrationRuntimeStart request. +func (client *GetClient) integrationRuntimeStartCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start/operationstatuses/{integrationRuntimeOperationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if integrationRuntimeName == "" { + return nil, errors.New("parameter integrationRuntimeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{integrationRuntimeName}", url.PathEscape(integrationRuntimeName)) + if integrationRuntimeOperationID == "" { + return nil, errors.New("parameter integrationRuntimeOperationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{integrationRuntimeOperationId}", url.PathEscape(integrationRuntimeOperationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// integrationRuntimeStartHandleResponse handles the IntegrationRuntimeStart response. +func (client *GetClient) integrationRuntimeStartHandleResponse(resp *http.Response) (GetClientIntegrationRuntimeStartResponse, error) { + result := GetClientIntegrationRuntimeStartResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IntegrationRuntimeOperationStatus); err != nil { + return GetClientIntegrationRuntimeStartResponse{}, err + } + return result, nil +} + +// IntegrationRuntimeStop - Get an integration runtime stop operation status +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - integrationRuntimeOperationID - Integration runtime Operation Id +// - options - GetClientIntegrationRuntimeStopOptions contains the optional parameters for the GetClient.IntegrationRuntimeStop +// method. +func (client *GetClient) IntegrationRuntimeStop(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeStopOptions) (GetClientIntegrationRuntimeStopResponse, error) { + req, err := client.integrationRuntimeStopCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntimeOperationID, options) + if err != nil { + return GetClientIntegrationRuntimeStopResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return GetClientIntegrationRuntimeStopResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return GetClientIntegrationRuntimeStopResponse{}, runtime.NewResponseError(resp) + } + return client.integrationRuntimeStopHandleResponse(resp) +} + +// integrationRuntimeStopCreateRequest creates the IntegrationRuntimeStop request. +func (client *GetClient) integrationRuntimeStopCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntimeOperationID string, options *GetClientIntegrationRuntimeStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop/operationstatuses/{integrationRuntimeOperationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if integrationRuntimeName == "" { + return nil, errors.New("parameter integrationRuntimeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{integrationRuntimeName}", url.PathEscape(integrationRuntimeName)) + if integrationRuntimeOperationID == "" { + return nil, errors.New("parameter integrationRuntimeOperationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{integrationRuntimeOperationId}", url.PathEscape(integrationRuntimeOperationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// integrationRuntimeStopHandleResponse handles the IntegrationRuntimeStop response. +func (client *GetClient) integrationRuntimeStopHandleResponse(resp *http.Response) (GetClientIntegrationRuntimeStopResponse, error) { + result := GetClientIntegrationRuntimeStopResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IntegrationRuntimeStopOperationStatus); err != nil { + return GetClientIntegrationRuntimeStopResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/synapse/armsynapse/go.mod b/sdk/resourcemanager/synapse/armsynapse/go.mod index 2538cb677912..7688d39d25c5 100644 --- a/sdk/resourcemanager/synapse/armsynapse/go.mod +++ b/sdk/resourcemanager/synapse/armsynapse/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/synapse/armsynapse/go.sum b/sdk/resourcemanager/synapse/armsynapse/go.sum index ed5b814680ee..3afb578030a5 100644 --- a/sdk/resourcemanager/synapse/armsynapse/go.sum +++ b/sdk/resourcemanager/synapse/armsynapse/go.sum @@ -1,33 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeauthkeys_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeauthkeys_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client.go index c8c792389e59..60bdba556da4 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeauthkeys_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimeAuthKeysClient struct { } // NewIntegrationRuntimeAuthKeysClient creates a new instance of IntegrationRuntimeAuthKeysClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimeAuthKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeAuthKeysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewIntegrationRuntimeAuthKeysClient(subscriptionID string, credential azcor // List - List authentication keys in an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimeAuthKeysClientListOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimeAuthKeysClientListOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.List +// method. func (client *IntegrationRuntimeAuthKeysClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeAuthKeysClientListOptions) (IntegrationRuntimeAuthKeysClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { @@ -118,13 +120,14 @@ func (client *IntegrationRuntimeAuthKeysClient) listHandleResponse(resp *http.Re // Regenerate - Regenerate the authentication key for an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// regenerateKeyParameters - The parameters for regenerating integration runtime authentication key. -// options - IntegrationRuntimeAuthKeysClientRegenerateOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.Regenerate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - regenerateKeyParameters - The parameters for regenerating integration runtime authentication key. +// - options - IntegrationRuntimeAuthKeysClientRegenerateOptions contains the optional parameters for the IntegrationRuntimeAuthKeysClient.Regenerate +// method. func (client *IntegrationRuntimeAuthKeysClient) Regenerate(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, regenerateKeyParameters IntegrationRuntimeRegenerateKeyParameters, options *IntegrationRuntimeAuthKeysClientRegenerateOptions) (IntegrationRuntimeAuthKeysClientRegenerateResponse, error) { req, err := client.regenerateCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, regenerateKeyParameters, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeconnectioninfos_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeconnectioninfos_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go index ea3d65d6300c..7042efca91d9 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeconnectioninfos_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimeConnectionInfosClient struct { } // NewIntegrationRuntimeConnectionInfosClient creates a new instance of IntegrationRuntimeConnectionInfosClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimeConnectionInfosClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeConnectionInfosClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewIntegrationRuntimeConnectionInfosClient(subscriptionID string, credentia // Get - Get connection info for an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimeConnectionInfosClientGetOptions contains the optional parameters for the IntegrationRuntimeConnectionInfosClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimeConnectionInfosClientGetOptions contains the optional parameters for the IntegrationRuntimeConnectionInfosClient.Get +// method. func (client *IntegrationRuntimeConnectionInfosClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeConnectionInfosClientGetOptions) (IntegrationRuntimeConnectionInfosClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimecredentials_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimecredentials_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go index 5b27a4a9d43d..60128cf6f630 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimecredentials_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimeCredentialsClient struct { } // NewIntegrationRuntimeCredentialsClient creates a new instance of IntegrationRuntimeCredentialsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimeCredentialsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeCredentialsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,12 +60,13 @@ func NewIntegrationRuntimeCredentialsClient(subscriptionID string, credential az // If you already have the latest credential backup file, you should manually import it (preferred) on any self-hosted integration // runtime node than using this API directly. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimeCredentialsClientSyncOptions contains the optional parameters for the IntegrationRuntimeCredentialsClient.Sync -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimeCredentialsClientSyncOptions contains the optional parameters for the IntegrationRuntimeCredentialsClient.Sync +// method. func (client *IntegrationRuntimeCredentialsClient) Sync(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeCredentialsClientSyncOptions) (IntegrationRuntimeCredentialsClientSyncResponse, error) { req, err := client.syncCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimemonitoringdata_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimemonitoringdata_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go index 0a0f53f3c077..6ba67b5fb5b2 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimemonitoringdata_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimeMonitoringDataClient struct { } // NewIntegrationRuntimeMonitoringDataClient creates a new instance of IntegrationRuntimeMonitoringDataClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimeMonitoringDataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeMonitoringDataClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewIntegrationRuntimeMonitoringDataClient(subscriptionID string, credential // List - Get monitoring data for an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimeMonitoringDataClientListOptions contains the optional parameters for the IntegrationRuntimeMonitoringDataClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimeMonitoringDataClientListOptions contains the optional parameters for the IntegrationRuntimeMonitoringDataClient.List +// method. func (client *IntegrationRuntimeMonitoringDataClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeMonitoringDataClientListOptions) (IntegrationRuntimeMonitoringDataClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodeipaddress_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodeipaddress_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go index 9fc8ee5ec19d..3e1b0814dfc7 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodeipaddress_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimeNodeIPAddressClient struct { } // NewIntegrationRuntimeNodeIPAddressClient creates a new instance of IntegrationRuntimeNodeIPAddressClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimeNodeIPAddressClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeNodeIPAddressClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewIntegrationRuntimeNodeIPAddressClient(subscriptionID string, credential // Get - Get the IP address of an integration runtime node // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// nodeName - Integration runtime node name -// options - IntegrationRuntimeNodeIPAddressClientGetOptions contains the optional parameters for the IntegrationRuntimeNodeIPAddressClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - nodeName - Integration runtime node name +// - options - IntegrationRuntimeNodeIPAddressClientGetOptions contains the optional parameters for the IntegrationRuntimeNodeIPAddressClient.Get +// method. func (client *IntegrationRuntimeNodeIPAddressClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, options *IntegrationRuntimeNodeIPAddressClientGetOptions) (IntegrationRuntimeNodeIPAddressClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, nodeName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodes_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodes_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go index c580ddc463e3..41c2f41749f0 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodes_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimeNodesClient struct { } // NewIntegrationRuntimeNodesClient creates a new instance of IntegrationRuntimeNodesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimeNodesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeNodesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewIntegrationRuntimeNodesClient(subscriptionID string, credential azcore.T // Delete - Delete an integration runtime node // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// nodeName - Integration runtime node name -// options - IntegrationRuntimeNodesClientDeleteOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Delete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - nodeName - Integration runtime node name +// - options - IntegrationRuntimeNodesClientDeleteOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Delete +// method. func (client *IntegrationRuntimeNodesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, options *IntegrationRuntimeNodesClientDeleteOptions) (IntegrationRuntimeNodesClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, nodeName, options) if err != nil { @@ -114,13 +116,14 @@ func (client *IntegrationRuntimeNodesClient) deleteCreateRequest(ctx context.Con // Get - Get an integration runtime node // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// nodeName - Integration runtime node name -// options - IntegrationRuntimeNodesClientGetOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - nodeName - Integration runtime node name +// - options - IntegrationRuntimeNodesClientGetOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Get +// method. func (client *IntegrationRuntimeNodesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, options *IntegrationRuntimeNodesClientGetOptions) (IntegrationRuntimeNodesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, nodeName, options) if err != nil { @@ -181,14 +184,15 @@ func (client *IntegrationRuntimeNodesClient) getHandleResponse(resp *http.Respon // Update - Create an integration runtime node // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// nodeName - Integration runtime node name -// updateIntegrationRuntimeNodeRequest - The parameters for updating an integration runtime node. -// options - IntegrationRuntimeNodesClientUpdateOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Update -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - nodeName - Integration runtime node name +// - updateIntegrationRuntimeNodeRequest - The parameters for updating an integration runtime node. +// - options - IntegrationRuntimeNodesClientUpdateOptions contains the optional parameters for the IntegrationRuntimeNodesClient.Update +// method. func (client *IntegrationRuntimeNodesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, nodeName string, updateIntegrationRuntimeNodeRequest UpdateIntegrationRuntimeNodeRequest, options *IntegrationRuntimeNodesClientUpdateOptions) (IntegrationRuntimeNodesClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, nodeName, updateIntegrationRuntimeNodeRequest, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeobjectmetadata_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeobjectmetadata_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go index 7ff9f7935c8a..31582ffc50ec 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeobjectmetadata_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimeObjectMetadataClient struct { } // NewIntegrationRuntimeObjectMetadataClient creates a new instance of IntegrationRuntimeObjectMetadataClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimeObjectMetadataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeObjectMetadataClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewIntegrationRuntimeObjectMetadataClient(subscriptionID string, credential // List - Get object metadata from an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimeObjectMetadataClientListOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimeObjectMetadataClientListOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.List +// method. func (client *IntegrationRuntimeObjectMetadataClient) List(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeObjectMetadataClientListOptions) (IntegrationRuntimeObjectMetadataClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { @@ -121,19 +123,22 @@ func (client *IntegrationRuntimeObjectMetadataClient) listHandleResponse(resp *h // BeginRefresh - Refresh the object metadata in an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimeObjectMetadataClientBeginRefreshOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.BeginRefresh -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimeObjectMetadataClientBeginRefreshOptions contains the optional parameters for the IntegrationRuntimeObjectMetadataClient.BeginRefresh +// method. func (client *IntegrationRuntimeObjectMetadataClient) BeginRefresh(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeObjectMetadataClientBeginRefreshOptions) (*runtime.Poller[IntegrationRuntimeObjectMetadataClientRefreshResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.refresh(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return nil, err } - return runtime.NewPoller[IntegrationRuntimeObjectMetadataClientRefreshResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[IntegrationRuntimeObjectMetadataClientRefreshResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[IntegrationRuntimeObjectMetadataClientRefreshResponse](options.ResumeToken, client.pl, nil) } @@ -141,6 +146,7 @@ func (client *IntegrationRuntimeObjectMetadataClient) BeginRefresh(ctx context.C // Refresh - Refresh the object metadata in an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimeObjectMetadataClient) refresh(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeObjectMetadataClientBeginRefreshOptions) (*http.Response, error) { req, err := client.refreshCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimes_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimes_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go index b2780a1f0f30..9efb0ae03ae4 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimes_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimesClient struct { } // NewIntegrationRuntimesClient creates a new instance of IntegrationRuntimesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewIntegrationRuntimesClient(subscriptionID string, credential azcore.Token // BeginCreate - Create an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// integrationRuntime - Integration runtime resource definition. -// options - IntegrationRuntimesClientBeginCreateOptions contains the optional parameters for the IntegrationRuntimesClient.BeginCreate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - integrationRuntime - Integration runtime resource definition. +// - options - IntegrationRuntimesClientBeginCreateOptions contains the optional parameters for the IntegrationRuntimesClient.BeginCreate +// method. func (client *IntegrationRuntimesClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, options *IntegrationRuntimesClientBeginCreateOptions) (*runtime.Poller[IntegrationRuntimesClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntime, options) @@ -77,6 +79,7 @@ func (client *IntegrationRuntimesClient) BeginCreate(ctx context.Context, resour // Create - Create an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) create(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, options *IntegrationRuntimesClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, integrationRuntime, options) @@ -128,12 +131,13 @@ func (client *IntegrationRuntimesClient) createCreateRequest(ctx context.Context // BeginDelete - Delete an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimesClientBeginDeleteOptions contains the optional parameters for the IntegrationRuntimesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimesClientBeginDeleteOptions contains the optional parameters for the IntegrationRuntimesClient.BeginDelete +// method. func (client *IntegrationRuntimesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginDeleteOptions) (*runtime.Poller[IntegrationRuntimesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -148,6 +152,7 @@ func (client *IntegrationRuntimesClient) BeginDelete(ctx context.Context, resour // Delete - Delete an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -196,12 +201,13 @@ func (client *IntegrationRuntimesClient) deleteCreateRequest(ctx context.Context // BeginDisableInteractiveQuery - Disable interactive query in integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimesClientBeginDisableInteractiveQueryOptions contains the optional parameters for the IntegrationRuntimesClient.BeginDisableInteractiveQuery -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimesClientBeginDisableInteractiveQueryOptions contains the optional parameters for the IntegrationRuntimesClient.BeginDisableInteractiveQuery +// method. func (client *IntegrationRuntimesClient) BeginDisableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginDisableInteractiveQueryOptions) (*runtime.Poller[IntegrationRuntimesClientDisableInteractiveQueryResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.disableInteractiveQuery(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -216,6 +222,7 @@ func (client *IntegrationRuntimesClient) BeginDisableInteractiveQuery(ctx contex // DisableInteractiveQuery - Disable interactive query in integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) disableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginDisableInteractiveQueryOptions) (*http.Response, error) { req, err := client.disableInteractiveQueryCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -264,12 +271,13 @@ func (client *IntegrationRuntimesClient) disableInteractiveQueryCreateRequest(ct // BeginEnableInteractiveQuery - Enable interactive query in integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimesClientBeginEnableInteractiveQueryOptions contains the optional parameters for the IntegrationRuntimesClient.BeginEnableInteractiveQuery -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimesClientBeginEnableInteractiveQueryOptions contains the optional parameters for the IntegrationRuntimesClient.BeginEnableInteractiveQuery +// method. func (client *IntegrationRuntimesClient) BeginEnableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginEnableInteractiveQueryOptions) (*runtime.Poller[IntegrationRuntimesClientEnableInteractiveQueryResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.enableInteractiveQuery(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -284,6 +292,7 @@ func (client *IntegrationRuntimesClient) BeginEnableInteractiveQuery(ctx context // EnableInteractiveQuery - Enable interactive query in integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) enableInteractiveQuery(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginEnableInteractiveQueryOptions) (*http.Response, error) { req, err := client.enableInteractiveQueryCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -332,11 +341,12 @@ func (client *IntegrationRuntimesClient) enableInteractiveQueryCreateRequest(ctx // Get - Get an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimesClientGetOptions contains the optional parameters for the IntegrationRuntimesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimesClientGetOptions contains the optional parameters for the IntegrationRuntimesClient.Get method. func (client *IntegrationRuntimesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientGetOptions) (IntegrationRuntimesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { @@ -395,12 +405,12 @@ func (client *IntegrationRuntimesClient) getHandleResponse(resp *http.Response) } // NewListByWorkspacePager - List all integration runtimes -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - IntegrationRuntimesClientListByWorkspaceOptions contains the optional parameters for the IntegrationRuntimesClient.ListByWorkspace -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - IntegrationRuntimesClientListByWorkspaceOptions contains the optional parameters for the IntegrationRuntimesClient.NewListByWorkspacePager +// method. func (client *IntegrationRuntimesClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *IntegrationRuntimesClientListByWorkspaceOptions) *runtime.Pager[IntegrationRuntimesClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[IntegrationRuntimesClientListByWorkspaceResponse]{ More: func(page IntegrationRuntimesClientListByWorkspaceResponse) bool { @@ -467,12 +477,13 @@ func (client *IntegrationRuntimesClient) listByWorkspaceHandleResponse(resp *htt // ListOutboundNetworkDependenciesEndpoints - Gets the list of outbound network dependencies for a given Azure-SSIS integration // runtime. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for -// the IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for +// the IntegrationRuntimesClient.ListOutboundNetworkDependenciesEndpoints method. func (client *IntegrationRuntimesClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsOptions) (IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse, error) { req, err := client.listOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { @@ -529,19 +540,22 @@ func (client *IntegrationRuntimesClient) listOutboundNetworkDependenciesEndpoint // BeginStart - Start an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimesClientBeginStartOptions contains the optional parameters for the IntegrationRuntimesClient.BeginStart -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimesClientBeginStartOptions contains the optional parameters for the IntegrationRuntimesClient.BeginStart +// method. func (client *IntegrationRuntimesClient) BeginStart(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginStartOptions) (*runtime.Poller[IntegrationRuntimesClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { return nil, err } - return runtime.NewPoller[IntegrationRuntimesClientStartResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[IntegrationRuntimesClientStartResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) } else { return runtime.NewPollerFromResumeToken[IntegrationRuntimesClientStartResponse](options.ResumeToken, client.pl, nil) } @@ -549,6 +563,7 @@ func (client *IntegrationRuntimesClient) BeginStart(ctx context.Context, resourc // Start - Start an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) start(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -597,12 +612,13 @@ func (client *IntegrationRuntimesClient) startCreateRequest(ctx context.Context, // BeginStop - Stop an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimesClientBeginStopOptions contains the optional parameters for the IntegrationRuntimesClient.BeginStop -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimesClientBeginStopOptions contains the optional parameters for the IntegrationRuntimesClient.BeginStop +// method. func (client *IntegrationRuntimesClient) BeginStop(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginStopOptions) (*runtime.Poller[IntegrationRuntimesClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -617,6 +633,7 @@ func (client *IntegrationRuntimesClient) BeginStop(ctx context.Context, resource // Stop - Stop an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *IntegrationRuntimesClient) stop(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) @@ -665,13 +682,14 @@ func (client *IntegrationRuntimesClient) stopCreateRequest(ctx context.Context, // Update - Update an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// updateIntegrationRuntimeRequest - The parameters for updating an integration runtime. -// options - IntegrationRuntimesClientUpdateOptions contains the optional parameters for the IntegrationRuntimesClient.Update -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - updateIntegrationRuntimeRequest - The parameters for updating an integration runtime. +// - options - IntegrationRuntimesClientUpdateOptions contains the optional parameters for the IntegrationRuntimesClient.Update +// method. func (client *IntegrationRuntimesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, updateIntegrationRuntimeRequest UpdateIntegrationRuntimeRequest, options *IntegrationRuntimesClientUpdateOptions) (IntegrationRuntimesClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, updateIntegrationRuntimeRequest, options) if err != nil { @@ -728,12 +746,13 @@ func (client *IntegrationRuntimesClient) updateHandleResponse(resp *http.Respons // Upgrade - Upgrade an integration runtime // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimesClientUpgradeOptions contains the optional parameters for the IntegrationRuntimesClient.Upgrade -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimesClientUpgradeOptions contains the optional parameters for the IntegrationRuntimesClient.Upgrade +// method. func (client *IntegrationRuntimesClient) Upgrade(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimesClientUpgradeOptions) (IntegrationRuntimesClientUpgradeResponse, error) { req, err := client.upgradeCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimestatus_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimestatus_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go index 184497b313fd..490c73ab48d9 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimestatus_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IntegrationRuntimeStatusClient struct { } // NewIntegrationRuntimeStatusClient creates a new instance of IntegrationRuntimeStatusClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIntegrationRuntimeStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IntegrationRuntimeStatusClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewIntegrationRuntimeStatusClient(subscriptionID string, credential azcore. // Get - Get the integration runtime status // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// integrationRuntimeName - Integration runtime name -// options - IntegrationRuntimeStatusClientGetOptions contains the optional parameters for the IntegrationRuntimeStatusClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - integrationRuntimeName - Integration runtime name +// - options - IntegrationRuntimeStatusClientGetOptions contains the optional parameters for the IntegrationRuntimeStatusClient.Get +// method. func (client *IntegrationRuntimeStatusClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, options *IntegrationRuntimeStatusClientGetOptions) (IntegrationRuntimeStatusClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, integrationRuntimeName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_ipfirewallrules_client.go b/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_ipfirewallrules_client.go rename to sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go index 8c615668ccb6..1a7af54158a9 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_ipfirewallrules_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type IPFirewallRulesClient struct { } // NewIPFirewallRulesClient creates a new instance of IPFirewallRulesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIPFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPFirewallRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewIPFirewallRulesClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Creates or updates a firewall rule // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// ruleName - The IP firewall rule name -// ipFirewallRuleInfo - IP firewall rule properties -// options - IPFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the IPFirewallRulesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - ruleName - The IP firewall rule name +// - ipFirewallRuleInfo - IP firewall rule properties +// - options - IPFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the IPFirewallRulesClient.BeginCreateOrUpdate +// method. func (client *IPFirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, ipFirewallRuleInfo IPFirewallRuleInfo, options *IPFirewallRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[IPFirewallRulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, ruleName, ipFirewallRuleInfo, options) @@ -79,6 +81,7 @@ func (client *IPFirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Creates or updates a firewall rule // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *IPFirewallRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, ipFirewallRuleInfo IPFirewallRuleInfo, options *IPFirewallRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, ruleName, ipFirewallRuleInfo, options) @@ -127,12 +130,13 @@ func (client *IPFirewallRulesClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Deletes a firewall rule // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// ruleName - The IP firewall rule name -// options - IPFirewallRulesClientBeginDeleteOptions contains the optional parameters for the IPFirewallRulesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - ruleName - The IP firewall rule name +// - options - IPFirewallRulesClientBeginDeleteOptions contains the optional parameters for the IPFirewallRulesClient.BeginDelete +// method. func (client *IPFirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *IPFirewallRulesClientBeginDeleteOptions) (*runtime.Poller[IPFirewallRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, ruleName, options) @@ -149,6 +153,7 @@ func (client *IPFirewallRulesClient) BeginDelete(ctx context.Context, resourceGr // Delete - Deletes a firewall rule // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *IPFirewallRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *IPFirewallRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, ruleName, options) @@ -197,11 +202,12 @@ func (client *IPFirewallRulesClient) deleteCreateRequest(ctx context.Context, re // Get - Get a firewall rule // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// ruleName - The IP firewall rule name -// options - IPFirewallRulesClientGetOptions contains the optional parameters for the IPFirewallRulesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - ruleName - The IP firewall rule name +// - options - IPFirewallRulesClientGetOptions contains the optional parameters for the IPFirewallRulesClient.Get method. func (client *IPFirewallRulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, ruleName string, options *IPFirewallRulesClientGetOptions) (IPFirewallRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, ruleName, options) if err != nil { @@ -257,12 +263,12 @@ func (client *IPFirewallRulesClient) getHandleResponse(resp *http.Response) (IPF } // NewListByWorkspacePager - Returns a list of firewall rules -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - IPFirewallRulesClientListByWorkspaceOptions contains the optional parameters for the IPFirewallRulesClient.ListByWorkspace -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - IPFirewallRulesClientListByWorkspaceOptions contains the optional parameters for the IPFirewallRulesClient.NewListByWorkspacePager +// method. func (client *IPFirewallRulesClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *IPFirewallRulesClientListByWorkspaceOptions) *runtime.Pager[IPFirewallRulesClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[IPFirewallRulesClientListByWorkspaceResponse]{ More: func(page IPFirewallRulesClientListByWorkspaceResponse) bool { @@ -328,12 +334,13 @@ func (client *IPFirewallRulesClient) listByWorkspaceHandleResponse(resp *http.Re // BeginReplaceAll - Replaces firewall rules // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// request - Replace all IP firewall rules request -// options - IPFirewallRulesClientBeginReplaceAllOptions contains the optional parameters for the IPFirewallRulesClient.BeginReplaceAll -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - request - Replace all IP firewall rules request +// - options - IPFirewallRulesClientBeginReplaceAllOptions contains the optional parameters for the IPFirewallRulesClient.BeginReplaceAll +// method. func (client *IPFirewallRulesClient) BeginReplaceAll(ctx context.Context, resourceGroupName string, workspaceName string, request ReplaceAllIPFirewallRulesRequest, options *IPFirewallRulesClientBeginReplaceAllOptions) (*runtime.Poller[IPFirewallRulesClientReplaceAllResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.replaceAll(ctx, resourceGroupName, workspaceName, request, options) @@ -350,6 +357,7 @@ func (client *IPFirewallRulesClient) BeginReplaceAll(ctx context.Context, resour // ReplaceAll - Replaces firewall rules // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *IPFirewallRulesClient) replaceAll(ctx context.Context, resourceGroupName string, workspaceName string, request ReplaceAllIPFirewallRulesRequest, options *IPFirewallRulesClientBeginReplaceAllOptions) (*http.Response, error) { req, err := client.replaceAllCreateRequest(ctx, resourceGroupName, workspaceName, request, options) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_keys_client.go b/sdk/resourcemanager/synapse/armsynapse/keys_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_keys_client.go rename to sdk/resourcemanager/synapse/armsynapse/keys_client.go index ceac39fe6b3f..bc2dbd4dd2b8 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_keys_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/keys_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type KeysClient struct { } // NewKeysClient creates a new instance of KeysClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KeysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // CreateOrUpdate - Creates or updates a workspace key // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// keyName - The name of the workspace key -// keyProperties - Key put request properties -// options - KeysClientCreateOrUpdateOptions contains the optional parameters for the KeysClient.CreateOrUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - keyName - The name of the workspace key +// - keyProperties - Key put request properties +// - options - KeysClientCreateOrUpdateOptions contains the optional parameters for the KeysClient.CreateOrUpdate method. func (client *KeysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, keyProperties Key, options *KeysClientCreateOrUpdateOptions) (KeysClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, keyName, keyProperties, options) if err != nil { @@ -118,11 +120,12 @@ func (client *KeysClient) createOrUpdateHandleResponse(resp *http.Response) (Key // Delete - Deletes a workspace key // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// keyName - The name of the workspace key -// options - KeysClientDeleteOptions contains the optional parameters for the KeysClient.Delete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - keyName - The name of the workspace key +// - options - KeysClientDeleteOptions contains the optional parameters for the KeysClient.Delete method. func (client *KeysClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, options *KeysClientDeleteOptions) (KeysClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, keyName, options) if err != nil { @@ -179,11 +182,12 @@ func (client *KeysClient) deleteHandleResponse(resp *http.Response) (KeysClientD // Get - Gets a workspace key // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// keyName - The name of the workspace key -// options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - keyName - The name of the workspace key +// - options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. func (client *KeysClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, keyName string, options *KeysClientGetOptions) (KeysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, keyName, options) if err != nil { @@ -239,11 +243,12 @@ func (client *KeysClient) getHandleResponse(resp *http.Response) (KeysClientGetR } // NewListByWorkspacePager - Returns a list of keys in a workspace -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - KeysClientListByWorkspaceOptions contains the optional parameters for the KeysClient.ListByWorkspace method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - KeysClientListByWorkspaceOptions contains the optional parameters for the KeysClient.NewListByWorkspacePager +// method. func (client *KeysClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *KeysClientListByWorkspaceOptions) *runtime.Pager[KeysClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[KeysClientListByWorkspaceResponse]{ More: func(page KeysClientListByWorkspaceResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustooperations_client.go b/sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go similarity index 92% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustooperations_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go index 09d862653e86..a3aeb29d6c0d 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustooperations_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -27,8 +28,8 @@ type KustoOperationsClient struct { } // NewKustoOperationsClient creates a new instance of KustoOperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKustoOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoOperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -49,9 +50,10 @@ func NewKustoOperationsClient(credential azcore.TokenCredential, options *arm.Cl } // NewListPager - Lists available operations for the Kusto sub-resources inside Microsoft.Synapse provider. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// options - KustoOperationsClientListOptions contains the optional parameters for the KustoOperationsClient.List method. +// - options - KustoOperationsClientListOptions contains the optional parameters for the KustoOperationsClient.NewListPager +// method. func (client *KustoOperationsClient) NewListPager(options *KustoOperationsClientListOptions) *runtime.Pager[KustoOperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[KustoOperationsClientListResponse]{ More: func(page KustoOperationsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolattacheddatabaseconfigurations_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolattacheddatabaseconfigurations_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go index ac4cc6e08f32..6423125fc7bf 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolattacheddatabaseconfigurations_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type KustoPoolAttachedDatabaseConfigurationsClient struct { } // NewKustoPoolAttachedDatabaseConfigurationsClient creates a new instance of KustoPoolAttachedDatabaseConfigurationsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKustoPoolAttachedDatabaseConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolAttachedDatabaseConfigurationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewKustoPoolAttachedDatabaseConfigurationsClient(subscriptionID string, cre // BeginCreateOrUpdate - Creates or updates an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// attachedDatabaseConfigurationName - The name of the attached database configuration. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// parameters - The database parameters supplied to the CreateOrUpdate operation. -// options - KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for -// the KustoPoolAttachedDatabaseConfigurationsClient.BeginCreateOrUpdate method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - attachedDatabaseConfigurationName - The name of the attached database configuration. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - parameters - The database parameters supplied to the CreateOrUpdate operation. +// - options - KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for +// the KustoPoolAttachedDatabaseConfigurationsClient.BeginCreateOrUpdate method. func (client *KustoPoolAttachedDatabaseConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, attachedDatabaseConfigurationName string, resourceGroupName string, parameters AttachedDatabaseConfiguration, options *KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters, options) @@ -78,6 +80,7 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) BeginCreateOrUpdate // CreateOrUpdate - Creates or updates an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolAttachedDatabaseConfigurationsClient) createOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, attachedDatabaseConfigurationName string, resourceGroupName string, parameters AttachedDatabaseConfiguration, options *KustoPoolAttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, parameters, options) @@ -130,13 +133,14 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) createOrUpdateCreat // BeginDelete - Deletes the attached database configuration with the given name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// attachedDatabaseConfigurationName - The name of the attached database configuration. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.BeginDelete -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - attachedDatabaseConfigurationName - The name of the attached database configuration. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.BeginDelete +// method. func (client *KustoPoolAttachedDatabaseConfigurationsClient) BeginDelete(ctx context.Context, workspaceName string, kustoPoolName string, attachedDatabaseConfigurationName string, resourceGroupName string, options *KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions) (*runtime.Poller[KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, options) @@ -151,6 +155,7 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) BeginDelete(ctx con // Delete - Deletes the attached database configuration with the given name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolAttachedDatabaseConfigurationsClient) deleteOperation(ctx context.Context, workspaceName string, kustoPoolName string, attachedDatabaseConfigurationName string, resourceGroupName string, options *KustoPoolAttachedDatabaseConfigurationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, options) @@ -203,13 +208,14 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) deleteCreateRequest // Get - Returns an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// attachedDatabaseConfigurationName - The name of the attached database configuration. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolAttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.Get -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - attachedDatabaseConfigurationName - The name of the attached database configuration. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolAttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.Get +// method. func (client *KustoPoolAttachedDatabaseConfigurationsClient) Get(ctx context.Context, workspaceName string, kustoPoolName string, attachedDatabaseConfigurationName string, resourceGroupName string, options *KustoPoolAttachedDatabaseConfigurationsClientGetOptions) (KustoPoolAttachedDatabaseConfigurationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, workspaceName, kustoPoolName, attachedDatabaseConfigurationName, resourceGroupName, options) if err != nil { @@ -269,13 +275,13 @@ func (client *KustoPoolAttachedDatabaseConfigurationsClient) getHandleResponse(r } // NewListByKustoPoolPager - Returns the list of attached database configurations of the given Kusto Pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions contains the optional parameters for the -// KustoPoolAttachedDatabaseConfigurationsClient.ListByKustoPool method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions contains the optional parameters for the +// KustoPoolAttachedDatabaseConfigurationsClient.NewListByKustoPoolPager method. func (client *KustoPoolAttachedDatabaseConfigurationsClient) NewListByKustoPoolPager(workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions) *runtime.Pager[KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse]{ More: func(page KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolchildresource_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolchildresource_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go index e9cebb70db40..19ba511da99d 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolchildresource_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type KustoPoolChildResourceClient struct { } // NewKustoPoolChildResourceClient creates a new instance of KustoPoolChildResourceClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKustoPoolChildResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolChildResourceClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewKustoPoolChildResourceClient(subscriptionID string, credential azcore.To // CheckNameAvailability - Checks that the Kusto Pool child resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// resourceName - The name of the Kusto Pool child resource. -// options - KustoPoolChildResourceClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolChildResourceClient.CheckNameAvailability -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the Kusto Pool child resource. +// - options - KustoPoolChildResourceClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolChildResourceClient.CheckNameAvailability +// method. func (client *KustoPoolChildResourceClient) CheckNameAvailability(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, resourceName DatabaseCheckNameRequest, options *KustoPoolChildResourceClientCheckNameAvailabilityOptions) (KustoPoolChildResourceClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, resourceName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabaseprincipalassignments_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabaseprincipalassignments_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go index 4a48ad9b64e8..64822f61ec79 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabaseprincipalassignments_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type KustoPoolDatabasePrincipalAssignmentsClient struct { } // NewKustoPoolDatabasePrincipalAssignmentsClient creates a new instance of KustoPoolDatabasePrincipalAssignmentsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKustoPoolDatabasePrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolDatabasePrincipalAssignmentsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewKustoPoolDatabasePrincipalAssignmentsClient(subscriptionID string, crede // CheckNameAvailability - Checks that the database principal assignment is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// principalAssignmentName - The name of the resource. -// options - KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for -// the KustoPoolDatabasePrincipalAssignmentsClient.CheckNameAvailability method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - principalAssignmentName - The name of the resource. +// - options - KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for +// the KustoPoolDatabasePrincipalAssignmentsClient.CheckNameAvailability method. func (client *KustoPoolDatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, resourceGroupName string, principalAssignmentName DatabasePrincipalAssignmentCheckNameRequest, options *KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions) (KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, workspaceName, kustoPoolName, databaseName, resourceGroupName, principalAssignmentName, options) if err != nil { @@ -124,15 +126,16 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) checkNameAvailability // BeginCreateOrUpdate - Creates a Kusto pool database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// principalAssignmentName - The name of the Kusto principalAssignment. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// parameters - The Kusto principalAssignments parameters supplied for the operation. -// options - KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the -// KustoPoolDatabasePrincipalAssignmentsClient.BeginCreateOrUpdate method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - principalAssignmentName - The name of the Kusto principalAssignment. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - parameters - The Kusto principalAssignments parameters supplied for the operation. +// - options - KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the +// KustoPoolDatabasePrincipalAssignmentsClient.BeginCreateOrUpdate method. func (client *KustoPoolDatabasePrincipalAssignmentsClient) BeginCreateOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, principalAssignmentName string, resourceGroupName string, parameters DatabasePrincipalAssignment, options *KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, parameters, options) @@ -147,6 +150,7 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) BeginCreateOrUpdate(c // CreateOrUpdate - Creates a Kusto pool database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasePrincipalAssignmentsClient) createOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, principalAssignmentName string, resourceGroupName string, parameters DatabasePrincipalAssignment, options *KustoPoolDatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, parameters, options) @@ -203,14 +207,15 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) createOrUpdateCreateR // BeginDelete - Deletes a Kusto pool principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// principalAssignmentName - The name of the Kusto principalAssignment. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.BeginDelete -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - principalAssignmentName - The name of the Kusto principalAssignment. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.BeginDelete +// method. func (client *KustoPoolDatabasePrincipalAssignmentsClient) BeginDelete(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions) (*runtime.Poller[KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, options) @@ -225,6 +230,7 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) BeginDelete(ctx conte // Delete - Deletes a Kusto pool principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasePrincipalAssignmentsClient) deleteOperation(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolDatabasePrincipalAssignmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, options) @@ -281,14 +287,15 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) deleteCreateRequest(c // Get - Gets a Kusto pool database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// principalAssignmentName - The name of the Kusto principalAssignment. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolDatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.Get -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - principalAssignmentName - The name of the Kusto principalAssignment. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolDatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.Get +// method. func (client *KustoPoolDatabasePrincipalAssignmentsClient) Get(ctx context.Context, workspaceName string, kustoPoolName string, databaseName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolDatabasePrincipalAssignmentsClientGetOptions) (KustoPoolDatabasePrincipalAssignmentsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, workspaceName, kustoPoolName, databaseName, principalAssignmentName, resourceGroupName, options) if err != nil { @@ -352,14 +359,14 @@ func (client *KustoPoolDatabasePrincipalAssignmentsClient) getHandleResponse(res } // NewListPager - Lists all Kusto pool database principalAssignments. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolDatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.List -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolDatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.NewListPager +// method. func (client *KustoPoolDatabasePrincipalAssignmentsClient) NewListPager(workspaceName string, kustoPoolName string, databaseName string, resourceGroupName string, options *KustoPoolDatabasePrincipalAssignmentsClientListOptions) *runtime.Pager[KustoPoolDatabasePrincipalAssignmentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolDatabasePrincipalAssignmentsClientListResponse]{ More: func(page KustoPoolDatabasePrincipalAssignmentsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabases_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabases_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go index 40bd72299096..3fa6b8dcffc7 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabases_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type KustoPoolDatabasesClient struct { } // NewKustoPoolDatabasesClient creates a new instance of KustoPoolDatabasesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKustoPoolDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolDatabasesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewKustoPoolDatabasesClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Creates or updates a database. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// parameters - The database parameters supplied to the CreateOrUpdate operation. -// options - KustoPoolDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - parameters - The database parameters supplied to the CreateOrUpdate operation. +// - options - KustoPoolDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginCreateOrUpdate +// method. func (client *KustoPoolDatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DatabaseClassification, options *KustoPoolDatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[KustoPoolDatabasesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, options) @@ -78,6 +80,7 @@ func (client *KustoPoolDatabasesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates a database. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DatabaseClassification, options *KustoPoolDatabasesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, options) @@ -130,13 +133,14 @@ func (client *KustoPoolDatabasesClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Deletes the database with the given name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// options - KustoPoolDatabasesClientBeginDeleteOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - options - KustoPoolDatabasesClientBeginDeleteOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginDelete +// method. func (client *KustoPoolDatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, options *KustoPoolDatabasesClientBeginDeleteOptions) (*runtime.Poller[KustoPoolDatabasesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, options) @@ -151,6 +155,7 @@ func (client *KustoPoolDatabasesClient) BeginDelete(ctx context.Context, resourc // Delete - Deletes the database with the given name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, options *KustoPoolDatabasesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, options) @@ -203,12 +208,13 @@ func (client *KustoPoolDatabasesClient) deleteCreateRequest(ctx context.Context, // Get - Returns a database. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// options - KustoPoolDatabasesClientGetOptions contains the optional parameters for the KustoPoolDatabasesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - options - KustoPoolDatabasesClientGetOptions contains the optional parameters for the KustoPoolDatabasesClient.Get method. func (client *KustoPoolDatabasesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, options *KustoPoolDatabasesClientGetOptions) (KustoPoolDatabasesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, options) if err != nil { @@ -268,13 +274,13 @@ func (client *KustoPoolDatabasesClient) getHandleResponse(resp *http.Response) ( } // NewListByKustoPoolPager - Returns the list of databases of the given Kusto pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// options - KustoPoolDatabasesClientListByKustoPoolOptions contains the optional parameters for the KustoPoolDatabasesClient.ListByKustoPool -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - options - KustoPoolDatabasesClientListByKustoPoolOptions contains the optional parameters for the KustoPoolDatabasesClient.NewListByKustoPoolPager +// method. func (client *KustoPoolDatabasesClient) NewListByKustoPoolPager(resourceGroupName string, workspaceName string, kustoPoolName string, options *KustoPoolDatabasesClientListByKustoPoolOptions) *runtime.Pager[KustoPoolDatabasesClientListByKustoPoolResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolDatabasesClientListByKustoPoolResponse]{ More: func(page KustoPoolDatabasesClientListByKustoPoolResponse) bool { @@ -338,14 +344,15 @@ func (client *KustoPoolDatabasesClient) listByKustoPoolHandleResponse(resp *http // BeginUpdate - Updates a database. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// parameters - The database parameters supplied to the Update operation. -// options - KustoPoolDatabasesClientBeginUpdateOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - parameters - The database parameters supplied to the Update operation. +// - options - KustoPoolDatabasesClientBeginUpdateOptions contains the optional parameters for the KustoPoolDatabasesClient.BeginUpdate +// method. func (client *KustoPoolDatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DatabaseClassification, options *KustoPoolDatabasesClientBeginUpdateOptions) (*runtime.Poller[KustoPoolDatabasesClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, options) @@ -360,6 +367,7 @@ func (client *KustoPoolDatabasesClient) BeginUpdate(ctx context.Context, resourc // Update - Updates a database. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDatabasesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DatabaseClassification, options *KustoPoolDatabasesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, options) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldataconnections_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldataconnections_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client.go index 3a6942e81e86..e323c6c435d0 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldataconnections_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type KustoPoolDataConnectionsClient struct { } // NewKustoPoolDataConnectionsClient creates a new instance of KustoPoolDataConnectionsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKustoPoolDataConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolDataConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewKustoPoolDataConnectionsClient(subscriptionID string, credential azcore. // CheckNameAvailability - Checks that the data connection name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// dataConnectionName - The name of the data connection. -// options - KustoPoolDataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolDataConnectionsClient.CheckNameAvailability -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - dataConnectionName - The name of the data connection. +// - options - KustoPoolDataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolDataConnectionsClient.CheckNameAvailability +// method. func (client *KustoPoolDataConnectionsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName DataConnectionCheckNameRequest, options *KustoPoolDataConnectionsClientCheckNameAvailabilityOptions) (KustoPoolDataConnectionsClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, options) if err != nil { @@ -124,15 +126,16 @@ func (client *KustoPoolDataConnectionsClient) checkNameAvailabilityHandleRespons // BeginCreateOrUpdate - Creates or updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// dataConnectionName - The name of the data connection. -// parameters - The data connection parameters supplied to the CreateOrUpdate operation. -// options - KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - dataConnectionName - The name of the data connection. +// - parameters - The data connection parameters supplied to the CreateOrUpdate operation. +// - options - KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginCreateOrUpdate +// method. func (client *KustoPoolDataConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[KustoPoolDataConnectionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, options) @@ -147,6 +150,7 @@ func (client *KustoPoolDataConnectionsClient) BeginCreateOrUpdate(ctx context.Co // CreateOrUpdate - Creates or updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDataConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *KustoPoolDataConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, options) @@ -203,14 +207,15 @@ func (client *KustoPoolDataConnectionsClient) createOrUpdateCreateRequest(ctx co // BeginDataConnectionValidation - Checks that the data connection parameters are valid. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// parameters - The data connection parameters supplied to the CreateOrUpdate operation. -// options - KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginDataConnectionValidation -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - parameters - The data connection parameters supplied to the CreateOrUpdate operation. +// - options - KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginDataConnectionValidation +// method. func (client *KustoPoolDataConnectionsClient) BeginDataConnectionValidation(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DataConnectionValidation, options *KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions) (*runtime.Poller[KustoPoolDataConnectionsClientDataConnectionValidationResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.dataConnectionValidation(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, options) @@ -227,6 +232,7 @@ func (client *KustoPoolDataConnectionsClient) BeginDataConnectionValidation(ctx // DataConnectionValidation - Checks that the data connection parameters are valid. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDataConnectionsClient) dataConnectionValidation(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, parameters DataConnectionValidation, options *KustoPoolDataConnectionsClientBeginDataConnectionValidationOptions) (*http.Response, error) { req, err := client.dataConnectionValidationCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, parameters, options) @@ -279,14 +285,15 @@ func (client *KustoPoolDataConnectionsClient) dataConnectionValidationCreateRequ // BeginDelete - Deletes the data connection with the given name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// dataConnectionName - The name of the data connection. -// options - KustoPoolDataConnectionsClientBeginDeleteOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - dataConnectionName - The name of the data connection. +// - options - KustoPoolDataConnectionsClientBeginDeleteOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginDelete +// method. func (client *KustoPoolDataConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, options *KustoPoolDataConnectionsClientBeginDeleteOptions) (*runtime.Poller[KustoPoolDataConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, options) @@ -301,6 +308,7 @@ func (client *KustoPoolDataConnectionsClient) BeginDelete(ctx context.Context, r // Delete - Deletes the data connection with the given name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDataConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, options *KustoPoolDataConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, options) @@ -357,14 +365,15 @@ func (client *KustoPoolDataConnectionsClient) deleteCreateRequest(ctx context.Co // Get - Returns a data connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// dataConnectionName - The name of the data connection. -// options - KustoPoolDataConnectionsClientGetOptions contains the optional parameters for the KustoPoolDataConnectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - dataConnectionName - The name of the data connection. +// - options - KustoPoolDataConnectionsClientGetOptions contains the optional parameters for the KustoPoolDataConnectionsClient.Get +// method. func (client *KustoPoolDataConnectionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, options *KustoPoolDataConnectionsClientGetOptions) (KustoPoolDataConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, options) if err != nil { @@ -428,14 +437,14 @@ func (client *KustoPoolDataConnectionsClient) getHandleResponse(resp *http.Respo } // NewListByDatabasePager - Returns the list of data connections of the given Kusto pool database. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// options - KustoPoolDataConnectionsClientListByDatabaseOptions contains the optional parameters for the KustoPoolDataConnectionsClient.ListByDatabase -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - options - KustoPoolDataConnectionsClientListByDatabaseOptions contains the optional parameters for the KustoPoolDataConnectionsClient.NewListByDatabasePager +// method. func (client *KustoPoolDataConnectionsClient) NewListByDatabasePager(resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, options *KustoPoolDataConnectionsClientListByDatabaseOptions) *runtime.Pager[KustoPoolDataConnectionsClientListByDatabaseResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolDataConnectionsClientListByDatabaseResponse]{ More: func(page KustoPoolDataConnectionsClientListByDatabaseResponse) bool { @@ -503,15 +512,16 @@ func (client *KustoPoolDataConnectionsClient) listByDatabaseHandleResponse(resp // BeginUpdate - Updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// databaseName - The name of the database in the Kusto pool. -// dataConnectionName - The name of the data connection. -// parameters - The data connection parameters supplied to the Update operation. -// options - KustoPoolDataConnectionsClientBeginUpdateOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - databaseName - The name of the database in the Kusto pool. +// - dataConnectionName - The name of the data connection. +// - parameters - The data connection parameters supplied to the Update operation. +// - options - KustoPoolDataConnectionsClientBeginUpdateOptions contains the optional parameters for the KustoPoolDataConnectionsClient.BeginUpdate +// method. func (client *KustoPoolDataConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *KustoPoolDataConnectionsClientBeginUpdateOptions) (*runtime.Poller[KustoPoolDataConnectionsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, options) @@ -526,6 +536,7 @@ func (client *KustoPoolDataConnectionsClient) BeginUpdate(ctx context.Context, r // Update - Updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolDataConnectionsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *KustoPoolDataConnectionsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, databaseName, dataConnectionName, parameters, options) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolprincipalassignments_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolprincipalassignments_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client.go index 09ded771b7e4..462d6079a10e 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolprincipalassignments_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type KustoPoolPrincipalAssignmentsClient struct { } // NewKustoPoolPrincipalAssignmentsClient creates a new instance of KustoPoolPrincipalAssignmentsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKustoPoolPrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolPrincipalAssignmentsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewKustoPoolPrincipalAssignmentsClient(subscriptionID string, credential az // CheckNameAvailability - Checks that the principal assignment name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// principalAssignmentName - The name of the principal assignment. -// options - KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.CheckNameAvailability -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - principalAssignmentName - The name of the principal assignment. +// - options - KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.CheckNameAvailability +// method. func (client *KustoPoolPrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, principalAssignmentName ClusterPrincipalAssignmentCheckNameRequest, options *KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityOptions) (KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, principalAssignmentName, options) if err != nil { @@ -119,14 +121,15 @@ func (client *KustoPoolPrincipalAssignmentsClient) checkNameAvailabilityHandleRe // BeginCreateOrUpdate - Create a Kusto pool principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// principalAssignmentName - The name of the Kusto principalAssignment. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// parameters - The Kusto pool principalAssignment's parameters supplied for the operation. -// options - KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.BeginCreateOrUpdate -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - principalAssignmentName - The name of the Kusto principalAssignment. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - parameters - The Kusto pool principalAssignment's parameters supplied for the operation. +// - options - KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.BeginCreateOrUpdate +// method. func (client *KustoPoolPrincipalAssignmentsClient) BeginCreateOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, principalAssignmentName string, resourceGroupName string, parameters ClusterPrincipalAssignment, options *KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters, options) @@ -141,6 +144,7 @@ func (client *KustoPoolPrincipalAssignmentsClient) BeginCreateOrUpdate(ctx conte // CreateOrUpdate - Create a Kusto pool principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolPrincipalAssignmentsClient) createOrUpdate(ctx context.Context, workspaceName string, kustoPoolName string, principalAssignmentName string, resourceGroupName string, parameters ClusterPrincipalAssignment, options *KustoPoolPrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, parameters, options) @@ -193,13 +197,14 @@ func (client *KustoPoolPrincipalAssignmentsClient) createOrUpdateCreateRequest(c // BeginDelete - Deletes a Kusto pool principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// principalAssignmentName - The name of the Kusto principalAssignment. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.BeginDelete -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - principalAssignmentName - The name of the Kusto principalAssignment. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.BeginDelete +// method. func (client *KustoPoolPrincipalAssignmentsClient) BeginDelete(ctx context.Context, workspaceName string, kustoPoolName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolPrincipalAssignmentsClientBeginDeleteOptions) (*runtime.Poller[KustoPoolPrincipalAssignmentsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, options) @@ -214,6 +219,7 @@ func (client *KustoPoolPrincipalAssignmentsClient) BeginDelete(ctx context.Conte // Delete - Deletes a Kusto pool principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolPrincipalAssignmentsClient) deleteOperation(ctx context.Context, workspaceName string, kustoPoolName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolPrincipalAssignmentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, options) @@ -266,13 +272,14 @@ func (client *KustoPoolPrincipalAssignmentsClient) deleteCreateRequest(ctx conte // Get - Gets a Kusto pool principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// principalAssignmentName - The name of the Kusto principalAssignment. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolPrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.Get -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - principalAssignmentName - The name of the Kusto principalAssignment. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolPrincipalAssignmentsClientGetOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.Get +// method. func (client *KustoPoolPrincipalAssignmentsClient) Get(ctx context.Context, workspaceName string, kustoPoolName string, principalAssignmentName string, resourceGroupName string, options *KustoPoolPrincipalAssignmentsClientGetOptions) (KustoPoolPrincipalAssignmentsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, workspaceName, kustoPoolName, principalAssignmentName, resourceGroupName, options) if err != nil { @@ -332,13 +339,13 @@ func (client *KustoPoolPrincipalAssignmentsClient) getHandleResponse(resp *http. } // NewListPager - Lists all Kusto pool principalAssignments. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolPrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.List -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolPrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.NewListPager +// method. func (client *KustoPoolPrincipalAssignmentsClient) NewListPager(workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolPrincipalAssignmentsClientListOptions) *runtime.Pager[KustoPoolPrincipalAssignmentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolPrincipalAssignmentsClientListResponse]{ More: func(page KustoPoolPrincipalAssignmentsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go new file mode 100644 index 000000000000..d80086f0d7ee --- /dev/null +++ b/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go @@ -0,0 +1,125 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armsynapse + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// KustoPoolPrivateLinkResourcesClient contains the methods for the KustoPoolPrivateLinkResources group. +// Don't use this type directly, use NewKustoPoolPrivateLinkResourcesClient() instead. +type KustoPoolPrivateLinkResourcesClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewKustoPoolPrivateLinkResourcesClient creates a new instance of KustoPoolPrivateLinkResourcesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewKustoPoolPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolPrivateLinkResourcesClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &KustoPoolPrivateLinkResourcesClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// NewListPager - Lists all Kusto pool PrivateLinkResources. +// +// Generated from API version 2021-06-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - options - KustoPoolPrivateLinkResourcesClientListOptions contains the optional parameters for the KustoPoolPrivateLinkResourcesClient.NewListPager +// method. +func (client *KustoPoolPrivateLinkResourcesClient) NewListPager(resourceGroupName string, workspaceName string, kustoPoolName string, options *KustoPoolPrivateLinkResourcesClientListOptions) *runtime.Pager[KustoPoolPrivateLinkResourcesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[KustoPoolPrivateLinkResourcesClientListResponse]{ + More: func(page KustoPoolPrivateLinkResourcesClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *KustoPoolPrivateLinkResourcesClientListResponse) (KustoPoolPrivateLinkResourcesClientListResponse, error) { + req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, kustoPoolName, options) + if err != nil { + return KustoPoolPrivateLinkResourcesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return KustoPoolPrivateLinkResourcesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return KustoPoolPrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *KustoPoolPrivateLinkResourcesClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, kustoPoolName string, options *KustoPoolPrivateLinkResourcesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/privateLinkResources" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if kustoPoolName == "" { + return nil, errors.New("parameter kustoPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{kustoPoolName}", url.PathEscape(kustoPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2021-06-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *KustoPoolPrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (KustoPoolPrivateLinkResourcesClientListResponse, error) { + result := KustoPoolPrivateLinkResourcesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResources); err != nil { + return KustoPoolPrivateLinkResourcesClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopools_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopools_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopools_client.go index 38ed14456f93..e0c1c6892424 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopools_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/kustopools_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type KustoPoolsClient struct { } // NewKustoPoolsClient creates a new instance of KustoPoolsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewKustoPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KustoPoolsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewKustoPoolsClient(subscriptionID string, credential azcore.TokenCredentia // BeginAddLanguageExtensions - Add a list of language extensions that can run within KQL queries. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// languageExtensionsToAdd - The language extensions to add. -// options - KustoPoolsClientBeginAddLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.BeginAddLanguageExtensions -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - languageExtensionsToAdd - The language extensions to add. +// - options - KustoPoolsClientBeginAddLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.BeginAddLanguageExtensions +// method. func (client *KustoPoolsClient) BeginAddLanguageExtensions(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, languageExtensionsToAdd LanguageExtensionsList, options *KustoPoolsClientBeginAddLanguageExtensionsOptions) (*runtime.Poller[KustoPoolsClientAddLanguageExtensionsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.addLanguageExtensions(ctx, workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, options) @@ -77,6 +79,7 @@ func (client *KustoPoolsClient) BeginAddLanguageExtensions(ctx context.Context, // AddLanguageExtensions - Add a list of language extensions that can run within KQL queries. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) addLanguageExtensions(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, languageExtensionsToAdd LanguageExtensionsList, options *KustoPoolsClientBeginAddLanguageExtensionsOptions) (*http.Response, error) { req, err := client.addLanguageExtensionsCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToAdd, options) @@ -125,11 +128,12 @@ func (client *KustoPoolsClient) addLanguageExtensionsCreateRequest(ctx context.C // CheckNameAvailability - Checks that the kusto pool name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// location - The name of Azure region. -// kustoPoolName - The name of the cluster. -// options - KustoPoolsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolsClient.CheckNameAvailability -// method. +// - location - The name of Azure region. +// - kustoPoolName - The name of the cluster. +// - options - KustoPoolsClientCheckNameAvailabilityOptions contains the optional parameters for the KustoPoolsClient.CheckNameAvailability +// method. func (client *KustoPoolsClient) CheckNameAvailability(ctx context.Context, location string, kustoPoolName KustoPoolCheckNameRequest, options *KustoPoolsClientCheckNameAvailabilityOptions) (KustoPoolsClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, location, kustoPoolName, options) if err != nil { @@ -178,13 +182,14 @@ func (client *KustoPoolsClient) checkNameAvailabilityHandleResponse(resp *http.R // BeginCreateOrUpdate - Create or update a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// kustoPoolName - The name of the Kusto pool. -// parameters - The Kusto pool parameters supplied to the CreateOrUpdate operation. -// options - KustoPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolsClient.BeginCreateOrUpdate -// method. +// - workspaceName - The name of the workspace. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - kustoPoolName - The name of the Kusto pool. +// - parameters - The Kusto pool parameters supplied to the CreateOrUpdate operation. +// - options - KustoPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the KustoPoolsClient.BeginCreateOrUpdate +// method. func (client *KustoPoolsClient) BeginCreateOrUpdate(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, parameters KustoPool, options *KustoPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[KustoPoolsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, workspaceName, resourceGroupName, kustoPoolName, parameters, options) @@ -199,6 +204,7 @@ func (client *KustoPoolsClient) BeginCreateOrUpdate(ctx context.Context, workspa // CreateOrUpdate - Create or update a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) createOrUpdate(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, parameters KustoPool, options *KustoPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, workspaceName, resourceGroupName, kustoPoolName, parameters, options) @@ -253,11 +259,12 @@ func (client *KustoPoolsClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// kustoPoolName - The name of the Kusto pool. -// options - KustoPoolsClientBeginDeleteOptions contains the optional parameters for the KustoPoolsClient.BeginDelete method. +// - workspaceName - The name of the workspace. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - kustoPoolName - The name of the Kusto pool. +// - options - KustoPoolsClientBeginDeleteOptions contains the optional parameters for the KustoPoolsClient.BeginDelete method. func (client *KustoPoolsClient) BeginDelete(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, options *KustoPoolsClientBeginDeleteOptions) (*runtime.Poller[KustoPoolsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, workspaceName, resourceGroupName, kustoPoolName, options) @@ -272,6 +279,7 @@ func (client *KustoPoolsClient) BeginDelete(ctx context.Context, workspaceName s // Delete - Deletes a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) deleteOperation(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, options *KustoPoolsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, workspaceName, resourceGroupName, kustoPoolName, options) @@ -320,13 +328,14 @@ func (client *KustoPoolsClient) deleteCreateRequest(ctx context.Context, workspa // BeginDetachFollowerDatabases - Detaches all followers of a database owned by this Kusto Pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// followerDatabaseToRemove - The follower databases properties to remove. -// options - KustoPoolsClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.BeginDetachFollowerDatabases -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - followerDatabaseToRemove - The follower databases properties to remove. +// - options - KustoPoolsClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.BeginDetachFollowerDatabases +// method. func (client *KustoPoolsClient) BeginDetachFollowerDatabases(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *KustoPoolsClientBeginDetachFollowerDatabasesOptions) (*runtime.Poller[KustoPoolsClientDetachFollowerDatabasesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.detachFollowerDatabases(ctx, workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, options) @@ -341,6 +350,7 @@ func (client *KustoPoolsClient) BeginDetachFollowerDatabases(ctx context.Context // DetachFollowerDatabases - Detaches all followers of a database owned by this Kusto Pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) detachFollowerDatabases(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *KustoPoolsClientBeginDetachFollowerDatabasesOptions) (*http.Response, error) { req, err := client.detachFollowerDatabasesCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, followerDatabaseToRemove, options) @@ -389,11 +399,12 @@ func (client *KustoPoolsClient) detachFollowerDatabasesCreateRequest(ctx context // Get - Gets a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolsClientGetOptions contains the optional parameters for the KustoPoolsClient.Get method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolsClientGetOptions contains the optional parameters for the KustoPoolsClient.Get method. func (client *KustoPoolsClient) Get(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientGetOptions) (KustoPoolsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) if err != nil { @@ -450,11 +461,12 @@ func (client *KustoPoolsClient) getHandleResponse(resp *http.Response) (KustoPoo // ListByWorkspace - List all Kusto pools // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - KustoPoolsClientListByWorkspaceOptions contains the optional parameters for the KustoPoolsClient.ListByWorkspace -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - KustoPoolsClientListByWorkspaceOptions contains the optional parameters for the KustoPoolsClient.ListByWorkspace +// method. func (client *KustoPoolsClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, options *KustoPoolsClientListByWorkspaceOptions) (KustoPoolsClientListByWorkspaceResponse, error) { req, err := client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -507,13 +519,13 @@ func (client *KustoPoolsClient) listByWorkspaceHandleResponse(resp *http.Respons // NewListFollowerDatabasesPager - Returns a list of databases that are owned by this Kusto Pool and were followed by another // Kusto Pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolsClientListFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.ListFollowerDatabases -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolsClientListFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.NewListFollowerDatabasesPager +// method. func (client *KustoPoolsClient) NewListFollowerDatabasesPager(workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientListFollowerDatabasesOptions) *runtime.Pager[KustoPoolsClientListFollowerDatabasesResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolsClientListFollowerDatabasesResponse]{ More: func(page KustoPoolsClientListFollowerDatabasesResponse) bool { @@ -576,13 +588,13 @@ func (client *KustoPoolsClient) listFollowerDatabasesHandleResponse(resp *http.R } // NewListLanguageExtensionsPager - Returns a list of language extensions that can run within KQL queries. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolsClientListLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.ListLanguageExtensions -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolsClientListLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.NewListLanguageExtensionsPager +// method. func (client *KustoPoolsClient) NewListLanguageExtensionsPager(workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientListLanguageExtensionsOptions) *runtime.Pager[KustoPoolsClientListLanguageExtensionsResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolsClientListLanguageExtensionsResponse]{ More: func(page KustoPoolsClientListLanguageExtensionsResponse) bool { @@ -645,9 +657,9 @@ func (client *KustoPoolsClient) listLanguageExtensionsHandleResponse(resp *http. } // NewListSKUsPager - Lists eligible SKUs for Kusto Pool resource. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// options - KustoPoolsClientListSKUsOptions contains the optional parameters for the KustoPoolsClient.ListSKUs method. +// - options - KustoPoolsClientListSKUsOptions contains the optional parameters for the KustoPoolsClient.NewListSKUsPager method. func (client *KustoPoolsClient) NewListSKUsPager(options *KustoPoolsClientListSKUsOptions) *runtime.Pager[KustoPoolsClientListSKUsResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolsClientListSKUsResponse]{ More: func(page KustoPoolsClientListSKUsResponse) bool { @@ -698,13 +710,13 @@ func (client *KustoPoolsClient) listSKUsHandleResponse(resp *http.Response) (Kus } // NewListSKUsByResourcePager - Returns the SKUs available for the provided resource. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolsClientListSKUsByResourceOptions contains the optional parameters for the KustoPoolsClient.ListSKUsByResource -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolsClientListSKUsByResourceOptions contains the optional parameters for the KustoPoolsClient.NewListSKUsByResourcePager +// method. func (client *KustoPoolsClient) NewListSKUsByResourcePager(workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientListSKUsByResourceOptions) *runtime.Pager[KustoPoolsClientListSKUsByResourceResponse] { return runtime.NewPager(runtime.PagingHandler[KustoPoolsClientListSKUsByResourceResponse]{ More: func(page KustoPoolsClientListSKUsByResourceResponse) bool { @@ -768,13 +780,14 @@ func (client *KustoPoolsClient) listSKUsByResourceHandleResponse(resp *http.Resp // BeginRemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// languageExtensionsToRemove - The language extensions to remove. -// options - KustoPoolsClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.BeginRemoveLanguageExtensions -// method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - languageExtensionsToRemove - The language extensions to remove. +// - options - KustoPoolsClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.BeginRemoveLanguageExtensions +// method. func (client *KustoPoolsClient) BeginRemoveLanguageExtensions(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, languageExtensionsToRemove LanguageExtensionsList, options *KustoPoolsClientBeginRemoveLanguageExtensionsOptions) (*runtime.Poller[KustoPoolsClientRemoveLanguageExtensionsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.removeLanguageExtensions(ctx, workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, options) @@ -789,6 +802,7 @@ func (client *KustoPoolsClient) BeginRemoveLanguageExtensions(ctx context.Contex // RemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) removeLanguageExtensions(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, languageExtensionsToRemove LanguageExtensionsList, options *KustoPoolsClientBeginRemoveLanguageExtensionsOptions) (*http.Response, error) { req, err := client.removeLanguageExtensionsCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, languageExtensionsToRemove, options) @@ -837,11 +851,12 @@ func (client *KustoPoolsClient) removeLanguageExtensionsCreateRequest(ctx contex // BeginStart - Starts a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolsClientBeginStartOptions contains the optional parameters for the KustoPoolsClient.BeginStart method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolsClientBeginStartOptions contains the optional parameters for the KustoPoolsClient.BeginStart method. func (client *KustoPoolsClient) BeginStart(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientBeginStartOptions) (*runtime.Poller[KustoPoolsClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, workspaceName, kustoPoolName, resourceGroupName, options) @@ -856,6 +871,7 @@ func (client *KustoPoolsClient) BeginStart(ctx context.Context, workspaceName st // Start - Starts a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) start(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) @@ -904,11 +920,12 @@ func (client *KustoPoolsClient) startCreateRequest(ctx context.Context, workspac // BeginStop - Stops a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// kustoPoolName - The name of the Kusto pool. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - KustoPoolsClientBeginStopOptions contains the optional parameters for the KustoPoolsClient.BeginStop method. +// - workspaceName - The name of the workspace. +// - kustoPoolName - The name of the Kusto pool. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - KustoPoolsClientBeginStopOptions contains the optional parameters for the KustoPoolsClient.BeginStop method. func (client *KustoPoolsClient) BeginStop(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientBeginStopOptions) (*runtime.Poller[KustoPoolsClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, workspaceName, kustoPoolName, resourceGroupName, options) @@ -923,6 +940,7 @@ func (client *KustoPoolsClient) BeginStop(ctx context.Context, workspaceName str // Stop - Stops a Kusto pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) stop(ctx context.Context, workspaceName string, kustoPoolName string, resourceGroupName string, options *KustoPoolsClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, workspaceName, kustoPoolName, resourceGroupName, options) @@ -971,12 +989,13 @@ func (client *KustoPoolsClient) stopCreateRequest(ctx context.Context, workspace // BeginUpdate - Update a Kusto Kusto Pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// workspaceName - The name of the workspace. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// kustoPoolName - The name of the Kusto pool. -// parameters - The Kusto pool parameters supplied to the Update operation. -// options - KustoPoolsClientBeginUpdateOptions contains the optional parameters for the KustoPoolsClient.BeginUpdate method. +// - workspaceName - The name of the workspace. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - kustoPoolName - The name of the Kusto pool. +// - parameters - The Kusto pool parameters supplied to the Update operation. +// - options - KustoPoolsClientBeginUpdateOptions contains the optional parameters for the KustoPoolsClient.BeginUpdate method. func (client *KustoPoolsClient) BeginUpdate(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, parameters KustoPoolUpdate, options *KustoPoolsClientBeginUpdateOptions) (*runtime.Poller[KustoPoolsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, workspaceName, resourceGroupName, kustoPoolName, parameters, options) @@ -991,6 +1010,7 @@ func (client *KustoPoolsClient) BeginUpdate(ctx context.Context, workspaceName s // Update - Update a Kusto Kusto Pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview func (client *KustoPoolsClient) update(ctx context.Context, workspaceName string, resourceGroupName string, kustoPoolName string, parameters KustoPoolUpdate, options *KustoPoolsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, workspaceName, resourceGroupName, kustoPoolName, parameters, options) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_libraries_client.go b/sdk/resourcemanager/synapse/armsynapse/libraries_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_libraries_client.go rename to sdk/resourcemanager/synapse/armsynapse/libraries_client.go index 8fe333c60239..d83f2190ec86 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_libraries_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/libraries_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type LibrariesClient struct { } // NewLibrariesClient creates a new instance of LibrariesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLibrariesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LibrariesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -55,12 +56,12 @@ func NewLibrariesClient(subscriptionID string, credential azcore.TokenCredential } // NewListByWorkspacePager - List libraries in a workspace. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - LibrariesClientListByWorkspaceOptions contains the optional parameters for the LibrariesClient.ListByWorkspace -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - LibrariesClientListByWorkspaceOptions contains the optional parameters for the LibrariesClient.NewListByWorkspacePager +// method. func (client *LibrariesClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *LibrariesClientListByWorkspaceOptions) *runtime.Pager[LibrariesClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[LibrariesClientListByWorkspaceResponse]{ More: func(page LibrariesClientListByWorkspaceResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_library_client.go b/sdk/resourcemanager/synapse/armsynapse/library_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_library_client.go rename to sdk/resourcemanager/synapse/armsynapse/library_client.go index 71502b259eaa..8d8f14796349 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_library_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/library_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type LibraryClient struct { } // NewLibraryClient creates a new instance of LibraryClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLibraryClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LibraryClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,11 +57,12 @@ func NewLibraryClient(subscriptionID string, credential azcore.TokenCredential, // Get - Get library by name in a workspace. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// libraryName - Library name -// workspaceName - The name of the workspace. -// options - LibraryClientGetOptions contains the optional parameters for the LibraryClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - libraryName - Library name +// - workspaceName - The name of the workspace. +// - options - LibraryClientGetOptions contains the optional parameters for the LibraryClient.Get method. func (client *LibraryClient) Get(ctx context.Context, resourceGroupName string, libraryName string, workspaceName string, options *LibraryClientGetOptions) (LibraryClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, libraryName, workspaceName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_models.go b/sdk/resourcemanager/synapse/armsynapse/models.go similarity index 96% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_models.go rename to sdk/resourcemanager/synapse/armsynapse/models.go index 27d2a5d6dd2a..9587eeefb169 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_models.go +++ b/sdk/resourcemanager/synapse/armsynapse/models.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -177,7 +178,7 @@ type AzureADOnlyAuthenticationsClientGetOptions struct { // placeholder for future optional parameters } -// AzureADOnlyAuthenticationsClientListOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.List +// AzureADOnlyAuthenticationsClientListOptions contains the optional parameters for the AzureADOnlyAuthenticationsClient.NewListPager // method. type AzureADOnlyAuthenticationsClientListOptions struct { // placeholder for future optional parameters @@ -281,9 +282,6 @@ type BigDataPoolResourceProperties struct { // Auto-scaling properties AutoScale *AutoScaleProperties `json:"autoScale,omitempty"` - // The cache size - CacheSize *int32 `json:"cacheSize,omitempty"` - // List of custom libraries/packages associated with the spark pool. CustomLibraries []*LibraryInfo `json:"customLibraries,omitempty"` @@ -293,6 +291,9 @@ type BigDataPoolResourceProperties struct { // Dynamic Executor Allocation DynamicExecutorAllocation *DynamicExecutorAllocation `json:"dynamicExecutorAllocation,omitempty"` + // Whether autotune is required or not. + IsAutotuneEnabled *bool `json:"isAutotuneEnabled,omitempty"` + // Whether compute isolation is required or not. IsComputeIsolationEnabled *bool `json:"isComputeIsolationEnabled,omitempty"` @@ -323,6 +324,9 @@ type BigDataPoolResourceProperties struct { // The Apache Spark version. SparkVersion *string `json:"sparkVersion,omitempty"` + // READ-ONLY; The cache size + CacheSize *int32 `json:"cacheSize,omitempty" azure:"ro"` + // READ-ONLY; The time when the Big Data pool was created. CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` @@ -350,7 +354,8 @@ type BigDataPoolsClientGetOptions struct { // placeholder for future optional parameters } -// BigDataPoolsClientListByWorkspaceOptions contains the optional parameters for the BigDataPoolsClient.ListByWorkspace method. +// BigDataPoolsClientListByWorkspaceOptions contains the optional parameters for the BigDataPoolsClient.NewListByWorkspacePager +// method. type BigDataPoolsClientListByWorkspaceOptions struct { // placeholder for future optional parameters } @@ -422,7 +427,8 @@ type ClusterPrincipalAssignmentCheckNameRequest struct { // REQUIRED; Principal Assignment resource name. Name *string `json:"name,omitempty"` - // REQUIRED; The type of resource, Microsoft.Synapse/workspaces/kustoPools/principalAssignments. + // CONSTANT; The type of resource, Microsoft.Synapse/workspaces/kustoPools/principalAssignments. + // Field has constant value "Microsoft.Synapse/workspaces/kustoPools/principalAssignments", any specified value is ignored. Type *string `json:"type,omitempty"` } @@ -447,6 +453,9 @@ type ClusterPrincipalProperties struct { // The tenant id of the principal TenantID *string `json:"tenantId,omitempty"` + // READ-ONLY; The service principal object id in AAD (Azure active directory) + AADObjectID *string `json:"aadObjectId,omitempty" azure:"ro"` + // READ-ONLY; The principal name PrincipalName *string `json:"principalName,omitempty" azure:"ro"` @@ -479,10 +488,10 @@ type CmdkeySetupTypeProperties struct { Password SecretBaseClassification `json:"password,omitempty"` // REQUIRED; The server name of data source access. - TargetName interface{} `json:"targetName,omitempty"` + TargetName any `json:"targetName,omitempty"` // REQUIRED; The user name of data source access. - UserName interface{} `json:"userName,omitempty"` + UserName any `json:"userName,omitempty"` } // ComponentSetup - The custom setup of installing 3rd party components. @@ -581,7 +590,8 @@ type DataConnectionCheckNameRequest struct { // REQUIRED; Data Connection name. Name *string `json:"name,omitempty"` - // REQUIRED; The type of resource, Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections. + // CONSTANT; The type of resource, Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections. + // Field has constant value "Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections", any specified value is ignored. Type *string `json:"type,omitempty"` } @@ -762,7 +772,7 @@ type DataMaskingRulesClientGetOptions struct { // placeholder for future optional parameters } -// DataMaskingRulesClientListBySQLPoolOptions contains the optional parameters for the DataMaskingRulesClient.ListBySQLPool +// DataMaskingRulesClientListBySQLPoolOptions contains the optional parameters for the DataMaskingRulesClient.NewListBySQLPoolPager // method. type DataMaskingRulesClientListBySQLPoolOptions struct { // placeholder for future optional parameters @@ -861,7 +871,9 @@ type DatabasePrincipalAssignmentCheckNameRequest struct { // REQUIRED; Principal Assignment resource name. Name *string `json:"name,omitempty"` - // REQUIRED; The type of resource, Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments. + // CONSTANT; The type of resource, Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments. + // Field has constant value "Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments", any specified value + // is ignored. Type *string `json:"type,omitempty"` } @@ -886,6 +898,9 @@ type DatabasePrincipalProperties struct { // The tenant id of the principal TenantID *string `json:"tenantId,omitempty"` + // READ-ONLY; The service principal object id in AAD (Azure active directory) + AADObjectID *string `json:"aadObjectId,omitempty" azure:"ro"` + // READ-ONLY; The principal name PrincipalName *string `json:"principalName,omitempty" azure:"ro"` @@ -1047,7 +1062,7 @@ type EnvironmentVariableSetupTypeProperties struct { // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty" azure:"ro"` + Info any `json:"info,omitempty" azure:"ro"` // READ-ONLY; The additional info type. Type *string `json:"type,omitempty" azure:"ro"` @@ -1078,6 +1093,25 @@ type ErrorResponse struct { Error *ErrorDetail `json:"error,omitempty"` } +// ErrorResponseAutoGenerated - Common error response for all Azure Resource Manager APIs to return error details for failed +// operations. (This also follows the OData error response format.) +type ErrorResponseAutoGenerated struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` + + // READ-ONLY; The error code. + Code *string `json:"code,omitempty" azure:"ro"` + + // READ-ONLY; The error details. + Details []*ErrorResponseAutoGenerated `json:"details,omitempty" azure:"ro"` + + // READ-ONLY; The error message. + Message *string `json:"message,omitempty" azure:"ro"` + + // READ-ONLY; The error target. + Target *string `json:"target,omitempty" azure:"ro"` +} + // EventGridConnectionProperties - Class representing the Kusto event grid connection properties. type EventGridConnectionProperties struct { // REQUIRED; The event hub consumer group. @@ -1222,7 +1256,7 @@ type ExtendedSQLPoolBlobAuditingPoliciesClientGetOptions struct { // placeholder for future optional parameters } -// ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.ListBySQLPool +// ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the ExtendedSQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager // method. type ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions struct { // placeholder for future optional parameters @@ -1491,6 +1525,22 @@ type GeoBackupPolicyProperties struct { StorageType *string `json:"storageType,omitempty" azure:"ro"` } +// GetClientIntegrationRuntimeEnableInteractivequeryOptions contains the optional parameters for the GetClient.IntegrationRuntimeEnableInteractivequery +// method. +type GetClientIntegrationRuntimeEnableInteractivequeryOptions struct { + // placeholder for future optional parameters +} + +// GetClientIntegrationRuntimeStartOptions contains the optional parameters for the GetClient.IntegrationRuntimeStart method. +type GetClientIntegrationRuntimeStartOptions struct { + // placeholder for future optional parameters +} + +// GetClientIntegrationRuntimeStopOptions contains the optional parameters for the GetClient.IntegrationRuntimeStop method. +type GetClientIntegrationRuntimeStopOptions struct { + // placeholder for future optional parameters +} + // GetSsisObjectMetadataRequest - The request payload of get SSIS object metadata. type GetSsisObjectMetadataRequest struct { // Metadata path. @@ -1558,7 +1608,7 @@ type IPFirewallRulesClientGetOptions struct { // placeholder for future optional parameters } -// IPFirewallRulesClientListByWorkspaceOptions contains the optional parameters for the IPFirewallRulesClient.ListByWorkspace +// IPFirewallRulesClientListByWorkspaceOptions contains the optional parameters for the IPFirewallRulesClient.NewListByWorkspacePager // method. type IPFirewallRulesClientListByWorkspaceOptions struct { // placeholder for future optional parameters @@ -1579,7 +1629,7 @@ type IntegrationRuntime struct { Type *IntegrationRuntimeType `json:"type,omitempty"` // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // Integration runtime description. Description *string `json:"description,omitempty"` @@ -1612,7 +1662,7 @@ type IntegrationRuntimeAuthKeysClientRegenerateOptions struct { // IntegrationRuntimeComputeProperties - The compute resource properties for managed integration runtime. type IntegrationRuntimeComputeProperties struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // Data flow properties for managed integration runtime. DataFlowProperties *IntegrationRuntimeDataFlowProperties `json:"dataFlowProperties,omitempty"` @@ -1636,7 +1686,7 @@ type IntegrationRuntimeComputeProperties struct { // IntegrationRuntimeConnectionInfo - Connection information for encrypting the on-premises data source credentials. type IntegrationRuntimeConnectionInfo struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // READ-ONLY; The on-premises integration runtime host URL. HostServiceURI *string `json:"hostServiceUri,omitempty" azure:"ro"` @@ -1681,7 +1731,7 @@ type IntegrationRuntimeCustomSetupScriptProperties struct { // IntegrationRuntimeDataFlowProperties - Data flow properties for managed integration runtime. type IntegrationRuntimeDataFlowProperties struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // Cluster will not be recycled and it will be used in next data flow activity run until TTL (time to live) is reached if // this is set as false. Default is true. @@ -1709,6 +1759,21 @@ type IntegrationRuntimeDataProxyProperties struct { StagingLinkedService *EntityReference `json:"stagingLinkedService,omitempty"` } +// IntegrationRuntimeEnableinteractivequery - Integration Runtime Operation Status Properties +type IntegrationRuntimeEnableinteractivequery struct { + // The operation error message. + Error *string `json:"error,omitempty"` + + // The operation name. + Name *string `json:"name,omitempty"` + + // The operation properties. + Properties any `json:"properties,omitempty"` + + // EnableInteractivequery status of Integrationruntimes. + Status *WorkspaceStatus `json:"status,omitempty"` +} + // IntegrationRuntimeListResponse - A list of integration runtime resources. type IntegrationRuntimeListResponse struct { // REQUIRED; List of integration runtimes. @@ -1748,7 +1813,7 @@ type IntegrationRuntimeNodeIPAddressClientGetOptions struct { // IntegrationRuntimeNodeMonitoringData - Monitoring data for integration runtime node. type IntegrationRuntimeNodeMonitoringData struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // READ-ONLY; Available memory (MB) on the integration runtime node. AvailableMemoryInMB *int32 `json:"availableMemoryInMB,omitempty" azure:"ro"` @@ -1806,6 +1871,21 @@ type IntegrationRuntimeObjectMetadataClientListOptions struct { GetMetadataRequest *GetSsisObjectMetadataRequest } +// IntegrationRuntimeOperationStatus - Integration Runtime Operation Status Properties +type IntegrationRuntimeOperationStatus struct { + // The operation error message. + Error *string `json:"error,omitempty"` + + // The operation name. + Name *string `json:"name,omitempty"` + + // The operation properties. + Properties any `json:"properties,omitempty"` + + // status of Start Integrationruntimes. + Status *WorkspaceStatus `json:"status,omitempty"` +} + // IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint - Azure-SSIS integration runtime outbound network dependency // endpoints for one category. type IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint struct { @@ -1867,7 +1947,7 @@ type IntegrationRuntimeResource struct { // IntegrationRuntimeSsisCatalogInfo - Catalog information for managed dedicated integration runtime. type IntegrationRuntimeSsisCatalogInfo struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // The password of the administrator user account of the catalog database. CatalogAdminPassword *SecureString `json:"catalogAdminPassword,omitempty"` @@ -1885,7 +1965,7 @@ type IntegrationRuntimeSsisCatalogInfo struct { // IntegrationRuntimeSsisProperties - SSIS properties for managed integration runtime. type IntegrationRuntimeSsisProperties struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // Catalog information for managed dedicated integration runtime. CatalogInfo *IntegrationRuntimeSsisCatalogInfo `json:"catalogInfo,omitempty"` @@ -1921,7 +2001,7 @@ type IntegrationRuntimeStatus struct { Type *IntegrationRuntimeType `json:"type,omitempty"` // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // READ-ONLY; The workspace name which the integration runtime belong to. DataFactoryName *string `json:"dataFactoryName,omitempty" azure:"ro"` @@ -1947,10 +2027,25 @@ type IntegrationRuntimeStatusResponse struct { Name *string `json:"name,omitempty" azure:"ro"` } +// IntegrationRuntimeStopOperationStatus - Integration Runtime Operation Status Properties +type IntegrationRuntimeStopOperationStatus struct { + // The operation error message. + Error *string `json:"error,omitempty"` + + // The operation name. + Name *string `json:"name,omitempty"` + + // The operation properties. + Properties any `json:"properties,omitempty"` + + // status of Start Integrationruntimes. + Status *WorkspaceStatus `json:"status,omitempty"` +} + // IntegrationRuntimeVNetProperties - VNet properties for managed integration runtime. type IntegrationRuntimeVNetProperties struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // Resource IDs of the public IP addresses that this integration runtime will use. PublicIPs []*string `json:"publicIPs,omitempty"` @@ -2017,7 +2112,7 @@ type IntegrationRuntimesClientGetOptions struct { IfNoneMatch *string } -// IntegrationRuntimesClientListByWorkspaceOptions contains the optional parameters for the IntegrationRuntimesClient.ListByWorkspace +// IntegrationRuntimesClientListByWorkspaceOptions contains the optional parameters for the IntegrationRuntimesClient.NewListByWorkspacePager // method. type IntegrationRuntimesClientListByWorkspaceOptions struct { // placeholder for future optional parameters @@ -2105,7 +2200,7 @@ func (i *IotHubDataConnection) GetDataConnection() *DataConnection { // KekIdentityProperties - Key encryption key properties type KekIdentityProperties struct { // Boolean specifying whether to use system assigned identity or not - UseSystemAssignedIdentity interface{} `json:"useSystemAssignedIdentity,omitempty"` + UseSystemAssignedIdentity any `json:"useSystemAssignedIdentity,omitempty"` // User assigned identity resource Id UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` @@ -2159,12 +2254,12 @@ type KeysClientGetOptions struct { // placeholder for future optional parameters } -// KeysClientListByWorkspaceOptions contains the optional parameters for the KeysClient.ListByWorkspace method. +// KeysClientListByWorkspaceOptions contains the optional parameters for the KeysClient.NewListByWorkspacePager method. type KeysClientListByWorkspaceOptions struct { // placeholder for future optional parameters } -// KustoOperationsClientListOptions contains the optional parameters for the KustoOperationsClient.List method. +// KustoOperationsClientListOptions contains the optional parameters for the KustoOperationsClient.NewListPager method. type KustoOperationsClientListOptions struct { // placeholder for future optional parameters } @@ -2219,7 +2314,7 @@ type KustoPoolAttachedDatabaseConfigurationsClientGetOptions struct { // placeholder for future optional parameters } -// KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.ListByKustoPool +// KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions contains the optional parameters for the KustoPoolAttachedDatabaseConfigurationsClient.NewListByKustoPoolPager // method. type KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolOptions struct { // placeholder for future optional parameters @@ -2230,7 +2325,8 @@ type KustoPoolCheckNameRequest struct { // REQUIRED; Kusto Pool name. Name *string `json:"name,omitempty"` - // REQUIRED; The type of resource, Microsoft.Synapse/workspaces/kustoPools. + // CONSTANT; The type of resource, Microsoft.Synapse/workspaces/kustoPools. + // Field has constant value "Microsoft.Synapse/workspaces/kustoPools", any specified value is ignored. Type *string `json:"type,omitempty"` } @@ -2279,7 +2375,7 @@ type KustoPoolDataConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// KustoPoolDataConnectionsClientListByDatabaseOptions contains the optional parameters for the KustoPoolDataConnectionsClient.ListByDatabase +// KustoPoolDataConnectionsClientListByDatabaseOptions contains the optional parameters for the KustoPoolDataConnectionsClient.NewListByDatabasePager // method. type KustoPoolDataConnectionsClientListByDatabaseOptions struct { // placeholder for future optional parameters @@ -2311,7 +2407,7 @@ type KustoPoolDatabasePrincipalAssignmentsClientGetOptions struct { // placeholder for future optional parameters } -// KustoPoolDatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.List +// KustoPoolDatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolDatabasePrincipalAssignmentsClient.NewListPager // method. type KustoPoolDatabasePrincipalAssignmentsClientListOptions struct { // placeholder for future optional parameters @@ -2343,7 +2439,7 @@ type KustoPoolDatabasesClientGetOptions struct { // placeholder for future optional parameters } -// KustoPoolDatabasesClientListByKustoPoolOptions contains the optional parameters for the KustoPoolDatabasesClient.ListByKustoPool +// KustoPoolDatabasesClientListByKustoPoolOptions contains the optional parameters for the KustoPoolDatabasesClient.NewListByKustoPoolPager // method. type KustoPoolDatabasesClientListByKustoPoolOptions struct { // placeholder for future optional parameters @@ -2381,12 +2477,36 @@ type KustoPoolPrincipalAssignmentsClientGetOptions struct { // placeholder for future optional parameters } -// KustoPoolPrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.List +// KustoPoolPrincipalAssignmentsClientListOptions contains the optional parameters for the KustoPoolPrincipalAssignmentsClient.NewListPager // method. type KustoPoolPrincipalAssignmentsClientListOptions struct { // placeholder for future optional parameters } +// KustoPoolPrivateLinkResources - Class representing a Private Link Resources. +type KustoPoolPrivateLinkResources struct { + // The Private Link Resources. + Properties *PrivateLinkResourcesProperties `json:"properties,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// KustoPoolPrivateLinkResourcesClientListOptions contains the optional parameters for the KustoPoolPrivateLinkResourcesClient.NewListPager +// method. +type KustoPoolPrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + // KustoPoolProperties - Class representing the Kusto pool properties. type KustoPoolProperties struct { // A boolean value that indicates if the purge operations are enabled. @@ -2518,25 +2638,25 @@ type KustoPoolsClientListByWorkspaceOptions struct { // placeholder for future optional parameters } -// KustoPoolsClientListFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.ListFollowerDatabases +// KustoPoolsClientListFollowerDatabasesOptions contains the optional parameters for the KustoPoolsClient.NewListFollowerDatabasesPager // method. type KustoPoolsClientListFollowerDatabasesOptions struct { // placeholder for future optional parameters } -// KustoPoolsClientListLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.ListLanguageExtensions +// KustoPoolsClientListLanguageExtensionsOptions contains the optional parameters for the KustoPoolsClient.NewListLanguageExtensionsPager // method. type KustoPoolsClientListLanguageExtensionsOptions struct { // placeholder for future optional parameters } -// KustoPoolsClientListSKUsByResourceOptions contains the optional parameters for the KustoPoolsClient.ListSKUsByResource +// KustoPoolsClientListSKUsByResourceOptions contains the optional parameters for the KustoPoolsClient.NewListSKUsByResourcePager // method. type KustoPoolsClientListSKUsByResourceOptions struct { // placeholder for future optional parameters } -// KustoPoolsClientListSKUsOptions contains the optional parameters for the KustoPoolsClient.ListSKUs method. +// KustoPoolsClientListSKUsOptions contains the optional parameters for the KustoPoolsClient.NewListSKUsPager method. type KustoPoolsClientListSKUsOptions struct { // placeholder for future optional parameters } @@ -2553,7 +2673,8 @@ type LanguageExtensionsList struct { Value []*LanguageExtension `json:"value,omitempty"` } -// LibrariesClientListByWorkspaceOptions contains the optional parameters for the LibrariesClient.ListByWorkspace method. +// LibrariesClientListByWorkspaceOptions contains the optional parameters for the LibrariesClient.NewListByWorkspacePager +// method. type LibrariesClientListByWorkspaceOptions struct { // placeholder for future optional parameters } @@ -2830,10 +2951,10 @@ type ManagedIdentitySQLControlSettingsModelProperties struct { // ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity - Grant sql control to managed identity type ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity struct { // Desired state - DesiredState *ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState `json:"desiredState,omitempty"` + DesiredState *DesiredState `json:"desiredState,omitempty"` // READ-ONLY; Actual state - ActualState *ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState `json:"actualState,omitempty" azure:"ro"` + ActualState *ActualState `json:"actualState,omitempty" azure:"ro"` } // ManagedIntegrationRuntime - Managed integration runtime, including managed elastic and managed dedicated integration runtimes. @@ -2845,7 +2966,7 @@ type ManagedIntegrationRuntime struct { TypeProperties *ManagedIntegrationRuntimeTypeProperties `json:"typeProperties,omitempty"` // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // Integration runtime description. Description *string `json:"description,omitempty"` @@ -2869,7 +2990,7 @@ func (m *ManagedIntegrationRuntime) GetIntegrationRuntime() *IntegrationRuntime // ManagedIntegrationRuntimeError - Error definition for managed integration runtime. type ManagedIntegrationRuntimeError struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // READ-ONLY; Error code. Code *string `json:"code,omitempty" azure:"ro"` @@ -2899,7 +3020,7 @@ type ManagedIntegrationRuntimeManagedVirtualNetworkReference struct { // ManagedIntegrationRuntimeNode - Properties of integration runtime node. type ManagedIntegrationRuntimeNode struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // The errors that occurred on this integration runtime node. Errors []*ManagedIntegrationRuntimeError `json:"errors,omitempty"` @@ -2914,7 +3035,7 @@ type ManagedIntegrationRuntimeNode struct { // ManagedIntegrationRuntimeOperationResult - Properties of managed integration runtime operation result. type ManagedIntegrationRuntimeOperationResult struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // READ-ONLY; The activity id for the operation request. ActivityID *string `json:"activityId,omitempty" azure:"ro"` @@ -2944,7 +3065,7 @@ type ManagedIntegrationRuntimeStatus struct { TypeProperties *ManagedIntegrationRuntimeStatusTypeProperties `json:"typeProperties,omitempty"` // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // READ-ONLY; The workspace name which the integration runtime belong to. DataFactoryName *string `json:"dataFactoryName,omitempty" azure:"ro"` @@ -3035,7 +3156,7 @@ type Operation struct { Origin *string `json:"origin,omitempty"` // Properties of the operation. - Properties interface{} `json:"properties,omitempty"` + Properties any `json:"properties,omitempty"` } // OperationDisplay - The object that describes the operation. @@ -3156,7 +3277,7 @@ type OperationResource struct { PercentComplete *float32 `json:"percentComplete,omitempty"` // Operation properties - Properties interface{} `json:"properties,omitempty"` + Properties any `json:"properties,omitempty"` // Operation start time StartTime *time.Time `json:"startTime,omitempty"` @@ -3295,7 +3416,7 @@ type PrivateEndpointConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager // method. type PrivateEndpointConnectionsClientListOptions struct { // placeholder for future optional parameters @@ -3307,7 +3428,7 @@ type PrivateEndpointConnectionsPrivateLinkHubClientGetOptions struct { // placeholder for future optional parameters } -// PrivateEndpointConnectionsPrivateLinkHubClientListOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.List +// PrivateEndpointConnectionsPrivateLinkHubClientListOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.NewListPager // method. type PrivateEndpointConnectionsPrivateLinkHubClientListOptions struct { // placeholder for future optional parameters @@ -3355,7 +3476,7 @@ type PrivateLinkHubPrivateLinkResourcesClientGetOptions struct { // placeholder for future optional parameters } -// PrivateLinkHubPrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.List +// PrivateLinkHubPrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.NewListPager // method. type PrivateLinkHubPrivateLinkResourcesClientListOptions struct { // placeholder for future optional parameters @@ -3387,13 +3508,13 @@ type PrivateLinkHubsClientGetOptions struct { // placeholder for future optional parameters } -// PrivateLinkHubsClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkHubsClient.ListByResourceGroup +// PrivateLinkHubsClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkHubsClient.NewListByResourceGroupPager // method. type PrivateLinkHubsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// PrivateLinkHubsClientListOptions contains the optional parameters for the PrivateLinkHubsClient.List method. +// PrivateLinkHubsClientListOptions contains the optional parameters for the PrivateLinkHubsClient.NewListPager method. type PrivateLinkHubsClientListOptions struct { // placeholder for future optional parameters } @@ -3439,16 +3560,38 @@ type PrivateLinkResourceProperties struct { RequiredZoneNames []*string `json:"requiredZoneNames,omitempty" azure:"ro"` } +// PrivateLinkResources - The list Kusto Private Link Resources operation response. +type PrivateLinkResources struct { + // The list of Kusto Private Link Resources. + Value []*KustoPoolPrivateLinkResources `json:"value,omitempty"` +} + // PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. type PrivateLinkResourcesClientGetOptions struct { // placeholder for future optional parameters } -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager +// method. type PrivateLinkResourcesClientListOptions struct { // placeholder for future optional parameters } +// PrivateLinkResourcesProperties - Private Link Resources Properties. +type PrivateLinkResourcesProperties struct { + // READ-ONLY; The Private link resources GroupId + GroupID *string `json:"groupId,omitempty" azure:"ro"` + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + + // READ-ONLY; The private link resource required member names. + RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` + + // READ-ONLY; The private link resource required zone names. + RequiredZoneNames []*string `json:"requiredZoneNames,omitempty" azure:"ro"` +} + // PrivateLinkServiceConnectionState - Connection state details of the private endpoint type PrivateLinkServiceConnectionState struct { // The private link service connection description. @@ -3851,7 +3994,7 @@ type RestorableDroppedSQLPoolsClientGetOptions struct { // placeholder for future optional parameters } -// RestorableDroppedSQLPoolsClientListByWorkspaceOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.ListByWorkspace +// RestorableDroppedSQLPoolsClientListByWorkspaceOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.NewListByWorkspacePager // method. type RestorableDroppedSQLPoolsClientListByWorkspaceOptions struct { // placeholder for future optional parameters @@ -3927,7 +4070,7 @@ type SKUDescription struct { ResourceType *string `json:"resourceType,omitempty" azure:"ro"` // READ-ONLY; The restrictions because of which SKU cannot be used - Restrictions []interface{} `json:"restrictions,omitempty" azure:"ro"` + Restrictions []any `json:"restrictions,omitempty" azure:"ro"` // READ-ONLY; The size of the SKU Size *string `json:"size,omitempty" azure:"ro"` @@ -3984,7 +4127,7 @@ type SQLPoolBlobAuditingPoliciesClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.ListBySQLPool +// SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager // method. type SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions struct { // placeholder for future optional parameters @@ -4195,7 +4338,7 @@ type SQLPoolGeoBackupPoliciesClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolGeoBackupPoliciesClientListOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.List +// SQLPoolGeoBackupPoliciesClientListOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.NewListPager // method. type SQLPoolGeoBackupPoliciesClientListOptions struct { // placeholder for future optional parameters @@ -4300,13 +4443,14 @@ type SQLPoolOperationProperties struct { State *ManagementOperationState `json:"state,omitempty" azure:"ro"` } -// SQLPoolOperationResultsClientGetLocationHeaderResultOptions contains the optional parameters for the SQLPoolOperationResultsClient.GetLocationHeaderResult +// SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions contains the optional parameters for the SQLPoolOperationResultsClient.BeginGetLocationHeaderResult // method. -type SQLPoolOperationResultsClientGetLocationHeaderResultOptions struct { - // placeholder for future optional parameters +type SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// SQLPoolOperationsClientListOptions contains the optional parameters for the SQLPoolOperationsClient.List method. +// SQLPoolOperationsClientListOptions contains the optional parameters for the SQLPoolOperationsClient.NewListPager method. type SQLPoolOperationsClientListOptions struct { // placeholder for future optional parameters } @@ -4338,7 +4482,8 @@ type SQLPoolReplicationLinksClientGetByNameOptions struct { // placeholder for future optional parameters } -// SQLPoolReplicationLinksClientListOptions contains the optional parameters for the SQLPoolReplicationLinksClient.List method. +// SQLPoolReplicationLinksClientListOptions contains the optional parameters for the SQLPoolReplicationLinksClient.NewListPager +// method. type SQLPoolReplicationLinksClientListOptions struct { // placeholder for future optional parameters } @@ -4405,7 +4550,8 @@ type SQLPoolRestorePointsClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolRestorePointsClientListOptions contains the optional parameters for the SQLPoolRestorePointsClient.List method. +// SQLPoolRestorePointsClientListOptions contains the optional parameters for the SQLPoolRestorePointsClient.NewListPager +// method. type SQLPoolRestorePointsClientListOptions struct { // placeholder for future optional parameters } @@ -4436,7 +4582,7 @@ type SQLPoolSchemasClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolSchemasClientListOptions contains the optional parameters for the SQLPoolSchemasClient.List method. +// SQLPoolSchemasClientListOptions contains the optional parameters for the SQLPoolSchemasClient.NewListPager method. type SQLPoolSchemasClientListOptions struct { // An OData filter expression that filters elements in the collection. Filter *string @@ -4454,7 +4600,7 @@ type SQLPoolSecurityAlertPoliciesClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolSecurityAlertPoliciesClientListOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.List +// SQLPoolSecurityAlertPoliciesClientListOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.NewListPager // method. type SQLPoolSecurityAlertPoliciesClientListOptions struct { // placeholder for future optional parameters @@ -4504,14 +4650,14 @@ type SQLPoolSensitivityLabelsClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolSensitivityLabelsClientListCurrentOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.ListCurrent +// SQLPoolSensitivityLabelsClientListCurrentOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.NewListCurrentPager // method. type SQLPoolSensitivityLabelsClientListCurrentOptions struct { // An OData filter expression that filters elements in the collection. Filter *string } -// SQLPoolSensitivityLabelsClientListRecommendedOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.ListRecommended +// SQLPoolSensitivityLabelsClientListRecommendedOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.NewListRecommendedPager // method. type SQLPoolSensitivityLabelsClientListRecommendedOptions struct { // An OData filter expression that filters elements in the collection. @@ -4540,7 +4686,7 @@ type SQLPoolTable struct { Type *string `json:"type,omitempty" azure:"ro"` } -// SQLPoolTableColumnsClientListByTableNameOptions contains the optional parameters for the SQLPoolTableColumnsClient.ListByTableName +// SQLPoolTableColumnsClientListByTableNameOptions contains the optional parameters for the SQLPoolTableColumnsClient.NewListByTableNamePager // method. type SQLPoolTableColumnsClientListByTableNameOptions struct { // An OData filter expression that filters elements in the collection. @@ -4561,7 +4707,8 @@ type SQLPoolTablesClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolTablesClientListBySchemaOptions contains the optional parameters for the SQLPoolTablesClient.ListBySchema method. +// SQLPoolTablesClientListBySchemaOptions contains the optional parameters for the SQLPoolTablesClient.NewListBySchemaPager +// method. type SQLPoolTablesClientListBySchemaOptions struct { // An OData filter expression that filters elements in the collection. Filter *string @@ -4579,7 +4726,7 @@ type SQLPoolTransparentDataEncryptionsClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolTransparentDataEncryptionsClientListOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.List +// SQLPoolTransparentDataEncryptionsClientListOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.NewListPager // method. type SQLPoolTransparentDataEncryptionsClientListOptions struct { // placeholder for future optional parameters @@ -4618,7 +4765,7 @@ type SQLPoolUsageListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// SQLPoolUsagesClientListOptions contains the optional parameters for the SQLPoolUsagesClient.List method. +// SQLPoolUsagesClientListOptions contains the optional parameters for the SQLPoolUsagesClient.NewListPager method. type SQLPoolUsagesClientListOptions struct { // placeholder for future optional parameters } @@ -4736,7 +4883,7 @@ type SQLPoolVulnerabilityAssessmentScansClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolVulnerabilityAssessmentScansClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.List +// SQLPoolVulnerabilityAssessmentScansClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.NewListPager // method. type SQLPoolVulnerabilityAssessmentScansClientListOptions struct { // placeholder for future optional parameters @@ -4775,7 +4922,7 @@ type SQLPoolVulnerabilityAssessmentsClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolVulnerabilityAssessmentsClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.List +// SQLPoolVulnerabilityAssessmentsClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.NewListPager // method. type SQLPoolVulnerabilityAssessmentsClientListOptions struct { // placeholder for future optional parameters @@ -4801,7 +4948,7 @@ type SQLPoolWorkloadClassifierClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolWorkloadClassifierClientListOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.List +// SQLPoolWorkloadClassifierClientListOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.NewListPager // method. type SQLPoolWorkloadClassifierClientListOptions struct { // placeholder for future optional parameters @@ -4826,7 +4973,8 @@ type SQLPoolWorkloadGroupClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolWorkloadGroupClientListOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.List method. +// SQLPoolWorkloadGroupClientListOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.NewListPager +// method. type SQLPoolWorkloadGroupClientListOptions struct { // placeholder for future optional parameters } @@ -4855,12 +5003,18 @@ type SQLPoolsClientBeginResumeOptions struct { ResumeToken string } +// SQLPoolsClientBeginUpdateOptions contains the optional parameters for the SQLPoolsClient.BeginUpdate method. +type SQLPoolsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + // SQLPoolsClientGetOptions contains the optional parameters for the SQLPoolsClient.Get method. type SQLPoolsClientGetOptions struct { // placeholder for future optional parameters } -// SQLPoolsClientListByWorkspaceOptions contains the optional parameters for the SQLPoolsClient.ListByWorkspace method. +// SQLPoolsClientListByWorkspaceOptions contains the optional parameters for the SQLPoolsClient.NewListByWorkspacePager method. type SQLPoolsClientListByWorkspaceOptions struct { // placeholder for future optional parameters } @@ -4870,11 +5024,6 @@ type SQLPoolsClientRenameOptions struct { // placeholder for future optional parameters } -// SQLPoolsClientUpdateOptions contains the optional parameters for the SQLPoolsClient.Update method. -type SQLPoolsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // SecretBaseClassification provides polymorphic access to related types. // Call the interface's GetSecretBase() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -4946,7 +5095,7 @@ type SelfHostedIntegrationRuntime struct { Type *IntegrationRuntimeType `json:"type,omitempty"` // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // Integration runtime description. Description *string `json:"description,omitempty"` @@ -4968,7 +5117,7 @@ func (s *SelfHostedIntegrationRuntime) GetIntegrationRuntime() *IntegrationRunti // SelfHostedIntegrationRuntimeNode - Properties of Self-hosted integration runtime node. type SelfHostedIntegrationRuntimeNode struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // READ-ONLY; The integration runtime capabilities dictionary Capabilities map[string]*string `json:"capabilities,omitempty" azure:"ro"` @@ -5034,7 +5183,7 @@ type SelfHostedIntegrationRuntimeStatus struct { TypeProperties *SelfHostedIntegrationRuntimeStatusTypeProperties `json:"typeProperties,omitempty"` // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} + AdditionalProperties map[string]any // READ-ONLY; The workspace name which the integration runtime belong to. DataFactoryName *string `json:"dataFactoryName,omitempty" azure:"ro"` @@ -5478,6 +5627,9 @@ type SparkConfigurationInfo struct { // Annotations for SparkConfiguration. Annotations []*string `json:"annotations,omitempty"` + // SparkConfiguration merge configs. + ConfigMergeRule map[string]*string `json:"configMergeRule,omitempty"` + // The timestamp of resource creation. Created *time.Time `json:"created,omitempty"` @@ -5518,7 +5670,7 @@ type SparkConfigurationResource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// SparkConfigurationsClientListByWorkspaceOptions contains the optional parameters for the SparkConfigurationsClient.ListByWorkspace +// SparkConfigurationsClientListByWorkspaceOptions contains the optional parameters for the SparkConfigurationsClient.NewListByWorkspacePager // method. type SparkConfigurationsClientListByWorkspaceOptions struct { // placeholder for future optional parameters @@ -6223,7 +6375,7 @@ type WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions struct { // placeholder for future optional parameters } -// WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.ListByWorkspace +// WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.NewListByWorkspacePager // method. type WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions struct { // placeholder for future optional parameters @@ -6242,7 +6394,7 @@ type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions str // placeholder for future optional parameters } -// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.List +// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.NewListPager // method. type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions struct { // placeholder for future optional parameters @@ -6268,7 +6420,7 @@ type WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions struct { // placeholder for future optional parameters } -// WorkspaceManagedSQLServerEncryptionProtectorClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.List +// WorkspaceManagedSQLServerEncryptionProtectorClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.NewListPager // method. type WorkspaceManagedSQLServerEncryptionProtectorClientListOptions struct { // placeholder for future optional parameters @@ -6288,7 +6440,7 @@ type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions struc } // WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for -// the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.ListByWorkspace method. +// the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.NewListByWorkspacePager method. type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions struct { // placeholder for future optional parameters } @@ -6299,7 +6451,7 @@ type WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions struct { // placeholder for future optional parameters } -// WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.List +// WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.NewListPager // method. type WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions struct { // placeholder for future optional parameters @@ -6318,13 +6470,13 @@ type WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions struct { // placeholder for future optional parameters } -// WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.List +// WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.NewListPager // method. type WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions struct { // placeholder for future optional parameters } -// WorkspaceManagedSQLServerUsagesClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerUsagesClient.List +// WorkspaceManagedSQLServerUsagesClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerUsagesClient.NewListPager // method. type WorkspaceManagedSQLServerUsagesClientListOptions struct { // placeholder for future optional parameters @@ -6348,7 +6500,7 @@ type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions struct { // placeholder for future optional parameters } -// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.List +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.NewListPager // method. type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions struct { // placeholder for future optional parameters @@ -6448,13 +6600,13 @@ type WorkspaceProperties struct { AdlaResourceID *string `json:"adlaResourceId,omitempty" azure:"ro"` // READ-ONLY; Workspace level configs and feature flags - ExtraProperties map[string]interface{} `json:"extraProperties,omitempty" azure:"ro"` + ExtraProperties map[string]any `json:"extraProperties,omitempty" azure:"ro"` // READ-ONLY; Resource provisioning state ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Workspace settings - Settings map[string]interface{} `json:"settings,omitempty" azure:"ro"` + Settings map[string]any `json:"settings,omitempty" azure:"ro"` // READ-ONLY; The workspace unique identifier WorkspaceUID *string `json:"workspaceUID,omitempty" azure:"ro"` @@ -6533,13 +6685,13 @@ type WorkspacesClientGetOptions struct { // placeholder for future optional parameters } -// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup +// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager // method. type WorkspacesClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.List method. +// WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.NewListPager method. type WorkspacesClientListOptions struct { // placeholder for future optional parameters } diff --git a/sdk/resourcemanager/synapse/armsynapse/models_serde.go b/sdk/resourcemanager/synapse/armsynapse/models_serde.go new file mode 100644 index 000000000000..2103fa19323b --- /dev/null +++ b/sdk/resourcemanager/synapse/armsynapse/models_serde.go @@ -0,0 +1,12707 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armsynapse + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AADAdminProperties. +func (a AADAdminProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "administratorType", a.AdministratorType) + populate(objectMap, "login", a.Login) + populate(objectMap, "sid", a.Sid) + populate(objectMap, "tenantId", a.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AADAdminProperties. +func (a *AADAdminProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorType": + err = unpopulate(val, "AdministratorType", &a.AdministratorType) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &a.Login) + delete(rawMsg, key) + case "sid": + err = unpopulate(val, "Sid", &a.Sid) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &a.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfiguration. +func (a AttachedDatabaseConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfiguration. +func (a *AttachedDatabaseConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationListResult. +func (a AttachedDatabaseConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationListResult. +func (a *AttachedDatabaseConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationProperties. +func (a AttachedDatabaseConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attachedDatabaseNames", a.AttachedDatabaseNames) + populate(objectMap, "databaseName", a.DatabaseName) + populate(objectMap, "defaultPrincipalsModificationKind", a.DefaultPrincipalsModificationKind) + populate(objectMap, "clusterResourceId", a.KustoPoolResourceID) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "tableLevelSharingProperties", a.TableLevelSharingProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationProperties. +func (a *AttachedDatabaseConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attachedDatabaseNames": + err = unpopulate(val, "AttachedDatabaseNames", &a.AttachedDatabaseNames) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &a.DatabaseName) + delete(rawMsg, key) + case "defaultPrincipalsModificationKind": + err = unpopulate(val, "DefaultPrincipalsModificationKind", &a.DefaultPrincipalsModificationKind) + delete(rawMsg, key) + case "clusterResourceId": + err = unpopulate(val, "KustoPoolResourceID", &a.KustoPoolResourceID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "tableLevelSharingProperties": + err = unpopulate(val, "TableLevelSharingProperties", &a.TableLevelSharingProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoPauseProperties. +func (a AutoPauseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "delayInMinutes", a.DelayInMinutes) + populate(objectMap, "enabled", a.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoPauseProperties. +func (a *AutoPauseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delayInMinutes": + err = unpopulate(val, "DelayInMinutes", &a.DelayInMinutes) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoScaleProperties. +func (a AutoScaleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "maxNodeCount", a.MaxNodeCount) + populate(objectMap, "minNodeCount", a.MinNodeCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleProperties. +func (a *AutoScaleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "maxNodeCount": + err = unpopulate(val, "MaxNodeCount", &a.MaxNodeCount) + delete(rawMsg, key) + case "minNodeCount": + err = unpopulate(val, "MinNodeCount", &a.MinNodeCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableRpOperation. +func (a AvailableRpOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", a.Display) + populate(objectMap, "isDataAction", a.IsDataAction) + populate(objectMap, "name", a.Name) + populate(objectMap, "origin", a.Origin) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableRpOperation. +func (a *AvailableRpOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &a.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &a.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &a.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableRpOperationDisplayInfo. +func (a AvailableRpOperationDisplayInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "operation", a.Operation) + populate(objectMap, "provider", a.Provider) + populate(objectMap, "resource", a.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableRpOperationDisplayInfo. +func (a *AvailableRpOperationDisplayInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &a.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &a.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &a.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthentication. +func (a AzureADOnlyAuthentication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureADOnlyAuthentication. +func (a *AzureADOnlyAuthentication) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthenticationListResult. +func (a AzureADOnlyAuthenticationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureADOnlyAuthenticationListResult. +func (a *AzureADOnlyAuthenticationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthenticationProperties. +func (a AzureADOnlyAuthenticationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureADOnlyAuthentication", a.AzureADOnlyAuthentication) + populateTimeRFC3339(objectMap, "creationDate", a.CreationDate) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureADOnlyAuthenticationProperties. +func (a *AzureADOnlyAuthenticationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureADOnlyAuthentication": + err = unpopulate(val, "AzureADOnlyAuthentication", &a.AzureADOnlyAuthentication) + delete(rawMsg, key) + case "creationDate": + err = unpopulateTimeRFC3339(val, "CreationDate", &a.CreationDate) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureCapacity. +func (a AzureCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "default", a.Default) + populate(objectMap, "maximum", a.Maximum) + populate(objectMap, "minimum", a.Minimum) + populate(objectMap, "scaleType", a.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureCapacity. +func (a *AzureCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &a.Default) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &a.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &a.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &a.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureEntityResource. +func (a AzureEntityResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureEntityResource. +func (a *AzureEntityResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureResourceSKU. +func (a AzureResourceSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", a.Capacity) + populate(objectMap, "resourceType", a.ResourceType) + populate(objectMap, "sku", a.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceSKU. +func (a *AzureResourceSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &a.Capacity) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &a.ResourceType) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureSKU. +func (a AzureSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", a.Capacity) + populate(objectMap, "name", a.Name) + populate(objectMap, "size", a.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSKU. +func (a *AzureSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &a.Capacity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &a.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BigDataPoolPatchInfo. +func (b BigDataPoolPatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", b.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BigDataPoolPatchInfo. +func (b *BigDataPoolPatchInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BigDataPoolResourceInfo. +func (b BigDataPoolResourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BigDataPoolResourceInfo. +func (b *BigDataPoolResourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BigDataPoolResourceInfoListResult. +func (b BigDataPoolResourceInfoListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BigDataPoolResourceInfoListResult. +func (b *BigDataPoolResourceInfoListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BigDataPoolResourceProperties. +func (b BigDataPoolResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoPause", b.AutoPause) + populate(objectMap, "autoScale", b.AutoScale) + populate(objectMap, "cacheSize", b.CacheSize) + populateTimeRFC3339(objectMap, "creationDate", b.CreationDate) + populate(objectMap, "customLibraries", b.CustomLibraries) + populate(objectMap, "defaultSparkLogFolder", b.DefaultSparkLogFolder) + populate(objectMap, "dynamicExecutorAllocation", b.DynamicExecutorAllocation) + populate(objectMap, "isAutotuneEnabled", b.IsAutotuneEnabled) + populate(objectMap, "isComputeIsolationEnabled", b.IsComputeIsolationEnabled) + populateTimeRFC3339(objectMap, "lastSucceededTimestamp", b.LastSucceededTimestamp) + populate(objectMap, "libraryRequirements", b.LibraryRequirements) + populate(objectMap, "nodeCount", b.NodeCount) + populate(objectMap, "nodeSize", b.NodeSize) + populate(objectMap, "nodeSizeFamily", b.NodeSizeFamily) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "sessionLevelPackagesEnabled", b.SessionLevelPackagesEnabled) + populate(objectMap, "sparkConfigProperties", b.SparkConfigProperties) + populate(objectMap, "sparkEventsFolder", b.SparkEventsFolder) + populate(objectMap, "sparkVersion", b.SparkVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BigDataPoolResourceProperties. +func (b *BigDataPoolResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoPause": + err = unpopulate(val, "AutoPause", &b.AutoPause) + delete(rawMsg, key) + case "autoScale": + err = unpopulate(val, "AutoScale", &b.AutoScale) + delete(rawMsg, key) + case "cacheSize": + err = unpopulate(val, "CacheSize", &b.CacheSize) + delete(rawMsg, key) + case "creationDate": + err = unpopulateTimeRFC3339(val, "CreationDate", &b.CreationDate) + delete(rawMsg, key) + case "customLibraries": + err = unpopulate(val, "CustomLibraries", &b.CustomLibraries) + delete(rawMsg, key) + case "defaultSparkLogFolder": + err = unpopulate(val, "DefaultSparkLogFolder", &b.DefaultSparkLogFolder) + delete(rawMsg, key) + case "dynamicExecutorAllocation": + err = unpopulate(val, "DynamicExecutorAllocation", &b.DynamicExecutorAllocation) + delete(rawMsg, key) + case "isAutotuneEnabled": + err = unpopulate(val, "IsAutotuneEnabled", &b.IsAutotuneEnabled) + delete(rawMsg, key) + case "isComputeIsolationEnabled": + err = unpopulate(val, "IsComputeIsolationEnabled", &b.IsComputeIsolationEnabled) + delete(rawMsg, key) + case "lastSucceededTimestamp": + err = unpopulateTimeRFC3339(val, "LastSucceededTimestamp", &b.LastSucceededTimestamp) + delete(rawMsg, key) + case "libraryRequirements": + err = unpopulate(val, "LibraryRequirements", &b.LibraryRequirements) + delete(rawMsg, key) + case "nodeCount": + err = unpopulate(val, "NodeCount", &b.NodeCount) + delete(rawMsg, key) + case "nodeSize": + err = unpopulate(val, "NodeSize", &b.NodeSize) + delete(rawMsg, key) + case "nodeSizeFamily": + err = unpopulate(val, "NodeSizeFamily", &b.NodeSizeFamily) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "sessionLevelPackagesEnabled": + err = unpopulate(val, "SessionLevelPackagesEnabled", &b.SessionLevelPackagesEnabled) + delete(rawMsg, key) + case "sparkConfigProperties": + err = unpopulate(val, "SparkConfigProperties", &b.SparkConfigProperties) + delete(rawMsg, key) + case "sparkEventsFolder": + err = unpopulate(val, "SparkEventsFolder", &b.SparkEventsFolder) + delete(rawMsg, key) + case "sparkVersion": + err = unpopulate(val, "SparkVersion", &b.SparkVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest. +func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest. +func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse. +func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "available", c.Available) + populate(objectMap, "message", c.Message) + populate(objectMap, "name", c.Name) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse. +func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "available": + err = unpopulate(val, "Available", &c.Available) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameResult. +func (c CheckNameResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "name", c.Name) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameResult. +func (c *CheckNameResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignment. +func (c ClusterPrincipalAssignment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignment. +func (c *ClusterPrincipalAssignment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignmentCheckNameRequest. +func (c ClusterPrincipalAssignmentCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + objectMap["type"] = "Microsoft.Synapse/workspaces/kustoPools/principalAssignments" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignmentCheckNameRequest. +func (c *ClusterPrincipalAssignmentCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignmentListResult. +func (c ClusterPrincipalAssignmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignmentListResult. +func (c *ClusterPrincipalAssignmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalProperties. +func (c ClusterPrincipalProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadObjectId", c.AADObjectID) + populate(objectMap, "principalId", c.PrincipalID) + populate(objectMap, "principalName", c.PrincipalName) + populate(objectMap, "principalType", c.PrincipalType) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "role", c.Role) + populate(objectMap, "tenantId", c.TenantID) + populate(objectMap, "tenantName", c.TenantName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalProperties. +func (c *ClusterPrincipalProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadObjectId": + err = unpopulate(val, "AADObjectID", &c.AADObjectID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &c.PrincipalID) + delete(rawMsg, key) + case "principalName": + err = unpopulate(val, "PrincipalName", &c.PrincipalName) + delete(rawMsg, key) + case "principalType": + err = unpopulate(val, "PrincipalType", &c.PrincipalType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &c.Role) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &c.TenantID) + delete(rawMsg, key) + case "tenantName": + err = unpopulate(val, "TenantName", &c.TenantName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CmdkeySetup. +func (c CmdkeySetup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = "CmdkeySetup" + populate(objectMap, "typeProperties", c.TypeProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CmdkeySetup. +func (c *CmdkeySetup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "typeProperties": + err = unpopulate(val, "TypeProperties", &c.TypeProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CmdkeySetupTypeProperties. +func (c CmdkeySetupTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "password", c.Password) + populate(objectMap, "targetName", &c.TargetName) + populate(objectMap, "userName", &c.UserName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CmdkeySetupTypeProperties. +func (c *CmdkeySetupTypeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "password": + c.Password, err = unmarshalSecretBaseClassification(val) + delete(rawMsg, key) + case "targetName": + err = unpopulate(val, "TargetName", &c.TargetName) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &c.UserName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentSetup. +func (c ComponentSetup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = "ComponentSetup" + populate(objectMap, "typeProperties", c.TypeProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentSetup. +func (c *ComponentSetup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "typeProperties": + err = unpopulate(val, "TypeProperties", &c.TypeProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateSQLPoolRestorePointDefinition. +func (c CreateSQLPoolRestorePointDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "restorePointLabel", c.RestorePointLabel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateSQLPoolRestorePointDefinition. +func (c *CreateSQLPoolRestorePointDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "restorePointLabel": + err = unpopulate(val, "RestorePointLabel", &c.RestorePointLabel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CspWorkspaceAdminProperties. +func (c CspWorkspaceAdminProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "initialWorkspaceAdminObjectId", c.InitialWorkspaceAdminObjectID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CspWorkspaceAdminProperties. +func (c *CspWorkspaceAdminProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "initialWorkspaceAdminObjectId": + err = unpopulate(val, "InitialWorkspaceAdminObjectID", &c.InitialWorkspaceAdminObjectID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomSetupBase. +func (c CustomSetupBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = c.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomSetupBase. +func (c *CustomSetupBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomerManagedKeyDetails. +func (c CustomerManagedKeyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "kekIdentity", c.KekIdentity) + populate(objectMap, "key", c.Key) + populate(objectMap, "status", c.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomerManagedKeyDetails. +func (c *CustomerManagedKeyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kekIdentity": + err = unpopulate(val, "KekIdentity", &c.KekIdentity) + delete(rawMsg, key) + case "key": + err = unpopulate(val, "Key", &c.Key) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnection. +func (d DataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + objectMap["kind"] = d.Kind + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnection. +func (d *DataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionCheckNameRequest. +func (d DataConnectionCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + objectMap["type"] = "Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionCheckNameRequest. +func (d *DataConnectionCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionListResult. +func (d DataConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionListResult. +func (d *DataConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + d.Value, err = unmarshalDataConnectionClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidation. +func (d DataConnectionValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataConnectionName", d.DataConnectionName) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidation. +func (d *DataConnectionValidation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataConnectionName": + err = unpopulate(val, "DataConnectionName", &d.DataConnectionName) + delete(rawMsg, key) + case "properties": + d.Properties, err = unmarshalDataConnectionClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidationListResult. +func (d DataConnectionValidationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidationListResult. +func (d *DataConnectionValidationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidationResult. +func (d DataConnectionValidationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorMessage", d.ErrorMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidationResult. +func (d *DataConnectionValidationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &d.ErrorMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataLakeStorageAccountDetails. +func (d DataLakeStorageAccountDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accountUrl", d.AccountURL) + populate(objectMap, "createManagedPrivateEndpoint", d.CreateManagedPrivateEndpoint) + populate(objectMap, "filesystem", d.Filesystem) + populate(objectMap, "resourceId", d.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataLakeStorageAccountDetails. +func (d *DataLakeStorageAccountDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accountUrl": + err = unpopulate(val, "AccountURL", &d.AccountURL) + delete(rawMsg, key) + case "createManagedPrivateEndpoint": + err = unpopulate(val, "CreateManagedPrivateEndpoint", &d.CreateManagedPrivateEndpoint) + delete(rawMsg, key) + case "filesystem": + err = unpopulate(val, "Filesystem", &d.Filesystem) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingPolicy. +func (d DataMaskingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) + populate(objectMap, "managedBy", d.ManagedBy) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingPolicy. +func (d *DataMaskingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "managedBy": + err = unpopulate(val, "ManagedBy", &d.ManagedBy) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingPolicyProperties. +func (d DataMaskingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationPrincipals", d.ApplicationPrincipals) + populate(objectMap, "dataMaskingState", d.DataMaskingState) + populate(objectMap, "exemptPrincipals", d.ExemptPrincipals) + populate(objectMap, "maskingLevel", d.MaskingLevel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingPolicyProperties. +func (d *DataMaskingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationPrincipals": + err = unpopulate(val, "ApplicationPrincipals", &d.ApplicationPrincipals) + delete(rawMsg, key) + case "dataMaskingState": + err = unpopulate(val, "DataMaskingState", &d.DataMaskingState) + delete(rawMsg, key) + case "exemptPrincipals": + err = unpopulate(val, "ExemptPrincipals", &d.ExemptPrincipals) + delete(rawMsg, key) + case "maskingLevel": + err = unpopulate(val, "MaskingLevel", &d.MaskingLevel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingRule. +func (d DataMaskingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRule. +func (d *DataMaskingRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingRuleListResult. +func (d DataMaskingRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRuleListResult. +func (d *DataMaskingRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingRuleProperties. +func (d DataMaskingRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aliasName", d.AliasName) + populate(objectMap, "columnName", d.ColumnName) + populate(objectMap, "id", d.ID) + populate(objectMap, "maskingFunction", d.MaskingFunction) + populate(objectMap, "numberFrom", d.NumberFrom) + populate(objectMap, "numberTo", d.NumberTo) + populate(objectMap, "prefixSize", d.PrefixSize) + populate(objectMap, "replacementString", d.ReplacementString) + populate(objectMap, "ruleState", d.RuleState) + populate(objectMap, "schemaName", d.SchemaName) + populate(objectMap, "suffixSize", d.SuffixSize) + populate(objectMap, "tableName", d.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRuleProperties. +func (d *DataMaskingRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aliasName": + err = unpopulate(val, "AliasName", &d.AliasName) + delete(rawMsg, key) + case "columnName": + err = unpopulate(val, "ColumnName", &d.ColumnName) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "maskingFunction": + err = unpopulate(val, "MaskingFunction", &d.MaskingFunction) + delete(rawMsg, key) + case "numberFrom": + err = unpopulate(val, "NumberFrom", &d.NumberFrom) + delete(rawMsg, key) + case "numberTo": + err = unpopulate(val, "NumberTo", &d.NumberTo) + delete(rawMsg, key) + case "prefixSize": + err = unpopulate(val, "PrefixSize", &d.PrefixSize) + delete(rawMsg, key) + case "replacementString": + err = unpopulate(val, "ReplacementString", &d.ReplacementString) + delete(rawMsg, key) + case "ruleState": + err = unpopulate(val, "RuleState", &d.RuleState) + delete(rawMsg, key) + case "schemaName": + err = unpopulate(val, "SchemaName", &d.SchemaName) + delete(rawMsg, key) + case "suffixSize": + err = unpopulate(val, "SuffixSize", &d.SuffixSize) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &d.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivities. +func (d DataWarehouseUserActivities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataWarehouseUserActivities. +func (d *DataWarehouseUserActivities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivitiesProperties. +func (d DataWarehouseUserActivitiesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeQueriesCount", d.ActiveQueriesCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataWarehouseUserActivitiesProperties. +func (d *DataWarehouseUserActivitiesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeQueriesCount": + err = unpopulate(val, "ActiveQueriesCount", &d.ActiveQueriesCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Database. +func (d Database) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + objectMap["kind"] = d.Kind + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Database. +func (d *Database) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseCheckNameRequest. +func (d DatabaseCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseCheckNameRequest. +func (d *DatabaseCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseListResult. +func (d DatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult. +func (d *DatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + d.Value, err = unmarshalDatabaseClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignment. +func (d DatabasePrincipalAssignment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignment. +func (d *DatabasePrincipalAssignment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignmentCheckNameRequest. +func (d DatabasePrincipalAssignmentCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + objectMap["type"] = "Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignmentCheckNameRequest. +func (d *DatabasePrincipalAssignmentCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignmentListResult. +func (d DatabasePrincipalAssignmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignmentListResult. +func (d *DatabasePrincipalAssignmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalProperties. +func (d DatabasePrincipalProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadObjectId", d.AADObjectID) + populate(objectMap, "principalId", d.PrincipalID) + populate(objectMap, "principalName", d.PrincipalName) + populate(objectMap, "principalType", d.PrincipalType) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "role", d.Role) + populate(objectMap, "tenantId", d.TenantID) + populate(objectMap, "tenantName", d.TenantName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalProperties. +func (d *DatabasePrincipalProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadObjectId": + err = unpopulate(val, "AADObjectID", &d.AADObjectID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &d.PrincipalID) + delete(rawMsg, key) + case "principalName": + err = unpopulate(val, "PrincipalName", &d.PrincipalName) + delete(rawMsg, key) + case "principalType": + err = unpopulate(val, "PrincipalType", &d.PrincipalType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &d.Role) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &d.TenantID) + delete(rawMsg, key) + case "tenantName": + err = unpopulate(val, "TenantName", &d.TenantName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseStatistics. +func (d DatabaseStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "size", d.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseStatistics. +func (d *DatabaseStatistics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "size": + err = unpopulate(val, "Size", &d.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DedicatedSQLminimalTLSSettings. +func (d DedicatedSQLminimalTLSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedSQLminimalTLSSettings. +func (d *DedicatedSQLminimalTLSSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DedicatedSQLminimalTLSSettingsListResult. +func (d DedicatedSQLminimalTLSSettingsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedSQLminimalTLSSettingsListResult. +func (d *DedicatedSQLminimalTLSSettingsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DedicatedSQLminimalTLSSettingsPatchInfo. +func (d DedicatedSQLminimalTLSSettingsPatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "minimalTlsVersion", d.MinimalTLSVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedSQLminimalTLSSettingsPatchInfo. +func (d *DedicatedSQLminimalTLSSettingsPatchInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "minimalTlsVersion": + err = unpopulate(val, "MinimalTLSVersion", &d.MinimalTLSVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DedicatedSQLminimalTLSSettingsProperties. +func (d DedicatedSQLminimalTLSSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "minimalTlsVersion", d.MinimalTLSVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedSQLminimalTLSSettingsProperties. +func (d *DedicatedSQLminimalTLSSettingsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "minimalTlsVersion": + err = unpopulate(val, "MinimalTLSVersion", &d.MinimalTLSVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DynamicExecutorAllocation. +func (d DynamicExecutorAllocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", d.Enabled) + populate(objectMap, "maxExecutors", d.MaxExecutors) + populate(objectMap, "minExecutors", d.MinExecutors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DynamicExecutorAllocation. +func (d *DynamicExecutorAllocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) + delete(rawMsg, key) + case "maxExecutors": + err = unpopulate(val, "MaxExecutors", &d.MaxExecutors) + delete(rawMsg, key) + case "minExecutors": + err = unpopulate(val, "MinExecutors", &d.MinExecutors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionDetails. +func (e EncryptionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cmk", e.Cmk) + populate(objectMap, "doubleEncryptionEnabled", e.DoubleEncryptionEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionDetails. +func (e *EncryptionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cmk": + err = unpopulate(val, "Cmk", &e.Cmk) + delete(rawMsg, key) + case "doubleEncryptionEnabled": + err = unpopulate(val, "DoubleEncryptionEnabled", &e.DoubleEncryptionEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionProtector. +func (e EncryptionProtector) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "kind", e.Kind) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtector. +func (e *EncryptionProtector) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionProtectorListResult. +func (e EncryptionProtectorListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtectorListResult. +func (e *EncryptionProtectorListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionProtectorProperties. +func (e EncryptionProtectorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serverKeyName", e.ServerKeyName) + populate(objectMap, "serverKeyType", e.ServerKeyType) + populate(objectMap, "subregion", e.Subregion) + populate(objectMap, "thumbprint", e.Thumbprint) + populate(objectMap, "uri", e.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtectorProperties. +func (e *EncryptionProtectorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serverKeyName": + err = unpopulate(val, "ServerKeyName", &e.ServerKeyName) + delete(rawMsg, key) + case "serverKeyType": + err = unpopulate(val, "ServerKeyType", &e.ServerKeyType) + delete(rawMsg, key) + case "subregion": + err = unpopulate(val, "Subregion", &e.Subregion) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &e.Thumbprint) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &e.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EntityReference. +func (e EntityReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "referenceName", e.ReferenceName) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EntityReference. +func (e *EntityReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "referenceName": + err = unpopulate(val, "ReferenceName", &e.ReferenceName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariableSetup. +func (e EnvironmentVariableSetup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = "EnvironmentVariableSetup" + populate(objectMap, "typeProperties", e.TypeProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariableSetup. +func (e *EnvironmentVariableSetup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + case "typeProperties": + err = unpopulate(val, "TypeProperties", &e.TypeProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariableSetupTypeProperties. +func (e EnvironmentVariableSetupTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "variableName", e.VariableName) + populate(objectMap, "variableValue", e.VariableValue) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariableSetupTypeProperties. +func (e *EnvironmentVariableSetupTypeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "variableName": + err = unpopulate(val, "VariableName", &e.VariableName) + delete(rawMsg, key) + case "variableValue": + err = unpopulate(val, "VariableValue", &e.VariableValue) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "info", &e.Info) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. +func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. +func (e ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. +func (e *ErrorDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponseAutoGenerated. +func (e ErrorResponseAutoGenerated) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseAutoGenerated. +func (e *ErrorResponseAutoGenerated) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventGridConnectionProperties. +func (e EventGridConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobStorageEventType", e.BlobStorageEventType) + populate(objectMap, "consumerGroup", e.ConsumerGroup) + populate(objectMap, "dataFormat", e.DataFormat) + populate(objectMap, "eventHubResourceId", e.EventHubResourceID) + populate(objectMap, "ignoreFirstRecord", e.IgnoreFirstRecord) + populate(objectMap, "mappingRuleName", e.MappingRuleName) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "storageAccountResourceId", e.StorageAccountResourceID) + populate(objectMap, "tableName", e.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridConnectionProperties. +func (e *EventGridConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobStorageEventType": + err = unpopulate(val, "BlobStorageEventType", &e.BlobStorageEventType) + delete(rawMsg, key) + case "consumerGroup": + err = unpopulate(val, "ConsumerGroup", &e.ConsumerGroup) + delete(rawMsg, key) + case "dataFormat": + err = unpopulate(val, "DataFormat", &e.DataFormat) + delete(rawMsg, key) + case "eventHubResourceId": + err = unpopulate(val, "EventHubResourceID", &e.EventHubResourceID) + delete(rawMsg, key) + case "ignoreFirstRecord": + err = unpopulate(val, "IgnoreFirstRecord", &e.IgnoreFirstRecord) + delete(rawMsg, key) + case "mappingRuleName": + err = unpopulate(val, "MappingRuleName", &e.MappingRuleName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "storageAccountResourceId": + err = unpopulate(val, "StorageAccountResourceID", &e.StorageAccountResourceID) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &e.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventGridDataConnection. +func (e EventGridDataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + objectMap["kind"] = DataConnectionKindEventGrid + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridDataConnection. +func (e *EventGridDataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventHubConnectionProperties. +func (e EventHubConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "compression", e.Compression) + populate(objectMap, "consumerGroup", e.ConsumerGroup) + populate(objectMap, "dataFormat", e.DataFormat) + populate(objectMap, "eventHubResourceId", e.EventHubResourceID) + populate(objectMap, "eventSystemProperties", e.EventSystemProperties) + populate(objectMap, "managedIdentityResourceId", e.ManagedIdentityResourceID) + populate(objectMap, "mappingRuleName", e.MappingRuleName) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "tableName", e.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubConnectionProperties. +func (e *EventHubConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "compression": + err = unpopulate(val, "Compression", &e.Compression) + delete(rawMsg, key) + case "consumerGroup": + err = unpopulate(val, "ConsumerGroup", &e.ConsumerGroup) + delete(rawMsg, key) + case "dataFormat": + err = unpopulate(val, "DataFormat", &e.DataFormat) + delete(rawMsg, key) + case "eventHubResourceId": + err = unpopulate(val, "EventHubResourceID", &e.EventHubResourceID) + delete(rawMsg, key) + case "eventSystemProperties": + err = unpopulate(val, "EventSystemProperties", &e.EventSystemProperties) + delete(rawMsg, key) + case "managedIdentityResourceId": + err = unpopulate(val, "ManagedIdentityResourceID", &e.ManagedIdentityResourceID) + delete(rawMsg, key) + case "mappingRuleName": + err = unpopulate(val, "MappingRuleName", &e.MappingRuleName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &e.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventHubDataConnection. +func (e EventHubDataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + objectMap["kind"] = DataConnectionKindEventHub + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubDataConnection. +func (e *EventHubDataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedSQLPoolBlobAuditingPolicy. +func (e ExtendedSQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedSQLPoolBlobAuditingPolicy. +func (e *ExtendedSQLPoolBlobAuditingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedSQLPoolBlobAuditingPolicyListResult. +func (e ExtendedSQLPoolBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedSQLPoolBlobAuditingPolicyListResult. +func (e *ExtendedSQLPoolBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedSQLPoolBlobAuditingPolicyProperties. +func (e ExtendedSQLPoolBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auditActionsAndGroups", e.AuditActionsAndGroups) + populate(objectMap, "isAzureMonitorTargetEnabled", e.IsAzureMonitorTargetEnabled) + populate(objectMap, "isStorageSecondaryKeyInUse", e.IsStorageSecondaryKeyInUse) + populate(objectMap, "predicateExpression", e.PredicateExpression) + populate(objectMap, "queueDelayMs", e.QueueDelayMs) + populate(objectMap, "retentionDays", e.RetentionDays) + populate(objectMap, "state", e.State) + populate(objectMap, "storageAccountAccessKey", e.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", e.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", e.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedSQLPoolBlobAuditingPolicyProperties. +func (e *ExtendedSQLPoolBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auditActionsAndGroups": + err = unpopulate(val, "AuditActionsAndGroups", &e.AuditActionsAndGroups) + delete(rawMsg, key) + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &e.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "isStorageSecondaryKeyInUse": + err = unpopulate(val, "IsStorageSecondaryKeyInUse", &e.IsStorageSecondaryKeyInUse) + delete(rawMsg, key) + case "predicateExpression": + err = unpopulate(val, "PredicateExpression", &e.PredicateExpression) + delete(rawMsg, key) + case "queueDelayMs": + err = unpopulate(val, "QueueDelayMs", &e.QueueDelayMs) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &e.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &e.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &e.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &e.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicy. +func (e ExtendedServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicy. +func (e *ExtendedServerBlobAuditingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicyListResult. +func (e ExtendedServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicyListResult. +func (e *ExtendedServerBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicyProperties. +func (e ExtendedServerBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auditActionsAndGroups", e.AuditActionsAndGroups) + populate(objectMap, "isAzureMonitorTargetEnabled", e.IsAzureMonitorTargetEnabled) + populate(objectMap, "isDevopsAuditEnabled", e.IsDevopsAuditEnabled) + populate(objectMap, "isStorageSecondaryKeyInUse", e.IsStorageSecondaryKeyInUse) + populate(objectMap, "predicateExpression", e.PredicateExpression) + populate(objectMap, "queueDelayMs", e.QueueDelayMs) + populate(objectMap, "retentionDays", e.RetentionDays) + populate(objectMap, "state", e.State) + populate(objectMap, "storageAccountAccessKey", e.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", e.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", e.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicyProperties. +func (e *ExtendedServerBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auditActionsAndGroups": + err = unpopulate(val, "AuditActionsAndGroups", &e.AuditActionsAndGroups) + delete(rawMsg, key) + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &e.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "isDevopsAuditEnabled": + err = unpopulate(val, "IsDevopsAuditEnabled", &e.IsDevopsAuditEnabled) + delete(rawMsg, key) + case "isStorageSecondaryKeyInUse": + err = unpopulate(val, "IsStorageSecondaryKeyInUse", &e.IsStorageSecondaryKeyInUse) + delete(rawMsg, key) + case "predicateExpression": + err = unpopulate(val, "PredicateExpression", &e.PredicateExpression) + delete(rawMsg, key) + case "queueDelayMs": + err = unpopulate(val, "QueueDelayMs", &e.QueueDelayMs) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &e.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &e.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &e.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &e.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseDefinition. +func (f FollowerDatabaseDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attachedDatabaseConfigurationName", f.AttachedDatabaseConfigurationName) + populate(objectMap, "databaseName", f.DatabaseName) + populate(objectMap, "clusterResourceId", f.KustoPoolResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseDefinition. +func (f *FollowerDatabaseDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attachedDatabaseConfigurationName": + err = unpopulate(val, "AttachedDatabaseConfigurationName", &f.AttachedDatabaseConfigurationName) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &f.DatabaseName) + delete(rawMsg, key) + case "clusterResourceId": + err = unpopulate(val, "KustoPoolResourceID", &f.KustoPoolResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseListResult. +func (f FollowerDatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseListResult. +func (f *FollowerDatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicy. +func (g GeoBackupPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "kind", g.Kind) + populate(objectMap, "location", g.Location) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicy. +func (g *GeoBackupPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &g.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &g.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicyListResult. +func (g GeoBackupPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicyListResult. +func (g *GeoBackupPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicyProperties. +func (g GeoBackupPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", g.State) + populate(objectMap, "storageType", g.StorageType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicyProperties. +func (g *GeoBackupPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &g.State) + delete(rawMsg, key) + case "storageType": + err = unpopulate(val, "StorageType", &g.StorageType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetSsisObjectMetadataRequest. +func (g GetSsisObjectMetadataRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metadataPath", g.MetadataPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetSsisObjectMetadataRequest. +func (g *GetSsisObjectMetadataRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metadataPath": + err = unpopulate(val, "MetadataPath", &g.MetadataPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPFirewallRuleInfo. +func (i IPFirewallRuleInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPFirewallRuleInfo. +func (i *IPFirewallRuleInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPFirewallRuleInfoListResult. +func (i IPFirewallRuleInfoListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPFirewallRuleInfoListResult. +func (i *IPFirewallRuleInfoListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPFirewallRuleProperties. +func (i IPFirewallRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endIpAddress", i.EndIPAddress) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "startIpAddress", i.StartIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPFirewallRuleProperties. +func (i *IPFirewallRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endIpAddress": + err = unpopulate(val, "EndIPAddress", &i.EndIPAddress) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "startIpAddress": + err = unpopulate(val, "StartIPAddress", &i.StartIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntime. +func (i IntegrationRuntime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", i.Description) + objectMap["type"] = i.Type + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntime. +func (i *IntegrationRuntime) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeAuthKeys. +func (i IntegrationRuntimeAuthKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authKey1", i.AuthKey1) + populate(objectMap, "authKey2", i.AuthKey2) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeAuthKeys. +func (i *IntegrationRuntimeAuthKeys) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authKey1": + err = unpopulate(val, "AuthKey1", &i.AuthKey1) + delete(rawMsg, key) + case "authKey2": + err = unpopulate(val, "AuthKey2", &i.AuthKey2) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeComputeProperties. +func (i IntegrationRuntimeComputeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataFlowProperties", i.DataFlowProperties) + populate(objectMap, "location", i.Location) + populate(objectMap, "maxParallelExecutionsPerNode", i.MaxParallelExecutionsPerNode) + populate(objectMap, "nodeSize", i.NodeSize) + populate(objectMap, "numberOfNodes", i.NumberOfNodes) + populate(objectMap, "vNetProperties", i.VNetProperties) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeComputeProperties. +func (i *IntegrationRuntimeComputeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataFlowProperties": + err = unpopulate(val, "DataFlowProperties", &i.DataFlowProperties) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "maxParallelExecutionsPerNode": + err = unpopulate(val, "MaxParallelExecutionsPerNode", &i.MaxParallelExecutionsPerNode) + delete(rawMsg, key) + case "nodeSize": + err = unpopulate(val, "NodeSize", &i.NodeSize) + delete(rawMsg, key) + case "numberOfNodes": + err = unpopulate(val, "NumberOfNodes", &i.NumberOfNodes) + delete(rawMsg, key) + case "vNetProperties": + err = unpopulate(val, "VNetProperties", &i.VNetProperties) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeConnectionInfo. +func (i IntegrationRuntimeConnectionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostServiceUri", i.HostServiceURI) + populate(objectMap, "identityCertThumbprint", i.IdentityCertThumbprint) + populate(objectMap, "isIdentityCertExprired", i.IsIdentityCertExprired) + populate(objectMap, "publicKey", i.PublicKey) + populate(objectMap, "serviceToken", i.ServiceToken) + populate(objectMap, "version", i.Version) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeConnectionInfo. +func (i *IntegrationRuntimeConnectionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostServiceUri": + err = unpopulate(val, "HostServiceURI", &i.HostServiceURI) + delete(rawMsg, key) + case "identityCertThumbprint": + err = unpopulate(val, "IdentityCertThumbprint", &i.IdentityCertThumbprint) + delete(rawMsg, key) + case "isIdentityCertExprired": + err = unpopulate(val, "IsIdentityCertExprired", &i.IsIdentityCertExprired) + delete(rawMsg, key) + case "publicKey": + err = unpopulate(val, "PublicKey", &i.PublicKey) + delete(rawMsg, key) + case "serviceToken": + err = unpopulate(val, "ServiceToken", &i.ServiceToken) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &i.Version) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeCustomSetupScriptProperties. +func (i IntegrationRuntimeCustomSetupScriptProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobContainerUri", i.BlobContainerURI) + populate(objectMap, "sasToken", i.SasToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeCustomSetupScriptProperties. +func (i *IntegrationRuntimeCustomSetupScriptProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobContainerUri": + err = unpopulate(val, "BlobContainerURI", &i.BlobContainerURI) + delete(rawMsg, key) + case "sasToken": + err = unpopulate(val, "SasToken", &i.SasToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeDataFlowProperties. +func (i IntegrationRuntimeDataFlowProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cleanup", i.Cleanup) + populate(objectMap, "computeType", i.ComputeType) + populate(objectMap, "coreCount", i.CoreCount) + populate(objectMap, "timeToLive", i.TimeToLive) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeDataFlowProperties. +func (i *IntegrationRuntimeDataFlowProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cleanup": + err = unpopulate(val, "Cleanup", &i.Cleanup) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &i.ComputeType) + delete(rawMsg, key) + case "coreCount": + err = unpopulate(val, "CoreCount", &i.CoreCount) + delete(rawMsg, key) + case "timeToLive": + err = unpopulate(val, "TimeToLive", &i.TimeToLive) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeDataProxyProperties. +func (i IntegrationRuntimeDataProxyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectVia", i.ConnectVia) + populate(objectMap, "path", i.Path) + populate(objectMap, "stagingLinkedService", i.StagingLinkedService) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeDataProxyProperties. +func (i *IntegrationRuntimeDataProxyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectVia": + err = unpopulate(val, "ConnectVia", &i.ConnectVia) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &i.Path) + delete(rawMsg, key) + case "stagingLinkedService": + err = unpopulate(val, "StagingLinkedService", &i.StagingLinkedService) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeEnableinteractivequery. +func (i IntegrationRuntimeEnableinteractivequery) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", i.Error) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", &i.Properties) + populate(objectMap, "status", i.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeEnableinteractivequery. +func (i *IntegrationRuntimeEnableinteractivequery) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &i.Error) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeListResponse. +func (i IntegrationRuntimeListResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeListResponse. +func (i *IntegrationRuntimeListResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeMonitoringData. +func (i IntegrationRuntimeMonitoringData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", i.Name) + populate(objectMap, "nodes", i.Nodes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeMonitoringData. +func (i *IntegrationRuntimeMonitoringData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "nodes": + err = unpopulate(val, "Nodes", &i.Nodes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeNodeIPAddress. +func (i IntegrationRuntimeNodeIPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddress", i.IPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeNodeIPAddress. +func (i *IntegrationRuntimeNodeIPAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddress": + err = unpopulate(val, "IPAddress", &i.IPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeNodeMonitoringData. +func (i IntegrationRuntimeNodeMonitoringData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableMemoryInMB", i.AvailableMemoryInMB) + populate(objectMap, "cpuUtilization", i.CPUUtilization) + populate(objectMap, "concurrentJobsLimit", i.ConcurrentJobsLimit) + populate(objectMap, "concurrentJobsRunning", i.ConcurrentJobsRunning) + populate(objectMap, "maxConcurrentJobs", i.MaxConcurrentJobs) + populate(objectMap, "nodeName", i.NodeName) + populate(objectMap, "receivedBytes", i.ReceivedBytes) + populate(objectMap, "sentBytes", i.SentBytes) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeNodeMonitoringData. +func (i *IntegrationRuntimeNodeMonitoringData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableMemoryInMB": + err = unpopulate(val, "AvailableMemoryInMB", &i.AvailableMemoryInMB) + delete(rawMsg, key) + case "cpuUtilization": + err = unpopulate(val, "CPUUtilization", &i.CPUUtilization) + delete(rawMsg, key) + case "concurrentJobsLimit": + err = unpopulate(val, "ConcurrentJobsLimit", &i.ConcurrentJobsLimit) + delete(rawMsg, key) + case "concurrentJobsRunning": + err = unpopulate(val, "ConcurrentJobsRunning", &i.ConcurrentJobsRunning) + delete(rawMsg, key) + case "maxConcurrentJobs": + err = unpopulate(val, "MaxConcurrentJobs", &i.MaxConcurrentJobs) + delete(rawMsg, key) + case "nodeName": + err = unpopulate(val, "NodeName", &i.NodeName) + delete(rawMsg, key) + case "receivedBytes": + err = unpopulate(val, "ReceivedBytes", &i.ReceivedBytes) + delete(rawMsg, key) + case "sentBytes": + err = unpopulate(val, "SentBytes", &i.SentBytes) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeOperationStatus. +func (i IntegrationRuntimeOperationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", i.Error) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", &i.Properties) + populate(objectMap, "status", i.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeOperationStatus. +func (i *IntegrationRuntimeOperationStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &i.Error) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint. +func (i IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "category", i.Category) + populate(objectMap, "endpoints", i.Endpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint. +func (i *IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &i.Category) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &i.Endpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeOutboundNetworkDependenciesEndpoint. +func (i IntegrationRuntimeOutboundNetworkDependenciesEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "domainName", i.DomainName) + populate(objectMap, "endpointDetails", i.EndpointDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeOutboundNetworkDependenciesEndpoint. +func (i *IntegrationRuntimeOutboundNetworkDependenciesEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domainName": + err = unpopulate(val, "DomainName", &i.DomainName) + delete(rawMsg, key) + case "endpointDetails": + err = unpopulate(val, "EndpointDetails", &i.EndpointDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails. +func (i IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", i.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails. +func (i *IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &i.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse. +func (i IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse. +func (i *IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeRegenerateKeyParameters. +func (i IntegrationRuntimeRegenerateKeyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyName", i.KeyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeRegenerateKeyParameters. +func (i *IntegrationRuntimeRegenerateKeyParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyName": + err = unpopulate(val, "KeyName", &i.KeyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeResource. +func (i IntegrationRuntimeResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeResource. +func (i *IntegrationRuntimeResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + i.Properties, err = unmarshalIntegrationRuntimeClassification(val) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeSsisCatalogInfo. +func (i IntegrationRuntimeSsisCatalogInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "catalogAdminPassword", i.CatalogAdminPassword) + populate(objectMap, "catalogAdminUserName", i.CatalogAdminUserName) + populate(objectMap, "catalogPricingTier", i.CatalogPricingTier) + populate(objectMap, "catalogServerEndpoint", i.CatalogServerEndpoint) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeSsisCatalogInfo. +func (i *IntegrationRuntimeSsisCatalogInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "catalogAdminPassword": + err = unpopulate(val, "CatalogAdminPassword", &i.CatalogAdminPassword) + delete(rawMsg, key) + case "catalogAdminUserName": + err = unpopulate(val, "CatalogAdminUserName", &i.CatalogAdminUserName) + delete(rawMsg, key) + case "catalogPricingTier": + err = unpopulate(val, "CatalogPricingTier", &i.CatalogPricingTier) + delete(rawMsg, key) + case "catalogServerEndpoint": + err = unpopulate(val, "CatalogServerEndpoint", &i.CatalogServerEndpoint) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeSsisProperties. +func (i IntegrationRuntimeSsisProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "catalogInfo", i.CatalogInfo) + populate(objectMap, "customSetupScriptProperties", i.CustomSetupScriptProperties) + populate(objectMap, "dataProxyProperties", i.DataProxyProperties) + populate(objectMap, "edition", i.Edition) + populate(objectMap, "expressCustomSetupProperties", i.ExpressCustomSetupProperties) + populate(objectMap, "licenseType", i.LicenseType) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeSsisProperties. +func (i *IntegrationRuntimeSsisProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "catalogInfo": + err = unpopulate(val, "CatalogInfo", &i.CatalogInfo) + delete(rawMsg, key) + case "customSetupScriptProperties": + err = unpopulate(val, "CustomSetupScriptProperties", &i.CustomSetupScriptProperties) + delete(rawMsg, key) + case "dataProxyProperties": + err = unpopulate(val, "DataProxyProperties", &i.DataProxyProperties) + delete(rawMsg, key) + case "edition": + err = unpopulate(val, "Edition", &i.Edition) + delete(rawMsg, key) + case "expressCustomSetupProperties": + i.ExpressCustomSetupProperties, err = unmarshalCustomSetupBaseClassificationArray(val) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &i.LicenseType) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeStatus. +func (i IntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataFactoryName", i.DataFactoryName) + populate(objectMap, "state", i.State) + objectMap["type"] = i.Type + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeStatus. +func (i *IntegrationRuntimeStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataFactoryName": + err = unpopulate(val, "DataFactoryName", &i.DataFactoryName) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &i.State) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeStatusResponse. +func (i IntegrationRuntimeStatusResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeStatusResponse. +func (i *IntegrationRuntimeStatusResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + i.Properties, err = unmarshalIntegrationRuntimeStatusClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeStopOperationStatus. +func (i IntegrationRuntimeStopOperationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", i.Error) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", &i.Properties) + populate(objectMap, "status", i.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeStopOperationStatus. +func (i *IntegrationRuntimeStopOperationStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &i.Error) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeVNetProperties. +func (i IntegrationRuntimeVNetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publicIPs", i.PublicIPs) + populate(objectMap, "subnet", i.Subnet) + populate(objectMap, "subnetId", i.SubnetID) + populate(objectMap, "vNetId", i.VNetID) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeVNetProperties. +func (i *IntegrationRuntimeVNetProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicIPs": + err = unpopulate(val, "PublicIPs", &i.PublicIPs) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &i.Subnet) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &i.SubnetID) + delete(rawMsg, key) + case "vNetId": + err = unpopulate(val, "VNetID", &i.VNetID) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotHubConnectionProperties. +func (i IotHubConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "consumerGroup", i.ConsumerGroup) + populate(objectMap, "dataFormat", i.DataFormat) + populate(objectMap, "eventSystemProperties", i.EventSystemProperties) + populate(objectMap, "iotHubResourceId", i.IotHubResourceID) + populate(objectMap, "mappingRuleName", i.MappingRuleName) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "sharedAccessPolicyName", i.SharedAccessPolicyName) + populate(objectMap, "tableName", i.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotHubConnectionProperties. +func (i *IotHubConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consumerGroup": + err = unpopulate(val, "ConsumerGroup", &i.ConsumerGroup) + delete(rawMsg, key) + case "dataFormat": + err = unpopulate(val, "DataFormat", &i.DataFormat) + delete(rawMsg, key) + case "eventSystemProperties": + err = unpopulate(val, "EventSystemProperties", &i.EventSystemProperties) + delete(rawMsg, key) + case "iotHubResourceId": + err = unpopulate(val, "IotHubResourceID", &i.IotHubResourceID) + delete(rawMsg, key) + case "mappingRuleName": + err = unpopulate(val, "MappingRuleName", &i.MappingRuleName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "sharedAccessPolicyName": + err = unpopulate(val, "SharedAccessPolicyName", &i.SharedAccessPolicyName) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &i.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotHubDataConnection. +func (i IotHubDataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + objectMap["kind"] = DataConnectionKindIotHub + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "systemData", i.SystemData) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotHubDataConnection. +func (i *IotHubDataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &i.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &i.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KekIdentityProperties. +func (k KekIdentityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "useSystemAssignedIdentity", &k.UseSystemAssignedIdentity) + populate(objectMap, "userAssignedIdentity", k.UserAssignedIdentity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KekIdentityProperties. +func (k *KekIdentityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "useSystemAssignedIdentity": + err = unpopulate(val, "UseSystemAssignedIdentity", &k.UseSystemAssignedIdentity) + delete(rawMsg, key) + case "userAssignedIdentity": + err = unpopulate(val, "UserAssignedIdentity", &k.UserAssignedIdentity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Key. +func (k Key) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Key. +func (k *Key) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyInfoListResult. +func (k KeyInfoListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", k.NextLink) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyInfoListResult. +func (k *KeyInfoListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &k.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyProperties. +func (k KeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isActiveCMK", k.IsActiveCMK) + populate(objectMap, "keyVaultUrl", k.KeyVaultURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyProperties. +func (k *KeyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isActiveCMK": + err = unpopulate(val, "IsActiveCMK", &k.IsActiveCMK) + delete(rawMsg, key) + case "keyVaultUrl": + err = unpopulate(val, "KeyVaultURL", &k.KeyVaultURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KustoPool. +func (k KustoPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", k.Etag) + populate(objectMap, "id", k.ID) + populate(objectMap, "location", k.Location) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "sku", k.SKU) + populate(objectMap, "systemData", k.SystemData) + populate(objectMap, "tags", k.Tags) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KustoPool. +func (k *KustoPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &k.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &k.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &k.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &k.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KustoPoolCheckNameRequest. +func (k KustoPoolCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", k.Name) + objectMap["type"] = "Microsoft.Synapse/workspaces/kustoPools" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolCheckNameRequest. +func (k *KustoPoolCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KustoPoolListResult. +func (k KustoPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolListResult. +func (k *KustoPoolListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KustoPoolPrivateLinkResources. +func (k KustoPoolPrivateLinkResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "systemData", k.SystemData) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolPrivateLinkResources. +func (k *KustoPoolPrivateLinkResources) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &k.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KustoPoolProperties. +func (k KustoPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataIngestionUri", k.DataIngestionURI) + populate(objectMap, "enablePurge", k.EnablePurge) + populate(objectMap, "enableStreamingIngest", k.EnableStreamingIngest) + populate(objectMap, "languageExtensions", k.LanguageExtensions) + populate(objectMap, "optimizedAutoscale", k.OptimizedAutoscale) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "state", k.State) + populate(objectMap, "stateReason", k.StateReason) + populate(objectMap, "uri", k.URI) + populate(objectMap, "workspaceUID", k.WorkspaceUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolProperties. +func (k *KustoPoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataIngestionUri": + err = unpopulate(val, "DataIngestionURI", &k.DataIngestionURI) + delete(rawMsg, key) + case "enablePurge": + err = unpopulate(val, "EnablePurge", &k.EnablePurge) + delete(rawMsg, key) + case "enableStreamingIngest": + err = unpopulate(val, "EnableStreamingIngest", &k.EnableStreamingIngest) + delete(rawMsg, key) + case "languageExtensions": + err = unpopulate(val, "LanguageExtensions", &k.LanguageExtensions) + delete(rawMsg, key) + case "optimizedAutoscale": + err = unpopulate(val, "OptimizedAutoscale", &k.OptimizedAutoscale) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &k.State) + delete(rawMsg, key) + case "stateReason": + err = unpopulate(val, "StateReason", &k.StateReason) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &k.URI) + delete(rawMsg, key) + case "workspaceUID": + err = unpopulate(val, "WorkspaceUID", &k.WorkspaceUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KustoPoolUpdate. +func (k KustoPoolUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "sku", k.SKU) + populate(objectMap, "tags", k.Tags) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KustoPoolUpdate. +func (k *KustoPoolUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &k.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LanguageExtension. +func (l LanguageExtension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "languageExtensionName", l.LanguageExtensionName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LanguageExtension. +func (l *LanguageExtension) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "languageExtensionName": + err = unpopulate(val, "LanguageExtensionName", &l.LanguageExtensionName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LanguageExtensionsList. +func (l LanguageExtensionsList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LanguageExtensionsList. +func (l *LanguageExtensionsList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LibraryInfo. +func (l LibraryInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", l.ContainerName) + populate(objectMap, "creatorId", l.CreatorID) + populate(objectMap, "name", l.Name) + populate(objectMap, "path", l.Path) + populate(objectMap, "provisioningStatus", l.ProvisioningStatus) + populate(objectMap, "type", l.Type) + populateTimeRFC3339(objectMap, "uploadedTimestamp", l.UploadedTimestamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LibraryInfo. +func (l *LibraryInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &l.ContainerName) + delete(rawMsg, key) + case "creatorId": + err = unpopulate(val, "CreatorID", &l.CreatorID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &l.Path) + delete(rawMsg, key) + case "provisioningStatus": + err = unpopulate(val, "ProvisioningStatus", &l.ProvisioningStatus) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + case "uploadedTimestamp": + err = unpopulateTimeRFC3339(val, "UploadedTimestamp", &l.UploadedTimestamp) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LibraryListResponse. +func (l LibraryListResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LibraryListResponse. +func (l *LibraryListResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LibraryRequirements. +func (l LibraryRequirements) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "content", l.Content) + populate(objectMap, "filename", l.Filename) + populateTimeRFC3339(objectMap, "time", l.Time) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LibraryRequirements. +func (l *LibraryRequirements) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "content": + err = unpopulate(val, "Content", &l.Content) + delete(rawMsg, key) + case "filename": + err = unpopulate(val, "Filename", &l.Filename) + delete(rawMsg, key) + case "time": + err = unpopulateTimeRFC3339(val, "Time", &l.Time) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LibraryResource. +func (l LibraryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", l.Etag) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LibraryResource. +func (l *LibraryResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &l.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LicensedComponentSetupTypeProperties. +func (l LicensedComponentSetupTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "componentName", l.ComponentName) + populate(objectMap, "licenseKey", l.LicenseKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LicensedComponentSetupTypeProperties. +func (l *LicensedComponentSetupTypeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentName": + err = unpopulate(val, "ComponentName", &l.ComponentName) + delete(rawMsg, key) + case "licenseKey": + l.LicenseKey, err = unmarshalSecretBaseClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LinkedIntegrationRuntime. +func (l LinkedIntegrationRuntime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "createTime", l.CreateTime) + populate(objectMap, "dataFactoryLocation", l.DataFactoryLocation) + populate(objectMap, "dataFactoryName", l.DataFactoryName) + populate(objectMap, "name", l.Name) + populate(objectMap, "subscriptionId", l.SubscriptionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedIntegrationRuntime. +func (l *LinkedIntegrationRuntime) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createTime": + err = unpopulateTimeRFC3339(val, "CreateTime", &l.CreateTime) + delete(rawMsg, key) + case "dataFactoryLocation": + err = unpopulate(val, "DataFactoryLocation", &l.DataFactoryLocation) + delete(rawMsg, key) + case "dataFactoryName": + err = unpopulate(val, "DataFactoryName", &l.DataFactoryName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &l.SubscriptionID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LinkedIntegrationRuntimeKeyAuthorization. +func (l LinkedIntegrationRuntimeKeyAuthorization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authorizationType"] = "Key" + populate(objectMap, "key", l.Key) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedIntegrationRuntimeKeyAuthorization. +func (l *LinkedIntegrationRuntimeKeyAuthorization) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationType": + err = unpopulate(val, "AuthorizationType", &l.AuthorizationType) + delete(rawMsg, key) + case "key": + err = unpopulate(val, "Key", &l.Key) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LinkedIntegrationRuntimeRbacAuthorization. +func (l LinkedIntegrationRuntimeRbacAuthorization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authorizationType"] = "RBAC" + populate(objectMap, "resourceId", l.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedIntegrationRuntimeRbacAuthorization. +func (l *LinkedIntegrationRuntimeRbacAuthorization) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationType": + err = unpopulate(val, "AuthorizationType", &l.AuthorizationType) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &l.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LinkedIntegrationRuntimeType. +func (l LinkedIntegrationRuntimeType) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authorizationType"] = l.AuthorizationType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedIntegrationRuntimeType. +func (l *LinkedIntegrationRuntimeType) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationType": + err = unpopulate(val, "AuthorizationType", &l.AuthorizationType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListResourceSKUsResult. +func (l ListResourceSKUsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListResourceSKUsResult. +func (l *ListResourceSKUsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListSQLPoolSecurityAlertPolicies. +func (l ListSQLPoolSecurityAlertPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListSQLPoolSecurityAlertPolicies. +func (l *ListSQLPoolSecurityAlertPolicies) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowOptions. +func (m MaintenanceWindowOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowOptions. +func (m *MaintenanceWindowOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowOptionsProperties. +func (m MaintenanceWindowOptionsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowMultipleMaintenanceWindowsPerCycle", m.AllowMultipleMaintenanceWindowsPerCycle) + populate(objectMap, "defaultDurationInMinutes", m.DefaultDurationInMinutes) + populate(objectMap, "isEnabled", m.IsEnabled) + populate(objectMap, "maintenanceWindowCycles", m.MaintenanceWindowCycles) + populate(objectMap, "minCycles", m.MinCycles) + populate(objectMap, "minDurationInMinutes", m.MinDurationInMinutes) + populate(objectMap, "timeGranularityInMinutes", m.TimeGranularityInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowOptionsProperties. +func (m *MaintenanceWindowOptionsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowMultipleMaintenanceWindowsPerCycle": + err = unpopulate(val, "AllowMultipleMaintenanceWindowsPerCycle", &m.AllowMultipleMaintenanceWindowsPerCycle) + delete(rawMsg, key) + case "defaultDurationInMinutes": + err = unpopulate(val, "DefaultDurationInMinutes", &m.DefaultDurationInMinutes) + delete(rawMsg, key) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &m.IsEnabled) + delete(rawMsg, key) + case "maintenanceWindowCycles": + err = unpopulate(val, "MaintenanceWindowCycles", &m.MaintenanceWindowCycles) + delete(rawMsg, key) + case "minCycles": + err = unpopulate(val, "MinCycles", &m.MinCycles) + delete(rawMsg, key) + case "minDurationInMinutes": + err = unpopulate(val, "MinDurationInMinutes", &m.MinDurationInMinutes) + delete(rawMsg, key) + case "timeGranularityInMinutes": + err = unpopulate(val, "TimeGranularityInMinutes", &m.TimeGranularityInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowTimeRange. +func (m MaintenanceWindowTimeRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dayOfWeek", m.DayOfWeek) + populate(objectMap, "duration", m.Duration) + populate(objectMap, "startTime", m.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowTimeRange. +func (m *MaintenanceWindowTimeRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dayOfWeek": + err = unpopulate(val, "DayOfWeek", &m.DayOfWeek) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &m.Duration) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindows. +func (m MaintenanceWindows) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindows. +func (m *MaintenanceWindows) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowsProperties. +func (m MaintenanceWindowsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "timeRanges", m.TimeRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowsProperties. +func (m *MaintenanceWindowsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "timeRanges": + err = unpopulate(val, "TimeRanges", &m.TimeRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentity. +func (m ManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentity. +func (m *ManagedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentitySQLControlSettingsModel. +func (m ManagedIdentitySQLControlSettingsModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentitySQLControlSettingsModel. +func (m *ManagedIdentitySQLControlSettingsModel) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentitySQLControlSettingsModelProperties. +func (m ManagedIdentitySQLControlSettingsModelProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "grantSqlControlToManagedIdentity", m.GrantSQLControlToManagedIdentity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentitySQLControlSettingsModelProperties. +func (m *ManagedIdentitySQLControlSettingsModelProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "grantSqlControlToManagedIdentity": + err = unpopulate(val, "GrantSQLControlToManagedIdentity", &m.GrantSQLControlToManagedIdentity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity. +func (m ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actualState", m.ActualState) + populate(objectMap, "desiredState", m.DesiredState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity. +func (m *ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actualState": + err = unpopulate(val, "ActualState", &m.ActualState) + delete(rawMsg, key) + case "desiredState": + err = unpopulate(val, "DesiredState", &m.DesiredState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntime. +func (m ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + populate(objectMap, "managedVirtualNetwork", m.ManagedVirtualNetwork) + populate(objectMap, "state", m.State) + objectMap["type"] = IntegrationRuntimeTypeManaged + populate(objectMap, "typeProperties", m.TypeProperties) + if m.AdditionalProperties != nil { + for key, val := range m.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntime. +func (m *ManagedIntegrationRuntime) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "managedVirtualNetwork": + err = unpopulate(val, "ManagedVirtualNetwork", &m.ManagedVirtualNetwork) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &m.State) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "typeProperties": + err = unpopulate(val, "TypeProperties", &m.TypeProperties) + delete(rawMsg, key) + default: + if m.AdditionalProperties == nil { + m.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + m.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeError. +func (m ManagedIntegrationRuntimeError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", m.Code) + populate(objectMap, "message", m.Message) + populate(objectMap, "parameters", m.Parameters) + populateTimeRFC3339(objectMap, "time", m.Time) + if m.AdditionalProperties != nil { + for key, val := range m.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeError. +func (m *ManagedIntegrationRuntimeError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &m.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &m.Message) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &m.Parameters) + delete(rawMsg, key) + case "time": + err = unpopulateTimeRFC3339(val, "Time", &m.Time) + delete(rawMsg, key) + default: + if m.AdditionalProperties == nil { + m.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + m.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeManagedVirtualNetworkReference. +func (m ManagedIntegrationRuntimeManagedVirtualNetworkReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "referenceName", m.ReferenceName) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeManagedVirtualNetworkReference. +func (m *ManagedIntegrationRuntimeManagedVirtualNetworkReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "referenceName": + err = unpopulate(val, "ReferenceName", &m.ReferenceName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeNode. +func (m ManagedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errors", m.Errors) + populate(objectMap, "nodeId", m.NodeID) + populate(objectMap, "status", m.Status) + if m.AdditionalProperties != nil { + for key, val := range m.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeNode. +func (m *ManagedIntegrationRuntimeNode) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errors": + err = unpopulate(val, "Errors", &m.Errors) + delete(rawMsg, key) + case "nodeId": + err = unpopulate(val, "NodeID", &m.NodeID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + default: + if m.AdditionalProperties == nil { + m.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + m.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeOperationResult. +func (m ManagedIntegrationRuntimeOperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activityId", m.ActivityID) + populate(objectMap, "errorCode", m.ErrorCode) + populate(objectMap, "parameters", m.Parameters) + populate(objectMap, "result", m.Result) + populateTimeRFC3339(objectMap, "startTime", m.StartTime) + populate(objectMap, "type", m.Type) + if m.AdditionalProperties != nil { + for key, val := range m.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeOperationResult. +func (m *ManagedIntegrationRuntimeOperationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activityId": + err = unpopulate(val, "ActivityID", &m.ActivityID) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &m.ErrorCode) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &m.Parameters) + delete(rawMsg, key) + case "result": + err = unpopulate(val, "Result", &m.Result) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + default: + if m.AdditionalProperties == nil { + m.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + m.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeStatus. +func (m ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataFactoryName", m.DataFactoryName) + populate(objectMap, "state", m.State) + objectMap["type"] = IntegrationRuntimeTypeManaged + populate(objectMap, "typeProperties", m.TypeProperties) + if m.AdditionalProperties != nil { + for key, val := range m.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeStatus. +func (m *ManagedIntegrationRuntimeStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataFactoryName": + err = unpopulate(val, "DataFactoryName", &m.DataFactoryName) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &m.State) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "typeProperties": + err = unpopulate(val, "TypeProperties", &m.TypeProperties) + delete(rawMsg, key) + default: + if m.AdditionalProperties == nil { + m.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + m.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeStatusTypeProperties. +func (m ManagedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "createTime", m.CreateTime) + populate(objectMap, "lastOperation", m.LastOperation) + populate(objectMap, "nodes", m.Nodes) + populate(objectMap, "otherErrors", m.OtherErrors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeStatusTypeProperties. +func (m *ManagedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createTime": + err = unpopulateTimeRFC3339(val, "CreateTime", &m.CreateTime) + delete(rawMsg, key) + case "lastOperation": + err = unpopulate(val, "LastOperation", &m.LastOperation) + delete(rawMsg, key) + case "nodes": + err = unpopulate(val, "Nodes", &m.Nodes) + delete(rawMsg, key) + case "otherErrors": + err = unpopulate(val, "OtherErrors", &m.OtherErrors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeTypeProperties. +func (m ManagedIntegrationRuntimeTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeProperties", m.ComputeProperties) + populate(objectMap, "ssisProperties", m.SsisProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeTypeProperties. +func (m *ManagedIntegrationRuntimeTypeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeProperties": + err = unpopulate(val, "ComputeProperties", &m.ComputeProperties) + delete(rawMsg, key) + case "ssisProperties": + err = unpopulate(val, "SsisProperties", &m.SsisProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedVirtualNetworkSettings. +func (m ManagedVirtualNetworkSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedAadTenantIdsForLinking", m.AllowedAADTenantIDsForLinking) + populate(objectMap, "linkedAccessCheckOnTargetResource", m.LinkedAccessCheckOnTargetResource) + populate(objectMap, "preventDataExfiltration", m.PreventDataExfiltration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedVirtualNetworkSettings. +func (m *ManagedVirtualNetworkSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedAadTenantIdsForLinking": + err = unpopulate(val, "AllowedAADTenantIDsForLinking", &m.AllowedAADTenantIDsForLinking) + delete(rawMsg, key) + case "linkedAccessCheckOnTargetResource": + err = unpopulate(val, "LinkedAccessCheckOnTargetResource", &m.LinkedAccessCheckOnTargetResource) + delete(rawMsg, key) + case "preventDataExfiltration": + err = unpopulate(val, "PreventDataExfiltration", &m.PreventDataExfiltration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetadataSyncConfig. +func (m MetadataSyncConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetadataSyncConfig. +func (m *MetadataSyncConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetadataSyncConfigProperties. +func (m MetadataSyncConfigProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "syncIntervalInMinutes", m.SyncIntervalInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetadataSyncConfigProperties. +func (m *MetadataSyncConfigProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "syncIntervalInMinutes": + err = unpopulate(val, "SyncIntervalInMinutes", &m.SyncIntervalInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populate(objectMap, "properties", &o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationMetaLogSpecification. +func (o OperationMetaLogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", o.BlobDuration) + populate(objectMap, "displayName", o.DisplayName) + populate(objectMap, "name", o.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationMetaLogSpecification. +func (o *OperationMetaLogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &o.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &o.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationMetaMetricDimensionSpecification. +func (o OperationMetaMetricDimensionSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", o.DisplayName) + populate(objectMap, "name", o.Name) + populate(objectMap, "toBeExportedForShoebox", o.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationMetaMetricDimensionSpecification. +func (o *OperationMetaMetricDimensionSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &o.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &o.ToBeExportedForShoebox) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationMetaMetricSpecification. +func (o OperationMetaMetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", o.AggregationType) + populate(objectMap, "dimensions", o.Dimensions) + populate(objectMap, "displayDescription", o.DisplayDescription) + populate(objectMap, "displayName", o.DisplayName) + populate(objectMap, "enableRegionalMdmAccount", o.EnableRegionalMdmAccount) + populate(objectMap, "metricFilterPattern", o.MetricFilterPattern) + populate(objectMap, "name", o.Name) + populate(objectMap, "sourceMdmAccount", o.SourceMdmAccount) + populate(objectMap, "sourceMdmNamespace", o.SourceMdmNamespace) + populate(objectMap, "supportsInstanceLevelAggregation", o.SupportsInstanceLevelAggregation) + populate(objectMap, "unit", o.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationMetaMetricSpecification. +func (o *OperationMetaMetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &o.AggregationType) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &o.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &o.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &o.DisplayName) + delete(rawMsg, key) + case "enableRegionalMdmAccount": + err = unpopulate(val, "EnableRegionalMdmAccount", &o.EnableRegionalMdmAccount) + delete(rawMsg, key) + case "metricFilterPattern": + err = unpopulate(val, "MetricFilterPattern", &o.MetricFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "sourceMdmAccount": + err = unpopulate(val, "SourceMdmAccount", &o.SourceMdmAccount) + delete(rawMsg, key) + case "sourceMdmNamespace": + err = unpopulate(val, "SourceMdmNamespace", &o.SourceMdmNamespace) + delete(rawMsg, key) + case "supportsInstanceLevelAggregation": + err = unpopulate(val, "SupportsInstanceLevelAggregation", &o.SupportsInstanceLevelAggregation) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &o.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationMetaPropertyInfo. +func (o OperationMetaPropertyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationMetaPropertyInfo. +func (o *OperationMetaPropertyInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationMetaServiceSpecification. +func (o OperationMetaServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", o.LogSpecifications) + populate(objectMap, "metricSpecifications", o.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationMetaServiceSpecification. +func (o *OperationMetaServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &o.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &o.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResource. +func (o OperationResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populate(objectMap, "error", o.Error) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "percentComplete", o.PercentComplete) + populate(objectMap, "properties", &o.Properties) + populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResource. +func (o *OperationResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &o.PercentComplete) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OptimizedAutoscale. +func (o OptimizedAutoscale) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isEnabled", o.IsEnabled) + populate(objectMap, "maximum", o.Maximum) + populate(objectMap, "minimum", o.Minimum) + populate(objectMap, "version", o.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OptimizedAutoscale. +func (o *OptimizedAutoscale) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isEnabled": + err = unpopulate(val, "IsEnabled", &o.IsEnabled) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &o.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &o.Minimum) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &o.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionForPrivateLinkHub. +func (p PrivateEndpointConnectionForPrivateLinkHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionForPrivateLinkHub. +func (p *PrivateEndpointConnectionForPrivateLinkHub) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionForPrivateLinkHubBasic. +func (p PrivateEndpointConnectionForPrivateLinkHubBasic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionForPrivateLinkHubBasic. +func (p *PrivateEndpointConnectionForPrivateLinkHubBasic) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated. +func (p PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated. +func (p *PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse. +func (p PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse. +func (p *PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionList. +func (p PrivateEndpointConnectionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionList. +func (p *PrivateEndpointConnectionList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkHub. +func (p PrivateLinkHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkHub. +func (p *PrivateLinkHub) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkHubInfoListResult. +func (p PrivateLinkHubInfoListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkHubInfoListResult. +func (p *PrivateLinkHubInfoListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkHubPatchInfo. +func (p PrivateLinkHubPatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkHubPatchInfo. +func (p *PrivateLinkHubPatchInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkHubProperties. +func (p PrivateLinkHubProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpointConnections", p.PrivateEndpointConnections) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkHubProperties. +func (p *PrivateLinkHubProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &p.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResources. +func (p PrivateLinkResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResources. +func (p *PrivateLinkResources) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourcesProperties. +func (p PrivateLinkResourcesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourcesProperties. +func (p *PrivateLinkResourcesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyResource. +func (p ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. +func (p *ProxyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PurviewConfiguration. +func (p PurviewConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "purviewResourceId", p.PurviewResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PurviewConfiguration. +func (p *PurviewConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "purviewResourceId": + err = unpopulate(val, "PurviewResourceID", &p.PurviewResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryInterval. +func (q QueryInterval) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "executionCount", q.ExecutionCount) + populateTimeRFC3339(objectMap, "intervalStartTime", q.IntervalStartTime) + populate(objectMap, "metrics", q.Metrics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryInterval. +func (q *QueryInterval) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "executionCount": + err = unpopulate(val, "ExecutionCount", &q.ExecutionCount) + delete(rawMsg, key) + case "intervalStartTime": + err = unpopulateTimeRFC3339(val, "IntervalStartTime", &q.IntervalStartTime) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &q.Metrics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryMetric. +func (q QueryMetric) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", q.DisplayName) + populate(objectMap, "name", q.Name) + populate(objectMap, "unit", q.Unit) + populate(objectMap, "value", q.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryMetric. +func (q *QueryMetric) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &q.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &q.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &q.Unit) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &q.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryStatistic. +func (q QueryStatistic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "intervals", q.Intervals) + populate(objectMap, "queryId", q.QueryID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryStatistic. +func (q *QueryStatistic) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "intervals": + err = unpopulate(val, "Intervals", &q.Intervals) + delete(rawMsg, key) + case "queryId": + err = unpopulate(val, "QueryID", &q.QueryID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadOnlyFollowingDatabase. +func (r ReadOnlyFollowingDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + objectMap["kind"] = KindReadOnlyFollowing + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadOnlyFollowingDatabase. +func (r *ReadOnlyFollowingDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadOnlyFollowingDatabaseProperties. +func (r ReadOnlyFollowingDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attachedDatabaseConfigurationName", r.AttachedDatabaseConfigurationName) + populate(objectMap, "hotCachePeriod", r.HotCachePeriod) + populate(objectMap, "leaderClusterResourceId", r.LeaderClusterResourceID) + populate(objectMap, "principalsModificationKind", r.PrincipalsModificationKind) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "softDeletePeriod", r.SoftDeletePeriod) + populate(objectMap, "statistics", r.Statistics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadOnlyFollowingDatabaseProperties. +func (r *ReadOnlyFollowingDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attachedDatabaseConfigurationName": + err = unpopulate(val, "AttachedDatabaseConfigurationName", &r.AttachedDatabaseConfigurationName) + delete(rawMsg, key) + case "hotCachePeriod": + err = unpopulate(val, "HotCachePeriod", &r.HotCachePeriod) + delete(rawMsg, key) + case "leaderClusterResourceId": + err = unpopulate(val, "LeaderClusterResourceID", &r.LeaderClusterResourceID) + delete(rawMsg, key) + case "principalsModificationKind": + err = unpopulate(val, "PrincipalsModificationKind", &r.PrincipalsModificationKind) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "softDeletePeriod": + err = unpopulate(val, "SoftDeletePeriod", &r.SoftDeletePeriod) + delete(rawMsg, key) + case "statistics": + err = unpopulate(val, "Statistics", &r.Statistics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabase. +func (r ReadWriteDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + objectMap["kind"] = KindReadWrite + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabase. +func (r *ReadWriteDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabaseProperties. +func (r ReadWriteDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hotCachePeriod", r.HotCachePeriod) + populate(objectMap, "isFollowed", r.IsFollowed) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "softDeletePeriod", r.SoftDeletePeriod) + populate(objectMap, "statistics", r.Statistics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabaseProperties. +func (r *ReadWriteDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hotCachePeriod": + err = unpopulate(val, "HotCachePeriod", &r.HotCachePeriod) + delete(rawMsg, key) + case "isFollowed": + err = unpopulate(val, "IsFollowed", &r.IsFollowed) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "softDeletePeriod": + err = unpopulate(val, "SoftDeletePeriod", &r.SoftDeletePeriod) + delete(rawMsg, key) + case "statistics": + err = unpopulate(val, "Statistics", &r.Statistics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdate. +func (r RecommendedSensitivityLabelUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdate. +func (r *RecommendedSensitivityLabelUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdateList. +func (r RecommendedSensitivityLabelUpdateList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operations", r.Operations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdateList. +func (r *RecommendedSensitivityLabelUpdateList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operations": + err = unpopulate(val, "Operations", &r.Operations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdateProperties. +func (r RecommendedSensitivityLabelUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "column", r.Column) + populate(objectMap, "op", r.Op) + populate(objectMap, "schema", r.Schema) + populate(objectMap, "table", r.Table) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdateProperties. +func (r *RecommendedSensitivityLabelUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "column": + err = unpopulate(val, "Column", &r.Column) + delete(rawMsg, key) + case "op": + err = unpopulate(val, "Op", &r.Op) + delete(rawMsg, key) + case "schema": + err = unpopulate(val, "Schema", &r.Schema) + delete(rawMsg, key) + case "table": + err = unpopulate(val, "Table", &r.Table) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableSQLPool. +func (r RecoverableSQLPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableSQLPool. +func (r *RecoverableSQLPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableSQLPoolListResult. +func (r RecoverableSQLPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableSQLPoolListResult. +func (r *RecoverableSQLPoolListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoverableSQLPoolProperties. +func (r RecoverableSQLPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "edition", r.Edition) + populate(objectMap, "elasticPoolName", r.ElasticPoolName) + populateTimeRFC3339(objectMap, "lastAvailableBackupDate", r.LastAvailableBackupDate) + populate(objectMap, "serviceLevelObjective", r.ServiceLevelObjective) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableSQLPoolProperties. +func (r *RecoverableSQLPoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "edition": + err = unpopulate(val, "Edition", &r.Edition) + delete(rawMsg, key) + case "elasticPoolName": + err = unpopulate(val, "ElasticPoolName", &r.ElasticPoolName) + delete(rawMsg, key) + case "lastAvailableBackupDate": + err = unpopulateTimeRFC3339(val, "LastAvailableBackupDate", &r.LastAvailableBackupDate) + delete(rawMsg, key) + case "serviceLevelObjective": + err = unpopulate(val, "ServiceLevelObjective", &r.ServiceLevelObjective) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplaceAllFirewallRulesOperationResponse. +func (r ReplaceAllFirewallRulesOperationResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operationId", r.OperationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplaceAllFirewallRulesOperationResponse. +func (r *ReplaceAllFirewallRulesOperationResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operationId": + err = unpopulate(val, "OperationID", &r.OperationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplaceAllIPFirewallRulesRequest. +func (r ReplaceAllIPFirewallRulesRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipFirewallRules", r.IPFirewallRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplaceAllIPFirewallRulesRequest. +func (r *ReplaceAllIPFirewallRulesRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipFirewallRules": + err = unpopulate(val, "IPFirewallRules", &r.IPFirewallRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationLink. +func (r ReplicationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLink. +func (r *ReplicationLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationLinkListResult. +func (r ReplicationLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLinkListResult. +func (r *ReplicationLinkListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationLinkProperties. +func (r ReplicationLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isTerminationAllowed", r.IsTerminationAllowed) + populate(objectMap, "partnerDatabase", r.PartnerDatabase) + populate(objectMap, "partnerLocation", r.PartnerLocation) + populate(objectMap, "partnerRole", r.PartnerRole) + populate(objectMap, "partnerServer", r.PartnerServer) + populate(objectMap, "percentComplete", r.PercentComplete) + populate(objectMap, "replicationMode", r.ReplicationMode) + populate(objectMap, "replicationState", r.ReplicationState) + populate(objectMap, "role", r.Role) + populateTimeRFC3339(objectMap, "startTime", r.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLinkProperties. +func (r *ReplicationLinkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isTerminationAllowed": + err = unpopulate(val, "IsTerminationAllowed", &r.IsTerminationAllowed) + delete(rawMsg, key) + case "partnerDatabase": + err = unpopulate(val, "PartnerDatabase", &r.PartnerDatabase) + delete(rawMsg, key) + case "partnerLocation": + err = unpopulate(val, "PartnerLocation", &r.PartnerLocation) + delete(rawMsg, key) + case "partnerRole": + err = unpopulate(val, "PartnerRole", &r.PartnerRole) + delete(rawMsg, key) + case "partnerServer": + err = unpopulate(val, "PartnerServer", &r.PartnerServer) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &r.PercentComplete) + delete(rawMsg, key) + case "replicationMode": + err = unpopulate(val, "ReplicationMode", &r.ReplicationMode) + delete(rawMsg, key) + case "replicationState": + err = unpopulate(val, "ReplicationState", &r.ReplicationState) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &r.Role) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceMoveDefinition. +func (r ResourceMoveDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMoveDefinition. +func (r *ResourceMoveDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedSQLPool. +func (r RestorableDroppedSQLPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedSQLPool. +func (r *RestorableDroppedSQLPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedSQLPoolListResult. +func (r RestorableDroppedSQLPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedSQLPoolListResult. +func (r *RestorableDroppedSQLPoolListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedSQLPoolProperties. +func (r RestorableDroppedSQLPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "creationDate", r.CreationDate) + populate(objectMap, "databaseName", r.DatabaseName) + populateTimeRFC3339(objectMap, "deletionDate", r.DeletionDate) + populateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) + populate(objectMap, "edition", r.Edition) + populate(objectMap, "elasticPoolName", r.ElasticPoolName) + populate(objectMap, "maxSizeBytes", r.MaxSizeBytes) + populate(objectMap, "serviceLevelObjective", r.ServiceLevelObjective) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedSQLPoolProperties. +func (r *RestorableDroppedSQLPoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationDate": + err = unpopulateTimeRFC3339(val, "CreationDate", &r.CreationDate) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &r.DatabaseName) + delete(rawMsg, key) + case "deletionDate": + err = unpopulateTimeRFC3339(val, "DeletionDate", &r.DeletionDate) + delete(rawMsg, key) + case "earliestRestoreDate": + err = unpopulateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) + delete(rawMsg, key) + case "edition": + err = unpopulate(val, "Edition", &r.Edition) + delete(rawMsg, key) + case "elasticPoolName": + err = unpopulate(val, "ElasticPoolName", &r.ElasticPoolName) + delete(rawMsg, key) + case "maxSizeBytes": + err = unpopulate(val, "MaxSizeBytes", &r.MaxSizeBytes) + delete(rawMsg, key) + case "serviceLevelObjective": + err = unpopulate(val, "ServiceLevelObjective", &r.ServiceLevelObjective) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorePoint. +func (r RestorePoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePoint. +func (r *RestorePoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorePointListResult. +func (r RestorePointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointListResult. +func (r *RestorePointListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorePointProperties. +func (r RestorePointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) + populateTimeRFC3339(objectMap, "restorePointCreationDate", r.RestorePointCreationDate) + populate(objectMap, "restorePointLabel", r.RestorePointLabel) + populate(objectMap, "restorePointType", r.RestorePointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointProperties. +func (r *RestorePointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "earliestRestoreDate": + err = unpopulateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) + delete(rawMsg, key) + case "restorePointCreationDate": + err = unpopulateTimeRFC3339(val, "RestorePointCreationDate", &r.RestorePointCreationDate) + delete(rawMsg, key) + case "restorePointLabel": + err = unpopulate(val, "RestorePointLabel", &r.RestorePointLabel) + delete(rawMsg, key) + case "restorePointType": + err = unpopulate(val, "RestorePointType", &r.RestorePointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "name", s.Name) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUDescription. +func (s SKUDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "locationInfo", s.LocationInfo) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "name", s.Name) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "restrictions", s.Restrictions) + populate(objectMap, "size", s.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescription. +func (s *SKUDescription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "locationInfo": + err = unpopulate(val, "LocationInfo", &s.LocationInfo) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "restrictions": + err = unpopulate(val, "Restrictions", &s.Restrictions) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUDescriptionList. +func (s SKUDescriptionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescriptionList. +func (s *SKUDescriptionList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKULocationInfoItem. +func (s SKULocationInfoItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", s.Location) + populate(objectMap, "zones", s.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKULocationInfoItem. +func (s *SKULocationInfoItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &s.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPool. +func (s SQLPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPool. +func (s *SQLPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolBlobAuditingPolicy. +func (s SQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolBlobAuditingPolicy. +func (s *SQLPoolBlobAuditingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolBlobAuditingPolicyListResult. +func (s SQLPoolBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolBlobAuditingPolicyListResult. +func (s *SQLPoolBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolBlobAuditingPolicyProperties. +func (s SQLPoolBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auditActionsAndGroups", s.AuditActionsAndGroups) + populate(objectMap, "isAzureMonitorTargetEnabled", s.IsAzureMonitorTargetEnabled) + populate(objectMap, "isStorageSecondaryKeyInUse", s.IsStorageSecondaryKeyInUse) + populate(objectMap, "retentionDays", s.RetentionDays) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", s.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", s.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolBlobAuditingPolicyProperties. +func (s *SQLPoolBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auditActionsAndGroups": + err = unpopulate(val, "AuditActionsAndGroups", &s.AuditActionsAndGroups) + delete(rawMsg, key) + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &s.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "isStorageSecondaryKeyInUse": + err = unpopulate(val, "IsStorageSecondaryKeyInUse", &s.IsStorageSecondaryKeyInUse) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &s.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &s.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolBlobAuditingPolicySQLPoolOperationListResult. +func (s SQLPoolBlobAuditingPolicySQLPoolOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolBlobAuditingPolicySQLPoolOperationListResult. +func (s *SQLPoolBlobAuditingPolicySQLPoolOperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolColumn. +func (s SQLPoolColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolColumn. +func (s *SQLPoolColumn) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolColumnListResult. +func (s SQLPoolColumnListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolColumnListResult. +func (s *SQLPoolColumnListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolColumnProperties. +func (s SQLPoolColumnProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columnType", s.ColumnType) + populate(objectMap, "isComputed", s.IsComputed) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolColumnProperties. +func (s *SQLPoolColumnProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columnType": + err = unpopulate(val, "ColumnType", &s.ColumnType) + delete(rawMsg, key) + case "isComputed": + err = unpopulate(val, "IsComputed", &s.IsComputed) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolConnectionPolicy. +func (s SQLPoolConnectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolConnectionPolicy. +func (s *SQLPoolConnectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolConnectionPolicyProperties. +func (s SQLPoolConnectionPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "proxyDnsName", s.ProxyDNSName) + populate(objectMap, "proxyPort", s.ProxyPort) + populate(objectMap, "redirectionState", s.RedirectionState) + populate(objectMap, "securityEnabledAccess", s.SecurityEnabledAccess) + populate(objectMap, "state", s.State) + populate(objectMap, "useServerDefault", s.UseServerDefault) + populate(objectMap, "visibility", s.Visibility) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolConnectionPolicyProperties. +func (s *SQLPoolConnectionPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "proxyDnsName": + err = unpopulate(val, "ProxyDNSName", &s.ProxyDNSName) + delete(rawMsg, key) + case "proxyPort": + err = unpopulate(val, "ProxyPort", &s.ProxyPort) + delete(rawMsg, key) + case "redirectionState": + err = unpopulate(val, "RedirectionState", &s.RedirectionState) + delete(rawMsg, key) + case "securityEnabledAccess": + err = unpopulate(val, "SecurityEnabledAccess", &s.SecurityEnabledAccess) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "useServerDefault": + err = unpopulate(val, "UseServerDefault", &s.UseServerDefault) + delete(rawMsg, key) + case "visibility": + err = unpopulate(val, "Visibility", &s.Visibility) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolInfoListResult. +func (s SQLPoolInfoListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolInfoListResult. +func (s *SQLPoolInfoListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolOperation. +func (s SQLPoolOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolOperation. +func (s *SQLPoolOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolOperationProperties. +func (s SQLPoolOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "databaseName", s.DatabaseName) + populate(objectMap, "description", s.Description) + populate(objectMap, "errorCode", s.ErrorCode) + populate(objectMap, "errorDescription", s.ErrorDescription) + populate(objectMap, "errorSeverity", s.ErrorSeverity) + populateTimeRFC3339(objectMap, "estimatedCompletionTime", s.EstimatedCompletionTime) + populate(objectMap, "isCancellable", s.IsCancellable) + populate(objectMap, "isUserError", s.IsUserError) + populate(objectMap, "operation", s.Operation) + populate(objectMap, "operationFriendlyName", s.OperationFriendlyName) + populate(objectMap, "percentComplete", s.PercentComplete) + populate(objectMap, "serverName", s.ServerName) + populateTimeRFC3339(objectMap, "startTime", s.StartTime) + populate(objectMap, "state", s.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolOperationProperties. +func (s *SQLPoolOperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databaseName": + err = unpopulate(val, "DatabaseName", &s.DatabaseName) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &s.ErrorCode) + delete(rawMsg, key) + case "errorDescription": + err = unpopulate(val, "ErrorDescription", &s.ErrorDescription) + delete(rawMsg, key) + case "errorSeverity": + err = unpopulate(val, "ErrorSeverity", &s.ErrorSeverity) + delete(rawMsg, key) + case "estimatedCompletionTime": + err = unpopulateTimeRFC3339(val, "EstimatedCompletionTime", &s.EstimatedCompletionTime) + delete(rawMsg, key) + case "isCancellable": + err = unpopulate(val, "IsCancellable", &s.IsCancellable) + delete(rawMsg, key) + case "isUserError": + err = unpopulate(val, "IsUserError", &s.IsUserError) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &s.Operation) + delete(rawMsg, key) + case "operationFriendlyName": + err = unpopulate(val, "OperationFriendlyName", &s.OperationFriendlyName) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &s.PercentComplete) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &s.ServerName) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolPatchInfo. +func (s SQLPoolPatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", s.Location) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "tags", s.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolPatchInfo. +func (s *SQLPoolPatchInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolResourceProperties. +func (s SQLPoolResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "collation", s.Collation) + populate(objectMap, "createMode", s.CreateMode) + populateTimeRFC3339(objectMap, "creationDate", s.CreationDate) + populate(objectMap, "maxSizeBytes", s.MaxSizeBytes) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "recoverableDatabaseId", s.RecoverableDatabaseID) + populateTimeRFC3339(objectMap, "restorePointInTime", s.RestorePointInTime) + populateTimeRFC3339(objectMap, "sourceDatabaseDeletionDate", s.SourceDatabaseDeletionDate) + populate(objectMap, "sourceDatabaseId", s.SourceDatabaseID) + populate(objectMap, "status", s.Status) + populate(objectMap, "storageAccountType", s.StorageAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolResourceProperties. +func (s *SQLPoolResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "collation": + err = unpopulate(val, "Collation", &s.Collation) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &s.CreateMode) + delete(rawMsg, key) + case "creationDate": + err = unpopulateTimeRFC3339(val, "CreationDate", &s.CreationDate) + delete(rawMsg, key) + case "maxSizeBytes": + err = unpopulate(val, "MaxSizeBytes", &s.MaxSizeBytes) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "recoverableDatabaseId": + err = unpopulate(val, "RecoverableDatabaseID", &s.RecoverableDatabaseID) + delete(rawMsg, key) + case "restorePointInTime": + err = unpopulateTimeRFC3339(val, "RestorePointInTime", &s.RestorePointInTime) + delete(rawMsg, key) + case "sourceDatabaseDeletionDate": + err = unpopulateTimeRFC3339(val, "SourceDatabaseDeletionDate", &s.SourceDatabaseDeletionDate) + delete(rawMsg, key) + case "sourceDatabaseId": + err = unpopulate(val, "SourceDatabaseID", &s.SourceDatabaseID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "storageAccountType": + err = unpopulate(val, "StorageAccountType", &s.StorageAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolSchema. +func (s SQLPoolSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolSchema. +func (s *SQLPoolSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolSchemaListResult. +func (s SQLPoolSchemaListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolSchemaListResult. +func (s *SQLPoolSchemaListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolSecurityAlertPolicy. +func (s SQLPoolSecurityAlertPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolSecurityAlertPolicy. +func (s *SQLPoolSecurityAlertPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolTable. +func (s SQLPoolTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolTable. +func (s *SQLPoolTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolTableListResult. +func (s SQLPoolTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolTableListResult. +func (s *SQLPoolTableListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolUsage. +func (s SQLPoolUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", s.CurrentValue) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "limit", s.Limit) + populate(objectMap, "name", s.Name) + populateTimeRFC3339(objectMap, "nextResetTime", s.NextResetTime) + populate(objectMap, "resourceName", s.ResourceName) + populate(objectMap, "unit", s.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolUsage. +func (s *SQLPoolUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &s.CurrentValue) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &s.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "nextResetTime": + err = unpopulateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &s.ResourceName) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &s.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolUsageListResult. +func (s SQLPoolUsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolUsageListResult. +func (s *SQLPoolUsageListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessment. +func (s SQLPoolVulnerabilityAssessment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolVulnerabilityAssessment. +func (s *SQLPoolVulnerabilityAssessment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentListResult. +func (s SQLPoolVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolVulnerabilityAssessmentListResult. +func (s *SQLPoolVulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentProperties. +func (s SQLPoolVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recurringScans", s.RecurringScans) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageContainerPath", s.StorageContainerPath) + populate(objectMap, "storageContainerSasKey", s.StorageContainerSasKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolVulnerabilityAssessmentProperties. +func (s *SQLPoolVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recurringScans": + err = unpopulate(val, "RecurringScans", &s.RecurringScans) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageContainerPath": + err = unpopulate(val, "StorageContainerPath", &s.StorageContainerPath) + delete(rawMsg, key) + case "storageContainerSasKey": + err = unpopulate(val, "StorageContainerSasKey", &s.StorageContainerSasKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentRuleBaseline. +func (s SQLPoolVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolVulnerabilityAssessmentRuleBaseline. +func (s *SQLPoolVulnerabilityAssessmentRuleBaseline) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentRuleBaselineItem. +func (s SQLPoolVulnerabilityAssessmentRuleBaselineItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "result", s.Result) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolVulnerabilityAssessmentRuleBaselineItem. +func (s *SQLPoolVulnerabilityAssessmentRuleBaselineItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "result": + err = unpopulate(val, "Result", &s.Result) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentRuleBaselineProperties. +func (s SQLPoolVulnerabilityAssessmentRuleBaselineProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "baselineResults", s.BaselineResults) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolVulnerabilityAssessmentRuleBaselineProperties. +func (s *SQLPoolVulnerabilityAssessmentRuleBaselineProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "baselineResults": + err = unpopulate(val, "BaselineResults", &s.BaselineResults) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentScanExportProperties. +func (s SQLPoolVulnerabilityAssessmentScanExportProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exportedReportLocation", s.ExportedReportLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolVulnerabilityAssessmentScanExportProperties. +func (s *SQLPoolVulnerabilityAssessmentScanExportProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exportedReportLocation": + err = unpopulate(val, "ExportedReportLocation", &s.ExportedReportLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentScansExport. +func (s SQLPoolVulnerabilityAssessmentScansExport) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolVulnerabilityAssessmentScansExport. +func (s *SQLPoolVulnerabilityAssessmentScansExport) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretBase. +func (s SecretBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = s.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretBase. +func (s *SecretBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecureString. +func (s SecureString) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = "SecureString" + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecureString. +func (s *SecureString) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityAlertPolicyProperties. +func (s SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populate(objectMap, "disabledAlerts", s.DisabledAlerts) + populate(objectMap, "emailAccountAdmins", s.EmailAccountAdmins) + populate(objectMap, "emailAddresses", s.EmailAddresses) + populate(objectMap, "retentionDays", s.RetentionDays) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageEndpoint", s.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAlertPolicyProperties. +func (s *SecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTime": + err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + delete(rawMsg, key) + case "disabledAlerts": + err = unpopulate(val, "DisabledAlerts", &s.DisabledAlerts) + delete(rawMsg, key) + case "emailAccountAdmins": + err = unpopulate(val, "EmailAccountAdmins", &s.EmailAccountAdmins) + delete(rawMsg, key) + case "emailAddresses": + err = unpopulate(val, "EmailAddresses", &s.EmailAddresses) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &s.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntime. +func (s SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + objectMap["type"] = IntegrationRuntimeTypeSelfHosted + populate(objectMap, "typeProperties", s.TypeProperties) + if s.AdditionalProperties != nil { + for key, val := range s.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntime. +func (s *SelfHostedIntegrationRuntime) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "typeProperties": + err = unpopulate(val, "TypeProperties", &s.TypeProperties) + delete(rawMsg, key) + default: + if s.AdditionalProperties == nil { + s.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + s.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntimeNode. +func (s SelfHostedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capabilities", s.Capabilities) + populate(objectMap, "concurrentJobsLimit", s.ConcurrentJobsLimit) + populateTimeRFC3339(objectMap, "expiryTime", s.ExpiryTime) + populate(objectMap, "hostServiceUri", s.HostServiceURI) + populate(objectMap, "isActiveDispatcher", s.IsActiveDispatcher) + populateTimeRFC3339(objectMap, "lastConnectTime", s.LastConnectTime) + populateTimeRFC3339(objectMap, "lastEndUpdateTime", s.LastEndUpdateTime) + populateTimeRFC3339(objectMap, "lastStartTime", s.LastStartTime) + populateTimeRFC3339(objectMap, "lastStartUpdateTime", s.LastStartUpdateTime) + populateTimeRFC3339(objectMap, "lastStopTime", s.LastStopTime) + populate(objectMap, "lastUpdateResult", s.LastUpdateResult) + populate(objectMap, "machineName", s.MachineName) + populate(objectMap, "maxConcurrentJobs", s.MaxConcurrentJobs) + populate(objectMap, "nodeName", s.NodeName) + populateTimeRFC3339(objectMap, "registerTime", s.RegisterTime) + populate(objectMap, "status", s.Status) + populate(objectMap, "version", s.Version) + populate(objectMap, "versionStatus", s.VersionStatus) + if s.AdditionalProperties != nil { + for key, val := range s.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntimeNode. +func (s *SelfHostedIntegrationRuntimeNode) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &s.Capabilities) + delete(rawMsg, key) + case "concurrentJobsLimit": + err = unpopulate(val, "ConcurrentJobsLimit", &s.ConcurrentJobsLimit) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) + delete(rawMsg, key) + case "hostServiceUri": + err = unpopulate(val, "HostServiceURI", &s.HostServiceURI) + delete(rawMsg, key) + case "isActiveDispatcher": + err = unpopulate(val, "IsActiveDispatcher", &s.IsActiveDispatcher) + delete(rawMsg, key) + case "lastConnectTime": + err = unpopulateTimeRFC3339(val, "LastConnectTime", &s.LastConnectTime) + delete(rawMsg, key) + case "lastEndUpdateTime": + err = unpopulateTimeRFC3339(val, "LastEndUpdateTime", &s.LastEndUpdateTime) + delete(rawMsg, key) + case "lastStartTime": + err = unpopulateTimeRFC3339(val, "LastStartTime", &s.LastStartTime) + delete(rawMsg, key) + case "lastStartUpdateTime": + err = unpopulateTimeRFC3339(val, "LastStartUpdateTime", &s.LastStartUpdateTime) + delete(rawMsg, key) + case "lastStopTime": + err = unpopulateTimeRFC3339(val, "LastStopTime", &s.LastStopTime) + delete(rawMsg, key) + case "lastUpdateResult": + err = unpopulate(val, "LastUpdateResult", &s.LastUpdateResult) + delete(rawMsg, key) + case "machineName": + err = unpopulate(val, "MachineName", &s.MachineName) + delete(rawMsg, key) + case "maxConcurrentJobs": + err = unpopulate(val, "MaxConcurrentJobs", &s.MaxConcurrentJobs) + delete(rawMsg, key) + case "nodeName": + err = unpopulate(val, "NodeName", &s.NodeName) + delete(rawMsg, key) + case "registerTime": + err = unpopulateTimeRFC3339(val, "RegisterTime", &s.RegisterTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + case "versionStatus": + err = unpopulate(val, "VersionStatus", &s.VersionStatus) + delete(rawMsg, key) + default: + if s.AdditionalProperties == nil { + s.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + s.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntimeStatus. +func (s SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataFactoryName", s.DataFactoryName) + populate(objectMap, "state", s.State) + objectMap["type"] = IntegrationRuntimeTypeSelfHosted + populate(objectMap, "typeProperties", s.TypeProperties) + if s.AdditionalProperties != nil { + for key, val := range s.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntimeStatus. +func (s *SelfHostedIntegrationRuntimeStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataFactoryName": + err = unpopulate(val, "DataFactoryName", &s.DataFactoryName) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "typeProperties": + err = unpopulate(val, "TypeProperties", &s.TypeProperties) + delete(rawMsg, key) + default: + if s.AdditionalProperties == nil { + s.AdditionalProperties = map[string]any{} + } + if val != nil { + var aux any + err = json.Unmarshal(val, &aux) + s.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntimeStatusTypeProperties. +func (s SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoUpdate", s.AutoUpdate) + populateTimeRFC3339(objectMap, "autoUpdateETA", s.AutoUpdateETA) + populate(objectMap, "capabilities", s.Capabilities) + populateTimeRFC3339(objectMap, "createTime", s.CreateTime) + populate(objectMap, "internalChannelEncryption", s.InternalChannelEncryption) + populate(objectMap, "latestVersion", s.LatestVersion) + populate(objectMap, "links", s.Links) + populate(objectMap, "localTimeZoneOffset", s.LocalTimeZoneOffset) + populate(objectMap, "newerVersions", s.NewerVersions) + populate(objectMap, "nodeCommunicationChannelEncryptionMode", s.NodeCommunicationChannelEncryptionMode) + populate(objectMap, "nodes", s.Nodes) + populate(objectMap, "pushedVersion", s.PushedVersion) + populateTimeRFC3339(objectMap, "scheduledUpdateDate", s.ScheduledUpdateDate) + populate(objectMap, "serviceRegion", s.ServiceRegion) + populate(objectMap, "serviceUrls", s.ServiceUrls) + populate(objectMap, "taskQueueId", s.TaskQueueID) + populate(objectMap, "updateDelayOffset", s.UpdateDelayOffset) + populate(objectMap, "version", s.Version) + populate(objectMap, "versionStatus", s.VersionStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntimeStatusTypeProperties. +func (s *SelfHostedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoUpdate": + err = unpopulate(val, "AutoUpdate", &s.AutoUpdate) + delete(rawMsg, key) + case "autoUpdateETA": + err = unpopulateTimeRFC3339(val, "AutoUpdateETA", &s.AutoUpdateETA) + delete(rawMsg, key) + case "capabilities": + err = unpopulate(val, "Capabilities", &s.Capabilities) + delete(rawMsg, key) + case "createTime": + err = unpopulateTimeRFC3339(val, "CreateTime", &s.CreateTime) + delete(rawMsg, key) + case "internalChannelEncryption": + err = unpopulate(val, "InternalChannelEncryption", &s.InternalChannelEncryption) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &s.LatestVersion) + delete(rawMsg, key) + case "links": + err = unpopulate(val, "Links", &s.Links) + delete(rawMsg, key) + case "localTimeZoneOffset": + err = unpopulate(val, "LocalTimeZoneOffset", &s.LocalTimeZoneOffset) + delete(rawMsg, key) + case "newerVersions": + err = unpopulate(val, "NewerVersions", &s.NewerVersions) + delete(rawMsg, key) + case "nodeCommunicationChannelEncryptionMode": + err = unpopulate(val, "NodeCommunicationChannelEncryptionMode", &s.NodeCommunicationChannelEncryptionMode) + delete(rawMsg, key) + case "nodes": + err = unpopulate(val, "Nodes", &s.Nodes) + delete(rawMsg, key) + case "pushedVersion": + err = unpopulate(val, "PushedVersion", &s.PushedVersion) + delete(rawMsg, key) + case "scheduledUpdateDate": + err = unpopulateTimeRFC3339(val, "ScheduledUpdateDate", &s.ScheduledUpdateDate) + delete(rawMsg, key) + case "serviceRegion": + err = unpopulate(val, "ServiceRegion", &s.ServiceRegion) + delete(rawMsg, key) + case "serviceUrls": + err = unpopulate(val, "ServiceUrls", &s.ServiceUrls) + delete(rawMsg, key) + case "taskQueueId": + err = unpopulate(val, "TaskQueueID", &s.TaskQueueID) + delete(rawMsg, key) + case "updateDelayOffset": + err = unpopulate(val, "UpdateDelayOffset", &s.UpdateDelayOffset) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + case "versionStatus": + err = unpopulate(val, "VersionStatus", &s.VersionStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntimeTypeProperties. +func (s SelfHostedIntegrationRuntimeTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "linkedInfo", s.LinkedInfo) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntimeTypeProperties. +func (s *SelfHostedIntegrationRuntimeTypeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linkedInfo": + s.LinkedInfo, err = unmarshalLinkedIntegrationRuntimeTypeClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabel. +func (s SensitivityLabel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "managedBy", s.ManagedBy) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabel. +func (s *SensitivityLabel) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "managedBy": + err = unpopulate(val, "ManagedBy", &s.ManagedBy) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelListResult. +func (s SensitivityLabelListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelListResult. +func (s *SensitivityLabelListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelProperties. +func (s SensitivityLabelProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columnName", s.ColumnName) + populate(objectMap, "informationType", s.InformationType) + populate(objectMap, "informationTypeId", s.InformationTypeID) + populate(objectMap, "isDisabled", s.IsDisabled) + populate(objectMap, "labelId", s.LabelID) + populate(objectMap, "labelName", s.LabelName) + populate(objectMap, "rank", s.Rank) + populate(objectMap, "schemaName", s.SchemaName) + populate(objectMap, "tableName", s.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelProperties. +func (s *SensitivityLabelProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columnName": + err = unpopulate(val, "ColumnName", &s.ColumnName) + delete(rawMsg, key) + case "informationType": + err = unpopulate(val, "InformationType", &s.InformationType) + delete(rawMsg, key) + case "informationTypeId": + err = unpopulate(val, "InformationTypeID", &s.InformationTypeID) + delete(rawMsg, key) + case "isDisabled": + err = unpopulate(val, "IsDisabled", &s.IsDisabled) + delete(rawMsg, key) + case "labelId": + err = unpopulate(val, "LabelID", &s.LabelID) + delete(rawMsg, key) + case "labelName": + err = unpopulate(val, "LabelName", &s.LabelName) + delete(rawMsg, key) + case "rank": + err = unpopulate(val, "Rank", &s.Rank) + delete(rawMsg, key) + case "schemaName": + err = unpopulate(val, "SchemaName", &s.SchemaName) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &s.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdate. +func (s SensitivityLabelUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdate. +func (s *SensitivityLabelUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdateList. +func (s SensitivityLabelUpdateList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operations", s.Operations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdateList. +func (s *SensitivityLabelUpdateList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operations": + err = unpopulate(val, "Operations", &s.Operations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdateProperties. +func (s SensitivityLabelUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "column", s.Column) + populate(objectMap, "op", s.Op) + populate(objectMap, "schema", s.Schema) + populate(objectMap, "sensitivityLabel", s.SensitivityLabel) + populate(objectMap, "table", s.Table) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdateProperties. +func (s *SensitivityLabelUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "column": + err = unpopulate(val, "Column", &s.Column) + delete(rawMsg, key) + case "op": + err = unpopulate(val, "Op", &s.Op) + delete(rawMsg, key) + case "schema": + err = unpopulate(val, "Schema", &s.Schema) + delete(rawMsg, key) + case "sensitivityLabel": + err = unpopulate(val, "SensitivityLabel", &s.SensitivityLabel) + delete(rawMsg, key) + case "table": + err = unpopulate(val, "Table", &s.Table) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicy. +func (s ServerBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicy. +func (s *ServerBlobAuditingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicyListResult. +func (s ServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicyListResult. +func (s *ServerBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicyProperties. +func (s ServerBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auditActionsAndGroups", s.AuditActionsAndGroups) + populate(objectMap, "isAzureMonitorTargetEnabled", s.IsAzureMonitorTargetEnabled) + populate(objectMap, "isDevopsAuditEnabled", s.IsDevopsAuditEnabled) + populate(objectMap, "isStorageSecondaryKeyInUse", s.IsStorageSecondaryKeyInUse) + populate(objectMap, "queueDelayMs", s.QueueDelayMs) + populate(objectMap, "retentionDays", s.RetentionDays) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageAccountSubscriptionId", s.StorageAccountSubscriptionID) + populate(objectMap, "storageEndpoint", s.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicyProperties. +func (s *ServerBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auditActionsAndGroups": + err = unpopulate(val, "AuditActionsAndGroups", &s.AuditActionsAndGroups) + delete(rawMsg, key) + case "isAzureMonitorTargetEnabled": + err = unpopulate(val, "IsAzureMonitorTargetEnabled", &s.IsAzureMonitorTargetEnabled) + delete(rawMsg, key) + case "isDevopsAuditEnabled": + err = unpopulate(val, "IsDevopsAuditEnabled", &s.IsDevopsAuditEnabled) + delete(rawMsg, key) + case "isStorageSecondaryKeyInUse": + err = unpopulate(val, "IsStorageSecondaryKeyInUse", &s.IsStorageSecondaryKeyInUse) + delete(rawMsg, key) + case "queueDelayMs": + err = unpopulate(val, "QueueDelayMs", &s.QueueDelayMs) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &s.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageAccountSubscriptionId": + err = unpopulate(val, "StorageAccountSubscriptionID", &s.StorageAccountSubscriptionID) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicy. +func (s ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicy. +func (s *ServerSecurityAlertPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicyListResult. +func (s ServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicyListResult. +func (s *ServerSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicyProperties. +func (s ServerSecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) + populate(objectMap, "disabledAlerts", s.DisabledAlerts) + populate(objectMap, "emailAccountAdmins", s.EmailAccountAdmins) + populate(objectMap, "emailAddresses", s.EmailAddresses) + populate(objectMap, "retentionDays", s.RetentionDays) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageEndpoint", s.StorageEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicyProperties. +func (s *ServerSecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTime": + err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) + delete(rawMsg, key) + case "disabledAlerts": + err = unpopulate(val, "DisabledAlerts", &s.DisabledAlerts) + delete(rawMsg, key) + case "emailAccountAdmins": + err = unpopulate(val, "EmailAccountAdmins", &s.EmailAccountAdmins) + delete(rawMsg, key) + case "emailAddresses": + err = unpopulate(val, "EmailAddresses", &s.EmailAddresses) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &s.RetentionDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageEndpoint": + err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerUsage. +func (s ServerUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", s.CurrentValue) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "limit", s.Limit) + populate(objectMap, "name", s.Name) + populateTimeRFC3339(objectMap, "nextResetTime", s.NextResetTime) + populate(objectMap, "resourceName", s.ResourceName) + populate(objectMap, "unit", s.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerUsage. +func (s *ServerUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &s.CurrentValue) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &s.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "nextResetTime": + err = unpopulateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &s.ResourceName) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &s.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerUsageListResult. +func (s ServerUsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerUsageListResult. +func (s *ServerUsageListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessment. +func (s ServerVulnerabilityAssessment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessment. +func (s *ServerVulnerabilityAssessment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentListResult. +func (s ServerVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentListResult. +func (s *ServerVulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentProperties. +func (s ServerVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recurringScans", s.RecurringScans) + populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) + populate(objectMap, "storageContainerPath", s.StorageContainerPath) + populate(objectMap, "storageContainerSasKey", s.StorageContainerSasKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentProperties. +func (s *ServerVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recurringScans": + err = unpopulate(val, "RecurringScans", &s.RecurringScans) + delete(rawMsg, key) + case "storageAccountAccessKey": + err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) + delete(rawMsg, key) + case "storageContainerPath": + err = unpopulate(val, "StorageContainerPath", &s.StorageContainerPath) + delete(rawMsg, key) + case "storageContainerSasKey": + err = unpopulate(val, "StorageContainerSasKey", &s.StorageContainerSasKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkConfigProperties. +func (s SparkConfigProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurationType", s.ConfigurationType) + populate(objectMap, "content", s.Content) + populate(objectMap, "filename", s.Filename) + populateTimeRFC3339(objectMap, "time", s.Time) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkConfigProperties. +func (s *SparkConfigProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configurationType": + err = unpopulate(val, "ConfigurationType", &s.ConfigurationType) + delete(rawMsg, key) + case "content": + err = unpopulate(val, "Content", &s.Content) + delete(rawMsg, key) + case "filename": + err = unpopulate(val, "Filename", &s.Filename) + delete(rawMsg, key) + case "time": + err = unpopulateTimeRFC3339(val, "Time", &s.Time) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkConfigurationInfo. +func (s SparkConfigurationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "annotations", s.Annotations) + populate(objectMap, "configMergeRule", s.ConfigMergeRule) + populate(objectMap, "configs", s.Configs) + populateTimeRFC3339(objectMap, "created", s.Created) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "description", s.Description) + populate(objectMap, "notes", s.Notes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkConfigurationInfo. +func (s *SparkConfigurationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "annotations": + err = unpopulate(val, "Annotations", &s.Annotations) + delete(rawMsg, key) + case "configMergeRule": + err = unpopulate(val, "ConfigMergeRule", &s.ConfigMergeRule) + delete(rawMsg, key) + case "configs": + err = unpopulate(val, "Configs", &s.Configs) + delete(rawMsg, key) + case "created": + err = unpopulateTimeRFC3339(val, "Created", &s.Created) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "notes": + err = unpopulate(val, "Notes", &s.Notes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkConfigurationListResponse. +func (s SparkConfigurationListResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkConfigurationListResponse. +func (s *SparkConfigurationListResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkConfigurationResource. +func (s SparkConfigurationResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkConfigurationResource. +func (s *SparkConfigurationResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisEnvironment. +func (s SsisEnvironment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "folderId", s.FolderID) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + objectMap["type"] = SsisObjectMetadataTypeEnvironment + populate(objectMap, "variables", s.Variables) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisEnvironment. +func (s *SsisEnvironment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "folderId": + err = unpopulate(val, "FolderID", &s.FolderID) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "variables": + err = unpopulate(val, "Variables", &s.Variables) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisEnvironmentReference. +func (s SsisEnvironmentReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "environmentFolderName", s.EnvironmentFolderName) + populate(objectMap, "environmentName", s.EnvironmentName) + populate(objectMap, "id", s.ID) + populate(objectMap, "referenceType", s.ReferenceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisEnvironmentReference. +func (s *SsisEnvironmentReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "environmentFolderName": + err = unpopulate(val, "EnvironmentFolderName", &s.EnvironmentFolderName) + delete(rawMsg, key) + case "environmentName": + err = unpopulate(val, "EnvironmentName", &s.EnvironmentName) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "referenceType": + err = unpopulate(val, "ReferenceType", &s.ReferenceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisFolder. +func (s SsisFolder) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + objectMap["type"] = SsisObjectMetadataTypeFolder + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisFolder. +func (s *SsisFolder) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisObjectMetadata. +func (s SsisObjectMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + objectMap["type"] = s.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisObjectMetadata. +func (s *SsisObjectMetadata) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisObjectMetadataListResponse. +func (s SsisObjectMetadataListResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisObjectMetadataListResponse. +func (s *SsisObjectMetadataListResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + s.Value, err = unmarshalSsisObjectMetadataClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisObjectMetadataStatusResponse. +func (s SsisObjectMetadataStatusResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", s.Error) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "status", s.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisObjectMetadataStatusResponse. +func (s *SsisObjectMetadataStatusResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &s.Error) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisPackage. +func (s SsisPackage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "folderId", s.FolderID) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "parameters", s.Parameters) + populate(objectMap, "projectId", s.ProjectID) + populate(objectMap, "projectVersion", s.ProjectVersion) + objectMap["type"] = SsisObjectMetadataTypePackage + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisPackage. +func (s *SsisPackage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "folderId": + err = unpopulate(val, "FolderID", &s.FolderID) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &s.Parameters) + delete(rawMsg, key) + case "projectId": + err = unpopulate(val, "ProjectID", &s.ProjectID) + delete(rawMsg, key) + case "projectVersion": + err = unpopulate(val, "ProjectVersion", &s.ProjectVersion) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisParameter. +func (s SsisParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataType", s.DataType) + populate(objectMap, "defaultValue", s.DefaultValue) + populate(objectMap, "description", s.Description) + populate(objectMap, "designDefaultValue", s.DesignDefaultValue) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "required", s.Required) + populate(objectMap, "sensitive", s.Sensitive) + populate(objectMap, "sensitiveDefaultValue", s.SensitiveDefaultValue) + populate(objectMap, "valueSet", s.ValueSet) + populate(objectMap, "valueType", s.ValueType) + populate(objectMap, "variable", s.Variable) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisParameter. +func (s *SsisParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &s.DataType) + delete(rawMsg, key) + case "defaultValue": + err = unpopulate(val, "DefaultValue", &s.DefaultValue) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "designDefaultValue": + err = unpopulate(val, "DesignDefaultValue", &s.DesignDefaultValue) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "required": + err = unpopulate(val, "Required", &s.Required) + delete(rawMsg, key) + case "sensitive": + err = unpopulate(val, "Sensitive", &s.Sensitive) + delete(rawMsg, key) + case "sensitiveDefaultValue": + err = unpopulate(val, "SensitiveDefaultValue", &s.SensitiveDefaultValue) + delete(rawMsg, key) + case "valueSet": + err = unpopulate(val, "ValueSet", &s.ValueSet) + delete(rawMsg, key) + case "valueType": + err = unpopulate(val, "ValueType", &s.ValueType) + delete(rawMsg, key) + case "variable": + err = unpopulate(val, "Variable", &s.Variable) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisProject. +func (s SsisProject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "environmentRefs", s.EnvironmentRefs) + populate(objectMap, "folderId", s.FolderID) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "parameters", s.Parameters) + objectMap["type"] = SsisObjectMetadataTypeProject + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisProject. +func (s *SsisProject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "environmentRefs": + err = unpopulate(val, "EnvironmentRefs", &s.EnvironmentRefs) + delete(rawMsg, key) + case "folderId": + err = unpopulate(val, "FolderID", &s.FolderID) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &s.Parameters) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsisVariable. +func (s SsisVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataType", s.DataType) + populate(objectMap, "description", s.Description) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "sensitive", s.Sensitive) + populate(objectMap, "sensitiveValue", s.SensitiveValue) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsisVariable. +func (s *SsisVariable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &s.DataType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "sensitive": + err = unpopulate(val, "Sensitive", &s.Sensitive) + delete(rawMsg, key) + case "sensitiveValue": + err = unpopulate(val, "SensitiveValue", &s.SensitiveValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubResource. +func (s SubResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubResource. +func (s *SubResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableLevelSharingProperties. +func (t TableLevelSharingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "externalTablesToExclude", t.ExternalTablesToExclude) + populate(objectMap, "externalTablesToInclude", t.ExternalTablesToInclude) + populate(objectMap, "materializedViewsToExclude", t.MaterializedViewsToExclude) + populate(objectMap, "materializedViewsToInclude", t.MaterializedViewsToInclude) + populate(objectMap, "tablesToExclude", t.TablesToExclude) + populate(objectMap, "tablesToInclude", t.TablesToInclude) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableLevelSharingProperties. +func (t *TableLevelSharingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "externalTablesToExclude": + err = unpopulate(val, "ExternalTablesToExclude", &t.ExternalTablesToExclude) + delete(rawMsg, key) + case "externalTablesToInclude": + err = unpopulate(val, "ExternalTablesToInclude", &t.ExternalTablesToInclude) + delete(rawMsg, key) + case "materializedViewsToExclude": + err = unpopulate(val, "MaterializedViewsToExclude", &t.MaterializedViewsToExclude) + delete(rawMsg, key) + case "materializedViewsToInclude": + err = unpopulate(val, "MaterializedViewsToInclude", &t.MaterializedViewsToInclude) + delete(rawMsg, key) + case "tablesToExclude": + err = unpopulate(val, "TablesToExclude", &t.TablesToExclude) + delete(rawMsg, key) + case "tablesToInclude": + err = unpopulate(val, "TablesToInclude", &t.TablesToInclude) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopQueries. +func (t TopQueries) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationFunction", t.AggregationFunction) + populate(objectMap, "executionType", t.ExecutionType) + populate(objectMap, "intervalType", t.IntervalType) + populate(objectMap, "numberOfTopQueries", t.NumberOfTopQueries) + populateTimeRFC3339(objectMap, "observationEndTime", t.ObservationEndTime) + populateTimeRFC3339(objectMap, "observationStartTime", t.ObservationStartTime) + populate(objectMap, "observedMetric", t.ObservedMetric) + populate(objectMap, "queries", t.Queries) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopQueries. +func (t *TopQueries) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationFunction": + err = unpopulate(val, "AggregationFunction", &t.AggregationFunction) + delete(rawMsg, key) + case "executionType": + err = unpopulate(val, "ExecutionType", &t.ExecutionType) + delete(rawMsg, key) + case "intervalType": + err = unpopulate(val, "IntervalType", &t.IntervalType) + delete(rawMsg, key) + case "numberOfTopQueries": + err = unpopulate(val, "NumberOfTopQueries", &t.NumberOfTopQueries) + delete(rawMsg, key) + case "observationEndTime": + err = unpopulateTimeRFC3339(val, "ObservationEndTime", &t.ObservationEndTime) + delete(rawMsg, key) + case "observationStartTime": + err = unpopulateTimeRFC3339(val, "ObservationStartTime", &t.ObservationStartTime) + delete(rawMsg, key) + case "observedMetric": + err = unpopulate(val, "ObservedMetric", &t.ObservedMetric) + delete(rawMsg, key) + case "queries": + err = unpopulate(val, "Queries", &t.Queries) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopQueriesListResult. +func (t TopQueriesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopQueriesListResult. +func (t *TopQueriesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrackedResource. +func (t TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. +func (t *TrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TransparentDataEncryption. +func (t TransparentDataEncryption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TransparentDataEncryption. +func (t *TransparentDataEncryption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TransparentDataEncryptionListResult. +func (t TransparentDataEncryptionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TransparentDataEncryptionListResult. +func (t *TransparentDataEncryptionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TransparentDataEncryptionProperties. +func (t TransparentDataEncryptionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "status", t.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TransparentDataEncryptionProperties. +func (t *TransparentDataEncryptionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &t.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateIntegrationRuntimeNodeRequest. +func (u UpdateIntegrationRuntimeNodeRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "concurrentJobsLimit", u.ConcurrentJobsLimit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateIntegrationRuntimeNodeRequest. +func (u *UpdateIntegrationRuntimeNodeRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "concurrentJobsLimit": + err = unpopulate(val, "ConcurrentJobsLimit", &u.ConcurrentJobsLimit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateIntegrationRuntimeRequest. +func (u UpdateIntegrationRuntimeRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoUpdate", u.AutoUpdate) + populate(objectMap, "updateDelayOffset", u.UpdateDelayOffset) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateIntegrationRuntimeRequest. +func (u *UpdateIntegrationRuntimeRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoUpdate": + err = unpopulate(val, "AutoUpdate", &u.AutoUpdate) + delete(rawMsg, key) + case "updateDelayOffset": + err = unpopulate(val, "UpdateDelayOffset", &u.UpdateDelayOffset) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedManagedIdentity. +func (u UserAssignedManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedManagedIdentity. +func (u *UserAssignedManagedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkProfile. +func (v VirtualNetworkProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeSubnetId", v.ComputeSubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkProfile. +func (v *VirtualNetworkProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeSubnetId": + err = unpopulate(val, "ComputeSubnetID", &v.ComputeSubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentRecurringScansProperties. +func (v VulnerabilityAssessmentRecurringScansProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "emailSubscriptionAdmins", v.EmailSubscriptionAdmins) + populate(objectMap, "emails", v.Emails) + populate(objectMap, "isEnabled", v.IsEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentRecurringScansProperties. +func (v *VulnerabilityAssessmentRecurringScansProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "emailSubscriptionAdmins": + err = unpopulate(val, "EmailSubscriptionAdmins", &v.EmailSubscriptionAdmins) + delete(rawMsg, key) + case "emails": + err = unpopulate(val, "Emails", &v.Emails) + delete(rawMsg, key) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &v.IsEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanError. +func (v VulnerabilityAssessmentScanError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", v.Code) + populate(objectMap, "message", v.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanError. +func (v *VulnerabilityAssessmentScanError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &v.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecord. +func (v VulnerabilityAssessmentScanRecord) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecord. +func (v *VulnerabilityAssessmentScanRecord) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordListResult. +func (v VulnerabilityAssessmentScanRecordListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordListResult. +func (v *VulnerabilityAssessmentScanRecordListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordProperties. +func (v VulnerabilityAssessmentScanRecordProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "endTime", v.EndTime) + populate(objectMap, "errors", v.Errors) + populate(objectMap, "numberOfFailedSecurityChecks", v.NumberOfFailedSecurityChecks) + populate(objectMap, "scanId", v.ScanID) + populateTimeRFC3339(objectMap, "startTime", v.StartTime) + populate(objectMap, "state", v.State) + populate(objectMap, "storageContainerPath", v.StorageContainerPath) + populate(objectMap, "triggerType", v.TriggerType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordProperties. +func (v *VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateTimeRFC3339(val, "EndTime", &v.EndTime) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &v.Errors) + delete(rawMsg, key) + case "numberOfFailedSecurityChecks": + err = unpopulate(val, "NumberOfFailedSecurityChecks", &v.NumberOfFailedSecurityChecks) + delete(rawMsg, key) + case "scanId": + err = unpopulate(val, "ScanID", &v.ScanID) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, "StartTime", &v.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &v.State) + delete(rawMsg, key) + case "storageContainerPath": + err = unpopulate(val, "StorageContainerPath", &v.StorageContainerPath) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &v.TriggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadClassifier. +func (w WorkloadClassifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifier. +func (w *WorkloadClassifier) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadClassifierListResult. +func (w WorkloadClassifierListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifierListResult. +func (w *WorkloadClassifierListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadClassifierProperties. +func (w WorkloadClassifierProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "context", w.Context) + populate(objectMap, "endTime", w.EndTime) + populate(objectMap, "importance", w.Importance) + populate(objectMap, "label", w.Label) + populate(objectMap, "memberName", w.MemberName) + populate(objectMap, "startTime", w.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifierProperties. +func (w *WorkloadClassifierProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "context": + err = unpopulate(val, "Context", &w.Context) + delete(rawMsg, key) + case "endTime": + err = unpopulate(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "importance": + err = unpopulate(val, "Importance", &w.Importance) + delete(rawMsg, key) + case "label": + err = unpopulate(val, "Label", &w.Label) + delete(rawMsg, key) + case "memberName": + err = unpopulate(val, "MemberName", &w.MemberName) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadGroup. +func (w WorkloadGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroup. +func (w *WorkloadGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadGroupListResult. +func (w WorkloadGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroupListResult. +func (w *WorkloadGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadGroupProperties. +func (w WorkloadGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "importance", w.Importance) + populate(objectMap, "maxResourcePercent", w.MaxResourcePercent) + populate(objectMap, "maxResourcePercentPerRequest", w.MaxResourcePercentPerRequest) + populate(objectMap, "minResourcePercent", w.MinResourcePercent) + populate(objectMap, "minResourcePercentPerRequest", w.MinResourcePercentPerRequest) + populate(objectMap, "queryExecutionTimeout", w.QueryExecutionTimeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroupProperties. +func (w *WorkloadGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "importance": + err = unpopulate(val, "Importance", &w.Importance) + delete(rawMsg, key) + case "maxResourcePercent": + err = unpopulate(val, "MaxResourcePercent", &w.MaxResourcePercent) + delete(rawMsg, key) + case "maxResourcePercentPerRequest": + err = unpopulate(val, "MaxResourcePercentPerRequest", &w.MaxResourcePercentPerRequest) + delete(rawMsg, key) + case "minResourcePercent": + err = unpopulate(val, "MinResourcePercent", &w.MinResourcePercent) + delete(rawMsg, key) + case "minResourcePercentPerRequest": + err = unpopulate(val, "MinResourcePercentPerRequest", &w.MinResourcePercentPerRequest) + delete(rawMsg, key) + case "queryExecutionTimeout": + err = unpopulate(val, "QueryExecutionTimeout", &w.QueryExecutionTimeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Workspace. +func (w Workspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "identity", w.Identity) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Workspace. +func (w *Workspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &w.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceAADAdminInfo. +func (w WorkspaceAADAdminInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceAADAdminInfo. +func (w *WorkspaceAADAdminInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceInfoListResult. +func (w WorkspaceInfoListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceInfoListResult. +func (w *WorkspaceInfoListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceKeyDetails. +func (w WorkspaceKeyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyVaultUrl", w.KeyVaultURL) + populate(objectMap, "name", w.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceKeyDetails. +func (w *WorkspaceKeyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultUrl": + err = unpopulate(val, "KeyVaultURL", &w.KeyVaultURL) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspacePatchInfo. +func (w WorkspacePatchInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", w.Identity) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatchInfo. +func (w *WorkspacePatchInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &w.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspacePatchProperties. +func (w WorkspacePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryption", w.Encryption) + populate(objectMap, "managedVirtualNetworkSettings", w.ManagedVirtualNetworkSettings) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + populate(objectMap, "purviewConfiguration", w.PurviewConfiguration) + populate(objectMap, "sqlAdministratorLoginPassword", w.SQLAdministratorLoginPassword) + populate(objectMap, "workspaceRepositoryConfiguration", w.WorkspaceRepositoryConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatchProperties. +func (w *WorkspacePatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encryption": + err = unpopulate(val, "Encryption", &w.Encryption) + delete(rawMsg, key) + case "managedVirtualNetworkSettings": + err = unpopulate(val, "ManagedVirtualNetworkSettings", &w.ManagedVirtualNetworkSettings) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) + delete(rawMsg, key) + case "purviewConfiguration": + err = unpopulate(val, "PurviewConfiguration", &w.PurviewConfiguration) + delete(rawMsg, key) + case "sqlAdministratorLoginPassword": + err = unpopulate(val, "SQLAdministratorLoginPassword", &w.SQLAdministratorLoginPassword) + delete(rawMsg, key) + case "workspaceRepositoryConfiguration": + err = unpopulate(val, "WorkspaceRepositoryConfiguration", &w.WorkspaceRepositoryConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. +func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "adlaResourceId", w.AdlaResourceID) + populate(objectMap, "azureADOnlyAuthentication", w.AzureADOnlyAuthentication) + populate(objectMap, "connectivityEndpoints", w.ConnectivityEndpoints) + populate(objectMap, "cspWorkspaceAdminProperties", w.CspWorkspaceAdminProperties) + populate(objectMap, "defaultDataLakeStorage", w.DefaultDataLakeStorage) + populate(objectMap, "encryption", w.Encryption) + populate(objectMap, "extraProperties", w.ExtraProperties) + populate(objectMap, "managedResourceGroupName", w.ManagedResourceGroupName) + populate(objectMap, "managedVirtualNetwork", w.ManagedVirtualNetwork) + populate(objectMap, "managedVirtualNetworkSettings", w.ManagedVirtualNetworkSettings) + populate(objectMap, "privateEndpointConnections", w.PrivateEndpointConnections) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + populate(objectMap, "purviewConfiguration", w.PurviewConfiguration) + populate(objectMap, "sqlAdministratorLogin", w.SQLAdministratorLogin) + populate(objectMap, "sqlAdministratorLoginPassword", w.SQLAdministratorLoginPassword) + populate(objectMap, "settings", w.Settings) + populate(objectMap, "trustedServiceBypassEnabled", w.TrustedServiceBypassEnabled) + populate(objectMap, "virtualNetworkProfile", w.VirtualNetworkProfile) + populate(objectMap, "workspaceRepositoryConfiguration", w.WorkspaceRepositoryConfiguration) + populate(objectMap, "workspaceUID", w.WorkspaceUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceProperties. +func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adlaResourceId": + err = unpopulate(val, "AdlaResourceID", &w.AdlaResourceID) + delete(rawMsg, key) + case "azureADOnlyAuthentication": + err = unpopulate(val, "AzureADOnlyAuthentication", &w.AzureADOnlyAuthentication) + delete(rawMsg, key) + case "connectivityEndpoints": + err = unpopulate(val, "ConnectivityEndpoints", &w.ConnectivityEndpoints) + delete(rawMsg, key) + case "cspWorkspaceAdminProperties": + err = unpopulate(val, "CspWorkspaceAdminProperties", &w.CspWorkspaceAdminProperties) + delete(rawMsg, key) + case "defaultDataLakeStorage": + err = unpopulate(val, "DefaultDataLakeStorage", &w.DefaultDataLakeStorage) + delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &w.Encryption) + delete(rawMsg, key) + case "extraProperties": + err = unpopulate(val, "ExtraProperties", &w.ExtraProperties) + delete(rawMsg, key) + case "managedResourceGroupName": + err = unpopulate(val, "ManagedResourceGroupName", &w.ManagedResourceGroupName) + delete(rawMsg, key) + case "managedVirtualNetwork": + err = unpopulate(val, "ManagedVirtualNetwork", &w.ManagedVirtualNetwork) + delete(rawMsg, key) + case "managedVirtualNetworkSettings": + err = unpopulate(val, "ManagedVirtualNetworkSettings", &w.ManagedVirtualNetworkSettings) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &w.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) + delete(rawMsg, key) + case "purviewConfiguration": + err = unpopulate(val, "PurviewConfiguration", &w.PurviewConfiguration) + delete(rawMsg, key) + case "sqlAdministratorLogin": + err = unpopulate(val, "SQLAdministratorLogin", &w.SQLAdministratorLogin) + delete(rawMsg, key) + case "sqlAdministratorLoginPassword": + err = unpopulate(val, "SQLAdministratorLoginPassword", &w.SQLAdministratorLoginPassword) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &w.Settings) + delete(rawMsg, key) + case "trustedServiceBypassEnabled": + err = unpopulate(val, "TrustedServiceBypassEnabled", &w.TrustedServiceBypassEnabled) + delete(rawMsg, key) + case "virtualNetworkProfile": + err = unpopulate(val, "VirtualNetworkProfile", &w.VirtualNetworkProfile) + delete(rawMsg, key) + case "workspaceRepositoryConfiguration": + err = unpopulate(val, "WorkspaceRepositoryConfiguration", &w.WorkspaceRepositoryConfiguration) + delete(rawMsg, key) + case "workspaceUID": + err = unpopulate(val, "WorkspaceUID", &w.WorkspaceUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceRepositoryConfiguration. +func (w WorkspaceRepositoryConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accountName", w.AccountName) + populate(objectMap, "collaborationBranch", w.CollaborationBranch) + populate(objectMap, "hostName", w.HostName) + populate(objectMap, "lastCommitId", w.LastCommitID) + populate(objectMap, "projectName", w.ProjectName) + populate(objectMap, "repositoryName", w.RepositoryName) + populate(objectMap, "rootFolder", w.RootFolder) + populate(objectMap, "tenantId", w.TenantID) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceRepositoryConfiguration. +func (w *WorkspaceRepositoryConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accountName": + err = unpopulate(val, "AccountName", &w.AccountName) + delete(rawMsg, key) + case "collaborationBranch": + err = unpopulate(val, "CollaborationBranch", &w.CollaborationBranch) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &w.HostName) + delete(rawMsg, key) + case "lastCommitId": + err = unpopulate(val, "LastCommitID", &w.LastCommitID) + delete(rawMsg, key) + case "projectName": + err = unpopulate(val, "ProjectName", &w.ProjectName) + delete(rawMsg, key) + case "repositoryName": + err = unpopulate(val, "RepositoryName", &w.RepositoryName) + delete(rawMsg, key) + case "rootFolder": + err = unpopulate(val, "RootFolder", &w.RootFolder) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &w.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_operations_client.go b/sdk/resourcemanager/synapse/armsynapse/operations_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_operations_client.go rename to sdk/resourcemanager/synapse/armsynapse/operations_client.go index d7a94b995199..d22911b80b2a 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_operations_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/operations_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type OperationsClient struct { } // NewOperationsClient creates a new instance of OperationsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,10 +57,11 @@ func NewOperationsClient(subscriptionID string, credential azcore.TokenCredentia // CheckNameAvailability - Check whether a workspace name is available // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// request - The check request -// options - OperationsClientCheckNameAvailabilityOptions contains the optional parameters for the OperationsClient.CheckNameAvailability -// method. +// - request - The check request +// - options - OperationsClientCheckNameAvailabilityOptions contains the optional parameters for the OperationsClient.CheckNameAvailability +// method. func (client *OperationsClient) CheckNameAvailability(ctx context.Context, request CheckNameAvailabilityRequest, options *OperationsClientCheckNameAvailabilityOptions) (OperationsClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, request, options) if err != nil { @@ -104,12 +106,13 @@ func (client *OperationsClient) checkNameAvailabilityHandleResponse(resp *http.R // GetAzureAsyncHeaderResult - Get the status of an operation // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// operationID - Operation ID -// options - OperationsClientGetAzureAsyncHeaderResultOptions contains the optional parameters for the OperationsClient.GetAzureAsyncHeaderResult -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - operationID - Operation ID +// - options - OperationsClientGetAzureAsyncHeaderResultOptions contains the optional parameters for the OperationsClient.GetAzureAsyncHeaderResult +// method. func (client *OperationsClient) GetAzureAsyncHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, operationID string, options *OperationsClientGetAzureAsyncHeaderResultOptions) (OperationsClientGetAzureAsyncHeaderResultResponse, error) { req, err := client.getAzureAsyncHeaderResultCreateRequest(ctx, resourceGroupName, workspaceName, operationID, options) if err != nil { @@ -166,12 +169,13 @@ func (client *OperationsClient) getAzureAsyncHeaderResultHandleResponse(resp *ht // GetLocationHeaderResult - Get the result of an operation // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// operationID - Operation ID -// options - OperationsClientGetLocationHeaderResultOptions contains the optional parameters for the OperationsClient.GetLocationHeaderResult -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - operationID - Operation ID +// - options - OperationsClientGetLocationHeaderResultOptions contains the optional parameters for the OperationsClient.GetLocationHeaderResult +// method. func (client *OperationsClient) GetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, operationID string, options *OperationsClientGetLocationHeaderResultOptions) (OperationsClientGetLocationHeaderResultResponse, error) { req, err := client.getLocationHeaderResultCreateRequest(ctx, resourceGroupName, workspaceName, operationID, options) if err != nil { @@ -219,8 +223,9 @@ func (client *OperationsClient) getLocationHeaderResultCreateRequest(ctx context // List - Get all available operations // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error) { req, err := client.listCreateRequest(ctx, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_polymorphic_helpers.go b/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go similarity index 96% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_polymorphic_helpers.go rename to sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go index 6c9ec057eebe..1a05b548df6c 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_polymorphic_helpers.go +++ b/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -14,7 +15,7 @@ func unmarshalCustomSetupBaseClassification(rawMsg json.RawMessage) (CustomSetup if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -55,7 +56,7 @@ func unmarshalDataConnectionClassification(rawMsg json.RawMessage) (DataConnecti if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -96,7 +97,7 @@ func unmarshalDatabaseClassification(rawMsg json.RawMessage) (DatabaseClassifica if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -135,7 +136,7 @@ func unmarshalIntegrationRuntimeClassification(rawMsg json.RawMessage) (Integrat if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -155,7 +156,7 @@ func unmarshalIntegrationRuntimeStatusClassification(rawMsg json.RawMessage) (In if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -175,7 +176,7 @@ func unmarshalLinkedIntegrationRuntimeTypeClassification(rawMsg json.RawMessage) if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -195,7 +196,7 @@ func unmarshalSecretBaseClassification(rawMsg json.RawMessage) (SecretBaseClassi if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -213,7 +214,7 @@ func unmarshalSsisObjectMetadataClassification(rawMsg json.RawMessage) (SsisObje if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnections_client.go b/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnections_client.go rename to sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go index e443ad9d9c16..1ef623b7f7ac 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnections_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type PrivateEndpointConnectionsClient struct { } // NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginCreate - Approve or reject a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// privateEndpointConnectionName - The name of the private endpoint connection. -// request - Request body of private endpoint connection to create. -// options - PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - request - Request body of private endpoint connection to create. +// - options - PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate +// method. func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, request PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, request, options) @@ -79,6 +81,7 @@ func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, // Create - Approve or reject a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *PrivateEndpointConnectionsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, request PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, request, options) @@ -127,12 +130,13 @@ func (client *PrivateEndpointConnectionsClient) createCreateRequest(ctx context. // BeginDelete - Delete a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// privateEndpointConnectionName - The name of the private endpoint connection. -// options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) @@ -147,6 +151,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Delete a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) @@ -195,12 +200,13 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// privateEndpointConnectionName - The name of the private endpoint connection. -// options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) if err != nil { @@ -256,12 +262,12 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res } // NewListPager - Lists private endpoint connection in workspace. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, workspaceName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListResponse]{ More: func(page PrivateEndpointConnectionsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnectionsprivatelinkhub_client.go b/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnectionsprivatelinkhub_client.go rename to sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go index 01a418bf2ec2..419899c48056 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnectionsprivatelinkhub_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type PrivateEndpointConnectionsPrivateLinkHubClient struct { } // NewPrivateEndpointConnectionsPrivateLinkHubClient creates a new instance of PrivateEndpointConnectionsPrivateLinkHubClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateEndpointConnectionsPrivateLinkHubClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsPrivateLinkHubClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewPrivateEndpointConnectionsPrivateLinkHubClient(subscriptionID string, cr // Get - Get all PrivateEndpointConnection in the PrivateLinkHub by name // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// privateLinkHubName - Name of the privateLinkHub -// privateEndpointConnectionName - Name of the privateEndpointConnection -// options - PrivateEndpointConnectionsPrivateLinkHubClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - privateLinkHubName - Name of the privateLinkHub +// - privateEndpointConnectionName - Name of the privateEndpointConnection +// - options - PrivateEndpointConnectionsPrivateLinkHubClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.Get +// method. func (client *PrivateEndpointConnectionsPrivateLinkHubClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsPrivateLinkHubClientGetOptions) (PrivateEndpointConnectionsPrivateLinkHubClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, privateLinkHubName, privateEndpointConnectionName, options) if err != nil { @@ -117,12 +119,12 @@ func (client *PrivateEndpointConnectionsPrivateLinkHubClient) getHandleResponse( } // NewListPager - Get all PrivateEndpointConnections in the PrivateLinkHub -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// privateLinkHubName - Name of the privateLinkHub -// options - PrivateEndpointConnectionsPrivateLinkHubClientListOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - privateLinkHubName - Name of the privateLinkHub +// - options - PrivateEndpointConnectionsPrivateLinkHubClientListOptions contains the optional parameters for the PrivateEndpointConnectionsPrivateLinkHubClient.NewListPager +// method. func (client *PrivateEndpointConnectionsPrivateLinkHubClient) NewListPager(resourceGroupName string, privateLinkHubName string, options *PrivateEndpointConnectionsPrivateLinkHubClientListOptions) *runtime.Pager[PrivateEndpointConnectionsPrivateLinkHubClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsPrivateLinkHubClientListResponse]{ More: func(page PrivateEndpointConnectionsPrivateLinkHubClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubprivatelinkresources_client.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubprivatelinkresources_client.go rename to sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go index cedda6ffd143..683d1e554a7b 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubprivatelinkresources_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type PrivateLinkHubPrivateLinkResourcesClient struct { } // NewPrivateLinkHubPrivateLinkResourcesClient creates a new instance of PrivateLinkHubPrivateLinkResourcesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateLinkHubPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkHubPrivateLinkResourcesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewPrivateLinkHubPrivateLinkResourcesClient(subscriptionID string, credenti // Get - Get private link resource in private link hub // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// privateLinkHubName - The name of the private link hub -// privateLinkResourceName - The name of the private link resource -// options - PrivateLinkHubPrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - privateLinkHubName - The name of the private link hub +// - privateLinkResourceName - The name of the private link resource +// - options - PrivateLinkHubPrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.Get +// method. func (client *PrivateLinkHubPrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkResourceName string, options *PrivateLinkHubPrivateLinkResourcesClientGetOptions) (PrivateLinkHubPrivateLinkResourcesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, privateLinkHubName, privateLinkResourceName, options) if err != nil { @@ -117,12 +119,12 @@ func (client *PrivateLinkHubPrivateLinkResourcesClient) getHandleResponse(resp * } // NewListPager - Get all private link resources for a private link hub -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// privateLinkHubName - The name of the private link hub -// options - PrivateLinkHubPrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - privateLinkHubName - The name of the private link hub +// - options - PrivateLinkHubPrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkHubPrivateLinkResourcesClient.NewListPager +// method. func (client *PrivateLinkHubPrivateLinkResourcesClient) NewListPager(resourceGroupName string, privateLinkHubName string, options *PrivateLinkHubPrivateLinkResourcesClientListOptions) *runtime.Pager[PrivateLinkHubPrivateLinkResourcesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkHubPrivateLinkResourcesClientListResponse]{ More: func(page PrivateLinkHubPrivateLinkResourcesClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubs_client.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubs_client.go rename to sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go index eb7d90cdd38f..d4c9f4658aed 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubs_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type PrivateLinkHubsClient struct { } // NewPrivateLinkHubsClient creates a new instance of PrivateLinkHubsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateLinkHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkHubsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewPrivateLinkHubsClient(subscriptionID string, credential azcore.TokenCred // CreateOrUpdate - Creates or updates a privateLinkHub // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// privateLinkHubName - Name of the privateLinkHub -// privateLinkHubInfo - PrivateLinkHub create or update request properties -// options - PrivateLinkHubsClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - privateLinkHubName - Name of the privateLinkHub +// - privateLinkHubInfo - PrivateLinkHub create or update request properties +// - options - PrivateLinkHubsClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.CreateOrUpdate +// method. func (client *PrivateLinkHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkHubInfo PrivateLinkHub, options *PrivateLinkHubsClientCreateOrUpdateOptions) (PrivateLinkHubsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, privateLinkHubName, privateLinkHubInfo, options) if err != nil { @@ -114,11 +116,12 @@ func (client *PrivateLinkHubsClient) createOrUpdateHandleResponse(resp *http.Res // BeginDelete - Deletes a privateLinkHub // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// privateLinkHubName - Name of the privateLinkHub -// options - PrivateLinkHubsClientBeginDeleteOptions contains the optional parameters for the PrivateLinkHubsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - privateLinkHubName - Name of the privateLinkHub +// - options - PrivateLinkHubsClientBeginDeleteOptions contains the optional parameters for the PrivateLinkHubsClient.BeginDelete +// method. func (client *PrivateLinkHubsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateLinkHubName string, options *PrivateLinkHubsClientBeginDeleteOptions) (*runtime.Poller[PrivateLinkHubsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, privateLinkHubName, options) @@ -133,6 +136,7 @@ func (client *PrivateLinkHubsClient) BeginDelete(ctx context.Context, resourceGr // Delete - Deletes a privateLinkHub // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *PrivateLinkHubsClient) deleteOperation(ctx context.Context, resourceGroupName string, privateLinkHubName string, options *PrivateLinkHubsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, privateLinkHubName, options) @@ -177,10 +181,11 @@ func (client *PrivateLinkHubsClient) deleteCreateRequest(ctx context.Context, re // Get - Gets a privateLinkHub // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// privateLinkHubName - Name of the privateLinkHub -// options - PrivateLinkHubsClientGetOptions contains the optional parameters for the PrivateLinkHubsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - privateLinkHubName - Name of the privateLinkHub +// - options - PrivateLinkHubsClientGetOptions contains the optional parameters for the PrivateLinkHubsClient.Get method. func (client *PrivateLinkHubsClient) Get(ctx context.Context, resourceGroupName string, privateLinkHubName string, options *PrivateLinkHubsClientGetOptions) (PrivateLinkHubsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, privateLinkHubName, options) if err != nil { @@ -232,9 +237,10 @@ func (client *PrivateLinkHubsClient) getHandleResponse(resp *http.Response) (Pri } // NewListPager - Returns a list of privateLinkHubs in a subscription -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// options - PrivateLinkHubsClientListOptions contains the optional parameters for the PrivateLinkHubsClient.List method. +// - options - PrivateLinkHubsClientListOptions contains the optional parameters for the PrivateLinkHubsClient.NewListPager +// method. func (client *PrivateLinkHubsClient) NewListPager(options *PrivateLinkHubsClientListOptions) *runtime.Pager[PrivateLinkHubsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkHubsClientListResponse]{ More: func(page PrivateLinkHubsClientListResponse) bool { @@ -291,11 +297,11 @@ func (client *PrivateLinkHubsClient) listHandleResponse(resp *http.Response) (Pr } // NewListByResourceGroupPager - Returns a list of privateLinkHubs in a resource group -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - PrivateLinkHubsClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkHubsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - PrivateLinkHubsClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkHubsClient.NewListByResourceGroupPager +// method. func (client *PrivateLinkHubsClient) NewListByResourceGroupPager(resourceGroupName string, options *PrivateLinkHubsClientListByResourceGroupOptions) *runtime.Pager[PrivateLinkHubsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkHubsClientListByResourceGroupResponse]{ More: func(page PrivateLinkHubsClientListByResourceGroupResponse) bool { @@ -357,11 +363,12 @@ func (client *PrivateLinkHubsClient) listByResourceGroupHandleResponse(resp *htt // Update - Updates a privateLinkHub // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// privateLinkHubName - Name of the privateLinkHub -// privateLinkHubPatchInfo - PrivateLinkHub patch request properties -// options - PrivateLinkHubsClientUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.Update method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - privateLinkHubName - Name of the privateLinkHub +// - privateLinkHubPatchInfo - PrivateLinkHub patch request properties +// - options - PrivateLinkHubsClientUpdateOptions contains the optional parameters for the PrivateLinkHubsClient.Update method. func (client *PrivateLinkHubsClient) Update(ctx context.Context, resourceGroupName string, privateLinkHubName string, privateLinkHubPatchInfo PrivateLinkHubPatchInfo, options *PrivateLinkHubsClientUpdateOptions) (PrivateLinkHubsClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, privateLinkHubName, privateLinkHubPatchInfo, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkresources_client.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkresources_client.go rename to sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go index 5988548d93e6..e595346fd400 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkresources_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type PrivateLinkResourcesClient struct { } // NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Get private link resource in workspace // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// privateLinkResourceName - The name of the private link resource -// options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - privateLinkResourceName - The name of the private link resource +// - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get +// method. func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, privateLinkResourceName, options) if err != nil { @@ -117,12 +119,12 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) } // NewListPager - Get all private link resources for a workspaces -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager +// method. func (client *PrivateLinkResourcesClient) NewListPager(resourceGroupName string, workspaceName string, options *PrivateLinkResourcesClientListOptions) *runtime.Pager[PrivateLinkResourcesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListResponse]{ More: func(page PrivateLinkResourcesClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_response_types.go b/sdk/resourcemanager/synapse/armsynapse/response_types.go similarity index 86% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_response_types.go rename to sdk/resourcemanager/synapse/armsynapse/response_types.go index 496f3dfe15de..f3bea8487745 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_response_types.go +++ b/sdk/resourcemanager/synapse/armsynapse/response_types.go @@ -5,12 +5,11 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse -import "encoding/json" - -// AzureADOnlyAuthenticationsClientCreateResponse contains the response from method AzureADOnlyAuthenticationsClient.Create. +// AzureADOnlyAuthenticationsClientCreateResponse contains the response from method AzureADOnlyAuthenticationsClient.BeginCreate. type AzureADOnlyAuthenticationsClientCreateResponse struct { AzureADOnlyAuthentication } @@ -20,25 +19,19 @@ type AzureADOnlyAuthenticationsClientGetResponse struct { AzureADOnlyAuthentication } -// AzureADOnlyAuthenticationsClientListResponse contains the response from method AzureADOnlyAuthenticationsClient.List. +// AzureADOnlyAuthenticationsClientListResponse contains the response from method AzureADOnlyAuthenticationsClient.NewListPager. type AzureADOnlyAuthenticationsClientListResponse struct { AzureADOnlyAuthenticationListResult } -// BigDataPoolsClientCreateOrUpdateResponse contains the response from method BigDataPoolsClient.CreateOrUpdate. +// BigDataPoolsClientCreateOrUpdateResponse contains the response from method BigDataPoolsClient.BeginCreateOrUpdate. type BigDataPoolsClientCreateOrUpdateResponse struct { BigDataPoolResourceInfo } -// BigDataPoolsClientDeleteResponse contains the response from method BigDataPoolsClient.Delete. +// BigDataPoolsClientDeleteResponse contains the response from method BigDataPoolsClient.BeginDelete. type BigDataPoolsClientDeleteResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BigDataPoolsClientDeleteResponse. -func (b *BigDataPoolsClientDeleteResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &b.Interface) + BigDataPoolResourceInfo } // BigDataPoolsClientGetResponse contains the response from method BigDataPoolsClient.Get. @@ -46,7 +39,7 @@ type BigDataPoolsClientGetResponse struct { BigDataPoolResourceInfo } -// BigDataPoolsClientListByWorkspaceResponse contains the response from method BigDataPoolsClient.ListByWorkspace. +// BigDataPoolsClientListByWorkspaceResponse contains the response from method BigDataPoolsClient.NewListByWorkspacePager. type BigDataPoolsClientListByWorkspaceResponse struct { BigDataPoolResourceInfoListResult } @@ -76,7 +69,7 @@ type DataMaskingRulesClientGetResponse struct { DataMaskingRule } -// DataMaskingRulesClientListBySQLPoolResponse contains the response from method DataMaskingRulesClient.ListBySQLPool. +// DataMaskingRulesClientListBySQLPoolResponse contains the response from method DataMaskingRulesClient.NewListBySQLPoolPager. type DataMaskingRulesClientListBySQLPoolResponse struct { DataMaskingRuleListResult } @@ -91,25 +84,34 @@ type ExtendedSQLPoolBlobAuditingPoliciesClientGetResponse struct { ExtendedSQLPoolBlobAuditingPolicy } -// ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse contains the response from method ExtendedSQLPoolBlobAuditingPoliciesClient.ListBySQLPool. +// ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse contains the response from method ExtendedSQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager. type ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse struct { ExtendedSQLPoolBlobAuditingPolicyListResult } -// IPFirewallRulesClientCreateOrUpdateResponse contains the response from method IPFirewallRulesClient.CreateOrUpdate. +// GetClientIntegrationRuntimeEnableInteractivequeryResponse contains the response from method GetClient.IntegrationRuntimeEnableInteractivequery. +type GetClientIntegrationRuntimeEnableInteractivequeryResponse struct { + IntegrationRuntimeEnableinteractivequery +} + +// GetClientIntegrationRuntimeStartResponse contains the response from method GetClient.IntegrationRuntimeStart. +type GetClientIntegrationRuntimeStartResponse struct { + IntegrationRuntimeOperationStatus +} + +// GetClientIntegrationRuntimeStopResponse contains the response from method GetClient.IntegrationRuntimeStop. +type GetClientIntegrationRuntimeStopResponse struct { + IntegrationRuntimeStopOperationStatus +} + +// IPFirewallRulesClientCreateOrUpdateResponse contains the response from method IPFirewallRulesClient.BeginCreateOrUpdate. type IPFirewallRulesClientCreateOrUpdateResponse struct { IPFirewallRuleInfo } -// IPFirewallRulesClientDeleteResponse contains the response from method IPFirewallRulesClient.Delete. +// IPFirewallRulesClientDeleteResponse contains the response from method IPFirewallRulesClient.BeginDelete. type IPFirewallRulesClientDeleteResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPFirewallRulesClientDeleteResponse. -func (i *IPFirewallRulesClientDeleteResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &i.Interface) + IPFirewallRuleInfo } // IPFirewallRulesClientGetResponse contains the response from method IPFirewallRulesClient.Get. @@ -117,12 +119,12 @@ type IPFirewallRulesClientGetResponse struct { IPFirewallRuleInfo } -// IPFirewallRulesClientListByWorkspaceResponse contains the response from method IPFirewallRulesClient.ListByWorkspace. +// IPFirewallRulesClientListByWorkspaceResponse contains the response from method IPFirewallRulesClient.NewListByWorkspacePager. type IPFirewallRulesClientListByWorkspaceResponse struct { IPFirewallRuleInfoListResult } -// IPFirewallRulesClientReplaceAllResponse contains the response from method IPFirewallRulesClient.ReplaceAll. +// IPFirewallRulesClientReplaceAllResponse contains the response from method IPFirewallRulesClient.BeginReplaceAll. type IPFirewallRulesClientReplaceAllResponse struct { ReplaceAllFirewallRulesOperationResponse } @@ -177,7 +179,7 @@ type IntegrationRuntimeObjectMetadataClientListResponse struct { SsisObjectMetadataListResponse } -// IntegrationRuntimeObjectMetadataClientRefreshResponse contains the response from method IntegrationRuntimeObjectMetadataClient.Refresh. +// IntegrationRuntimeObjectMetadataClientRefreshResponse contains the response from method IntegrationRuntimeObjectMetadataClient.BeginRefresh. type IntegrationRuntimeObjectMetadataClientRefreshResponse struct { SsisObjectMetadataStatusResponse } @@ -187,22 +189,22 @@ type IntegrationRuntimeStatusClientGetResponse struct { IntegrationRuntimeStatusResponse } -// IntegrationRuntimesClientCreateResponse contains the response from method IntegrationRuntimesClient.Create. +// IntegrationRuntimesClientCreateResponse contains the response from method IntegrationRuntimesClient.BeginCreate. type IntegrationRuntimesClientCreateResponse struct { IntegrationRuntimeResource } -// IntegrationRuntimesClientDeleteResponse contains the response from method IntegrationRuntimesClient.Delete. +// IntegrationRuntimesClientDeleteResponse contains the response from method IntegrationRuntimesClient.BeginDelete. type IntegrationRuntimesClientDeleteResponse struct { // placeholder for future response values } -// IntegrationRuntimesClientDisableInteractiveQueryResponse contains the response from method IntegrationRuntimesClient.DisableInteractiveQuery. +// IntegrationRuntimesClientDisableInteractiveQueryResponse contains the response from method IntegrationRuntimesClient.BeginDisableInteractiveQuery. type IntegrationRuntimesClientDisableInteractiveQueryResponse struct { // placeholder for future response values } -// IntegrationRuntimesClientEnableInteractiveQueryResponse contains the response from method IntegrationRuntimesClient.EnableInteractiveQuery. +// IntegrationRuntimesClientEnableInteractiveQueryResponse contains the response from method IntegrationRuntimesClient.BeginEnableInteractiveQuery. type IntegrationRuntimesClientEnableInteractiveQueryResponse struct { // placeholder for future response values } @@ -212,7 +214,7 @@ type IntegrationRuntimesClientGetResponse struct { IntegrationRuntimeResource } -// IntegrationRuntimesClientListByWorkspaceResponse contains the response from method IntegrationRuntimesClient.ListByWorkspace. +// IntegrationRuntimesClientListByWorkspaceResponse contains the response from method IntegrationRuntimesClient.NewListByWorkspacePager. type IntegrationRuntimesClientListByWorkspaceResponse struct { IntegrationRuntimeListResponse } @@ -222,12 +224,12 @@ type IntegrationRuntimesClientListOutboundNetworkDependenciesEndpointsResponse s IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse } -// IntegrationRuntimesClientStartResponse contains the response from method IntegrationRuntimesClient.Start. +// IntegrationRuntimesClientStartResponse contains the response from method IntegrationRuntimesClient.BeginStart. type IntegrationRuntimesClientStartResponse struct { IntegrationRuntimeStatusResponse } -// IntegrationRuntimesClientStopResponse contains the response from method IntegrationRuntimesClient.Stop. +// IntegrationRuntimesClientStopResponse contains the response from method IntegrationRuntimesClient.BeginStop. type IntegrationRuntimesClientStopResponse struct { // placeholder for future response values } @@ -257,22 +259,22 @@ type KeysClientGetResponse struct { Key } -// KeysClientListByWorkspaceResponse contains the response from method KeysClient.ListByWorkspace. +// KeysClientListByWorkspaceResponse contains the response from method KeysClient.NewListByWorkspacePager. type KeysClientListByWorkspaceResponse struct { KeyInfoListResult } -// KustoOperationsClientListResponse contains the response from method KustoOperationsClient.List. +// KustoOperationsClientListResponse contains the response from method KustoOperationsClient.NewListPager. type KustoOperationsClientListResponse struct { OperationListResult } -// KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.CreateOrUpdate. +// KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.BeginCreateOrUpdate. type KustoPoolAttachedDatabaseConfigurationsClientCreateOrUpdateResponse struct { AttachedDatabaseConfiguration } -// KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.Delete. +// KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.BeginDelete. type KustoPoolAttachedDatabaseConfigurationsClientDeleteResponse struct { // placeholder for future response values } @@ -282,7 +284,7 @@ type KustoPoolAttachedDatabaseConfigurationsClientGetResponse struct { AttachedDatabaseConfiguration } -// KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.ListByKustoPool. +// KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse contains the response from method KustoPoolAttachedDatabaseConfigurationsClient.NewListByKustoPoolPager. type KustoPoolAttachedDatabaseConfigurationsClientListByKustoPoolResponse struct { AttachedDatabaseConfigurationListResult } @@ -297,7 +299,7 @@ type KustoPoolDataConnectionsClientCheckNameAvailabilityResponse struct { CheckNameResult } -// KustoPoolDataConnectionsClientCreateOrUpdateResponse contains the response from method KustoPoolDataConnectionsClient.CreateOrUpdate. +// KustoPoolDataConnectionsClientCreateOrUpdateResponse contains the response from method KustoPoolDataConnectionsClient.BeginCreateOrUpdate. type KustoPoolDataConnectionsClientCreateOrUpdateResponse struct { DataConnectionClassification } @@ -312,12 +314,12 @@ func (k *KustoPoolDataConnectionsClientCreateOrUpdateResponse) UnmarshalJSON(dat return nil } -// KustoPoolDataConnectionsClientDataConnectionValidationResponse contains the response from method KustoPoolDataConnectionsClient.DataConnectionValidation. +// KustoPoolDataConnectionsClientDataConnectionValidationResponse contains the response from method KustoPoolDataConnectionsClient.BeginDataConnectionValidation. type KustoPoolDataConnectionsClientDataConnectionValidationResponse struct { DataConnectionValidationListResult } -// KustoPoolDataConnectionsClientDeleteResponse contains the response from method KustoPoolDataConnectionsClient.Delete. +// KustoPoolDataConnectionsClientDeleteResponse contains the response from method KustoPoolDataConnectionsClient.BeginDelete. type KustoPoolDataConnectionsClientDeleteResponse struct { // placeholder for future response values } @@ -337,12 +339,12 @@ func (k *KustoPoolDataConnectionsClientGetResponse) UnmarshalJSON(data []byte) e return nil } -// KustoPoolDataConnectionsClientListByDatabaseResponse contains the response from method KustoPoolDataConnectionsClient.ListByDatabase. +// KustoPoolDataConnectionsClientListByDatabaseResponse contains the response from method KustoPoolDataConnectionsClient.NewListByDatabasePager. type KustoPoolDataConnectionsClientListByDatabaseResponse struct { DataConnectionListResult } -// KustoPoolDataConnectionsClientUpdateResponse contains the response from method KustoPoolDataConnectionsClient.Update. +// KustoPoolDataConnectionsClientUpdateResponse contains the response from method KustoPoolDataConnectionsClient.BeginUpdate. type KustoPoolDataConnectionsClientUpdateResponse struct { DataConnectionClassification } @@ -362,12 +364,12 @@ type KustoPoolDatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse st CheckNameResult } -// KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.CreateOrUpdate. +// KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.BeginCreateOrUpdate. type KustoPoolDatabasePrincipalAssignmentsClientCreateOrUpdateResponse struct { DatabasePrincipalAssignment } -// KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.Delete. +// KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.BeginDelete. type KustoPoolDatabasePrincipalAssignmentsClientDeleteResponse struct { // placeholder for future response values } @@ -377,12 +379,12 @@ type KustoPoolDatabasePrincipalAssignmentsClientGetResponse struct { DatabasePrincipalAssignment } -// KustoPoolDatabasePrincipalAssignmentsClientListResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.List. +// KustoPoolDatabasePrincipalAssignmentsClientListResponse contains the response from method KustoPoolDatabasePrincipalAssignmentsClient.NewListPager. type KustoPoolDatabasePrincipalAssignmentsClientListResponse struct { DatabasePrincipalAssignmentListResult } -// KustoPoolDatabasesClientCreateOrUpdateResponse contains the response from method KustoPoolDatabasesClient.CreateOrUpdate. +// KustoPoolDatabasesClientCreateOrUpdateResponse contains the response from method KustoPoolDatabasesClient.BeginCreateOrUpdate. type KustoPoolDatabasesClientCreateOrUpdateResponse struct { DatabaseClassification } @@ -397,7 +399,7 @@ func (k *KustoPoolDatabasesClientCreateOrUpdateResponse) UnmarshalJSON(data []by return nil } -// KustoPoolDatabasesClientDeleteResponse contains the response from method KustoPoolDatabasesClient.Delete. +// KustoPoolDatabasesClientDeleteResponse contains the response from method KustoPoolDatabasesClient.BeginDelete. type KustoPoolDatabasesClientDeleteResponse struct { // placeholder for future response values } @@ -417,12 +419,12 @@ func (k *KustoPoolDatabasesClientGetResponse) UnmarshalJSON(data []byte) error { return nil } -// KustoPoolDatabasesClientListByKustoPoolResponse contains the response from method KustoPoolDatabasesClient.ListByKustoPool. +// KustoPoolDatabasesClientListByKustoPoolResponse contains the response from method KustoPoolDatabasesClient.NewListByKustoPoolPager. type KustoPoolDatabasesClientListByKustoPoolResponse struct { DatabaseListResult } -// KustoPoolDatabasesClientUpdateResponse contains the response from method KustoPoolDatabasesClient.Update. +// KustoPoolDatabasesClientUpdateResponse contains the response from method KustoPoolDatabasesClient.BeginUpdate. type KustoPoolDatabasesClientUpdateResponse struct { DatabaseClassification } @@ -442,12 +444,12 @@ type KustoPoolPrincipalAssignmentsClientCheckNameAvailabilityResponse struct { CheckNameResult } -// KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method KustoPoolPrincipalAssignmentsClient.CreateOrUpdate. +// KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method KustoPoolPrincipalAssignmentsClient.BeginCreateOrUpdate. type KustoPoolPrincipalAssignmentsClientCreateOrUpdateResponse struct { ClusterPrincipalAssignment } -// KustoPoolPrincipalAssignmentsClientDeleteResponse contains the response from method KustoPoolPrincipalAssignmentsClient.Delete. +// KustoPoolPrincipalAssignmentsClientDeleteResponse contains the response from method KustoPoolPrincipalAssignmentsClient.BeginDelete. type KustoPoolPrincipalAssignmentsClientDeleteResponse struct { // placeholder for future response values } @@ -457,12 +459,17 @@ type KustoPoolPrincipalAssignmentsClientGetResponse struct { ClusterPrincipalAssignment } -// KustoPoolPrincipalAssignmentsClientListResponse contains the response from method KustoPoolPrincipalAssignmentsClient.List. +// KustoPoolPrincipalAssignmentsClientListResponse contains the response from method KustoPoolPrincipalAssignmentsClient.NewListPager. type KustoPoolPrincipalAssignmentsClientListResponse struct { ClusterPrincipalAssignmentListResult } -// KustoPoolsClientAddLanguageExtensionsResponse contains the response from method KustoPoolsClient.AddLanguageExtensions. +// KustoPoolPrivateLinkResourcesClientListResponse contains the response from method KustoPoolPrivateLinkResourcesClient.NewListPager. +type KustoPoolPrivateLinkResourcesClientListResponse struct { + PrivateLinkResources +} + +// KustoPoolsClientAddLanguageExtensionsResponse contains the response from method KustoPoolsClient.BeginAddLanguageExtensions. type KustoPoolsClientAddLanguageExtensionsResponse struct { // placeholder for future response values } @@ -472,17 +479,17 @@ type KustoPoolsClientCheckNameAvailabilityResponse struct { CheckNameResult } -// KustoPoolsClientCreateOrUpdateResponse contains the response from method KustoPoolsClient.CreateOrUpdate. +// KustoPoolsClientCreateOrUpdateResponse contains the response from method KustoPoolsClient.BeginCreateOrUpdate. type KustoPoolsClientCreateOrUpdateResponse struct { KustoPool } -// KustoPoolsClientDeleteResponse contains the response from method KustoPoolsClient.Delete. +// KustoPoolsClientDeleteResponse contains the response from method KustoPoolsClient.BeginDelete. type KustoPoolsClientDeleteResponse struct { // placeholder for future response values } -// KustoPoolsClientDetachFollowerDatabasesResponse contains the response from method KustoPoolsClient.DetachFollowerDatabases. +// KustoPoolsClientDetachFollowerDatabasesResponse contains the response from method KustoPoolsClient.BeginDetachFollowerDatabases. type KustoPoolsClientDetachFollowerDatabasesResponse struct { // placeholder for future response values } @@ -497,47 +504,47 @@ type KustoPoolsClientListByWorkspaceResponse struct { KustoPoolListResult } -// KustoPoolsClientListFollowerDatabasesResponse contains the response from method KustoPoolsClient.ListFollowerDatabases. +// KustoPoolsClientListFollowerDatabasesResponse contains the response from method KustoPoolsClient.NewListFollowerDatabasesPager. type KustoPoolsClientListFollowerDatabasesResponse struct { FollowerDatabaseListResult } -// KustoPoolsClientListLanguageExtensionsResponse contains the response from method KustoPoolsClient.ListLanguageExtensions. +// KustoPoolsClientListLanguageExtensionsResponse contains the response from method KustoPoolsClient.NewListLanguageExtensionsPager. type KustoPoolsClientListLanguageExtensionsResponse struct { LanguageExtensionsList } -// KustoPoolsClientListSKUsByResourceResponse contains the response from method KustoPoolsClient.ListSKUsByResource. +// KustoPoolsClientListSKUsByResourceResponse contains the response from method KustoPoolsClient.NewListSKUsByResourcePager. type KustoPoolsClientListSKUsByResourceResponse struct { ListResourceSKUsResult } -// KustoPoolsClientListSKUsResponse contains the response from method KustoPoolsClient.ListSKUs. +// KustoPoolsClientListSKUsResponse contains the response from method KustoPoolsClient.NewListSKUsPager. type KustoPoolsClientListSKUsResponse struct { SKUDescriptionList } -// KustoPoolsClientRemoveLanguageExtensionsResponse contains the response from method KustoPoolsClient.RemoveLanguageExtensions. +// KustoPoolsClientRemoveLanguageExtensionsResponse contains the response from method KustoPoolsClient.BeginRemoveLanguageExtensions. type KustoPoolsClientRemoveLanguageExtensionsResponse struct { // placeholder for future response values } -// KustoPoolsClientStartResponse contains the response from method KustoPoolsClient.Start. +// KustoPoolsClientStartResponse contains the response from method KustoPoolsClient.BeginStart. type KustoPoolsClientStartResponse struct { // placeholder for future response values } -// KustoPoolsClientStopResponse contains the response from method KustoPoolsClient.Stop. +// KustoPoolsClientStopResponse contains the response from method KustoPoolsClient.BeginStop. type KustoPoolsClientStopResponse struct { // placeholder for future response values } -// KustoPoolsClientUpdateResponse contains the response from method KustoPoolsClient.Update. +// KustoPoolsClientUpdateResponse contains the response from method KustoPoolsClient.BeginUpdate. type KustoPoolsClientUpdateResponse struct { KustoPool } -// LibrariesClientListByWorkspaceResponse contains the response from method LibrariesClient.ListByWorkspace. +// LibrariesClientListByWorkspaceResponse contains the response from method LibrariesClient.NewListByWorkspacePager. type LibrariesClientListByWorkspaceResponse struct { LibraryListResponse } @@ -568,12 +575,12 @@ type OperationsClientListResponse struct { AvailableRpOperationArray []*AvailableRpOperation } -// PrivateEndpointConnectionsClientCreateResponse contains the response from method PrivateEndpointConnectionsClient.Create. +// PrivateEndpointConnectionsClientCreateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreate. type PrivateEndpointConnectionsClientCreateResponse struct { PrivateEndpointConnection } -// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete. +// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. type PrivateEndpointConnectionsClientDeleteResponse struct { OperationResource } @@ -583,7 +590,7 @@ type PrivateEndpointConnectionsClientGetResponse struct { PrivateEndpointConnection } -// PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List. +// PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. type PrivateEndpointConnectionsClientListResponse struct { PrivateEndpointConnectionList } @@ -593,7 +600,7 @@ type PrivateEndpointConnectionsPrivateLinkHubClientGetResponse struct { PrivateEndpointConnectionForPrivateLinkHub } -// PrivateEndpointConnectionsPrivateLinkHubClientListResponse contains the response from method PrivateEndpointConnectionsPrivateLinkHubClient.List. +// PrivateEndpointConnectionsPrivateLinkHubClientListResponse contains the response from method PrivateEndpointConnectionsPrivateLinkHubClient.NewListPager. type PrivateEndpointConnectionsPrivateLinkHubClientListResponse struct { PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse } @@ -603,7 +610,7 @@ type PrivateLinkHubPrivateLinkResourcesClientGetResponse struct { PrivateLinkResource } -// PrivateLinkHubPrivateLinkResourcesClientListResponse contains the response from method PrivateLinkHubPrivateLinkResourcesClient.List. +// PrivateLinkHubPrivateLinkResourcesClientListResponse contains the response from method PrivateLinkHubPrivateLinkResourcesClient.NewListPager. type PrivateLinkHubPrivateLinkResourcesClientListResponse struct { PrivateLinkResourceListResult } @@ -613,7 +620,7 @@ type PrivateLinkHubsClientCreateOrUpdateResponse struct { PrivateLinkHub } -// PrivateLinkHubsClientDeleteResponse contains the response from method PrivateLinkHubsClient.Delete. +// PrivateLinkHubsClientDeleteResponse contains the response from method PrivateLinkHubsClient.BeginDelete. type PrivateLinkHubsClientDeleteResponse struct { // placeholder for future response values } @@ -623,12 +630,12 @@ type PrivateLinkHubsClientGetResponse struct { PrivateLinkHub } -// PrivateLinkHubsClientListByResourceGroupResponse contains the response from method PrivateLinkHubsClient.ListByResourceGroup. +// PrivateLinkHubsClientListByResourceGroupResponse contains the response from method PrivateLinkHubsClient.NewListByResourceGroupPager. type PrivateLinkHubsClientListByResourceGroupResponse struct { PrivateLinkHubInfoListResult } -// PrivateLinkHubsClientListResponse contains the response from method PrivateLinkHubsClient.List. +// PrivateLinkHubsClientListResponse contains the response from method PrivateLinkHubsClient.NewListPager. type PrivateLinkHubsClientListResponse struct { PrivateLinkHubInfoListResult } @@ -643,7 +650,7 @@ type PrivateLinkResourcesClientGetResponse struct { PrivateLinkResource } -// PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.List. +// PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.NewListPager. type PrivateLinkResourcesClientListResponse struct { PrivateLinkResourceListResult } @@ -653,7 +660,7 @@ type RestorableDroppedSQLPoolsClientGetResponse struct { RestorableDroppedSQLPool } -// RestorableDroppedSQLPoolsClientListByWorkspaceResponse contains the response from method RestorableDroppedSQLPoolsClient.ListByWorkspace. +// RestorableDroppedSQLPoolsClientListByWorkspaceResponse contains the response from method RestorableDroppedSQLPoolsClient.NewListByWorkspacePager. type RestorableDroppedSQLPoolsClientListByWorkspaceResponse struct { RestorableDroppedSQLPoolListResult } @@ -668,7 +675,7 @@ type SQLPoolBlobAuditingPoliciesClientGetResponse struct { SQLPoolBlobAuditingPolicy } -// SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse contains the response from method SQLPoolBlobAuditingPoliciesClient.ListBySQLPool. +// SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse contains the response from method SQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager. type SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse struct { SQLPoolBlobAuditingPolicyListResult } @@ -698,7 +705,7 @@ type SQLPoolGeoBackupPoliciesClientGetResponse struct { GeoBackupPolicy } -// SQLPoolGeoBackupPoliciesClientListResponse contains the response from method SQLPoolGeoBackupPoliciesClient.List. +// SQLPoolGeoBackupPoliciesClientListResponse contains the response from method SQLPoolGeoBackupPoliciesClient.NewListPager. type SQLPoolGeoBackupPoliciesClientListResponse struct { GeoBackupPolicyListResult } @@ -728,13 +735,12 @@ type SQLPoolMetadataSyncConfigsClientGetResponse struct { MetadataSyncConfig } -// SQLPoolOperationResultsClientGetLocationHeaderResultResponse contains the response from method SQLPoolOperationResultsClient.GetLocationHeaderResult. +// SQLPoolOperationResultsClientGetLocationHeaderResultResponse contains the response from method SQLPoolOperationResultsClient.BeginGetLocationHeaderResult. type SQLPoolOperationResultsClientGetLocationHeaderResultResponse struct { - // Anything - Interface interface{} + SQLPool } -// SQLPoolOperationsClientListResponse contains the response from method SQLPoolOperationsClient.List. +// SQLPoolOperationsClientListResponse contains the response from method SQLPoolOperationsClient.NewListPager. type SQLPoolOperationsClientListResponse struct { SQLPoolBlobAuditingPolicySQLPoolOperationListResult } @@ -749,12 +755,12 @@ type SQLPoolReplicationLinksClientGetByNameResponse struct { ReplicationLink } -// SQLPoolReplicationLinksClientListResponse contains the response from method SQLPoolReplicationLinksClient.List. +// SQLPoolReplicationLinksClientListResponse contains the response from method SQLPoolReplicationLinksClient.NewListPager. type SQLPoolReplicationLinksClientListResponse struct { ReplicationLinkListResult } -// SQLPoolRestorePointsClientCreateResponse contains the response from method SQLPoolRestorePointsClient.Create. +// SQLPoolRestorePointsClientCreateResponse contains the response from method SQLPoolRestorePointsClient.BeginCreate. type SQLPoolRestorePointsClientCreateResponse struct { RestorePoint } @@ -769,7 +775,7 @@ type SQLPoolRestorePointsClientGetResponse struct { RestorePoint } -// SQLPoolRestorePointsClientListResponse contains the response from method SQLPoolRestorePointsClient.List. +// SQLPoolRestorePointsClientListResponse contains the response from method SQLPoolRestorePointsClient.NewListPager. type SQLPoolRestorePointsClientListResponse struct { RestorePointListResult } @@ -779,7 +785,7 @@ type SQLPoolSchemasClientGetResponse struct { SQLPoolSchema } -// SQLPoolSchemasClientListResponse contains the response from method SQLPoolSchemasClient.List. +// SQLPoolSchemasClientListResponse contains the response from method SQLPoolSchemasClient.NewListPager. type SQLPoolSchemasClientListResponse struct { SQLPoolSchemaListResult } @@ -794,7 +800,7 @@ type SQLPoolSecurityAlertPoliciesClientGetResponse struct { SQLPoolSecurityAlertPolicy } -// SQLPoolSecurityAlertPoliciesClientListResponse contains the response from method SQLPoolSecurityAlertPoliciesClient.List. +// SQLPoolSecurityAlertPoliciesClientListResponse contains the response from method SQLPoolSecurityAlertPoliciesClient.NewListPager. type SQLPoolSecurityAlertPoliciesClientListResponse struct { ListSQLPoolSecurityAlertPolicies } @@ -824,12 +830,12 @@ type SQLPoolSensitivityLabelsClientGetResponse struct { SensitivityLabel } -// SQLPoolSensitivityLabelsClientListCurrentResponse contains the response from method SQLPoolSensitivityLabelsClient.ListCurrent. +// SQLPoolSensitivityLabelsClientListCurrentResponse contains the response from method SQLPoolSensitivityLabelsClient.NewListCurrentPager. type SQLPoolSensitivityLabelsClientListCurrentResponse struct { SensitivityLabelListResult } -// SQLPoolSensitivityLabelsClientListRecommendedResponse contains the response from method SQLPoolSensitivityLabelsClient.ListRecommended. +// SQLPoolSensitivityLabelsClientListRecommendedResponse contains the response from method SQLPoolSensitivityLabelsClient.NewListRecommendedPager. type SQLPoolSensitivityLabelsClientListRecommendedResponse struct { SensitivityLabelListResult } @@ -839,7 +845,7 @@ type SQLPoolSensitivityLabelsClientUpdateResponse struct { // placeholder for future response values } -// SQLPoolTableColumnsClientListByTableNameResponse contains the response from method SQLPoolTableColumnsClient.ListByTableName. +// SQLPoolTableColumnsClientListByTableNameResponse contains the response from method SQLPoolTableColumnsClient.NewListByTableNamePager. type SQLPoolTableColumnsClientListByTableNameResponse struct { SQLPoolColumnListResult } @@ -849,7 +855,7 @@ type SQLPoolTablesClientGetResponse struct { SQLPoolTable } -// SQLPoolTablesClientListBySchemaResponse contains the response from method SQLPoolTablesClient.ListBySchema. +// SQLPoolTablesClientListBySchemaResponse contains the response from method SQLPoolTablesClient.NewListBySchemaPager. type SQLPoolTablesClientListBySchemaResponse struct { SQLPoolTableListResult } @@ -864,12 +870,12 @@ type SQLPoolTransparentDataEncryptionsClientGetResponse struct { TransparentDataEncryption } -// SQLPoolTransparentDataEncryptionsClientListResponse contains the response from method SQLPoolTransparentDataEncryptionsClient.List. +// SQLPoolTransparentDataEncryptionsClientListResponse contains the response from method SQLPoolTransparentDataEncryptionsClient.NewListPager. type SQLPoolTransparentDataEncryptionsClientListResponse struct { TransparentDataEncryptionListResult } -// SQLPoolUsagesClientListResponse contains the response from method SQLPoolUsagesClient.List. +// SQLPoolUsagesClientListResponse contains the response from method SQLPoolUsagesClient.NewListPager. type SQLPoolUsagesClientListResponse struct { SQLPoolUsageListResult } @@ -899,12 +905,12 @@ type SQLPoolVulnerabilityAssessmentScansClientGetResponse struct { VulnerabilityAssessmentScanRecord } -// SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method SQLPoolVulnerabilityAssessmentScansClient.InitiateScan. +// SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method SQLPoolVulnerabilityAssessmentScansClient.BeginInitiateScan. type SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse struct { // placeholder for future response values } -// SQLPoolVulnerabilityAssessmentScansClientListResponse contains the response from method SQLPoolVulnerabilityAssessmentScansClient.List. +// SQLPoolVulnerabilityAssessmentScansClientListResponse contains the response from method SQLPoolVulnerabilityAssessmentScansClient.NewListPager. type SQLPoolVulnerabilityAssessmentScansClientListResponse struct { VulnerabilityAssessmentScanRecordListResult } @@ -924,17 +930,17 @@ type SQLPoolVulnerabilityAssessmentsClientGetResponse struct { SQLPoolVulnerabilityAssessment } -// SQLPoolVulnerabilityAssessmentsClientListResponse contains the response from method SQLPoolVulnerabilityAssessmentsClient.List. +// SQLPoolVulnerabilityAssessmentsClientListResponse contains the response from method SQLPoolVulnerabilityAssessmentsClient.NewListPager. type SQLPoolVulnerabilityAssessmentsClientListResponse struct { SQLPoolVulnerabilityAssessmentListResult } -// SQLPoolWorkloadClassifierClientCreateOrUpdateResponse contains the response from method SQLPoolWorkloadClassifierClient.CreateOrUpdate. +// SQLPoolWorkloadClassifierClientCreateOrUpdateResponse contains the response from method SQLPoolWorkloadClassifierClient.BeginCreateOrUpdate. type SQLPoolWorkloadClassifierClientCreateOrUpdateResponse struct { WorkloadClassifier } -// SQLPoolWorkloadClassifierClientDeleteResponse contains the response from method SQLPoolWorkloadClassifierClient.Delete. +// SQLPoolWorkloadClassifierClientDeleteResponse contains the response from method SQLPoolWorkloadClassifierClient.BeginDelete. type SQLPoolWorkloadClassifierClientDeleteResponse struct { // placeholder for future response values } @@ -944,17 +950,17 @@ type SQLPoolWorkloadClassifierClientGetResponse struct { WorkloadClassifier } -// SQLPoolWorkloadClassifierClientListResponse contains the response from method SQLPoolWorkloadClassifierClient.List. +// SQLPoolWorkloadClassifierClientListResponse contains the response from method SQLPoolWorkloadClassifierClient.NewListPager. type SQLPoolWorkloadClassifierClientListResponse struct { WorkloadClassifierListResult } -// SQLPoolWorkloadGroupClientCreateOrUpdateResponse contains the response from method SQLPoolWorkloadGroupClient.CreateOrUpdate. +// SQLPoolWorkloadGroupClientCreateOrUpdateResponse contains the response from method SQLPoolWorkloadGroupClient.BeginCreateOrUpdate. type SQLPoolWorkloadGroupClientCreateOrUpdateResponse struct { WorkloadGroup } -// SQLPoolWorkloadGroupClientDeleteResponse contains the response from method SQLPoolWorkloadGroupClient.Delete. +// SQLPoolWorkloadGroupClientDeleteResponse contains the response from method SQLPoolWorkloadGroupClient.BeginDelete. type SQLPoolWorkloadGroupClientDeleteResponse struct { // placeholder for future response values } @@ -964,25 +970,19 @@ type SQLPoolWorkloadGroupClientGetResponse struct { WorkloadGroup } -// SQLPoolWorkloadGroupClientListResponse contains the response from method SQLPoolWorkloadGroupClient.List. +// SQLPoolWorkloadGroupClientListResponse contains the response from method SQLPoolWorkloadGroupClient.NewListPager. type SQLPoolWorkloadGroupClientListResponse struct { WorkloadGroupListResult } -// SQLPoolsClientCreateResponse contains the response from method SQLPoolsClient.Create. +// SQLPoolsClientCreateResponse contains the response from method SQLPoolsClient.BeginCreate. type SQLPoolsClientCreateResponse struct { SQLPool } -// SQLPoolsClientDeleteResponse contains the response from method SQLPoolsClient.Delete. +// SQLPoolsClientDeleteResponse contains the response from method SQLPoolsClient.BeginDelete. type SQLPoolsClientDeleteResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolsClientDeleteResponse. -func (s *SQLPoolsClientDeleteResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &s.Interface) + SQLPool } // SQLPoolsClientGetResponse contains the response from method SQLPoolsClient.Get. @@ -990,20 +990,14 @@ type SQLPoolsClientGetResponse struct { SQLPool } -// SQLPoolsClientListByWorkspaceResponse contains the response from method SQLPoolsClient.ListByWorkspace. +// SQLPoolsClientListByWorkspaceResponse contains the response from method SQLPoolsClient.NewListByWorkspacePager. type SQLPoolsClientListByWorkspaceResponse struct { SQLPoolInfoListResult } -// SQLPoolsClientPauseResponse contains the response from method SQLPoolsClient.Pause. +// SQLPoolsClientPauseResponse contains the response from method SQLPoolsClient.BeginPause. type SQLPoolsClientPauseResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolsClientPauseResponse. -func (s *SQLPoolsClientPauseResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &s.Interface) + SQLPool } // SQLPoolsClientRenameResponse contains the response from method SQLPoolsClient.Rename. @@ -1011,18 +1005,12 @@ type SQLPoolsClientRenameResponse struct { // placeholder for future response values } -// SQLPoolsClientResumeResponse contains the response from method SQLPoolsClient.Resume. +// SQLPoolsClientResumeResponse contains the response from method SQLPoolsClient.BeginResume. type SQLPoolsClientResumeResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolsClientResumeResponse. -func (s *SQLPoolsClientResumeResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &s.Interface) + SQLPool } -// SQLPoolsClientUpdateResponse contains the response from method SQLPoolsClient.Update. +// SQLPoolsClientUpdateResponse contains the response from method SQLPoolsClient.BeginUpdate. type SQLPoolsClientUpdateResponse struct { SQLPool } @@ -1032,17 +1020,17 @@ type SparkConfigurationClientGetResponse struct { SparkConfigurationResource } -// SparkConfigurationsClientListByWorkspaceResponse contains the response from method SparkConfigurationsClient.ListByWorkspace. +// SparkConfigurationsClientListByWorkspaceResponse contains the response from method SparkConfigurationsClient.NewListByWorkspacePager. type SparkConfigurationsClientListByWorkspaceResponse struct { SparkConfigurationListResponse } -// WorkspaceAADAdminsClientCreateOrUpdateResponse contains the response from method WorkspaceAADAdminsClient.CreateOrUpdate. +// WorkspaceAADAdminsClientCreateOrUpdateResponse contains the response from method WorkspaceAADAdminsClient.BeginCreateOrUpdate. type WorkspaceAADAdminsClientCreateOrUpdateResponse struct { WorkspaceAADAdminInfo } -// WorkspaceAADAdminsClientDeleteResponse contains the response from method WorkspaceAADAdminsClient.Delete. +// WorkspaceAADAdminsClientDeleteResponse contains the response from method WorkspaceAADAdminsClient.BeginDelete. type WorkspaceAADAdminsClientDeleteResponse struct { // placeholder for future response values } @@ -1052,7 +1040,7 @@ type WorkspaceAADAdminsClientGetResponse struct { WorkspaceAADAdminInfo } -// WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse contains the response from method WorkspaceManagedIdentitySQLControlSettingsClient.CreateOrUpdate. +// WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse contains the response from method WorkspaceManagedIdentitySQLControlSettingsClient.BeginCreateOrUpdate. type WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse struct { ManagedIdentitySQLControlSettingsModel } @@ -1062,7 +1050,7 @@ type WorkspaceManagedIdentitySQLControlSettingsClientGetResponse struct { ManagedIdentitySQLControlSettingsModel } -// WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerBlobAuditingPoliciesClient.CreateOrUpdate. +// WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerBlobAuditingPoliciesClient.BeginCreateOrUpdate. type WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct { ServerBlobAuditingPolicy } @@ -1072,7 +1060,7 @@ type WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse struct { ServerBlobAuditingPolicy } -// WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse contains the response from method WorkspaceManagedSQLServerBlobAuditingPoliciesClient.ListByWorkspace. +// WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse contains the response from method WorkspaceManagedSQLServerBlobAuditingPoliciesClient.NewListByWorkspacePager. type WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse struct { ServerBlobAuditingPolicyListResult } @@ -1082,17 +1070,17 @@ type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse st DedicatedSQLminimalTLSSettings } -// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse contains the response from method WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.List. +// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse contains the response from method WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.NewListPager. type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse struct { DedicatedSQLminimalTLSSettingsListResult } -// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse contains the response from method WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.Update. +// WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse contains the response from method WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.BeginUpdate. type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse struct { DedicatedSQLminimalTLSSettings } -// WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.CreateOrUpdate. +// WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.BeginCreateOrUpdate. type WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse struct { EncryptionProtector } @@ -1102,17 +1090,17 @@ type WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse struct { EncryptionProtector } -// WorkspaceManagedSQLServerEncryptionProtectorClientListResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.List. +// WorkspaceManagedSQLServerEncryptionProtectorClientListResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.NewListPager. type WorkspaceManagedSQLServerEncryptionProtectorClientListResponse struct { EncryptionProtectorListResult } -// WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.Revalidate. +// WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse contains the response from method WorkspaceManagedSQLServerEncryptionProtectorClient.BeginRevalidate. type WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse struct { // placeholder for future response values } -// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.CreateOrUpdate. +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.BeginCreateOrUpdate. type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse struct { ExtendedServerBlobAuditingPolicy } @@ -1122,7 +1110,7 @@ type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse stru ExtendedServerBlobAuditingPolicy } -// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse contains the response from method WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.ListByWorkspace. +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse contains the response from method WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.NewListByWorkspacePager. type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse struct { ExtendedServerBlobAuditingPolicyListResult } @@ -1132,12 +1120,12 @@ type WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse struct { RecoverableSQLPool } -// WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse contains the response from method WorkspaceManagedSQLServerRecoverableSQLPoolsClient.List. +// WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse contains the response from method WorkspaceManagedSQLServerRecoverableSQLPoolsClient.NewListPager. type WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse struct { RecoverableSQLPoolListResult } -// WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerSecurityAlertPolicyClient.CreateOrUpdate. +// WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse contains the response from method WorkspaceManagedSQLServerSecurityAlertPolicyClient.BeginCreateOrUpdate. type WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse struct { ServerSecurityAlertPolicy } @@ -1147,12 +1135,12 @@ type WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse struct { ServerSecurityAlertPolicy } -// WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse contains the response from method WorkspaceManagedSQLServerSecurityAlertPolicyClient.List. +// WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse contains the response from method WorkspaceManagedSQLServerSecurityAlertPolicyClient.NewListPager. type WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse struct { ServerSecurityAlertPolicyListResult } -// WorkspaceManagedSQLServerUsagesClientListResponse contains the response from method WorkspaceManagedSQLServerUsagesClient.List. +// WorkspaceManagedSQLServerUsagesClientListResponse contains the response from method WorkspaceManagedSQLServerUsagesClient.NewListPager. type WorkspaceManagedSQLServerUsagesClientListResponse struct { ServerUsageListResult } @@ -1172,17 +1160,17 @@ type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse struct { ServerVulnerabilityAssessment } -// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse contains the response from method WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.List. +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse contains the response from method WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.NewListPager. type WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse struct { ServerVulnerabilityAssessmentListResult } -// WorkspaceSQLAADAdminsClientCreateOrUpdateResponse contains the response from method WorkspaceSQLAADAdminsClient.CreateOrUpdate. +// WorkspaceSQLAADAdminsClientCreateOrUpdateResponse contains the response from method WorkspaceSQLAADAdminsClient.BeginCreateOrUpdate. type WorkspaceSQLAADAdminsClientCreateOrUpdateResponse struct { WorkspaceAADAdminInfo } -// WorkspaceSQLAADAdminsClientDeleteResponse contains the response from method WorkspaceSQLAADAdminsClient.Delete. +// WorkspaceSQLAADAdminsClientDeleteResponse contains the response from method WorkspaceSQLAADAdminsClient.BeginDelete. type WorkspaceSQLAADAdminsClientDeleteResponse struct { // placeholder for future response values } @@ -1192,20 +1180,14 @@ type WorkspaceSQLAADAdminsClientGetResponse struct { WorkspaceAADAdminInfo } -// WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.CreateOrUpdate. +// WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.BeginCreateOrUpdate. type WorkspacesClientCreateOrUpdateResponse struct { Workspace } -// WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.Delete. +// WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.BeginDelete. type WorkspacesClientDeleteResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacesClientDeleteResponse. -func (w *WorkspacesClientDeleteResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &w.Interface) + Workspace } // WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get. @@ -1213,17 +1195,17 @@ type WorkspacesClientGetResponse struct { Workspace } -// WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.ListByResourceGroup. +// WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.NewListByResourceGroupPager. type WorkspacesClientListByResourceGroupResponse struct { WorkspaceInfoListResult } -// WorkspacesClientListResponse contains the response from method WorkspacesClient.List. +// WorkspacesClientListResponse contains the response from method WorkspacesClient.NewListPager. type WorkspacesClientListResponse struct { WorkspaceInfoListResult } -// WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.Update. +// WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.BeginUpdate. type WorkspacesClientUpdateResponse struct { Workspace } diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_restorabledroppedsqlpools_client.go b/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_restorabledroppedsqlpools_client.go rename to sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go index 1e32ed0b4357..11ab498ba83f 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_restorabledroppedsqlpools_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type RestorableDroppedSQLPoolsClient struct { } // NewRestorableDroppedSQLPoolsClient creates a new instance of RestorableDroppedSQLPoolsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRestorableDroppedSQLPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableDroppedSQLPoolsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewRestorableDroppedSQLPoolsClient(subscriptionID string, credential azcore // Get - Gets a deleted sql pool that can be restored // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// restorableDroppedSQLPoolID - The id of the deleted Sql Pool in the form of sqlPoolName,deletionTimeInFileTimeFormat -// options - RestorableDroppedSQLPoolsClientGetOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - restorableDroppedSQLPoolID - The id of the deleted Sql Pool in the form of sqlPoolName,deletionTimeInFileTimeFormat +// - options - RestorableDroppedSQLPoolsClientGetOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.Get +// method. func (client *RestorableDroppedSQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, restorableDroppedSQLPoolID string, options *RestorableDroppedSQLPoolsClientGetOptions) (RestorableDroppedSQLPoolsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, restorableDroppedSQLPoolID, options) if err != nil { @@ -117,12 +119,12 @@ func (client *RestorableDroppedSQLPoolsClient) getHandleResponse(resp *http.Resp } // NewListByWorkspacePager - Gets a list of deleted Sql pools that can be restored -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - RestorableDroppedSQLPoolsClientListByWorkspaceOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.ListByWorkspace -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - RestorableDroppedSQLPoolsClientListByWorkspaceOptions contains the optional parameters for the RestorableDroppedSQLPoolsClient.NewListByWorkspacePager +// method. func (client *RestorableDroppedSQLPoolsClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *RestorableDroppedSQLPoolsClientListByWorkspaceOptions) *runtime.Pager[RestorableDroppedSQLPoolsClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[RestorableDroppedSQLPoolsClientListByWorkspaceResponse]{ More: func(page RestorableDroppedSQLPoolsClientListByWorkspaceResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfiguration_client.go b/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfiguration_client.go rename to sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go index bfbc8912296b..9d139dc2f476 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfiguration_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SparkConfigurationClient struct { } // NewSparkConfigurationClient creates a new instance of SparkConfigurationClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSparkConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SparkConfigurationClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,11 +57,12 @@ func NewSparkConfigurationClient(subscriptionID string, credential azcore.TokenC // Get - Get SparkConfiguration by name in a workspace. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// sparkConfigurationName - SparkConfiguration name -// workspaceName - The name of the workspace. -// options - SparkConfigurationClientGetOptions contains the optional parameters for the SparkConfigurationClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - sparkConfigurationName - SparkConfiguration name +// - workspaceName - The name of the workspace. +// - options - SparkConfigurationClientGetOptions contains the optional parameters for the SparkConfigurationClient.Get method. func (client *SparkConfigurationClient) Get(ctx context.Context, resourceGroupName string, sparkConfigurationName string, workspaceName string, options *SparkConfigurationClientGetOptions) (SparkConfigurationClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, sparkConfigurationName, workspaceName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfigurations_client.go b/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfigurations_client.go rename to sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go index 723b06a3b82e..7389bbc0b3f0 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfigurations_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SparkConfigurationsClient struct { } // NewSparkConfigurationsClient creates a new instance of SparkConfigurationsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSparkConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SparkConfigurationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -55,12 +56,12 @@ func NewSparkConfigurationsClient(subscriptionID string, credential azcore.Token } // NewListByWorkspacePager - List sparkConfigurations in a workspace. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - SparkConfigurationsClientListByWorkspaceOptions contains the optional parameters for the SparkConfigurationsClient.ListByWorkspace -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - SparkConfigurationsClientListByWorkspaceOptions contains the optional parameters for the SparkConfigurationsClient.NewListByWorkspacePager +// method. func (client *SparkConfigurationsClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *SparkConfigurationsClientListByWorkspaceOptions) *runtime.Pager[SparkConfigurationsClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[SparkConfigurationsClientListByWorkspaceResponse]{ More: func(page SparkConfigurationsClientListByWorkspaceResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolblobauditingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolblobauditingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go index 8b51de03f33a..945b9c5849f2 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolblobauditingpolicies_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolBlobAuditingPoliciesClient struct { } // NewSQLPoolBlobAuditingPoliciesClient creates a new instance of SQLPoolBlobAuditingPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolBlobAuditingPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewSQLPoolBlobAuditingPoliciesClient(subscriptionID string, credential azco // CreateOrUpdate - Creates or updates a SQL pool's blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// parameters - The database blob auditing policy. -// options - SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - parameters - The database blob auditing policy. +// - options - SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.CreateOrUpdate +// method. func (client *SQLPoolBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters SQLPoolBlobAuditingPolicy, options *SQLPoolBlobAuditingPoliciesClientCreateOrUpdateOptions) (SQLPoolBlobAuditingPoliciesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) if err != nil { @@ -120,12 +122,13 @@ func (client *SQLPoolBlobAuditingPoliciesClient) createOrUpdateHandleResponse(re // Get - Get a SQL pool's blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolBlobAuditingPoliciesClientGetOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.Get +// method. func (client *SQLPoolBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolBlobAuditingPoliciesClientGetOptions) (SQLPoolBlobAuditingPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) if err != nil { @@ -182,13 +185,13 @@ func (client *SQLPoolBlobAuditingPoliciesClient) getHandleResponse(resp *http.Re } // NewListBySQLPoolPager - Lists auditing settings of a Sql pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.ListBySQLPool -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions contains the optional parameters for the SQLPoolBlobAuditingPoliciesClient.NewListBySQLPoolPager +// method. func (client *SQLPoolBlobAuditingPoliciesClient) NewListBySQLPoolPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolBlobAuditingPoliciesClientListBySQLPoolOptions) *runtime.Pager[SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse]{ More: func(page SQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolcolumns_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolcolumns_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go index 59dff98de894..a7aca43c6059 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolcolumns_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolColumnsClient struct { } // NewSQLPoolColumnsClient creates a new instance of SQLPoolColumnsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolColumnsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewSQLPoolColumnsClient(subscriptionID string, credential azcore.TokenCrede // Get - Get Sql pool column // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// tableName - The name of the table. -// columnName - The name of the column. -// options - SQLPoolColumnsClientGetOptions contains the optional parameters for the SQLPoolColumnsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - SQLPoolColumnsClientGetOptions contains the optional parameters for the SQLPoolColumnsClient.Get method. func (client *SQLPoolColumnsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, options *SQLPoolColumnsClientGetOptions) (SQLPoolColumnsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolconnectionpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolconnectionpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go index f54a34b17251..243b31b2cb15 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolconnectionpolicies_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolConnectionPoliciesClient struct { } // NewSQLPoolConnectionPoliciesClient creates a new instance of SQLPoolConnectionPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolConnectionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolConnectionPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewSQLPoolConnectionPoliciesClient(subscriptionID string, credential azcore // Get - Get a Sql pool's connection policy, which is used with table auditing. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// connectionPolicyName - The name of the connection policy. -// options - SQLPoolConnectionPoliciesClientGetOptions contains the optional parameters for the SQLPoolConnectionPoliciesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - connectionPolicyName - The name of the connection policy. +// - options - SQLPoolConnectionPoliciesClientGetOptions contains the optional parameters for the SQLPoolConnectionPoliciesClient.Get +// method. func (client *SQLPoolConnectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, connectionPolicyName ConnectionPolicyName, options *SQLPoolConnectionPoliciesClientGetOptions) (SQLPoolConnectionPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, connectionPolicyName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooldatawarehouseuseractivities_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooldatawarehouseuseractivities_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go index 8cbb571ff86e..781c7b14b65b 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooldatawarehouseuseractivities_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolDataWarehouseUserActivitiesClient struct { } // NewSQLPoolDataWarehouseUserActivitiesClient creates a new instance of SQLPoolDataWarehouseUserActivitiesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolDataWarehouseUserActivitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolDataWarehouseUserActivitiesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewSQLPoolDataWarehouseUserActivitiesClient(subscriptionID string, credenti // Get - Gets the user activities of a SQL pool which includes running and suspended queries // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// dataWarehouseUserActivityName - The activity name of the Sql pool. -// options - SQLPoolDataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the SQLPoolDataWarehouseUserActivitiesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - dataWarehouseUserActivityName - The activity name of the Sql pool. +// - options - SQLPoolDataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the SQLPoolDataWarehouseUserActivitiesClient.Get +// method. func (client *SQLPoolDataWarehouseUserActivitiesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, dataWarehouseUserActivityName DataWarehouseUserActivityName, options *SQLPoolDataWarehouseUserActivitiesClientGetOptions) (SQLPoolDataWarehouseUserActivitiesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, dataWarehouseUserActivityName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolgeobackuppolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolgeobackuppolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go index f9d6a1a071a2..8f4a7892ae85 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolgeobackuppolicies_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolGeoBackupPoliciesClient struct { } // NewSQLPoolGeoBackupPoliciesClient creates a new instance of SQLPoolGeoBackupPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolGeoBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolGeoBackupPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewSQLPoolGeoBackupPoliciesClient(subscriptionID string, credential azcore. // CreateOrUpdate - Updates a SQL Pool geo backup policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// geoBackupPolicyName - The name of the geo backup policy. -// parameters - The required parameters for creating or updating the geo backup policy. -// options - SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - geoBackupPolicyName - The name of the geo backup policy. +// - parameters - The required parameters for creating or updating the geo backup policy. +// - options - SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.CreateOrUpdate +// method. func (client *SQLPoolGeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, geoBackupPolicyName GeoBackupPolicyName, parameters GeoBackupPolicy, options *SQLPoolGeoBackupPoliciesClientCreateOrUpdateOptions) (SQLPoolGeoBackupPoliciesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, geoBackupPolicyName, parameters, options) if err != nil { @@ -124,13 +126,14 @@ func (client *SQLPoolGeoBackupPoliciesClient) createOrUpdateHandleResponse(resp // Get - Get the specified SQL pool geo backup policy // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// geoBackupPolicyName - The name of the geo backup policy. -// options - SQLPoolGeoBackupPoliciesClientGetOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - geoBackupPolicyName - The name of the geo backup policy. +// - options - SQLPoolGeoBackupPoliciesClientGetOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.Get +// method. func (client *SQLPoolGeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, geoBackupPolicyName GeoBackupPolicyName, options *SQLPoolGeoBackupPoliciesClientGetOptions) (SQLPoolGeoBackupPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, geoBackupPolicyName, options) if err != nil { @@ -190,13 +193,13 @@ func (client *SQLPoolGeoBackupPoliciesClient) getHandleResponse(resp *http.Respo } // NewListPager - Get list of SQL pool geo backup policies -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolGeoBackupPoliciesClientListOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolGeoBackupPoliciesClientListOptions contains the optional parameters for the SQLPoolGeoBackupPoliciesClient.NewListPager +// method. func (client *SQLPoolGeoBackupPoliciesClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolGeoBackupPoliciesClientListOptions) *runtime.Pager[SQLPoolGeoBackupPoliciesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolGeoBackupPoliciesClientListResponse]{ More: func(page SQLPoolGeoBackupPoliciesClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindowoptions_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindowoptions_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go index 54889fce5661..1d55c8915750 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindowoptions_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolMaintenanceWindowOptionsClient struct { } // NewSQLPoolMaintenanceWindowOptionsClient creates a new instance of SQLPoolMaintenanceWindowOptionsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolMaintenanceWindowOptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolMaintenanceWindowOptionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewSQLPoolMaintenanceWindowOptionsClient(subscriptionID string, credential // Get - Get list of SQL pool's available maintenance windows. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// maintenanceWindowOptionsName - Maintenance window options name. -// options - SQLPoolMaintenanceWindowOptionsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowOptionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - maintenanceWindowOptionsName - Maintenance window options name. +// - options - SQLPoolMaintenanceWindowOptionsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowOptionsClient.Get +// method. func (client *SQLPoolMaintenanceWindowOptionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, maintenanceWindowOptionsName string, options *SQLPoolMaintenanceWindowOptionsClientGetOptions) (SQLPoolMaintenanceWindowOptionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowOptionsName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindows_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go similarity index 87% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindows_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go index 3b936536d331..6ffa27297a90 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindows_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolMaintenanceWindowsClient struct { } // NewSQLPoolMaintenanceWindowsClient creates a new instance of SQLPoolMaintenanceWindowsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolMaintenanceWindowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolMaintenanceWindowsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewSQLPoolMaintenanceWindowsClient(subscriptionID string, credential azcore // CreateOrUpdate - Creates or updates a Sql pool's maintenance windows settings. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// maintenanceWindowName - Maintenance window name. -// parameters - The required parameters for creating or updating Maintenance Windows settings -// options - SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - maintenanceWindowName - Maintenance window name. +// - parameters - The required parameters for creating or updating Maintenance Windows settings +// - options - SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.CreateOrUpdate +// method. func (client *SQLPoolMaintenanceWindowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, maintenanceWindowName string, parameters MaintenanceWindows, options *SQLPoolMaintenanceWindowsClientCreateOrUpdateOptions) (SQLPoolMaintenanceWindowsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName, parameters, options) if err != nil { @@ -111,13 +113,14 @@ func (client *SQLPoolMaintenanceWindowsClient) createOrUpdateCreateRequest(ctx c // Get - Get a SQL pool's Maintenance Windows. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// maintenanceWindowName - Maintenance window name. -// options - SQLPoolMaintenanceWindowsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - maintenanceWindowName - Maintenance window name. +// - options - SQLPoolMaintenanceWindowsClientGetOptions contains the optional parameters for the SQLPoolMaintenanceWindowsClient.Get +// method. func (client *SQLPoolMaintenanceWindowsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, maintenanceWindowName string, options *SQLPoolMaintenanceWindowsClientGetOptions) (SQLPoolMaintenanceWindowsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmetadatasyncconfigs_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmetadatasyncconfigs_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go index 583f36278de7..5671cc49c8b9 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmetadatasyncconfigs_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolMetadataSyncConfigsClient struct { } // NewSQLPoolMetadataSyncConfigsClient creates a new instance of SQLPoolMetadataSyncConfigsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolMetadataSyncConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolMetadataSyncConfigsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewSQLPoolMetadataSyncConfigsClient(subscriptionID string, credential azcor // Create - Set the metadata sync configuration for a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// metadataSyncConfiguration - Metadata sync configuration -// options - SQLPoolMetadataSyncConfigsClientCreateOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Create -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - metadataSyncConfiguration - Metadata sync configuration +// - options - SQLPoolMetadataSyncConfigsClientCreateOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Create +// method. func (client *SQLPoolMetadataSyncConfigsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, metadataSyncConfiguration MetadataSyncConfig, options *SQLPoolMetadataSyncConfigsClientCreateOptions) (SQLPoolMetadataSyncConfigsClientCreateResponse, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, metadataSyncConfiguration, options) if err != nil { @@ -72,7 +74,7 @@ func (client *SQLPoolMetadataSyncConfigsClient) Create(ctx context.Context, reso if err != nil { return SQLPoolMetadataSyncConfigsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNotFound) { + if !runtime.HasStatusCode(resp, http.StatusOK) { return SQLPoolMetadataSyncConfigsClientCreateResponse{}, runtime.NewResponseError(resp) } return client.createHandleResponse(resp) @@ -119,12 +121,13 @@ func (client *SQLPoolMetadataSyncConfigsClient) createHandleResponse(resp *http. // Get - Get the metadata sync configuration for a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolMetadataSyncConfigsClientGetOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolMetadataSyncConfigsClientGetOptions contains the optional parameters for the SQLPoolMetadataSyncConfigsClient.Get +// method. func (client *SQLPoolMetadataSyncConfigsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolMetadataSyncConfigsClientGetOptions) (SQLPoolMetadataSyncConfigsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) if err != nil { @@ -134,7 +137,7 @@ func (client *SQLPoolMetadataSyncConfigsClient) Get(ctx context.Context, resourc if err != nil { return SQLPoolMetadataSyncConfigsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNotFound) { + if !runtime.HasStatusCode(resp, http.StatusOK) { return SQLPoolMetadataSyncConfigsClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooloperationresults_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go similarity index 68% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooloperationresults_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go index 9e81dd321ea2..acfdbea278dc 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooloperationresults_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolOperationResultsClient struct { } // NewSQLPoolOperationResultsClient creates a new instance of SQLPoolOperationResultsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolOperationResultsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -54,32 +55,49 @@ func NewSQLPoolOperationResultsClient(subscriptionID string, credential azcore.T return client, nil } +// BeginGetLocationHeaderResult - Get the status of a SQL pool operation +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-06-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - operationID - Operation ID +// - options - SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions contains the optional parameters for the SQLPoolOperationResultsClient.BeginGetLocationHeaderResult +// method. +func (client *SQLPoolOperationResultsClient) BeginGetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, operationID string, options *SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions) (*runtime.Poller[SQLPoolOperationResultsClientGetLocationHeaderResultResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getLocationHeaderResult(ctx, resourceGroupName, workspaceName, sqlPoolName, operationID, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[SQLPoolOperationResultsClientGetLocationHeaderResultResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[SQLPoolOperationResultsClientGetLocationHeaderResultResponse](options.ResumeToken, client.pl, nil) + } +} + // GetLocationHeaderResult - Get the status of a SQL pool operation // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// operationID - Operation ID -// options - SQLPoolOperationResultsClientGetLocationHeaderResultOptions contains the optional parameters for the SQLPoolOperationResultsClient.GetLocationHeaderResult -// method. -func (client *SQLPoolOperationResultsClient) GetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, operationID string, options *SQLPoolOperationResultsClientGetLocationHeaderResultOptions) (SQLPoolOperationResultsClientGetLocationHeaderResultResponse, error) { +func (client *SQLPoolOperationResultsClient) getLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, operationID string, options *SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions) (*http.Response, error) { req, err := client.getLocationHeaderResultCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, operationID, options) if err != nil { - return SQLPoolOperationResultsClientGetLocationHeaderResultResponse{}, err + return nil, err } resp, err := client.pl.Do(req) if err != nil { - return SQLPoolOperationResultsClientGetLocationHeaderResultResponse{}, err + return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return SQLPoolOperationResultsClientGetLocationHeaderResultResponse{}, runtime.NewResponseError(resp) + return nil, runtime.NewResponseError(resp) } - return client.getLocationHeaderResultHandleResponse(resp) + return resp, nil } // getLocationHeaderResultCreateRequest creates the GetLocationHeaderResult request. -func (client *SQLPoolOperationResultsClient) getLocationHeaderResultCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, operationID string, options *SQLPoolOperationResultsClientGetLocationHeaderResultOptions) (*policy.Request, error) { +func (client *SQLPoolOperationResultsClient) getLocationHeaderResultCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, operationID string, options *SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/operationResults/{operationId}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -111,12 +129,3 @@ func (client *SQLPoolOperationResultsClient) getLocationHeaderResultCreateReques req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } - -// getLocationHeaderResultHandleResponse handles the GetLocationHeaderResult response. -func (client *SQLPoolOperationResultsClient) getLocationHeaderResultHandleResponse(resp *http.Response) (SQLPoolOperationResultsClientGetLocationHeaderResultResponse, error) { - result := SQLPoolOperationResultsClientGetLocationHeaderResultResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { - return SQLPoolOperationResultsClientGetLocationHeaderResultResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooloperations_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooloperations_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client.go index a01af1648f09..5f4e933d4051 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooloperations_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolOperationsClient struct { } // NewSQLPoolOperationsClient creates a new instance of SQLPoolOperationsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolOperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -55,12 +56,13 @@ func NewSQLPoolOperationsClient(subscriptionID string, credential azcore.TokenCr } // NewListPager - Gets a list of operations performed on the SQL pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolOperationsClientListOptions contains the optional parameters for the SQLPoolOperationsClient.List method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolOperationsClientListOptions contains the optional parameters for the SQLPoolOperationsClient.NewListPager +// method. func (client *SQLPoolOperationsClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolOperationsClientListOptions) *runtime.Pager[SQLPoolOperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolOperationsClientListResponse]{ More: func(page SQLPoolOperationsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrecommendedsensitivitylabels_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrecommendedsensitivitylabels_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go index 7ac8b63e5c72..d222a63d98f1 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrecommendedsensitivitylabels_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolRecommendedSensitivityLabelsClient struct { } // NewSQLPoolRecommendedSensitivityLabelsClient creates a new instance of SQLPoolRecommendedSensitivityLabelsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolRecommendedSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolRecommendedSensitivityLabelsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewSQLPoolRecommendedSensitivityLabelsClient(subscriptionID string, credent // Update - Update recommended sensitivity labels states of a given SQL Pool using an operations batch. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolRecommendedSensitivityLabelsClient.Update -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolRecommendedSensitivityLabelsClient.Update +// method. func (client *SQLPoolRecommendedSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters RecommendedSensitivityLabelUpdateList, options *SQLPoolRecommendedSensitivityLabelsClientUpdateOptions) (SQLPoolRecommendedSensitivityLabelsClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolreplicationlinks_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolreplicationlinks_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client.go index dfb77d0985a8..1de7bd223b6d 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolreplicationlinks_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolReplicationLinksClient struct { } // NewSQLPoolReplicationLinksClient creates a new instance of SQLPoolReplicationLinksClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolReplicationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolReplicationLinksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewSQLPoolReplicationLinksClient(subscriptionID string, credential azcore.T // GetByName - Get SQL pool replication link by name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// linkID - The ID of the replication link. -// options - SQLPoolReplicationLinksClientGetByNameOptions contains the optional parameters for the SQLPoolReplicationLinksClient.GetByName -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - linkID - The ID of the replication link. +// - options - SQLPoolReplicationLinksClientGetByNameOptions contains the optional parameters for the SQLPoolReplicationLinksClient.GetByName +// method. func (client *SQLPoolReplicationLinksClient) GetByName(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, linkID string, options *SQLPoolReplicationLinksClientGetByNameOptions) (SQLPoolReplicationLinksClientGetByNameResponse, error) { req, err := client.getByNameCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, linkID, options) if err != nil { @@ -122,13 +124,13 @@ func (client *SQLPoolReplicationLinksClient) getByNameHandleResponse(resp *http. } // NewListPager - Lists a Sql pool's replication links. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolReplicationLinksClientListOptions contains the optional parameters for the SQLPoolReplicationLinksClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolReplicationLinksClientListOptions contains the optional parameters for the SQLPoolReplicationLinksClient.NewListPager +// method. func (client *SQLPoolReplicationLinksClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolReplicationLinksClientListOptions) *runtime.Pager[SQLPoolReplicationLinksClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolReplicationLinksClientListResponse]{ More: func(page SQLPoolReplicationLinksClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrestorepoints_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrestorepoints_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go index 35f8506e6d4a..880f24492149 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrestorepoints_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolRestorePointsClient struct { } // NewSQLPoolRestorePointsClient creates a new instance of SQLPoolRestorePointsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolRestorePointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolRestorePointsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewSQLPoolRestorePointsClient(subscriptionID string, credential azcore.Toke // BeginCreate - Creates a restore point for a data warehouse. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// parameters - The definition for creating the restore point of this Sql pool. -// options - SQLPoolRestorePointsClientBeginCreateOptions contains the optional parameters for the SQLPoolRestorePointsClient.BeginCreate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - parameters - The definition for creating the restore point of this Sql pool. +// - options - SQLPoolRestorePointsClientBeginCreateOptions contains the optional parameters for the SQLPoolRestorePointsClient.BeginCreate +// method. func (client *SQLPoolRestorePointsClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters CreateSQLPoolRestorePointDefinition, options *SQLPoolRestorePointsClientBeginCreateOptions) (*runtime.Poller[SQLPoolRestorePointsClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) @@ -79,6 +81,7 @@ func (client *SQLPoolRestorePointsClient) BeginCreate(ctx context.Context, resou // Create - Creates a restore point for a data warehouse. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolRestorePointsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters CreateSQLPoolRestorePointDefinition, options *SQLPoolRestorePointsClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) @@ -127,13 +130,14 @@ func (client *SQLPoolRestorePointsClient) createCreateRequest(ctx context.Contex // Delete - Deletes a restore point. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// restorePointName - The name of the restore point. -// options - SQLPoolRestorePointsClientDeleteOptions contains the optional parameters for the SQLPoolRestorePointsClient.Delete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - restorePointName - The name of the restore point. +// - options - SQLPoolRestorePointsClientDeleteOptions contains the optional parameters for the SQLPoolRestorePointsClient.Delete +// method. func (client *SQLPoolRestorePointsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, restorePointName string, options *SQLPoolRestorePointsClientDeleteOptions) (SQLPoolRestorePointsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, restorePointName, options) if err != nil { @@ -184,13 +188,14 @@ func (client *SQLPoolRestorePointsClient) deleteCreateRequest(ctx context.Contex // Get - Gets a restore point. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// restorePointName - The name of the restore point. -// options - SQLPoolRestorePointsClientGetOptions contains the optional parameters for the SQLPoolRestorePointsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - restorePointName - The name of the restore point. +// - options - SQLPoolRestorePointsClientGetOptions contains the optional parameters for the SQLPoolRestorePointsClient.Get +// method. func (client *SQLPoolRestorePointsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, restorePointName string, options *SQLPoolRestorePointsClientGetOptions) (SQLPoolRestorePointsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, restorePointName, options) if err != nil { @@ -250,13 +255,13 @@ func (client *SQLPoolRestorePointsClient) getHandleResponse(resp *http.Response) } // NewListPager - Get SQL pool backup information -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolRestorePointsClientListOptions contains the optional parameters for the SQLPoolRestorePointsClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolRestorePointsClientListOptions contains the optional parameters for the SQLPoolRestorePointsClient.NewListPager +// method. func (client *SQLPoolRestorePointsClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolRestorePointsClientListOptions) *runtime.Pager[SQLPoolRestorePointsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolRestorePointsClientListResponse]{ More: func(page SQLPoolRestorePointsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpools_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go similarity index 86% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpools_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go index 528526e8bf96..d814488fb76c 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpools_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolsClient struct { } // NewSQLPoolsClient creates a new instance of SQLPoolsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewSQLPoolsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Create a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// sqlPoolInfo - The SQL pool to create -// options - SQLPoolsClientBeginCreateOptions contains the optional parameters for the SQLPoolsClient.BeginCreate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - sqlPoolInfo - The SQL pool to create +// - options - SQLPoolsClientBeginCreateOptions contains the optional parameters for the SQLPoolsClient.BeginCreate method. func (client *SQLPoolsClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPool, options *SQLPoolsClientBeginCreateOptions) (*runtime.Poller[SQLPoolsClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, resourceGroupName, workspaceName, sqlPoolName, sqlPoolInfo, options) @@ -78,6 +80,7 @@ func (client *SQLPoolsClient) BeginCreate(ctx context.Context, resourceGroupName // Create - Create a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPool, options *SQLPoolsClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, sqlPoolInfo, options) @@ -88,7 +91,7 @@ func (client *SQLPoolsClient) create(ctx context.Context, resourceGroupName stri if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNotFound) { + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { return nil, runtime.NewResponseError(resp) } return resp, nil @@ -126,11 +129,12 @@ func (client *SQLPoolsClient) createCreateRequest(ctx context.Context, resourceG // BeginDelete - Delete a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolsClientBeginDeleteOptions contains the optional parameters for the SQLPoolsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolsClientBeginDeleteOptions contains the optional parameters for the SQLPoolsClient.BeginDelete method. func (client *SQLPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginDeleteOptions) (*runtime.Poller[SQLPoolsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, sqlPoolName, options) @@ -147,6 +151,7 @@ func (client *SQLPoolsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Delete a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) @@ -195,11 +200,12 @@ func (client *SQLPoolsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Get SQL pool properties // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolsClientGetOptions contains the optional parameters for the SQLPoolsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolsClientGetOptions contains the optional parameters for the SQLPoolsClient.Get method. func (client *SQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientGetOptions) (SQLPoolsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) if err != nil { @@ -255,12 +261,12 @@ func (client *SQLPoolsClient) getHandleResponse(resp *http.Response) (SQLPoolsCl } // NewListByWorkspacePager - List all SQL pools -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - SQLPoolsClientListByWorkspaceOptions contains the optional parameters for the SQLPoolsClient.ListByWorkspace -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - SQLPoolsClientListByWorkspaceOptions contains the optional parameters for the SQLPoolsClient.NewListByWorkspacePager +// method. func (client *SQLPoolsClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *SQLPoolsClientListByWorkspaceOptions) *runtime.Pager[SQLPoolsClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolsClientListByWorkspaceResponse]{ More: func(page SQLPoolsClientListByWorkspaceResponse) bool { @@ -326,11 +332,12 @@ func (client *SQLPoolsClient) listByWorkspaceHandleResponse(resp *http.Response) // BeginPause - Pause a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolsClientBeginPauseOptions contains the optional parameters for the SQLPoolsClient.BeginPause method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolsClientBeginPauseOptions contains the optional parameters for the SQLPoolsClient.BeginPause method. func (client *SQLPoolsClient) BeginPause(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginPauseOptions) (*runtime.Poller[SQLPoolsClientPauseResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.pause(ctx, resourceGroupName, workspaceName, sqlPoolName, options) @@ -347,6 +354,7 @@ func (client *SQLPoolsClient) BeginPause(ctx context.Context, resourceGroupName // Pause - Pause a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolsClient) pause(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginPauseOptions) (*http.Response, error) { req, err := client.pauseCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) @@ -395,12 +403,13 @@ func (client *SQLPoolsClient) pauseCreateRequest(ctx context.Context, resourceGr // Rename - Rename a SQL pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// parameters - The resource move definition for renaming this Sql pool. -// options - SQLPoolsClientRenameOptions contains the optional parameters for the SQLPoolsClient.Rename method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - parameters - The resource move definition for renaming this Sql pool. +// - options - SQLPoolsClientRenameOptions contains the optional parameters for the SQLPoolsClient.Rename method. func (client *SQLPoolsClient) Rename(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters ResourceMoveDefinition, options *SQLPoolsClientRenameOptions) (SQLPoolsClientRenameResponse, error) { req, err := client.renameCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) if err != nil { @@ -447,11 +456,12 @@ func (client *SQLPoolsClient) renameCreateRequest(ctx context.Context, resourceG // BeginResume - Resume a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolsClientBeginResumeOptions contains the optional parameters for the SQLPoolsClient.BeginResume method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolsClientBeginResumeOptions contains the optional parameters for the SQLPoolsClient.BeginResume method. func (client *SQLPoolsClient) BeginResume(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginResumeOptions) (*runtime.Poller[SQLPoolsClientResumeResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.resume(ctx, resourceGroupName, workspaceName, sqlPoolName, options) @@ -468,6 +478,7 @@ func (client *SQLPoolsClient) BeginResume(ctx context.Context, resourceGroupName // Resume - Resume a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolsClient) resume(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolsClientBeginResumeOptions) (*http.Response, error) { req, err := client.resumeCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) @@ -514,31 +525,48 @@ func (client *SQLPoolsClient) resumeCreateRequest(ctx context.Context, resourceG return req, nil } +// BeginUpdate - Apply a partial update to a SQL pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2021-06-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - sqlPoolInfo - The updated SQL pool properties +// - options - SQLPoolsClientBeginUpdateOptions contains the optional parameters for the SQLPoolsClient.BeginUpdate method. +func (client *SQLPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPoolPatchInfo, options *SQLPoolsClientBeginUpdateOptions) (*runtime.Poller[SQLPoolsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, workspaceName, sqlPoolName, sqlPoolInfo, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[SQLPoolsClientUpdateResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[SQLPoolsClientUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + // Update - Apply a partial update to a SQL pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// sqlPoolInfo - The updated SQL pool properties -// options - SQLPoolsClientUpdateOptions contains the optional parameters for the SQLPoolsClient.Update method. -func (client *SQLPoolsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPoolPatchInfo, options *SQLPoolsClientUpdateOptions) (SQLPoolsClientUpdateResponse, error) { +func (client *SQLPoolsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPoolPatchInfo, options *SQLPoolsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, sqlPoolInfo, options) if err != nil { - return SQLPoolsClientUpdateResponse{}, err + return nil, err } resp, err := client.pl.Do(req) if err != nil { - return SQLPoolsClientUpdateResponse{}, err + return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return SQLPoolsClientUpdateResponse{}, runtime.NewResponseError(resp) + return nil, runtime.NewResponseError(resp) } - return client.updateHandleResponse(resp) + return resp, nil } // updateCreateRequest creates the Update request. -func (client *SQLPoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPoolPatchInfo, options *SQLPoolsClientUpdateOptions) (*policy.Request, error) { +func (client *SQLPoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, sqlPoolInfo SQLPoolPatchInfo, options *SQLPoolsClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -566,12 +594,3 @@ func (client *SQLPoolsClient) updateCreateRequest(ctx context.Context, resourceG req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, sqlPoolInfo) } - -// updateHandleResponse handles the Update response. -func (client *SQLPoolsClient) updateHandleResponse(resp *http.Response) (SQLPoolsClientUpdateResponse, error) { - result := SQLPoolsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SQLPool); err != nil { - return SQLPoolsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolschemas_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolschemas_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go index 712cac5627cf..37c1a79d37de 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolschemas_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolSchemasClient struct { } // NewSQLPoolSchemasClient creates a new instance of SQLPoolSchemasClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolSchemasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolSchemasClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewSQLPoolSchemasClient(subscriptionID string, credential azcore.TokenCrede // Get - Get Sql Pool schema // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// options - SQLPoolSchemasClientGetOptions contains the optional parameters for the SQLPoolSchemasClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - options - SQLPoolSchemasClientGetOptions contains the optional parameters for the SQLPoolSchemasClient.Get method. func (client *SQLPoolSchemasClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, options *SQLPoolSchemasClientGetOptions) (SQLPoolSchemasClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, options) if err != nil { @@ -121,12 +123,12 @@ func (client *SQLPoolSchemasClient) getHandleResponse(resp *http.Response) (SQLP } // NewListPager - Gets schemas of a given SQL pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolSchemasClientListOptions contains the optional parameters for the SQLPoolSchemasClient.List method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolSchemasClientListOptions contains the optional parameters for the SQLPoolSchemasClient.NewListPager method. func (client *SQLPoolSchemasClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolSchemasClientListOptions) *runtime.Pager[SQLPoolSchemasClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolSchemasClientListResponse]{ More: func(page SQLPoolSchemasClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsecurityalertpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsecurityalertpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go index 25a631f70eb2..5ddde4cd085a 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsecurityalertpolicies_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolSecurityAlertPoliciesClient struct { } // NewSQLPoolSecurityAlertPoliciesClient creates a new instance of SQLPoolSecurityAlertPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolSecurityAlertPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewSQLPoolSecurityAlertPoliciesClient(subscriptionID string, credential azc // CreateOrUpdate - Create or update a Sql pool's security alert policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// securityAlertPolicyName - The name of the security alert policy. -// parameters - The Sql pool security alert policy. -// options - SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - securityAlertPolicyName - The name of the security alert policy. +// - parameters - The Sql pool security alert policy. +// - options - SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.CreateOrUpdate +// method. func (client *SQLPoolSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, securityAlertPolicyName SecurityAlertPolicyName, parameters SQLPoolSecurityAlertPolicy, options *SQLPoolSecurityAlertPoliciesClientCreateOrUpdateOptions) (SQLPoolSecurityAlertPoliciesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, securityAlertPolicyName, parameters, options) if err != nil { @@ -124,13 +126,14 @@ func (client *SQLPoolSecurityAlertPoliciesClient) createOrUpdateHandleResponse(r // Get - Get a Sql pool's security alert policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// securityAlertPolicyName - The name of the security alert policy. -// options - SQLPoolSecurityAlertPoliciesClientGetOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - securityAlertPolicyName - The name of the security alert policy. +// - options - SQLPoolSecurityAlertPoliciesClientGetOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.Get +// method. func (client *SQLPoolSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, securityAlertPolicyName SecurityAlertPolicyName, options *SQLPoolSecurityAlertPoliciesClientGetOptions) (SQLPoolSecurityAlertPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, securityAlertPolicyName, options) if err != nil { @@ -190,13 +193,13 @@ func (client *SQLPoolSecurityAlertPoliciesClient) getHandleResponse(resp *http.R } // NewListPager - Get a list of Sql pool's security alert policies. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolSecurityAlertPoliciesClientListOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolSecurityAlertPoliciesClientListOptions contains the optional parameters for the SQLPoolSecurityAlertPoliciesClient.NewListPager +// method. func (client *SQLPoolSecurityAlertPoliciesClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolSecurityAlertPoliciesClientListOptions) *runtime.Pager[SQLPoolSecurityAlertPoliciesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolSecurityAlertPoliciesClientListResponse]{ More: func(page SQLPoolSecurityAlertPoliciesClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsensitivitylabels_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsensitivitylabels_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go index 8a88825f0e6d..ff5f4f700992 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsensitivitylabels_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -32,9 +33,9 @@ type SQLPoolSensitivityLabelsClient struct { } // NewSQLPoolSensitivityLabelsClient creates a new instance of SQLPoolSensitivityLabelsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolSensitivityLabelsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,16 +58,17 @@ func NewSQLPoolSensitivityLabelsClient(subscriptionID string, credential azcore. // CreateOrUpdate - Creates or updates the sensitivity label of a given column in a Sql pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// tableName - The name of the table. -// columnName - The name of the column. -// parameters - The column sensitivity label resource. -// options - SQLPoolSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - parameters - The column sensitivity label resource. +// - options - SQLPoolSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.CreateOrUpdate +// method. func (client *SQLPoolSensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel, options *SQLPoolSensitivityLabelsClientCreateOrUpdateOptions) (SQLPoolSensitivityLabelsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, parameters, options) if err != nil { @@ -136,15 +138,16 @@ func (client *SQLPoolSensitivityLabelsClient) createOrUpdateHandleResponse(resp // Delete - Deletes the sensitivity label of a given column in a Sql pool // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// tableName - The name of the table. -// columnName - The name of the column. -// options - SQLPoolSensitivityLabelsClientDeleteOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Delete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - SQLPoolSensitivityLabelsClientDeleteOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Delete +// method. func (client *SQLPoolSensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, options *SQLPoolSensitivityLabelsClientDeleteOptions) (SQLPoolSensitivityLabelsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, options) if err != nil { @@ -204,15 +207,16 @@ func (client *SQLPoolSensitivityLabelsClient) deleteCreateRequest(ctx context.Co // DisableRecommendation - Disables sensitivity recommendations on a given column // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// tableName - The name of the table. -// columnName - The name of the column. -// options - SQLPoolSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.DisableRecommendation -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - SQLPoolSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.DisableRecommendation +// method. func (client *SQLPoolSensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, options *SQLPoolSensitivityLabelsClientDisableRecommendationOptions) (SQLPoolSensitivityLabelsClientDisableRecommendationResponse, error) { req, err := client.disableRecommendationCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, options) if err != nil { @@ -273,15 +277,16 @@ func (client *SQLPoolSensitivityLabelsClient) disableRecommendationCreateRequest // EnableRecommendation - Enables sensitivity recommendations on a given column (recommendations are enabled by default on // all columns) // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// tableName - The name of the table. -// columnName - The name of the column. -// options - SQLPoolSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.EnableRecommendation -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - options - SQLPoolSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.EnableRecommendation +// method. func (client *SQLPoolSensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, options *SQLPoolSensitivityLabelsClientEnableRecommendationOptions) (SQLPoolSensitivityLabelsClientEnableRecommendationResponse, error) { req, err := client.enableRecommendationCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, options) if err != nil { @@ -341,16 +346,17 @@ func (client *SQLPoolSensitivityLabelsClient) enableRecommendationCreateRequest( // Get - Gets the sensitivity label of a given column // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// tableName - The name of the table. -// columnName - The name of the column. -// sensitivityLabelSource - The source of the sensitivity label. -// options - SQLPoolSensitivityLabelsClientGetOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - columnName - The name of the column. +// - sensitivityLabelSource - The source of the sensitivity label. +// - options - SQLPoolSensitivityLabelsClientGetOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Get +// method. func (client *SQLPoolSensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource, options *SQLPoolSensitivityLabelsClientGetOptions) (SQLPoolSensitivityLabelsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, sensitivityLabelSource, options) if err != nil { @@ -422,13 +428,13 @@ func (client *SQLPoolSensitivityLabelsClient) getHandleResponse(resp *http.Respo } // NewListCurrentPager - Gets SQL pool sensitivity labels. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolSensitivityLabelsClientListCurrentOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.ListCurrent -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolSensitivityLabelsClientListCurrentOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.NewListCurrentPager +// method. func (client *SQLPoolSensitivityLabelsClient) NewListCurrentPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolSensitivityLabelsClientListCurrentOptions) *runtime.Pager[SQLPoolSensitivityLabelsClientListCurrentResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolSensitivityLabelsClientListCurrentResponse]{ More: func(page SQLPoolSensitivityLabelsClientListCurrentResponse) bool { @@ -500,13 +506,13 @@ func (client *SQLPoolSensitivityLabelsClient) listCurrentHandleResponse(resp *ht } // NewListRecommendedPager - Gets sensitivity labels of a given SQL pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolSensitivityLabelsClientListRecommendedOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.ListRecommended -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolSensitivityLabelsClientListRecommendedOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.NewListRecommendedPager +// method. func (client *SQLPoolSensitivityLabelsClient) NewListRecommendedPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolSensitivityLabelsClientListRecommendedOptions) *runtime.Pager[SQLPoolSensitivityLabelsClientListRecommendedResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolSensitivityLabelsClientListRecommendedResponse]{ More: func(page SQLPoolSensitivityLabelsClientListRecommendedResponse) bool { @@ -585,12 +591,13 @@ func (client *SQLPoolSensitivityLabelsClient) listRecommendedHandleResponse(resp // Update - Update sensitivity labels of a given SQL Pool using an operations batch. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Update -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolSensitivityLabelsClientUpdateOptions contains the optional parameters for the SQLPoolSensitivityLabelsClient.Update +// method. func (client *SQLPoolSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, parameters SensitivityLabelUpdateList, options *SQLPoolSensitivityLabelsClientUpdateOptions) (SQLPoolSensitivityLabelsClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltablecolumns_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltablecolumns_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go index baa78e23aad4..41a5246af777 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltablecolumns_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolTableColumnsClient struct { } // NewSQLPoolTableColumnsClient creates a new instance of SQLPoolTableColumnsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolTableColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolTableColumnsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -55,15 +56,15 @@ func NewSQLPoolTableColumnsClient(subscriptionID string, credential azcore.Token } // NewListByTableNamePager - Gets columns in a given table in a SQL pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// tableName - The name of the table. -// options - SQLPoolTableColumnsClientListByTableNameOptions contains the optional parameters for the SQLPoolTableColumnsClient.ListByTableName -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - options - SQLPoolTableColumnsClientListByTableNameOptions contains the optional parameters for the SQLPoolTableColumnsClient.NewListByTableNamePager +// method. func (client *SQLPoolTableColumnsClient) NewListByTableNamePager(resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, options *SQLPoolTableColumnsClientListByTableNameOptions) *runtime.Pager[SQLPoolTableColumnsClientListByTableNameResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolTableColumnsClientListByTableNameResponse]{ More: func(page SQLPoolTableColumnsClientListByTableNameResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltables_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltables_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go index f2817e57de58..6551f2d325fd 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltables_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolTablesClient struct { } // NewSQLPoolTablesClient creates a new instance of SQLPoolTablesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolTablesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewSQLPoolTablesClient(subscriptionID string, credential azcore.TokenCreden // Get - Get Sql pool table // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// tableName - The name of the table. -// options - SQLPoolTablesClientGetOptions contains the optional parameters for the SQLPoolTablesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - tableName - The name of the table. +// - options - SQLPoolTablesClientGetOptions contains the optional parameters for the SQLPoolTablesClient.Get method. func (client *SQLPoolTablesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, tableName string, options *SQLPoolTablesClientGetOptions) (SQLPoolTablesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, options) if err != nil { @@ -126,14 +128,14 @@ func (client *SQLPoolTablesClient) getHandleResponse(resp *http.Response) (SQLPo } // NewListBySchemaPager - Gets tables of a given schema in a SQL pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// schemaName - The name of the schema. -// options - SQLPoolTablesClientListBySchemaOptions contains the optional parameters for the SQLPoolTablesClient.ListBySchema -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - schemaName - The name of the schema. +// - options - SQLPoolTablesClientListBySchemaOptions contains the optional parameters for the SQLPoolTablesClient.NewListBySchemaPager +// method. func (client *SQLPoolTablesClient) NewListBySchemaPager(resourceGroupName string, workspaceName string, sqlPoolName string, schemaName string, options *SQLPoolTablesClientListBySchemaOptions) *runtime.Pager[SQLPoolTablesClientListBySchemaResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolTablesClientListBySchemaResponse]{ More: func(page SQLPoolTablesClientListBySchemaResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltransparentdataencryptions_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltransparentdataencryptions_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go index 5aee0eafd4ce..2255508cabcb 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltransparentdataencryptions_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolTransparentDataEncryptionsClient struct { } // NewSQLPoolTransparentDataEncryptionsClient creates a new instance of SQLPoolTransparentDataEncryptionsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolTransparentDataEncryptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolTransparentDataEncryptionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewSQLPoolTransparentDataEncryptionsClient(subscriptionID string, credentia // CreateOrUpdate - Creates or updates a Sql pool's transparent data encryption configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// transparentDataEncryptionName - The name of the transparent data encryption configuration. -// parameters - The required parameters for creating or updating transparent data encryption. -// options - SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - transparentDataEncryptionName - The name of the transparent data encryption configuration. +// - parameters - The required parameters for creating or updating transparent data encryption. +// - options - SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.CreateOrUpdate +// method. func (client *SQLPoolTransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, transparentDataEncryptionName TransparentDataEncryptionName, parameters TransparentDataEncryption, options *SQLPoolTransparentDataEncryptionsClientCreateOrUpdateOptions) (SQLPoolTransparentDataEncryptionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, transparentDataEncryptionName, parameters, options) if err != nil { @@ -124,13 +126,14 @@ func (client *SQLPoolTransparentDataEncryptionsClient) createOrUpdateHandleRespo // Get - Get a SQL pool's transparent data encryption configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// transparentDataEncryptionName - The name of the transparent data encryption configuration. -// options - SQLPoolTransparentDataEncryptionsClientGetOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - transparentDataEncryptionName - The name of the transparent data encryption configuration. +// - options - SQLPoolTransparentDataEncryptionsClientGetOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.Get +// method. func (client *SQLPoolTransparentDataEncryptionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, transparentDataEncryptionName TransparentDataEncryptionName, options *SQLPoolTransparentDataEncryptionsClientGetOptions) (SQLPoolTransparentDataEncryptionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, transparentDataEncryptionName, options) if err != nil { @@ -190,13 +193,13 @@ func (client *SQLPoolTransparentDataEncryptionsClient) getHandleResponse(resp *h } // NewListPager - Get list of SQL pool's transparent data encryption configurations. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolTransparentDataEncryptionsClientListOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolTransparentDataEncryptionsClientListOptions contains the optional parameters for the SQLPoolTransparentDataEncryptionsClient.NewListPager +// method. func (client *SQLPoolTransparentDataEncryptionsClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolTransparentDataEncryptionsClientListOptions) *runtime.Pager[SQLPoolTransparentDataEncryptionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolTransparentDataEncryptionsClientListResponse]{ More: func(page SQLPoolTransparentDataEncryptionsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolusages_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolusages_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go index 5616fc07d591..28e60a32c504 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolusages_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolUsagesClient struct { } // NewSQLPoolUsagesClient creates a new instance of SQLPoolUsagesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolUsagesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -55,12 +56,12 @@ func NewSQLPoolUsagesClient(subscriptionID string, credential azcore.TokenCreden } // NewListPager - Gets SQL pool usages. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolUsagesClientListOptions contains the optional parameters for the SQLPoolUsagesClient.List method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolUsagesClientListOptions contains the optional parameters for the SQLPoolUsagesClient.NewListPager method. func (client *SQLPoolUsagesClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolUsagesClientListOptions) *runtime.Pager[SQLPoolUsagesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolUsagesClientListResponse]{ More: func(page SQLPoolUsagesClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentrulebaselines_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go similarity index 85% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentrulebaselines_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go index 098cca8b550c..b85a23ceeaf7 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentrulebaselines_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolVulnerabilityAssessmentRuleBaselinesClient struct { } // NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient creates a new instance of SQLPoolVulnerabilityAssessmentRuleBaselinesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolVulnerabilityAssessmentRuleBaselinesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,17 +57,18 @@ func NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, // CreateOrUpdate - Creates or updates a Sql pool's vulnerability assessment rule baseline. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// ruleID - The vulnerability assessment rule ID. -// baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule -// and master for workspace level rule). -// parameters - The requested rule baseline resource. -// options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the -// SQLPoolVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule +// and master for workspace level rule). +// - parameters - The requested rule baseline resource. +// - options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the +// SQLPoolVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method. func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters SQLPoolVulnerabilityAssessmentRuleBaseline, options *SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (SQLPoolVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, ruleID, baselineName, parameters, options) if err != nil { @@ -135,16 +137,17 @@ func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) createOrUpdateH // Delete - Removes the database's vulnerability assessment rule baseline. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// ruleID - The vulnerability assessment rule ID. -// baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule -// and master for workspace level rule). -// options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Delete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule +// and master for workspace level rule). +// - options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Delete +// method. func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (SQLPoolVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, ruleID, baselineName, options) if err != nil { @@ -203,16 +206,17 @@ func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) deleteCreateReq // Get - Gets a SqlPool's vulnerability assessment rule baseline. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// ruleID - The vulnerability assessment rule ID. -// baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule -// and master for server level rule). -// options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - ruleID - The vulnerability assessment rule ID. +// - baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule +// and master for server level rule). +// - options - SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentRuleBaselinesClient.Get +// method. func (client *SQLPoolVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetOptions) (SQLPoolVulnerabilityAssessmentRuleBaselinesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, ruleID, baselineName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessments_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessments_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go index 1019f30e7339..9b1a7d381dcd 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessments_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolVulnerabilityAssessmentsClient struct { } // NewSQLPoolVulnerabilityAssessmentsClient creates a new instance of SQLPoolVulnerabilityAssessmentsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolVulnerabilityAssessmentsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewSQLPoolVulnerabilityAssessmentsClient(subscriptionID string, credential // CreateOrUpdate - Creates or updates the Sql pool vulnerability assessment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// parameters - The requested resource. -// options - SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - parameters - The requested resource. +// - options - SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.CreateOrUpdate +// method. func (client *SQLPoolVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters SQLPoolVulnerabilityAssessment, options *SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateOptions) (SQLPoolVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, parameters, options) if err != nil { @@ -124,13 +126,14 @@ func (client *SQLPoolVulnerabilityAssessmentsClient) createOrUpdateHandleRespons // Delete - Removes the database's vulnerability assessment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// options - SQLPoolVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Delete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - SQLPoolVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Delete +// method. func (client *SQLPoolVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *SQLPoolVulnerabilityAssessmentsClientDeleteOptions) (SQLPoolVulnerabilityAssessmentsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, options) if err != nil { @@ -181,13 +184,14 @@ func (client *SQLPoolVulnerabilityAssessmentsClient) deleteCreateRequest(ctx con // Get - Gets the Sql pool's vulnerability assessment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// options - SQLPoolVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - SQLPoolVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.Get +// method. func (client *SQLPoolVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *SQLPoolVulnerabilityAssessmentsClientGetOptions) (SQLPoolVulnerabilityAssessmentsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, options) if err != nil { @@ -247,13 +251,13 @@ func (client *SQLPoolVulnerabilityAssessmentsClient) getHandleResponse(resp *htt } // NewListPager - Lists the vulnerability assessment policies associated with a SQL pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolVulnerabilityAssessmentsClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolVulnerabilityAssessmentsClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentsClient.NewListPager +// method. func (client *SQLPoolVulnerabilityAssessmentsClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolVulnerabilityAssessmentsClientListOptions) *runtime.Pager[SQLPoolVulnerabilityAssessmentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolVulnerabilityAssessmentsClientListResponse]{ More: func(page SQLPoolVulnerabilityAssessmentsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentscans_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go similarity index 88% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentscans_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go index 5d0a21f6ddf0..6bc170132e7b 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentscans_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolVulnerabilityAssessmentScansClient struct { } // NewSQLPoolVulnerabilityAssessmentScansClient creates a new instance of SQLPoolVulnerabilityAssessmentScansClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolVulnerabilityAssessmentScansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolVulnerabilityAssessmentScansClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewSQLPoolVulnerabilityAssessmentScansClient(subscriptionID string, credent // Export - Convert an existing scan result to a human readable format. If already exists nothing happens // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// scanID - The vulnerability assessment scan Id of the scan to retrieve. -// options - SQLPoolVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Export -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id of the scan to retrieve. +// - options - SQLPoolVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Export +// method. func (client *SQLPoolVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *SQLPoolVulnerabilityAssessmentScansClientExportOptions) (SQLPoolVulnerabilityAssessmentScansClientExportResponse, error) { req, err := client.exportCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, scanID, options) if err != nil { @@ -128,14 +130,15 @@ func (client *SQLPoolVulnerabilityAssessmentScansClient) exportHandleResponse(re // Get - Gets a vulnerability assessment scan record of a Sql pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// scanID - The vulnerability assessment scan Id of the scan to retrieve. -// options - SQLPoolVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id of the scan to retrieve. +// - options - SQLPoolVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.Get +// method. func (client *SQLPoolVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *SQLPoolVulnerabilityAssessmentScansClientGetOptions) (SQLPoolVulnerabilityAssessmentScansClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, scanID, options) if err != nil { @@ -200,14 +203,15 @@ func (client *SQLPoolVulnerabilityAssessmentScansClient) getHandleResponse(resp // BeginInitiateScan - Executes a Vulnerability Assessment database scan. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// scanID - The vulnerability assessment scan Id of the scan to retrieve. -// options - SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.BeginInitiateScan -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - scanID - The vulnerability assessment scan Id of the scan to retrieve. +// - options - SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.BeginInitiateScan +// method. func (client *SQLPoolVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*runtime.Poller[SQLPoolVulnerabilityAssessmentScansClientInitiateScanResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.initiateScan(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, scanID, options) @@ -222,6 +226,7 @@ func (client *SQLPoolVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx c // InitiateScan - Executes a Vulnerability Assessment database scan. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolVulnerabilityAssessmentScansClient) initiateScan(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *SQLPoolVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*http.Response, error) { req, err := client.initiateScanCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, scanID, options) @@ -276,14 +281,14 @@ func (client *SQLPoolVulnerabilityAssessmentScansClient) initiateScanCreateReque } // NewListPager - Lists the vulnerability assessment scans of a SQL pool. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// options - SQLPoolVulnerabilityAssessmentScansClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - SQLPoolVulnerabilityAssessmentScansClientListOptions contains the optional parameters for the SQLPoolVulnerabilityAssessmentScansClient.NewListPager +// method. func (client *SQLPoolVulnerabilityAssessmentScansClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *SQLPoolVulnerabilityAssessmentScansClientListOptions) *runtime.Pager[SQLPoolVulnerabilityAssessmentScansClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolVulnerabilityAssessmentScansClientListResponse]{ More: func(page SQLPoolVulnerabilityAssessmentScansClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadclassifier_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadclassifier_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go index afb9b3fbada2..976f98f6d929 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadclassifier_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolWorkloadClassifierClient struct { } // NewSQLPoolWorkloadClassifierClient creates a new instance of SQLPoolWorkloadClassifierClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolWorkloadClassifierClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolWorkloadClassifierClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,15 +57,16 @@ func NewSQLPoolWorkloadClassifierClient(subscriptionID string, credential azcore // BeginCreateOrUpdate - Create Or Update workload classifier for a Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// workloadGroupName - The name of the workload group. -// workloadClassifierName - The name of the workload classifier. -// parameters - The properties of the workload classifier. -// options - SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - workloadGroupName - The name of the workload group. +// - workloadClassifierName - The name of the workload classifier. +// - parameters - The properties of the workload classifier. +// - options - SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.BeginCreateOrUpdate +// method. func (client *SQLPoolWorkloadClassifierClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier, options *SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions) (*runtime.Poller[SQLPoolWorkloadClassifierClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, workloadClassifierName, parameters, options) @@ -79,6 +81,7 @@ func (client *SQLPoolWorkloadClassifierClient) BeginCreateOrUpdate(ctx context.C // CreateOrUpdate - Create Or Update workload classifier for a Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolWorkloadClassifierClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier, options *SQLPoolWorkloadClassifierClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, workloadClassifierName, parameters, options) @@ -135,14 +138,15 @@ func (client *SQLPoolWorkloadClassifierClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Remove workload classifier of a Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// workloadGroupName - The name of the workload group. -// workloadClassifierName - The name of the workload classifier. -// options - SQLPoolWorkloadClassifierClientBeginDeleteOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - workloadGroupName - The name of the workload group. +// - workloadClassifierName - The name of the workload classifier. +// - options - SQLPoolWorkloadClassifierClientBeginDeleteOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.BeginDelete +// method. func (client *SQLPoolWorkloadClassifierClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, workloadClassifierName string, options *SQLPoolWorkloadClassifierClientBeginDeleteOptions) (*runtime.Poller[SQLPoolWorkloadClassifierClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, workloadClassifierName, options) @@ -157,6 +161,7 @@ func (client *SQLPoolWorkloadClassifierClient) BeginDelete(ctx context.Context, // Delete - Remove workload classifier of a Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolWorkloadClassifierClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, workloadClassifierName string, options *SQLPoolWorkloadClassifierClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, workloadClassifierName, options) @@ -212,14 +217,15 @@ func (client *SQLPoolWorkloadClassifierClient) deleteCreateRequest(ctx context.C // Get - Get a workload classifier of Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// workloadGroupName - The name of the workload group. -// workloadClassifierName - The name of the workload classifier. -// options - SQLPoolWorkloadClassifierClientGetOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - workloadGroupName - The name of the workload group. +// - workloadClassifierName - The name of the workload classifier. +// - options - SQLPoolWorkloadClassifierClientGetOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.Get +// method. func (client *SQLPoolWorkloadClassifierClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, workloadClassifierName string, options *SQLPoolWorkloadClassifierClientGetOptions) (SQLPoolWorkloadClassifierClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, workloadClassifierName, options) if err != nil { @@ -283,14 +289,14 @@ func (client *SQLPoolWorkloadClassifierClient) getHandleResponse(resp *http.Resp } // NewListPager - Get list of Sql pool's workload classifier for workload groups. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// workloadGroupName - The name of the workload group. -// options - SQLPoolWorkloadClassifierClientListOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - workloadGroupName - The name of the workload group. +// - options - SQLPoolWorkloadClassifierClientListOptions contains the optional parameters for the SQLPoolWorkloadClassifierClient.NewListPager +// method. func (client *SQLPoolWorkloadClassifierClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, options *SQLPoolWorkloadClassifierClientListOptions) *runtime.Pager[SQLPoolWorkloadClassifierClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolWorkloadClassifierClientListResponse]{ More: func(page SQLPoolWorkloadClassifierClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadgroup_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadgroup_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go index e3370a925c9c..94fe28ca4aa8 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadgroup_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type SQLPoolWorkloadGroupClient struct { } // NewSQLPoolWorkloadGroupClient creates a new instance of SQLPoolWorkloadGroupClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSQLPoolWorkloadGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLPoolWorkloadGroupClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,14 +57,15 @@ func NewSQLPoolWorkloadGroupClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Create Or Update a Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// workloadGroupName - The name of the workload group. -// parameters - The requested workload group state. -// options - SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - workloadGroupName - The name of the workload group. +// - parameters - The requested workload group state. +// - options - SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.BeginCreateOrUpdate +// method. func (client *SQLPoolWorkloadGroupClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, parameters WorkloadGroup, options *SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions) (*runtime.Poller[SQLPoolWorkloadGroupClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, parameters, options) @@ -78,6 +80,7 @@ func (client *SQLPoolWorkloadGroupClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Create Or Update a Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolWorkloadGroupClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, parameters WorkloadGroup, options *SQLPoolWorkloadGroupClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, parameters, options) @@ -130,13 +133,14 @@ func (client *SQLPoolWorkloadGroupClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Remove Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// workloadGroupName - The name of the workload group. -// options - SQLPoolWorkloadGroupClientBeginDeleteOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - workloadGroupName - The name of the workload group. +// - options - SQLPoolWorkloadGroupClientBeginDeleteOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.BeginDelete +// method. func (client *SQLPoolWorkloadGroupClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, options *SQLPoolWorkloadGroupClientBeginDeleteOptions) (*runtime.Poller[SQLPoolWorkloadGroupClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, options) @@ -151,6 +155,7 @@ func (client *SQLPoolWorkloadGroupClient) BeginDelete(ctx context.Context, resou // Delete - Remove Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *SQLPoolWorkloadGroupClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, options *SQLPoolWorkloadGroupClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, options) @@ -202,13 +207,14 @@ func (client *SQLPoolWorkloadGroupClient) deleteCreateRequest(ctx context.Contex // Get - Get a Sql pool's workload group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// workloadGroupName - The name of the workload group. -// options - SQLPoolWorkloadGroupClientGetOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - workloadGroupName - The name of the workload group. +// - options - SQLPoolWorkloadGroupClientGetOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.Get +// method. func (client *SQLPoolWorkloadGroupClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, workloadGroupName string, options *SQLPoolWorkloadGroupClientGetOptions) (SQLPoolWorkloadGroupClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, workloadGroupName, options) if err != nil { @@ -268,13 +274,13 @@ func (client *SQLPoolWorkloadGroupClient) getHandleResponse(resp *http.Response) } // NewListPager - Get list of Sql pool's workload groups. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - SQL pool name -// options - SQLPoolWorkloadGroupClientListOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - SQL pool name +// - options - SQLPoolWorkloadGroupClientListOptions contains the optional parameters for the SQLPoolWorkloadGroupClient.NewListPager +// method. func (client *SQLPoolWorkloadGroupClient) NewListPager(resourceGroupName string, workspaceName string, sqlPoolName string, options *SQLPoolWorkloadGroupClientListOptions) *runtime.Pager[SQLPoolWorkloadGroupClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SQLPoolWorkloadGroupClientListResponse]{ More: func(page SQLPoolWorkloadGroupClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_time_rfc3339.go b/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go similarity index 96% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_time_rfc3339.go rename to sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go index 66a34145e8a9..ae82870e9311 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_time_rfc3339.go +++ b/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -61,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaceaadadmins_client.go b/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaceaadadmins_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go index 8fa8fb39b3f1..717bd81061ec 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaceaadadmins_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceAADAdminsClient struct { } // NewWorkspaceAADAdminsClient creates a new instance of WorkspaceAADAdminsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceAADAdminsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAADAdminsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewWorkspaceAADAdminsClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Creates or updates a workspace active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// aadAdminInfo - Workspace active directory administrator properties -// options - WorkspaceAADAdminsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceAADAdminsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - aadAdminInfo - Workspace active directory administrator properties +// - options - WorkspaceAADAdminsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceAADAdminsClient.BeginCreateOrUpdate +// method. func (client *WorkspaceAADAdminsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAADAdminInfo, options *WorkspaceAADAdminsClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceAADAdminsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, aadAdminInfo, options) @@ -78,6 +80,7 @@ func (client *WorkspaceAADAdminsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates a workspace active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceAADAdminsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAADAdminInfo, options *WorkspaceAADAdminsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, aadAdminInfo, options) @@ -122,11 +125,12 @@ func (client *WorkspaceAADAdminsClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Deletes a workspace active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceAADAdminsClientBeginDeleteOptions contains the optional parameters for the WorkspaceAADAdminsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceAADAdminsClientBeginDeleteOptions contains the optional parameters for the WorkspaceAADAdminsClient.BeginDelete +// method. func (client *WorkspaceAADAdminsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceAADAdminsClientBeginDeleteOptions) (*runtime.Poller[WorkspaceAADAdminsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, options) @@ -143,6 +147,7 @@ func (client *WorkspaceAADAdminsClient) BeginDelete(ctx context.Context, resourc // Delete - Deletes a workspace active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceAADAdminsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceAADAdminsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) @@ -187,10 +192,11 @@ func (client *WorkspaceAADAdminsClient) deleteCreateRequest(ctx context.Context, // Get - Gets a workspace active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceAADAdminsClientGetOptions contains the optional parameters for the WorkspaceAADAdminsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceAADAdminsClientGetOptions contains the optional parameters for the WorkspaceAADAdminsClient.Get method. func (client *WorkspaceAADAdminsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceAADAdminsClientGetOptions) (WorkspaceAADAdminsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedidentitysqlcontrolsettings_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedidentitysqlcontrolsettings_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go index 19b71db53ecd..3c33aeefd857 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedidentitysqlcontrolsettings_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedIdentitySQLControlSettingsClient struct { } // NewWorkspaceManagedIdentitySQLControlSettingsClient creates a new instance of WorkspaceManagedIdentitySQLControlSettingsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedIdentitySQLControlSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedIdentitySQLControlSettingsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewWorkspaceManagedIdentitySQLControlSettingsClient(subscriptionID string, // BeginCreateOrUpdate - Create or update Managed Identity Sql Control Settings // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// managedIdentitySQLControlSettings - Managed Identity Sql Control Settings -// options - WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for -// the WorkspaceManagedIdentitySQLControlSettingsClient.BeginCreateOrUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - managedIdentitySQLControlSettings - Managed Identity Sql Control Settings +// - options - WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for +// the WorkspaceManagedIdentitySQLControlSettingsClient.BeginCreateOrUpdate method. func (client *WorkspaceManagedIdentitySQLControlSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, managedIdentitySQLControlSettings ManagedIdentitySQLControlSettingsModel, options *WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceManagedIdentitySQLControlSettingsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, managedIdentitySQLControlSettings, options) @@ -78,6 +80,7 @@ func (client *WorkspaceManagedIdentitySQLControlSettingsClient) BeginCreateOrUpd // CreateOrUpdate - Create or update Managed Identity Sql Control Settings // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceManagedIdentitySQLControlSettingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, managedIdentitySQLControlSettings ManagedIdentitySQLControlSettingsModel, options *WorkspaceManagedIdentitySQLControlSettingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, managedIdentitySQLControlSettings, options) @@ -122,11 +125,12 @@ func (client *WorkspaceManagedIdentitySQLControlSettingsClient) createOrUpdateCr // Get - Get Managed Identity Sql Control Settings // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedIdentitySQLControlSettingsClientGetOptions contains the optional parameters for the WorkspaceManagedIdentitySQLControlSettingsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedIdentitySQLControlSettingsClientGetOptions contains the optional parameters for the WorkspaceManagedIdentitySQLControlSettingsClient.Get +// method. func (client *WorkspaceManagedIdentitySQLControlSettingsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceManagedIdentitySQLControlSettingsClientGetOptions) (WorkspaceManagedIdentitySQLControlSettingsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverblobauditingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverblobauditingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go index 6c856d002a9e..1ab467f50db4 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverblobauditingpolicies_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedSQLServerBlobAuditingPoliciesClient struct { } // NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient creates a new instance of WorkspaceManagedSQLServerBlobAuditingPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerBlobAuditingPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient(subscriptionID strin // BeginCreateOrUpdate - Create or Update a workspace managed sql server's blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// blobAuditingPolicyName - The name of the blob auditing policy. -// parameters - Properties of extended blob auditing policy. -// options - WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters -// for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - blobAuditingPolicyName - The name of the blob auditing policy. +// - parameters - Properties of extended blob auditing policy. +// - options - WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters +// for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method. func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, parameters ServerBlobAuditingPolicy, options *WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceManagedSQLServerBlobAuditingPoliciesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, blobAuditingPolicyName, parameters, options) @@ -77,6 +79,7 @@ func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) BeginCreateOr // CreateOrUpdate - Create or Update a workspace managed sql server's blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, parameters ServerBlobAuditingPolicy, options *WorkspaceManagedSQLServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, blobAuditingPolicyName, parameters, options) @@ -125,12 +128,13 @@ func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) createOrUpdat // Get - Get a workspace managed sql server's blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// blobAuditingPolicyName - The name of the blob auditing policy. -// options - WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - blobAuditingPolicyName - The name of the blob auditing policy. +// - options - WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.Get +// method. func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, options *WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetOptions) (WorkspaceManagedSQLServerBlobAuditingPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, blobAuditingPolicyName, options) if err != nil { @@ -186,12 +190,12 @@ func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) getHandleResp } // NewListByWorkspacePager - List workspace managed sql server's blob auditing policies. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for -// the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.ListByWorkspace method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters for +// the WorkspaceManagedSQLServerBlobAuditingPoliciesClient.NewListByWorkspacePager method. func (client *WorkspaceManagedSQLServerBlobAuditingPoliciesClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceOptions) *runtime.Pager[WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse]{ More: func(page WorkspaceManagedSQLServerBlobAuditingPoliciesClientListByWorkspaceResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go index b48bf49c1882..12d293852f4c 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient struct { } // NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient creates a new instance of WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient(subscripti // Get - Get workspace managed sql server's minimal tls settings. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// dedicatedSQLminimalTLSSettingsName - The name of the dedicated sql minimal tls settings. -// options - WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions contains the optional parameters for -// the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - dedicatedSQLminimalTLSSettingsName - The name of the dedicated sql minimal tls settings. +// - options - WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions contains the optional parameters for +// the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.Get method. func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, dedicatedSQLminimalTLSSettingsName string, options *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetOptions) (WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, dedicatedSQLminimalTLSSettingsName, options) if err != nil { @@ -117,12 +119,12 @@ func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) get } // NewListPager - List workspace managed sql server's minimal tls settings. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions contains the optional parameters for -// the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.List method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions contains the optional parameters for +// the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.NewListPager method. func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) NewListPager(resourceGroupName string, workspaceName string, options *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListOptions) *runtime.Pager[WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse]{ More: func(page WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientListResponse) bool { @@ -188,13 +190,14 @@ func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) lis // BeginUpdate - Update workspace managed sql server's minimal tls settings. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// dedicatedSQLminimalTLSSettingsName - The name of the dedicated sql minimal tls settings. -// parameters - minimal tls settings -// options - WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions contains the optional parameters -// for the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.BeginUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - dedicatedSQLminimalTLSSettingsName - The name of the dedicated sql minimal tls settings. +// - parameters - minimal tls settings +// - options - WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions contains the optional parameters +// for the WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient.BeginUpdate method. func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dedicatedSQLminimalTLSSettingsName DedicatedSQLMinimalTLSSettingsName, parameters DedicatedSQLminimalTLSSettings, options *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions) (*runtime.Poller[WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, dedicatedSQLminimalTLSSettingsName, parameters, options) @@ -209,6 +212,7 @@ func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) Beg // Update - Update workspace managed sql server's minimal tls settings. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, dedicatedSQLminimalTLSSettingsName DedicatedSQLMinimalTLSSettingsName, parameters DedicatedSQLminimalTLSSettings, options *WorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, dedicatedSQLminimalTLSSettingsName, parameters, options) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverencryptionprotector_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverencryptionprotector_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go index 5e58019aa011..57b99df195a5 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverencryptionprotector_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedSQLServerEncryptionProtectorClient struct { } // NewWorkspaceManagedSQLServerEncryptionProtectorClient creates a new instance of WorkspaceManagedSQLServerEncryptionProtectorClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerEncryptionProtectorClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerEncryptionProtectorClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewWorkspaceManagedSQLServerEncryptionProtectorClient(subscriptionID string // BeginCreateOrUpdate - Updates workspace managed sql server's encryption protector. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// encryptionProtectorName - The name of the encryption protector. -// parameters - The requested encryption protector resource state. -// options - WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions contains the optional parameters -// for the WorkspaceManagedSQLServerEncryptionProtectorClient.BeginCreateOrUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - encryptionProtectorName - The name of the encryption protector. +// - parameters - The requested encryption protector resource state. +// - options - WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions contains the optional parameters +// for the WorkspaceManagedSQLServerEncryptionProtectorClient.BeginCreateOrUpdate method. func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, encryptionProtectorName EncryptionProtectorName, parameters EncryptionProtector, options *WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceManagedSQLServerEncryptionProtectorClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, encryptionProtectorName, parameters, options) @@ -77,6 +79,7 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) BeginCreateOrU // CreateOrUpdate - Updates workspace managed sql server's encryption protector. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, encryptionProtectorName EncryptionProtectorName, parameters EncryptionProtector, options *WorkspaceManagedSQLServerEncryptionProtectorClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, encryptionProtectorName, parameters, options) @@ -125,12 +128,13 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) createOrUpdate // Get - Get workspace managed sql server's encryption protector. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// encryptionProtectorName - The name of the encryption protector. -// options - WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - encryptionProtectorName - The name of the encryption protector. +// - options - WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.Get +// method. func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, encryptionProtectorName EncryptionProtectorName, options *WorkspaceManagedSQLServerEncryptionProtectorClientGetOptions) (WorkspaceManagedSQLServerEncryptionProtectorClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, encryptionProtectorName, options) if err != nil { @@ -186,12 +190,12 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) getHandleRespo } // NewListPager - Get list of encryption protectors for workspace managed sql server. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedSQLServerEncryptionProtectorClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedSQLServerEncryptionProtectorClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerEncryptionProtectorClient.NewListPager +// method. func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) NewListPager(resourceGroupName string, workspaceName string, options *WorkspaceManagedSQLServerEncryptionProtectorClientListOptions) *runtime.Pager[WorkspaceManagedSQLServerEncryptionProtectorClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceManagedSQLServerEncryptionProtectorClientListResponse]{ More: func(page WorkspaceManagedSQLServerEncryptionProtectorClientListResponse) bool { @@ -257,12 +261,13 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) listHandleResp // BeginRevalidate - Revalidates workspace managed sql server's existing encryption protector. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// encryptionProtectorName - The name of the encryption protector. -// options - WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions contains the optional parameters for -// the WorkspaceManagedSQLServerEncryptionProtectorClient.BeginRevalidate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - encryptionProtectorName - The name of the encryption protector. +// - options - WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions contains the optional parameters for +// the WorkspaceManagedSQLServerEncryptionProtectorClient.BeginRevalidate method. func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) BeginRevalidate(ctx context.Context, resourceGroupName string, workspaceName string, encryptionProtectorName EncryptionProtectorName, options *WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions) (*runtime.Poller[WorkspaceManagedSQLServerEncryptionProtectorClientRevalidateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.revalidate(ctx, resourceGroupName, workspaceName, encryptionProtectorName, options) @@ -277,6 +282,7 @@ func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) BeginRevalidat // Revalidate - Revalidates workspace managed sql server's existing encryption protector. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerEncryptionProtectorClient) revalidate(ctx context.Context, resourceGroupName string, workspaceName string, encryptionProtectorName EncryptionProtectorName, options *WorkspaceManagedSQLServerEncryptionProtectorClientBeginRevalidateOptions) (*http.Response, error) { req, err := client.revalidateCreateRequest(ctx, resourceGroupName, workspaceName, encryptionProtectorName, options) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverextendedblobauditingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverextendedblobauditingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go index 1a1fe28469fb..8dc4384a4116 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverextendedblobauditingpolicies_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient struct { } // NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient creates a new instance of WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient(subscription // BeginCreateOrUpdate - Create or Update a workspace managed sql server's extended blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// blobAuditingPolicyName - The name of the blob auditing policy. -// parameters - Properties of extended blob auditing policy. -// options - WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters -// for the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.BeginCreateOrUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - blobAuditingPolicyName - The name of the blob auditing policy. +// - parameters - Properties of extended blob auditing policy. +// - options - WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters +// for the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.BeginCreateOrUpdate method. func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, parameters ExtendedServerBlobAuditingPolicy, options *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, blobAuditingPolicyName, parameters, options) @@ -77,6 +79,7 @@ func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) Begin // CreateOrUpdate - Create or Update a workspace managed sql server's extended blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, parameters ExtendedServerBlobAuditingPolicy, options *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, blobAuditingPolicyName, parameters, options) @@ -125,12 +128,13 @@ func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) creat // Get - Get a workspace SQL server's extended blob auditing policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// blobAuditingPolicyName - The name of the blob auditing policy. -// options - WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions contains the optional parameters for the -// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - blobAuditingPolicyName - The name of the blob auditing policy. +// - options - WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions contains the optional parameters for the +// WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.Get method. func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, blobAuditingPolicyName BlobAuditingPolicyName, options *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetOptions) (WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, blobAuditingPolicyName, options) if err != nil { @@ -186,12 +190,12 @@ func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) getHa } // NewListByWorkspacePager - List workspace managed sql server's extended blob auditing policies. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters -// for the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.ListByWorkspace method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions contains the optional parameters +// for the WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient.NewListByWorkspacePager method. func (client *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceOptions) *runtime.Pager[WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse]{ More: func(page WorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClientListByWorkspaceResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverrecoverablesqlpools_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverrecoverablesqlpools_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go index 66eb42b7b82a..f513fb19cb8d 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverrecoverablesqlpools_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedSQLServerRecoverableSQLPoolsClient struct { } // NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient creates a new instance of WorkspaceManagedSQLServerRecoverableSQLPoolsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerRecoverableSQLPoolsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient(subscriptionID string // Get - Get recoverable sql pools for workspace managed sql server. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// sqlPoolName - The name of the sql pool -// options - WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - sqlPoolName - The name of the sql pool +// - options - WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.Get +// method. func (client *WorkspaceManagedSQLServerRecoverableSQLPoolsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, options *WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetOptions) (WorkspaceManagedSQLServerRecoverableSQLPoolsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, sqlPoolName, options) if err != nil { @@ -117,12 +119,12 @@ func (client *WorkspaceManagedSQLServerRecoverableSQLPoolsClient) getHandleRespo } // NewListPager - Get list of recoverable sql pools for workspace managed sql server. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerRecoverableSQLPoolsClient.NewListPager +// method. func (client *WorkspaceManagedSQLServerRecoverableSQLPoolsClient) NewListPager(resourceGroupName string, workspaceName string, options *WorkspaceManagedSQLServerRecoverableSQLPoolsClientListOptions) *runtime.Pager[WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse]{ More: func(page WorkspaceManagedSQLServerRecoverableSQLPoolsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserversecurityalertpolicy_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserversecurityalertpolicy_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go index d79ed3a78019..c461dedcb7c8 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserversecurityalertpolicy_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedSQLServerSecurityAlertPolicyClient struct { } // NewWorkspaceManagedSQLServerSecurityAlertPolicyClient creates a new instance of WorkspaceManagedSQLServerSecurityAlertPolicyClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerSecurityAlertPolicyClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewWorkspaceManagedSQLServerSecurityAlertPolicyClient(subscriptionID string // BeginCreateOrUpdate - Create or Update a workspace managed sql server's threat detection policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// securityAlertPolicyName - The name of the security alert policy. -// parameters - The workspace managed sql server security alert policy. -// options - WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions contains the optional parameters -// for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.BeginCreateOrUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - securityAlertPolicyName - The name of the security alert policy. +// - parameters - The workspace managed sql server security alert policy. +// - options - WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions contains the optional parameters +// for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.BeginCreateOrUpdate method. func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, securityAlertPolicyName SecurityAlertPolicyNameAutoGenerated, parameters ServerSecurityAlertPolicy, options *WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceManagedSQLServerSecurityAlertPolicyClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, securityAlertPolicyName, parameters, options) @@ -77,6 +79,7 @@ func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) BeginCreateOrU // CreateOrUpdate - Create or Update a workspace managed sql server's threat detection policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, securityAlertPolicyName SecurityAlertPolicyNameAutoGenerated, parameters ServerSecurityAlertPolicy, options *WorkspaceManagedSQLServerSecurityAlertPolicyClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, securityAlertPolicyName, parameters, options) @@ -125,12 +128,13 @@ func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) createOrUpdate // Get - Get a workspace managed sql server's security alert policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// securityAlertPolicyName - The name of the security alert policy. -// options - WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - securityAlertPolicyName - The name of the security alert policy. +// - options - WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.Get +// method. func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, securityAlertPolicyName SecurityAlertPolicyNameAutoGenerated, options *WorkspaceManagedSQLServerSecurityAlertPolicyClientGetOptions) (WorkspaceManagedSQLServerSecurityAlertPolicyClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, securityAlertPolicyName, options) if err != nil { @@ -186,12 +190,12 @@ func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) getHandleRespo } // NewListPager - Get workspace managed sql server's threat detection policies. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerSecurityAlertPolicyClient.NewListPager +// method. func (client *WorkspaceManagedSQLServerSecurityAlertPolicyClient) NewListPager(resourceGroupName string, workspaceName string, options *WorkspaceManagedSQLServerSecurityAlertPolicyClientListOptions) *runtime.Pager[WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse]{ More: func(page WorkspaceManagedSQLServerSecurityAlertPolicyClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverusages_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverusages_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go index be5c0fe428cc..e624316434b3 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverusages_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedSQLServerUsagesClient struct { } // NewWorkspaceManagedSQLServerUsagesClient creates a new instance of WorkspaceManagedSQLServerUsagesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerUsagesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -55,12 +56,12 @@ func NewWorkspaceManagedSQLServerUsagesClient(subscriptionID string, credential } // NewListPager - Get list of server usages metric for workspace managed sql server. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedSQLServerUsagesClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerUsagesClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedSQLServerUsagesClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerUsagesClient.NewListPager +// method. func (client *WorkspaceManagedSQLServerUsagesClient) NewListPager(resourceGroupName string, workspaceName string, options *WorkspaceManagedSQLServerUsagesClientListOptions) *runtime.Pager[WorkspaceManagedSQLServerUsagesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceManagedSQLServerUsagesClientListResponse]{ More: func(page WorkspaceManagedSQLServerUsagesClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlservervulnerabilityassessments_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlservervulnerabilityassessments_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go index e38360ad2abe..fc36c8df3a43 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlservervulnerabilityassessments_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceManagedSQLServerVulnerabilityAssessmentsClient struct { } // NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient creates a new instance of WorkspaceManagedSQLServerVulnerabilityAssessmentsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceManagedSQLServerVulnerabilityAssessmentsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,13 +57,14 @@ func NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient(subscriptionID s // CreateOrUpdate - Create or Update workspace managed sql server's vulnerability assessment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// parameters - Properties for vulnerability assessment. -// options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters -// for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.CreateOrUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - parameters - Properties for vulnerability assessment. +// - options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters +// for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.CreateOrUpdate method. func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters ServerVulnerabilityAssessment, options *WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateOptions) (WorkspaceManagedSQLServerVulnerabilityAssessmentsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, vulnerabilityAssessmentName, parameters, options) if err != nil { @@ -119,12 +121,13 @@ func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) createOrU // Delete - Remove workspace managed sql server's vulnerability assessment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the -// WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Delete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the +// WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Delete method. func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteOptions) (WorkspaceManagedSQLServerVulnerabilityAssessmentsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, vulnerabilityAssessmentName, options) if err != nil { @@ -171,12 +174,13 @@ func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) deleteCre // Get - Get workspace managed sql server's vulnerability assessment. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// vulnerabilityAssessmentName - The name of the vulnerability assessment. -// options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - vulnerabilityAssessmentName - The name of the vulnerability assessment. +// - options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.Get +// method. func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetOptions) (WorkspaceManagedSQLServerVulnerabilityAssessmentsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, vulnerabilityAssessmentName, options) if err != nil { @@ -232,12 +236,12 @@ func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) getHandle } // NewListPager - Lists the vulnerability assessment policies associated with a workspace managed sql server. -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.List -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions contains the optional parameters for the WorkspaceManagedSQLServerVulnerabilityAssessmentsClient.NewListPager +// method. func (client *WorkspaceManagedSQLServerVulnerabilityAssessmentsClient) NewListPager(resourceGroupName string, workspaceName string, options *WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListOptions) *runtime.Pager[WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse]{ More: func(page WorkspaceManagedSQLServerVulnerabilityAssessmentsClientListResponse) bool { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaces_client.go b/sdk/resourcemanager/synapse/armsynapse/workspaces_client.go similarity index 90% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaces_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspaces_client.go index 7e93015e47d5..4eb819f8314b 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaces_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspaces_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspacesClient struct { } // NewWorkspacesClient creates a new instance of WorkspacesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates a workspace // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// workspaceInfo - Workspace create or update request properties -// options - WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - workspaceInfo - Workspace create or update request properties +// - options - WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate +// method. func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspaceInfo Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspacesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, workspaceInfo, options) @@ -78,6 +80,7 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates a workspace // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspaceInfo Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, workspaceInfo, options) @@ -122,10 +125,11 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a workspace // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*runtime.Poller[WorkspacesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, options) @@ -142,6 +146,7 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes a workspace // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) @@ -186,10 +191,11 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets a workspace // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -241,9 +247,9 @@ func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (Workspac } // NewListPager - Returns a list of workspaces in a subscription -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// options - WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.List method. +// - options - WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.NewListPager method. func (client *WorkspacesClient) NewListPager(options *WorkspacesClientListOptions) *runtime.Pager[WorkspacesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListResponse]{ More: func(page WorkspacesClientListResponse) bool { @@ -300,11 +306,11 @@ func (client *WorkspacesClient) listHandleResponse(resp *http.Response) (Workspa } // NewListByResourceGroupPager - Returns a list of workspaces in a resource group -// If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager +// method. func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListByResourceGroupResponse]{ More: func(page WorkspacesClientListByResourceGroupResponse) bool { @@ -366,11 +372,12 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res // BeginUpdate - Updates a workspace // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// workspacePatchInfo - Workspace patch request properties -// options - WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - workspacePatchInfo - Workspace patch request properties +// - options - WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method. func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspacePatchInfo WorkspacePatchInfo, options *WorkspacesClientBeginUpdateOptions) (*runtime.Poller[WorkspacesClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, workspacePatchInfo, options) @@ -387,6 +394,7 @@ func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupNa // Update - Updates a workspace // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspacesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, workspacePatchInfo WorkspacePatchInfo, options *WorkspacesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, workspacePatchInfo, options) diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacesqlaadadmins_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go similarity index 89% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacesqlaadadmins_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go index 714ee6829437..348963fa9cb3 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacesqlaadadmins_client.go +++ b/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armsynapse @@ -31,9 +32,9 @@ type WorkspaceSQLAADAdminsClient struct { } // NewWorkspaceSQLAADAdminsClient creates a new instance of WorkspaceSQLAADAdminsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWorkspaceSQLAADAdminsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceSQLAADAdminsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,12 +57,13 @@ func NewWorkspaceSQLAADAdminsClient(subscriptionID string, credential azcore.Tok // BeginCreateOrUpdate - Creates or updates a workspace SQL active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// aadAdminInfo - Workspace active directory administrator properties -// options - WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - aadAdminInfo - Workspace active directory administrator properties +// - options - WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.BeginCreateOrUpdate +// method. func (client *WorkspaceSQLAADAdminsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAADAdminInfo, options *WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceSQLAADAdminsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, aadAdminInfo, options) @@ -78,6 +80,7 @@ func (client *WorkspaceSQLAADAdminsClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Creates or updates a workspace SQL active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceSQLAADAdminsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, aadAdminInfo WorkspaceAADAdminInfo, options *WorkspaceSQLAADAdminsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, aadAdminInfo, options) @@ -122,11 +125,12 @@ func (client *WorkspaceSQLAADAdminsClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Deletes a workspace SQL active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceSQLAADAdminsClientBeginDeleteOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceSQLAADAdminsClientBeginDeleteOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.BeginDelete +// method. func (client *WorkspaceSQLAADAdminsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceSQLAADAdminsClientBeginDeleteOptions) (*runtime.Poller[WorkspaceSQLAADAdminsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, options) @@ -143,6 +147,7 @@ func (client *WorkspaceSQLAADAdminsClient) BeginDelete(ctx context.Context, reso // Delete - Deletes a workspace SQL active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 func (client *WorkspaceSQLAADAdminsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceSQLAADAdminsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) @@ -187,11 +192,12 @@ func (client *WorkspaceSQLAADAdminsClient) deleteCreateRequest(ctx context.Conte // Get - Gets a workspace SQL active directory admin // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2021-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace. -// options - WorkspaceSQLAADAdminsClientGetOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace. +// - options - WorkspaceSQLAADAdminsClientGetOptions contains the optional parameters for the WorkspaceSQLAADAdminsClient.Get +// method. func (client *WorkspaceSQLAADAdminsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspaceSQLAADAdminsClientGetOptions) (WorkspaceSQLAADAdminsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_azureadonlyauthentications_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_azureadonlyauthentications_client_test.go deleted file mode 100644 index 271220ff8a8d..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_azureadonlyauthentications_client_test.go +++ /dev/null @@ -1,99 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAzureADOnlyAuthentication.json -func ExampleAzureADOnlyAuthenticationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewAzureADOnlyAuthenticationsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "workspace-6852", - "workspace-2080", - armsynapse.AzureADOnlyAuthenticationNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateAzureADOnlyAuthentication.json -func ExampleAzureADOnlyAuthenticationsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewAzureADOnlyAuthenticationsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreate(ctx, - "workspace-6852", - "workspace-2080", - armsynapse.AzureADOnlyAuthenticationNameDefault, - armsynapse.AzureADOnlyAuthentication{ - Properties: &armsynapse.AzureADOnlyAuthenticationProperties{ - AzureADOnlyAuthentication: to.Ptr(true), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListAzureADOnlyAuthentication.json -func ExampleAzureADOnlyAuthenticationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewAzureADOnlyAuthenticationsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("workspace-6852", - "workspace-2080", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_bigdatapools_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_bigdatapools_client_test.go deleted file mode 100644 index 86de9253206e..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_bigdatapools_client_test.go +++ /dev/null @@ -1,176 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/GetBigDataPool.json -func ExampleBigDataPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewBigDataPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExamplePool", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/UpdateBigDataPool.json -func ExampleBigDataPoolsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewBigDataPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExamplePool", - armsynapse.BigDataPoolPatchInfo{ - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/CreateOrUpdateBigDataPool.json -func ExampleBigDataPoolsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewBigDataPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExamplePool", - armsynapse.BigDataPoolResourceInfo{ - Location: to.Ptr("West US 2"), - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - Properties: &armsynapse.BigDataPoolResourceProperties{ - AutoPause: &armsynapse.AutoPauseProperties{ - DelayInMinutes: to.Ptr[int32](15), - Enabled: to.Ptr(true), - }, - AutoScale: &armsynapse.AutoScaleProperties{ - Enabled: to.Ptr(true), - MaxNodeCount: to.Ptr[int32](50), - MinNodeCount: to.Ptr[int32](3), - }, - DefaultSparkLogFolder: to.Ptr("/logs"), - LibraryRequirements: &armsynapse.LibraryRequirements{ - Content: to.Ptr(""), - Filename: to.Ptr("requirements.txt"), - }, - NodeCount: to.Ptr[int32](4), - NodeSize: to.Ptr(armsynapse.NodeSizeMedium), - NodeSizeFamily: to.Ptr(armsynapse.NodeSizeFamilyMemoryOptimized), - SparkEventsFolder: to.Ptr("/events"), - SparkVersion: to.Ptr("2.4"), - }, - }, - &armsynapse.BigDataPoolsClientBeginCreateOrUpdateOptions{Force: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/DeleteBigDataPool.json -func ExampleBigDataPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewBigDataPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExamplePool", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/ListBigDataPoolsInWorkspace.json -func ExampleBigDataPoolsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewBigDataPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("ExampleResourceGroup", - "ExampleWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_datamaskingpolicies_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_datamaskingpolicies_client_test.go deleted file mode 100644 index ba404b2689ca..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_datamaskingpolicies_client_test.go +++ /dev/null @@ -1,70 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyCreateOrUpdateMax.json -func ExampleDataMaskingPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewDataMaskingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", - armsynapse.DataMaskingPolicy{ - Properties: &armsynapse.DataMaskingPolicyProperties{ - DataMaskingState: to.Ptr(armsynapse.DataMaskingStateEnabled), - ExemptPrincipals: to.Ptr("testuser;"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyGet.json -func ExampleDataMaskingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewDataMaskingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_datamaskingrules_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_datamaskingrules_client_test.go deleted file mode 100644 index 7b88fa8f9992..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_datamaskingrules_client_test.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json -func ExampleDataMaskingRulesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewDataMaskingRulesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", - "rule1", - armsynapse.DataMaskingRule{ - Properties: &armsynapse.DataMaskingRuleProperties{ - AliasName: to.Ptr("nickname"), - ColumnName: to.Ptr("test1"), - MaskingFunction: to.Ptr(armsynapse.DataMaskingFunctionDefault), - RuleState: to.Ptr(armsynapse.DataMaskingRuleStateEnabled), - SchemaName: to.Ptr("dbo"), - TableName: to.Ptr("Table_1"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleGet.json -func ExampleDataMaskingRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewDataMaskingRulesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-331", - "rule1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_extendedsqlpoolblobauditingpolicies_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_extendedsqlpoolblobauditingpolicies_client_test.go deleted file mode 100644 index 2f0ad518cf7c..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_extendedsqlpoolblobauditingpolicies_client_test.go +++ /dev/null @@ -1,70 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingGet.json -func ExampleExtendedSQLPoolBlobAuditingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewExtendedSQLPoolBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "blobauditingtest-6852", - "blobauditingtest-2080", - "testdb", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolAzureMonitorAuditingCreateMin.json -func ExampleExtendedSQLPoolBlobAuditingPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewExtendedSQLPoolBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "blobauditingtest-4799", - "blobauditingtest-6440", - "testdb", - armsynapse.ExtendedSQLPoolBlobAuditingPolicy{ - Properties: &armsynapse.ExtendedSQLPoolBlobAuditingPolicyProperties{ - IsAzureMonitorTargetEnabled: to.Ptr(true), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeauthkeys_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeauthkeys_client_test.go deleted file mode 100644 index bbb135c63879..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeauthkeys_client_test.go +++ /dev/null @@ -1,67 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_RegenerateAuthKey.json -func ExampleIntegrationRuntimeAuthKeysClient_Regenerate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeAuthKeysClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Regenerate(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - armsynapse.IntegrationRuntimeRegenerateKeyParameters{ - KeyName: to.Ptr(armsynapse.IntegrationRuntimeAuthKeyNameAuthKey2), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListAuthKeys.json -func ExampleIntegrationRuntimeAuthKeysClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeAuthKeysClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeconnectioninfos_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeconnectioninfos_client_test.go deleted file mode 100644 index eb74514b440d..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeconnectioninfos_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_GetConnectionInfo.json -func ExampleIntegrationRuntimeConnectionInfosClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeConnectionInfosClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimecredentials_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimecredentials_client_test.go deleted file mode 100644 index e5660a40883c..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimecredentials_client_test.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_SyncCredentials.json -func ExampleIntegrationRuntimeCredentialsClient_Sync() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeCredentialsClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Sync(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimemonitoringdata_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimemonitoringdata_client_test.go deleted file mode 100644 index 2bbea893b555..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimemonitoringdata_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeMonitoringData_List.json -func ExampleIntegrationRuntimeMonitoringDataClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeMonitoringDataClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimenodeipaddress_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimenodeipaddress_client_test.go deleted file mode 100644 index 8b1fceb616b4..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimenodeipaddress_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_GetIpAddress.json -func ExampleIntegrationRuntimeNodeIPAddressClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeNodeIPAddressClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - "Node_1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimenodes_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimenodes_client_test.go deleted file mode 100644 index 41634f429fc3..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimenodes_client_test.go +++ /dev/null @@ -1,91 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Get.json -func ExampleIntegrationRuntimeNodesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeNodesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - "Node_1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Update.json -func ExampleIntegrationRuntimeNodesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeNodesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - "Node_1", - armsynapse.UpdateIntegrationRuntimeNodeRequest{ - ConcurrentJobsLimit: to.Ptr[int32](2), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Delete.json -func ExampleIntegrationRuntimeNodesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeNodesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - "Node_1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeobjectmetadata_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeobjectmetadata_client_test.go deleted file mode 100644 index 9c8c3203f3b7..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimeobjectmetadata_client_test.go +++ /dev/null @@ -1,71 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeObjectMetadata_List.json -func ExampleIntegrationRuntimeObjectMetadataClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeObjectMetadataClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "testactivityv2", - &armsynapse.IntegrationRuntimeObjectMetadataClientListOptions{GetMetadataRequest: &armsynapse.GetSsisObjectMetadataRequest{ - MetadataPath: to.Ptr("ssisFolders"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeObjectMetadata_Refresh.json -func ExampleIntegrationRuntimeObjectMetadataClient_BeginRefresh() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeObjectMetadataClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRefresh(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "testactivityv2", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimes_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimes_client_test.go deleted file mode 100644 index ece5970d40e7..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimes_client_test.go +++ /dev/null @@ -1,298 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Update.json -func ExampleIntegrationRuntimesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - armsynapse.UpdateIntegrationRuntimeRequest{ - AutoUpdate: to.Ptr(armsynapse.IntegrationRuntimeAutoUpdateOff), - UpdateDelayOffset: to.Ptr("\"PT3H\""), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Get.json -func ExampleIntegrationRuntimesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - &armsynapse.IntegrationRuntimesClientGetOptions{IfNoneMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Create.json -func ExampleIntegrationRuntimesClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreate(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - armsynapse.IntegrationRuntimeResource{ - Properties: &armsynapse.SelfHostedIntegrationRuntime{ - Type: to.Ptr(armsynapse.IntegrationRuntimeTypeSelfHosted), - Description: to.Ptr("A selfhosted integration runtime"), - }, - }, - &armsynapse.IntegrationRuntimesClientBeginCreateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Delete.json -func ExampleIntegrationRuntimesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Upgrade.json -func ExampleIntegrationRuntimesClient_Upgrade() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Upgrade(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListByWorkspace.json -func ExampleIntegrationRuntimesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("exampleResourceGroup", - "exampleWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Start.json -func ExampleIntegrationRuntimesClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStart(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleManagedIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Stop.json -func ExampleIntegrationRuntimesClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleManagedIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json -func ExampleIntegrationRuntimesClient_ListOutboundNetworkDependenciesEndpoints() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("ade9c2b6-c160-4305-9bb9-80342f6c1ae2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListOutboundNetworkDependenciesEndpoints(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_EnableInteractiveQuery.json -func ExampleIntegrationRuntimesClient_BeginEnableInteractiveQuery() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginEnableInteractiveQuery(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleManagedIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_DisableInteractiveQuery.json -func ExampleIntegrationRuntimesClient_BeginDisableInteractiveQuery() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDisableInteractiveQuery(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleManagedIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimestatus_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimestatus_client_test.go deleted file mode 100644 index f8d3d4ae0f0b..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_integrationruntimestatus_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_GetStatus.json -func ExampleIntegrationRuntimeStatusClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIntegrationRuntimeStatusClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_ipfirewallrules_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_ipfirewallrules_client_test.go deleted file mode 100644 index a90ae2466a36..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_ipfirewallrules_client_test.go +++ /dev/null @@ -1,165 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListIpFirewallRules.json -func ExampleIPFirewallRulesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIPFirewallRulesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("ExampleResourceGroup", - "ExampleWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateIpFirewallRule.json -func ExampleIPFirewallRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIPFirewallRulesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleIpFirewallRule", - armsynapse.IPFirewallRuleInfo{ - Properties: &armsynapse.IPFirewallRuleProperties{ - EndIPAddress: to.Ptr("10.0.0.254"), - StartIPAddress: to.Ptr("10.0.0.0"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteIpFirewallRule.json -func ExampleIPFirewallRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIPFirewallRulesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleIpFirewallRule", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetIpFirewallRule.json -func ExampleIPFirewallRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIPFirewallRulesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleIpFirewallRule", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ReplaceAllIpFirewallRules.json -func ExampleIPFirewallRulesClient_BeginReplaceAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewIPFirewallRulesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginReplaceAll(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - armsynapse.ReplaceAllIPFirewallRulesRequest{ - IPFirewallRules: map[string]*armsynapse.IPFirewallRuleProperties{ - "AnotherExampleFirewallRule": { - EndIPAddress: to.Ptr("10.0.1.254"), - StartIPAddress: to.Ptr("10.0.1.0"), - }, - "ExampleFirewallRule": { - EndIPAddress: to.Ptr("10.0.0.254"), - StartIPAddress: to.Ptr("10.0.0.0"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_keys_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_keys_client_test.go deleted file mode 100644 index 94aeb1dc37c1..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_keys_client_test.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListKeysInWorkspace.json -func ExampleKeysClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKeysClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("ExampleResourceGroup", - "ExampleWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetKey.json -func ExampleKeysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKeysClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "somekey", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateKey.json -func ExampleKeysClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKeysClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "somekey", - armsynapse.Key{ - Properties: &armsynapse.KeyProperties{ - IsActiveCMK: to.Ptr(true), - KeyVaultURL: to.Ptr("https://vault.azure.net/keys/somesecret"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteKey.json -func ExampleKeysClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKeysClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Delete(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "somekey", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustooperations_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustooperations_client_test.go deleted file mode 100644 index b88a0776fd39..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustooperations_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoOperationsList.json -func ExampleKustoOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolattacheddatabaseconfigurations_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolattacheddatabaseconfigurations_client_test.go deleted file mode 100644 index 20a79827a490..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolattacheddatabaseconfigurations_client_test.go +++ /dev/null @@ -1,145 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationsListByKustoPool.json -func ExampleKustoPoolAttachedDatabaseConfigurationsClient_NewListByKustoPoolPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolAttachedDatabaseConfigurationsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByKustoPoolPager("kustorptest", - "kustoclusterrptest4", - "kustorptest", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationsGet.json -func ExampleKustoPoolAttachedDatabaseConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolAttachedDatabaseConfigurationsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "kustorptest", - "kustoclusterrptest4", - "attachedDatabaseConfigurations1", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationsCreateOrUpdate.json -func ExampleKustoPoolAttachedDatabaseConfigurationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolAttachedDatabaseConfigurationsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "kustorptest", - "kustoclusterrptest4", - "attachedDatabaseConfigurations1", - "kustorptest", - armsynapse.AttachedDatabaseConfiguration{ - Location: to.Ptr("westus"), - Properties: &armsynapse.AttachedDatabaseConfigurationProperties{ - KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/Workspaces/kustorptest/KustoPools/kustoclusterrptest4"), - DatabaseName: to.Ptr("kustodatabase"), - DefaultPrincipalsModificationKind: to.Ptr(armsynapse.DefaultPrincipalsModificationKindUnion), - TableLevelSharingProperties: &armsynapse.TableLevelSharingProperties{ - ExternalTablesToExclude: []*string{ - to.Ptr("ExternalTable2")}, - ExternalTablesToInclude: []*string{ - to.Ptr("ExternalTable1")}, - MaterializedViewsToExclude: []*string{ - to.Ptr("MaterializedViewTable2")}, - MaterializedViewsToInclude: []*string{ - to.Ptr("MaterializedViewTable1")}, - TablesToExclude: []*string{ - to.Ptr("Table2")}, - TablesToInclude: []*string{ - to.Ptr("Table1")}, - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationsDelete.json -func ExampleKustoPoolAttachedDatabaseConfigurationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolAttachedDatabaseConfigurationsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "kustorptest", - "kustoclusterrptest4", - "attachedDatabaseConfigurations1", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolchildresource_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolchildresource_client_test.go deleted file mode 100644 index dd3735f4f2d6..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolchildresource_client_test.go +++ /dev/null @@ -1,45 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolAttachedDatabaseConfigurationCheckNameAvailability.json -func ExampleKustoPoolChildResourceClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolChildResourceClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - "kustorptest", - "kustoclusterrptest4", - "kustorptest", - armsynapse.DatabaseCheckNameRequest{ - Name: to.Ptr("adc1"), - Type: to.Ptr(armsynapse.TypeMicrosoftSynapseWorkspacesKustoPoolsAttachedDatabaseConfigurations), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldatabaseprincipalassignments_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldatabaseprincipalassignments_client_test.go deleted file mode 100644 index 7e2687a5a906..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldatabaseprincipalassignments_client_test.go +++ /dev/null @@ -1,163 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsCheckNameAvailability.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasePrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "Kustodatabase8", - "kustorptest", - armsynapse.DatabasePrincipalAssignmentCheckNameRequest{ - Name: to.Ptr("kustoprincipal1"), - Type: to.Ptr("Microsoft.Synapse/workspaces/kustoPools/databases/principalAssignments"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsList.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasePrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("synapseWorkspaceName", - "kustoclusterrptest4", - "Kustodatabase8", - "kustorptest", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsGet.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasePrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "Kustodatabase8", - "kustoprincipal1", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsCreateOrUpdate.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasePrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "Kustodatabase8", - "kustoprincipal1", - "kustorptest", - armsynapse.DatabasePrincipalAssignment{ - Properties: &armsynapse.DatabasePrincipalProperties{ - PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - Role: to.Ptr(armsynapse.DatabasePrincipalRoleAdmin), - TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasePrincipalAssignmentsDelete.json -func ExampleKustoPoolDatabasePrincipalAssignmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasePrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "Kustodatabase8", - "kustoprincipal1", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldatabases_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldatabases_client_test.go deleted file mode 100644 index 8befa3cc4095..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldatabases_client_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoDatabasesListByKustoPool.json -func ExampleKustoPoolDatabasesClient_NewListByKustoPoolPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasesClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByKustoPoolPager("kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesGet.json -func ExampleKustoPoolDatabasesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasesClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesCreateOrUpdate.json -func ExampleKustoPoolDatabasesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasesClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - &armsynapse.ReadWriteDatabase{ - Kind: to.Ptr(armsynapse.KindReadWrite), - Location: to.Ptr("westus"), - Properties: &armsynapse.ReadWriteDatabaseProperties{ - SoftDeletePeriod: to.Ptr("P1D"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesUpdate.json -func ExampleKustoPoolDatabasesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasesClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - &armsynapse.ReadWriteDatabase{ - Kind: to.Ptr(armsynapse.KindReadWrite), - Properties: &armsynapse.ReadWriteDatabaseProperties{ - SoftDeletePeriod: to.Ptr("P1D"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDatabasesDelete.json -func ExampleKustoPoolDatabasesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDatabasesClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldataconnections_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldataconnections_client_test.go deleted file mode 100644 index b868925cfb55..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopooldataconnections_client_test.go +++ /dev/null @@ -1,234 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsCheckNameAvailability.json -func ExampleKustoPoolDataConnectionsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDataConnectionsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "Kustodatabase8", - armsynapse.DataConnectionCheckNameRequest{ - Name: to.Ptr("DataConnections8"), - Type: to.Ptr("Microsoft.Synapse/workspaces/kustoPools/databases/dataConnections"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionValidation.json -func ExampleKustoPoolDataConnectionsClient_BeginDataConnectionValidation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDataConnectionsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDataConnectionValidation(ctx, - "kustorptest", - "kustorptest", - "kustoclusterrptest4", - "KustoDatabase8", - armsynapse.DataConnectionValidation{ - DataConnectionName: to.Ptr("DataConnections8"), - Properties: &armsynapse.EventHubDataConnection{ - Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsListByDatabase.json -func ExampleKustoPoolDataConnectionsClient_NewListByDatabasePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDataConnectionsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByDatabasePager("kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsGet.json -func ExampleKustoPoolDataConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDataConnectionsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - "DataConnections8", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsCreateOrUpdate.json -func ExampleKustoPoolDataConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDataConnectionsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - "DataConnections8", - &armsynapse.EventHubDataConnection{ - Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - Location: to.Ptr("westus"), - Properties: &armsynapse.EventHubConnectionProperties{ - ConsumerGroup: to.Ptr("testConsumerGroup1"), - EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsUpdate.json -func ExampleKustoPoolDataConnectionsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDataConnectionsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - "DataConnections8", - &armsynapse.EventHubDataConnection{ - Kind: to.Ptr(armsynapse.DataConnectionKindEventHub), - Location: to.Ptr("westus"), - Properties: &armsynapse.EventHubConnectionProperties{ - ConsumerGroup: to.Ptr("testConsumerGroup1"), - EventHubResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolDataConnectionsDelete.json -func ExampleKustoPoolDataConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolDataConnectionsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "kustorptest", - "synapseWorkspaceName", - "kustoclusterrptest4", - "KustoDatabase8", - "kustoeventhubconnection1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolprincipalassignments_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolprincipalassignments_client_test.go deleted file mode 100644 index aebfb61f9137..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopoolprincipalassignments_client_test.go +++ /dev/null @@ -1,158 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsCheckNameAvailability.json -func ExampleKustoPoolPrincipalAssignmentsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolPrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "kustorptest", - armsynapse.ClusterPrincipalAssignmentCheckNameRequest{ - Name: to.Ptr("kustoprincipal1"), - Type: to.Ptr("Microsoft.Synapse/workspaces/kustoPools/principalAssignments"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsList.json -func ExampleKustoPoolPrincipalAssignmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolPrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("synapseWorkspaceName", - "kustoclusterrptest4", - "kustorptest", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsGet.json -func ExampleKustoPoolPrincipalAssignmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolPrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "kustoprincipal1", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsCreateOrUpdate.json -func ExampleKustoPoolPrincipalAssignmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolPrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "kustoprincipal1", - "kustorptest", - armsynapse.ClusterPrincipalAssignment{ - Properties: &armsynapse.ClusterPrincipalProperties{ - PrincipalID: to.Ptr("87654321-1234-1234-1234-123456789123"), - PrincipalType: to.Ptr(armsynapse.PrincipalTypeApp), - Role: to.Ptr(armsynapse.ClusterPrincipalRoleAllDatabasesAdmin), - TenantID: to.Ptr("12345678-1234-1234-1234-123456789123"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrincipalAssignmentsDelete.json -func ExampleKustoPoolPrincipalAssignmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolPrincipalAssignmentsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "kustoprincipal1", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopools_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopools_client_test.go deleted file mode 100644 index c91cd5d77afa..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_kustopools_client_test.go +++ /dev/null @@ -1,395 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsCheckNameAvailability.json -func ExampleKustoPoolsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - "westus", - armsynapse.KustoPoolCheckNameRequest{ - Name: to.Ptr("kustoclusterrptest4"), - Type: to.Ptr("Microsoft.Synapse/workspaces/kustoPools"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsListByWorkspace.json -func ExampleKustoPoolsClient_ListByWorkspace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListByWorkspace(ctx, - "kustorptest", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsGet.json -func ExampleKustoPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "synapseWorkspaceName", - "kustoclusterrptest4", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsCreateOrUpdate.json -func ExampleKustoPoolsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "synapseWorkspaceName", - "kustorptest", - "kustoclusterrptest4", - armsynapse.KustoPool{ - Location: to.Ptr("westus"), - Properties: &armsynapse.KustoPoolProperties{ - EnablePurge: to.Ptr(true), - EnableStreamingIngest: to.Ptr(true), - WorkspaceUID: to.Ptr("11111111-2222-3333-444444444444"), - }, - SKU: &armsynapse.AzureSKU{ - Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - Capacity: to.Ptr[int32](2), - Size: to.Ptr(armsynapse.SKUSizeMedium), - }, - }, - &armsynapse.KustoPoolsClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsUpdate.json -func ExampleKustoPoolsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "synapseWorkspaceName", - "kustorptest", - "kustoclusterrptest4", - armsynapse.KustoPoolUpdate{ - Properties: &armsynapse.KustoPoolProperties{ - EnablePurge: to.Ptr(true), - EnableStreamingIngest: to.Ptr(true), - WorkspaceUID: to.Ptr("11111111-2222-3333-444444444444"), - }, - SKU: &armsynapse.AzureSKU{ - Name: to.Ptr(armsynapse.SKUNameStorageOptimized), - Capacity: to.Ptr[int32](2), - Size: to.Ptr(armsynapse.SKUSizeMedium), - }, - }, - &armsynapse.KustoPoolsClientBeginUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsDelete.json -func ExampleKustoPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "kustorptest", - "kustorptest", - "kustoclusterrptest4", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsStop.json -func ExampleKustoPoolsClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, - "kustorptest", - "kustoclusterrptest4", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolsStart.json -func ExampleKustoPoolsClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStart(ctx, - "kustorptest", - "kustoclusterrptest4", - "kustorptest", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolLanguageExtensionsList.json -func ExampleKustoPoolsClient_NewListLanguageExtensionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListLanguageExtensionsPager("kustorptest", - "kustoclusterrptest4", - "kustorptest", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolLanguageExtensionsAdd.json -func ExampleKustoPoolsClient_BeginAddLanguageExtensions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginAddLanguageExtensions(ctx, - "kustorptest", - "kustoclusterrptest4", - "kustorptest", - armsynapse.LanguageExtensionsList{ - Value: []*armsynapse.LanguageExtension{ - { - LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNamePYTHON), - }, - { - LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNameR), - }}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolLanguageExtensionsRemove.json -func ExampleKustoPoolsClient_BeginRemoveLanguageExtensions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRemoveLanguageExtensions(ctx, - "kustorptest", - "kustoclusterrptest4", - "kustorptest", - armsynapse.LanguageExtensionsList{ - Value: []*armsynapse.LanguageExtension{ - { - LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNamePYTHON), - }, - { - LanguageExtensionName: to.Ptr(armsynapse.LanguageExtensionNameR), - }}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolFollowerDatabasesList.json -func ExampleKustoPoolsClient_NewListFollowerDatabasesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListFollowerDatabasesPager("kustorptest", - "kustoclusterrptest4", - "kustorptest", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolFollowerDatabasesDetach.json -func ExampleKustoPoolsClient_BeginDetachFollowerDatabases() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewKustoPoolsClient("12345678-1234-1234-1234-123456789098", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDetachFollowerDatabases(ctx, - "kustorptest", - "kustoclusterrptest4", - "kustorptest", - armsynapse.FollowerDatabaseDefinition{ - AttachedDatabaseConfigurationName: to.Ptr("myAttachedDatabaseConfiguration"), - KustoPoolResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/kustorptest/kustoPools/leader4"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_libraries_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_libraries_client_test.go deleted file mode 100644 index 87dd400b83a0..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_libraries_client_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/Libraries_ListByWorkspace.json -func ExampleLibrariesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewLibrariesClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("exampleResourceGroup", - "exampleWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_library_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_library_client_test.go deleted file mode 100644 index add53f327756..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_library_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/Library_Get.json -func ExampleLibraryClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewLibraryClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "exampleResourceGroup", - "exampleLibraryName.jar", - "exampleWorkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_operations_client_test.go deleted file mode 100644 index 170b6f281faf..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_operations_client_test.go +++ /dev/null @@ -1,106 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CheckNameAvailabilityWorkspaceAlreadyExists.json -func ExampleOperationsClient_CheckNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewOperationsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckNameAvailability(ctx, - armsynapse.CheckNameAvailabilityRequest{ - Name: to.Ptr("workspace1"), - Type: to.Ptr("Microsoft.Synapse/workspaces"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAvailableOperations.json -func ExampleOperationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewOperationsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetLocationHeader.json -func ExampleOperationsClient_GetLocationHeaderResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewOperationsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.GetLocationHeaderResult(ctx, - "resourceGroup1", - "workspace1", - "01234567-89ab-4def-0123-456789abcdef", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAzureAsyncOperationHeader.json -func ExampleOperationsClient_GetAzureAsyncHeaderResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewOperationsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetAzureAsyncHeaderResult(ctx, - "resourceGroup1", - "workspace1", - "01234567-89ab-4def-0123-456789abcdef", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privateendpointconnections_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privateendpointconnections_client_test.go deleted file mode 100644 index 7b79dc290a93..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privateendpointconnections_client_test.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateEndpointConnectionsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExamplePrivateEndpointConnection", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateEndpointConnectionsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreate(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExamplePrivateEndpointConnection", - armsynapse.PrivateEndpointConnection{ - Properties: &armsynapse.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armsynapse.PrivateLinkServiceConnectionState{ - Description: to.Ptr("Approved by abc@example.com"), - Status: to.Ptr("Approved"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json -func ExamplePrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateEndpointConnectionsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExamplePrivateEndpointConnection", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateEndpointConnections.json -func ExamplePrivateEndpointConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateEndpointConnectionsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("ExampleResourceGroup", - "ExampleWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privateendpointconnectionsprivatelinkhub_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privateendpointconnectionsprivatelinkhub_client_test.go deleted file mode 100644 index 38384446d11f..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privateendpointconnectionsprivatelinkhub_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PrivateEndpointConnectionsPrivateLinkHub_List.json -func ExamplePrivateEndpointConnectionsPrivateLinkHubClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateEndpointConnectionsPrivateLinkHubClient("48b08652-d7a1-4d52-b13f-5a2471dce57b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("gh-res-grp", - "pe0", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PrivateEndpointConnectionsPrivateLinkHub_Get.json -func ExamplePrivateEndpointConnectionsPrivateLinkHubClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateEndpointConnectionsPrivateLinkHubClient("48b08652-d7a1-4d52-b13f-5a2471dce57b", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "gh-res-grp", - "pe0", - "pe0-f3ed30f5-338c-4855-a542-24a403694ad2", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkhubprivatelinkresources_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkhubprivatelinkresources_client_test.go deleted file mode 100644 index 83656f39ce93..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkhubprivatelinkresources_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubPrivateLinkResources.json -func ExamplePrivateLinkHubPrivateLinkResourcesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkHubPrivateLinkResourcesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("ExampleResourceGroup", - "ExamplePrivateLinkHub", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkHubPrivateLinkResource.json -func ExamplePrivateLinkHubPrivateLinkResourcesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkHubPrivateLinkResourcesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "ExampleResourceGroup", - "ExamplePrivateLinkHub", - "sql", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkhubs_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkhubs_client_test.go deleted file mode 100644 index f8be4a65a2a1..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkhubs_client_test.go +++ /dev/null @@ -1,169 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubsInResourceGroup.json -func ExamplePrivateLinkHubsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkHubsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("resourceGroup1", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkHub.json -func ExamplePrivateLinkHubsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkHubsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "resourceGroup1", - "privateLinkHub1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdatePrivateLinkHub.json -func ExamplePrivateLinkHubsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkHubsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "resourceGroup1", - "privateLinkHub1", - armsynapse.PrivateLinkHubPatchInfo{ - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdatePrivateLinkHub.json -func ExamplePrivateLinkHubsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkHubsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "resourceGroup1", - "privateLinkHub1", - armsynapse.PrivateLinkHub{ - Location: to.Ptr("East US"), - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - Properties: &armsynapse.PrivateLinkHubProperties{}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeletePrivateLinkHub.json -func ExamplePrivateLinkHubsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkHubsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "resourceGroup1", - "privateLinkHub1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubsInSubscription.json -func ExamplePrivateLinkHubsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkHubsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkresources_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkresources_client_test.go deleted file mode 100644 index 9644dce5e011..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_privatelinkresources_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkResources.json -func ExamplePrivateLinkResourcesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkResourcesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("ExampleResourceGroup", - "ExampleWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkResource.json -func ExamplePrivateLinkResourcesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewPrivateLinkResourcesClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "sql", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_restorabledroppedsqlpools_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_restorabledroppedsqlpools_client_test.go deleted file mode 100644 index 1c1092d43580..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_restorabledroppedsqlpools_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RestorableDroppedSqlPoolGet.json -func ExampleRestorableDroppedSQLPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewRestorableDroppedSQLPoolsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "restorabledroppeddatabasetest-1257", - "restorabledroppeddatabasetest-2389", - "restorabledroppeddatabasetest-7654,131403269876900000", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RestorableDroppedSqlpoolList.json -func ExampleRestorableDroppedSQLPoolsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewRestorableDroppedSQLPoolsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("restorabledroppeddatabasetest-1349", - "restorabledroppeddatabasetest-1840", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sparkconfiguration_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sparkconfiguration_client_test.go deleted file mode 100644 index 199856b5aeb9..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sparkconfiguration_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/SparkConfiguration_Get.json -func ExampleSparkConfigurationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSparkConfigurationClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "exampleResourceGroup", - "exampleSparkConfigurationName", - "exampleWorkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sparkconfigurations_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sparkconfigurations_client_test.go deleted file mode 100644 index 43d7ae5f69c1..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sparkconfigurations_client_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/SparkConfigurations_ListByWorkspace.json -func ExampleSparkConfigurationsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSparkConfigurationsClient("12345678-1234-1234-1234-12345678abc", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("exampleResourceGroup", - "exampleWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolblobauditingpolicies_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolblobauditingpolicies_client_test.go deleted file mode 100644 index 103e984b6417..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolblobauditingpolicies_client_test.go +++ /dev/null @@ -1,79 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolBlobAuditing.json -func ExampleSQLPoolBlobAuditingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "blobauditingtest-6852", - "blobauditingtest-2080", - "testdb", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolBlobAuditingWithAllParameters.json -func ExampleSQLPoolBlobAuditingPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "blobauditingtest-4799", - "blobauditingtest-6440", - "testdb", - armsynapse.SQLPoolBlobAuditingPolicy{ - Properties: &armsynapse.SQLPoolBlobAuditingPolicyProperties{ - AuditActionsAndGroups: []*string{ - to.Ptr("DATABASE_LOGOUT_GROUP"), - to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), - to.Ptr("UPDATE on database::TestDatabaseName by public")}, - IsAzureMonitorTargetEnabled: to.Ptr(true), - IsStorageSecondaryKeyInUse: to.Ptr(false), - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolcolumns_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolcolumns_client_test.go deleted file mode 100644 index 045b715c1fd3..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolcolumns_client_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolColumnGet.json -func ExampleSQLPoolColumnsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolColumnsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRG", - "serverName", - "myDatabase", - "dbo", - "table1", - "column1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolconnectionpolicies_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolconnectionpolicies_client_test.go deleted file mode 100644 index 1e9cc33d9809..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolconnectionpolicies_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolConnectionPolicy.json -func ExampleSQLPoolConnectionPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolConnectionPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "blobauditingtest-6852", - "blobauditingtest-2080", - "testdb", - armsynapse.ConnectionPolicyNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooldatawarehouseuseractivities_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooldatawarehouseuseractivities_client_test.go deleted file mode 100644 index 4469d20e07ab..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooldatawarehouseuseractivities_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolUserActivity.json -func ExampleSQLPoolDataWarehouseUserActivitiesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolDataWarehouseUserActivitiesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - armsynapse.DataWarehouseUserActivityNameCurrent, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolgeobackuppolicies_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolgeobackuppolicies_client_test.go deleted file mode 100644 index 9d0c29365dab..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolgeobackuppolicies_client_test.go +++ /dev/null @@ -1,98 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolGeoBackupPolicies_List.json -func ExampleSQLPoolGeoBackupPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolGeoBackupPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("sqlcrudtest-4799", - "sqlcrudtest-5961", - "testdw", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateGeoBackupPolicies.json -func ExampleSQLPoolGeoBackupPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolGeoBackupPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "testrg", - "testws", - "testdw", - armsynapse.GeoBackupPolicyNameDefault, - armsynapse.GeoBackupPolicy{ - Properties: &armsynapse.GeoBackupPolicyProperties{ - State: to.Ptr(armsynapse.GeoBackupPolicyStateEnabled), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolGeoBackupPolicy.json -func ExampleSQLPoolGeoBackupPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolGeoBackupPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "sqlcrudtest-4799", - "sqlcrudtest-5961", - "testdw", - armsynapse.GeoBackupPolicyNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmaintenancewindowoptions_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmaintenancewindowoptions_client_test.go deleted file mode 100644 index 08e35591d93c..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmaintenancewindowoptions_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetMaintenanceWindowOptions.json -func ExampleSQLPoolMaintenanceWindowOptionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolMaintenanceWindowOptionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "samplerg", - "testworkspace", - "testsp", - "current", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmaintenancewindows_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmaintenancewindows_client_test.go deleted file mode 100644 index e32d42da7dfa..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmaintenancewindows_client_test.go +++ /dev/null @@ -1,74 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetMaintenanceWindows.json -func ExampleSQLPoolMaintenanceWindowsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolMaintenanceWindowsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "samplerg", - "testworkspace", - "testsp", - "current", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateMaintenanceWindows.json -func ExampleSQLPoolMaintenanceWindowsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolMaintenanceWindowsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.CreateOrUpdate(ctx, - "samplerg", - "testworkspace", - "testsp", - "current", - armsynapse.MaintenanceWindows{ - Properties: &armsynapse.MaintenanceWindowsProperties{ - TimeRanges: []*armsynapse.MaintenanceWindowTimeRange{ - { - DayOfWeek: to.Ptr(armsynapse.DayOfWeekSaturday), - Duration: to.Ptr("PT60M"), - StartTime: to.Ptr("00:00:00"), - }}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmetadatasyncconfigs_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmetadatasyncconfigs_client_test.go deleted file mode 100644 index e931354cc631..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolmetadatasyncconfigs_client_test.go +++ /dev/null @@ -1,69 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolMetadataSyncConfig.json -func ExampleSQLPoolMetadataSyncConfigsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolMetadataSyncConfigsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPoolMetadataSyncConfig.json -func ExampleSQLPoolMetadataSyncConfigsClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolMetadataSyncConfigsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - armsynapse.MetadataSyncConfig{ - Properties: &armsynapse.MetadataSyncConfigProperties{ - Enabled: to.Ptr(true), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooloperationresults_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooloperationresults_client_test.go deleted file mode 100644 index 8313edd90b35..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooloperationresults_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetLocationHeaderResultWithSqlPool.json -func ExampleSQLPoolOperationResultsClient_GetLocationHeaderResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolOperationResultsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetLocationHeaderResult(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - "fedcba98-7654-4210-fedc-ba9876543210", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooloperations_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooloperations_client_test.go deleted file mode 100644 index 07f665882a66..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooloperations_client_test.go +++ /dev/null @@ -1,44 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolOperations.json -func ExampleSQLPoolOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolOperationsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("sqlcrudtest-7398", - "sqlcrudtest-4645", - "testdb", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolrecommendedsensitivitylabels_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolrecommendedsensitivitylabels_client_test.go deleted file mode 100644 index 0940649b7060..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolrecommendedsensitivitylabels_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SensitivityLabelsRecommendedUpdate.json -func ExampleSQLPoolRecommendedSensitivityLabelsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolRecommendedSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Update(ctx, - "myRG", - "myWorkspace", - "mySqlPool", - armsynapse.RecommendedSensitivityLabelUpdateList{ - Operations: []*armsynapse.RecommendedSensitivityLabelUpdate{ - { - Properties: &armsynapse.RecommendedSensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column1"), - Op: to.Ptr(armsynapse.RecommendedSensitivityLabelUpdateKindEnable), - Table: to.Ptr("table1"), - }, - }, - { - Properties: &armsynapse.RecommendedSensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column2"), - Op: to.Ptr(armsynapse.RecommendedSensitivityLabelUpdateKindEnable), - Table: to.Ptr("table2"), - }, - }, - { - Properties: &armsynapse.RecommendedSensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column3"), - Op: to.Ptr(armsynapse.RecommendedSensitivityLabelUpdateKindDisable), - Table: to.Ptr("table1"), - }, - }}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolreplicationlinks_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolreplicationlinks_client_test.go deleted file mode 100644 index 8f48feeb951e..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolreplicationlinks_client_test.go +++ /dev/null @@ -1,68 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolReplicationLinks.json -func ExampleSQLPoolReplicationLinksClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolReplicationLinksClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("sqlcrudtest-4799", - "sqlcrudtest-6440", - "testdb", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolReplicationLinks_GetByName.json -func ExampleSQLPoolReplicationLinksClient_GetByName() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolReplicationLinksClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetByName(ctx, - "sqlcrudtest-4799", - "sqlcrudtest-6440", - "testdb", - "5b301b68-03f6-4b26-b0f4-73ebb8634238", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolrestorepoints_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolrestorepoints_client_test.go deleted file mode 100644 index 1dcaea26cc7b..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolrestorepoints_client_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolRestorePoints.json -func ExampleSQLPoolRestorePointsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolRestorePointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("Default-SQL-SouthEastAsia", - "testserver", - "testDatabase", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPoolRestorePoints.json -func ExampleSQLPoolRestorePointsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolRestorePointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreate(ctx, - "Default-SQL-SouthEastAsia", - "testserver", - "testDatabase", - armsynapse.CreateSQLPoolRestorePointDefinition{ - RestorePointLabel: to.Ptr("mylabel"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolRestorePointsGet.json -func ExampleSQLPoolRestorePointsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolRestorePointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "Default-SQL-SouthEastAsia", - "testws", - "testpool", - "131546477590000000", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolRestorePointsDelete.json -func ExampleSQLPoolRestorePointsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolRestorePointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "Default-SQL-SouthEastAsia", - "testws", - "testpool", - "131546477590000000", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpools_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpools_client_test.go deleted file mode 100644 index cbd7a1ae9de4..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpools_client_test.go +++ /dev/null @@ -1,253 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPool.json -func ExampleSQLPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateSqlPool.json -func ExampleSQLPoolsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - armsynapse.SQLPoolPatchInfo{ - Location: to.Ptr("West US 2"), - Properties: &armsynapse.SQLPoolResourceProperties{ - Collation: to.Ptr(""), - MaxSizeBytes: to.Ptr[int64](0), - RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1970-01-01T00:00:00.000Z"); return t }()), - }, - SKU: &armsynapse.SKU{ - Name: to.Ptr(""), - Tier: to.Ptr(""), - }, - Tags: map[string]*string{}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPool.json -func ExampleSQLPoolsClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreate(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - armsynapse.SQLPool{ - Location: to.Ptr("Southeast Asia"), - Tags: map[string]*string{}, - Properties: &armsynapse.SQLPoolResourceProperties{ - Collation: to.Ptr(""), - CreateMode: to.Ptr(armsynapse.CreateMode("")), - MaxSizeBytes: to.Ptr[int64](0), - RecoverableDatabaseID: to.Ptr(""), - SourceDatabaseID: to.Ptr(""), - StorageAccountType: to.Ptr(armsynapse.StorageAccountTypeLRS), - }, - SKU: &armsynapse.SKU{ - Name: to.Ptr(""), - Tier: to.Ptr(""), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPool.json -func ExampleSQLPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsInWorkspace.json -func ExampleSQLPoolsClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("sqlcrudtest-6845", - "sqlcrudtest-7177", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PauseSqlPool.json -func ExampleSQLPoolsClient_BeginPause() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginPause(ctx, - "Default-SQL-SouthEastAsia", - "testsvr", - "testdwdb", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ResumeSqlPool.json -func ExampleSQLPoolsClient_BeginResume() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolsClient("01234567-89ab-4def-0123-456789abcdef", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResume(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RenameSqlPool.json -func ExampleSQLPoolsClient_Rename() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Rename(ctx, - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - armsynapse.ResourceMoveDefinition{ - ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/testsvr/sqlPools/newtestdb"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolschemas_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolschemas_client_test.go deleted file mode 100644 index 05b30f511a93..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolschemas_client_test.go +++ /dev/null @@ -1,68 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolSchema.json -func ExampleSQLPoolSchemasClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSchemasClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myRG", - "serverName", - "myDatabase", - &armsynapse.SQLPoolSchemasClientListOptions{Filter: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolSchemaGet.json -func ExampleSQLPoolSchemasClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSchemasClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRG", - "serverName", - "myDatabase", - "dbo", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolsecurityalertpolicies_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolsecurityalertpolicies_client_test.go deleted file mode 100644 index 3e0693765bfe..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolsecurityalertpolicies_client_test.go +++ /dev/null @@ -1,108 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolSecurityAlertPolicies_List.json -func ExampleSQLPoolSecurityAlertPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSecurityAlertPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("securityalert-6852", - "securityalert-2080", - "testdb", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolSecurityAlert.json -func ExampleSQLPoolSecurityAlertPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSecurityAlertPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "securityalert-6852", - "securityalert-2080", - "testdb", - armsynapse.SecurityAlertPolicyNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolSecurityAlertWithAllParameters.json -func ExampleSQLPoolSecurityAlertPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSecurityAlertPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "securityalert-4799", - "securityalert-6440", - "testdb", - armsynapse.SecurityAlertPolicyNameDefault, - armsynapse.SQLPoolSecurityAlertPolicy{ - Properties: &armsynapse.SecurityAlertPolicyProperties{ - DisabledAlerts: []*string{ - to.Ptr("Sql_Injection"), - to.Ptr("Usage_Anomaly")}, - EmailAccountAdmins: to.Ptr(true), - EmailAddresses: []*string{ - to.Ptr("test@microsoft.com"), - to.Ptr("user@microsoft.com")}, - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolsensitivitylabels_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolsensitivitylabels_client_test.go deleted file mode 100644 index acf6a7c246f8..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolsensitivitylabels_client_test.go +++ /dev/null @@ -1,274 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsSensitivityLabelsWithSourceCurrent.json -func ExampleSQLPoolSensitivityLabelsClient_NewListCurrentPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCurrentPager("myRG", - "myServer", - "myDatabase", - &armsynapse.SQLPoolSensitivityLabelsClientListCurrentOptions{Filter: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SensitivityLabelsCurrentUpdate.json -func ExampleSQLPoolSensitivityLabelsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Update(ctx, - "myRG", - "myWorkspace", - "mySqlPool", - armsynapse.SensitivityLabelUpdateList{ - Operations: []*armsynapse.SensitivityLabelUpdate{ - { - Properties: &armsynapse.SensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column1"), - Op: to.Ptr(armsynapse.SensitivityLabelUpdateKindSet), - SensitivityLabel: &armsynapse.SensitivityLabel{ - Properties: &armsynapse.SensitivityLabelProperties{ - InformationType: to.Ptr("Financial"), - InformationTypeID: to.Ptr("1D3652D6-422C-4115-82F1-65DAEBC665C8"), - LabelID: to.Ptr("3A477B16-9423-432B-AA97-6069B481CEC3"), - LabelName: to.Ptr("Highly Confidential"), - Rank: to.Ptr(armsynapse.SensitivityLabelRankLow), - }, - }, - Table: to.Ptr("table1"), - }, - }, - { - Properties: &armsynapse.SensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("column2"), - Op: to.Ptr(armsynapse.SensitivityLabelUpdateKindSet), - SensitivityLabel: &armsynapse.SensitivityLabel{ - Properties: &armsynapse.SensitivityLabelProperties{ - InformationType: to.Ptr("PhoneNumber"), - InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), - LabelName: to.Ptr("PII"), - Rank: to.Ptr(armsynapse.SensitivityLabelRankCritical), - }, - }, - Table: to.Ptr("table2"), - }, - }, - { - Properties: &armsynapse.SensitivityLabelUpdateProperties{ - Schema: to.Ptr("dbo"), - Column: to.Ptr("Column3"), - Op: to.Ptr(armsynapse.SensitivityLabelUpdateKindRemove), - Table: to.Ptr("Table1"), - }, - }}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolSensitivityLabelsWithSourceRecommended.json -func ExampleSQLPoolSensitivityLabelsClient_NewListRecommendedPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListRecommendedPager("myRG", - "myServer", - "myDatabase", - &armsynapse.SQLPoolSensitivityLabelsClientListRecommendedOptions{IncludeDisabledRecommendations: nil, - SkipToken: nil, - Filter: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolColumnSensitivityLabelWithAllParameters.json -func ExampleSQLPoolSensitivityLabelsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - armsynapse.SensitivityLabel{ - Properties: &armsynapse.SensitivityLabelProperties{ - InformationType: to.Ptr("PhoneNumber"), - InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), - LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), - LabelName: to.Ptr("PII"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolColumnSensitivityLabel.json -func ExampleSQLPoolSensitivityLabelsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolColumnSensitivityLabelGet.json -func ExampleSQLPoolSensitivityLabelsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - armsynapse.SensitivityLabelSourceCurrent, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RecommendedColumnSensitivityLabelEnable.json -func ExampleSQLPoolSensitivityLabelsClient_EnableRecommendation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.EnableRecommendation(ctx, - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RecommendedColumnSensitivityLabelDisable.json -func ExampleSQLPoolSensitivityLabelsClient_DisableRecommendation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolSensitivityLabelsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.DisableRecommendation(ctx, - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltablecolumns_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltablecolumns_client_test.go deleted file mode 100644 index 43941b7f631f..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltablecolumns_client_test.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolColumns.json -func ExampleSQLPoolTableColumnsClient_NewListByTableNamePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolTableColumnsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByTableNamePager("myRG", - "serverName", - "myDatabase", - "dbo", - "table1", - &armsynapse.SQLPoolTableColumnsClientListByTableNameOptions{Filter: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltables_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltables_client_test.go deleted file mode 100644 index 87c4a913f8d3..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltables_client_test.go +++ /dev/null @@ -1,70 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolTables.json -func ExampleSQLPoolTablesClient_NewListBySchemaPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolTablesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySchemaPager("myRG", - "serverName", - "myDatabase", - "dbo", - &armsynapse.SQLPoolTablesClientListBySchemaOptions{Filter: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolTableGet.json -func ExampleSQLPoolTablesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolTablesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "myRG", - "serverName", - "myDatabase", - "dbo", - "table1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltransparentdataencryptions_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltransparentdataencryptions_client_test.go deleted file mode 100644 index a131a794caad..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpooltransparentdataencryptions_client_test.go +++ /dev/null @@ -1,98 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolTransparentDataEncryption.json -func ExampleSQLPoolTransparentDataEncryptionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolTransparentDataEncryptionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - armsynapse.TransparentDataEncryptionNameCurrent, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolTransparentDataEncryption.json -func ExampleSQLPoolTransparentDataEncryptionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolTransparentDataEncryptionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - armsynapse.TransparentDataEncryptionNameCurrent, - armsynapse.TransparentDataEncryption{ - Properties: &armsynapse.TransparentDataEncryptionProperties{ - Status: to.Ptr(armsynapse.TransparentDataEncryptionStatusEnabled), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolTransparentDataEncryptionList.json -func ExampleSQLPoolTransparentDataEncryptionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolTransparentDataEncryptionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolusages_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolusages_client_test.go deleted file mode 100644 index cdb74db03472..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolusages_client_test.go +++ /dev/null @@ -1,44 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolUsageMetricsList.json -func ExampleSQLPoolUsagesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolUsagesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("sqlcrudtest-6730", - "sqlcrudtest-9007", - "3481", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessmentrulebaselines_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessmentrulebaselines_client_test.go deleted file mode 100644 index f0a7db5ccd37..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessmentrulebaselines_client_test.go +++ /dev/null @@ -1,115 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentRuleBaseline.json -func ExampleSQLPoolVulnerabilityAssessmentRuleBaselinesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - "VA1001", - armsynapse.VulnerabilityAssessmentPolicyBaselineNameDefault, - armsynapse.SQLPoolVulnerabilityAssessmentRuleBaseline{ - Properties: &armsynapse.SQLPoolVulnerabilityAssessmentRuleBaselineProperties{ - BaselineResults: []*armsynapse.SQLPoolVulnerabilityAssessmentRuleBaselineItem{ - { - Result: []*string{ - to.Ptr("userA"), - to.Ptr("SELECT")}, - }, - { - Result: []*string{ - to.Ptr("userB"), - to.Ptr("SELECT")}, - }, - { - Result: []*string{ - to.Ptr("userC"), - to.Ptr("SELECT"), - to.Ptr("tableId_4")}, - }}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolVulnerabilityAssessmentRuleBaseline.json -func ExampleSQLPoolVulnerabilityAssessmentRuleBaselinesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - "VA1001", - armsynapse.VulnerabilityAssessmentPolicyBaselineNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolVulnerabilityAssessmentRuleBaselineGet.json -func ExampleSQLPoolVulnerabilityAssessmentRuleBaselinesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentRuleBaselinesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "vulnerabilityaseessmenttest-4711", - "vulnerabilityaseessmenttest-6411", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - "VA1001", - armsynapse.VulnerabilityAssessmentPolicyBaselineNameMaster, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessments_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessments_client_test.go deleted file mode 100644 index ff3a56059731..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessments_client_test.go +++ /dev/null @@ -1,129 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolVulnerabilityAssessments.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolVulnerabilityAssessment.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentWithAllParameters.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - armsynapse.SQLPoolVulnerabilityAssessment{ - Properties: &armsynapse.SQLPoolVulnerabilityAssessmentProperties{ - RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - EmailSubscriptionAdmins: to.Ptr(true), - Emails: []*string{ - to.Ptr("email1@mail.com"), - to.Ptr("email2@mail.com")}, - IsEnabled: to.Ptr(true), - }, - StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolVulnerabilityAssessment.json -func ExampleSQLPoolVulnerabilityAssessmentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessmentscans_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessmentscans_client_test.go deleted file mode 100644 index 496930e45d52..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolvulnerabilityassessmentscans_client_test.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolVulnerabilityAssessmentScanRecords.json -func ExampleSQLPoolVulnerabilityAssessmentScansClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentScansClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExecuteSqlPoolVulnerabilityAssessmentScans.json -func ExampleSQLPoolVulnerabilityAssessmentScansClient_BeginInitiateScan() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentScansClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginInitiateScan(ctx, - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - "scan01", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExportSqlPoolVulnerabilityAssessmentScan.json -func ExampleSQLPoolVulnerabilityAssessmentScansClient_Export() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentScansClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Export(ctx, - "vulnerabilityassessmenttest-4799", - "vulnerabilityassessmenttest-6440", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - "scan001", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolVulnerabilityAssessmentScanRecordsGet.json -func ExampleSQLPoolVulnerabilityAssessmentScansClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolVulnerabilityAssessmentScansClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - armsynapse.VulnerabilityAssessmentNameDefault, - "scan001", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolworkloadclassifier_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolworkloadclassifier_client_test.go deleted file mode 100644 index 4d43df98eb46..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolworkloadclassifier_client_test.go +++ /dev/null @@ -1,137 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupWorkloadClassifier.json -func ExampleSQLPoolWorkloadClassifierClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolWorkloadClassifierClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - "wlm_classifier", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadClassifierMax.json -func ExampleSQLPoolWorkloadClassifierClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolWorkloadClassifierClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - "wlm_workloadclassifier", - armsynapse.WorkloadClassifier{ - Properties: &armsynapse.WorkloadClassifierProperties{ - Context: to.Ptr("test_context"), - EndTime: to.Ptr("14:00"), - Importance: to.Ptr("high"), - Label: to.Ptr("test_label"), - MemberName: to.Ptr("dbo"), - StartTime: to.Ptr("12:00"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolWorkloadGroupWorkloadClassifer.json -func ExampleSQLPoolWorkloadClassifierClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolWorkloadClassifierClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - "wlm_workloadclassifier", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupWorkloadClassifierList.json -func ExampleSQLPoolWorkloadClassifierClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolWorkloadClassifierClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolworkloadgroup_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolworkloadgroup_client_test.go deleted file mode 100644 index 52f53e144ae7..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_sqlpoolworkloadgroup_client_test.go +++ /dev/null @@ -1,133 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroup.json -func ExampleSQLPoolWorkloadGroupClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolWorkloadGroupClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "smallrc", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadGroupMax.json -func ExampleSQLPoolWorkloadGroupClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolWorkloadGroupClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "smallrc", - armsynapse.WorkloadGroup{ - Properties: &armsynapse.WorkloadGroupProperties{ - Importance: to.Ptr("normal"), - MaxResourcePercent: to.Ptr[int32](100), - MaxResourcePercentPerRequest: to.Ptr[float64](3), - MinResourcePercent: to.Ptr[int32](0), - MinResourcePercentPerRequest: to.Ptr[float64](3), - QueryExecutionTimeout: to.Ptr[int32](0), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolWorkloadGroup.json -func ExampleSQLPoolWorkloadGroupClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolWorkloadGroupClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupList.json -func ExampleSQLPoolWorkloadGroupClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewSQLPoolWorkloadGroupClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspaceaadadmins_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspaceaadadmins_client_test.go deleted file mode 100644 index ec8cada145a4..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspaceaadadmins_client_test.go +++ /dev/null @@ -1,98 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceAadAdmin.json -func ExampleWorkspaceAADAdminsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceAADAdminsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "resourceGroup1", - "workspace1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspaceAadAdmin.json -func ExampleWorkspaceAADAdminsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceAADAdminsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "resourceGroup1", - "workspace1", - armsynapse.WorkspaceAADAdminInfo{ - Properties: &armsynapse.AADAdminProperties{ - AdministratorType: to.Ptr("ActiveDirectory"), - Login: to.Ptr("bob@contoso.com"), - Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceAadAdmin.json -func ExampleWorkspaceAADAdminsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceAADAdminsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "resourceGroup1", - "workspace1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedidentitysqlcontrolsettings_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedidentitysqlcontrolsettings_client_test.go deleted file mode 100644 index af29702c94b8..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedidentitysqlcontrolsettings_client_test.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetManagedIdentitySqlControlSettings.json -func ExampleWorkspaceManagedIdentitySQLControlSettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedIdentitySQLControlSettingsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "resourceGroup1", - "workspace1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateManagedIdentitySqlControlSettings.json -func ExampleWorkspaceManagedIdentitySQLControlSettingsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedIdentitySQLControlSettingsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "resourceGroup1", - "workspace1", - armsynapse.ManagedIdentitySQLControlSettingsModel{ - Properties: &armsynapse.ManagedIdentitySQLControlSettingsModelProperties{ - GrantSQLControlToManagedIdentity: &armsynapse.ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity{ - DesiredState: to.Ptr(armsynapse.ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredStateEnabled), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverblobauditingpolicies_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverblobauditingpolicies_client_test.go deleted file mode 100644 index 8aeec587253a..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverblobauditingpolicies_client_test.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerBlobAuditingSettings.json -func ExampleWorkspaceManagedSQLServerBlobAuditingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.BlobAuditingPolicyNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerBlobAuditingSettingsWithAllParameters.json -func ExampleWorkspaceManagedSQLServerBlobAuditingPoliciesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.BlobAuditingPolicyNameDefault, - armsynapse.ServerBlobAuditingPolicy{ - Properties: &armsynapse.ServerBlobAuditingPolicyProperties{ - AuditActionsAndGroups: []*string{ - to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - to.Ptr("BATCH_COMPLETED_GROUP")}, - IsAzureMonitorTargetEnabled: to.Ptr(true), - IsStorageSecondaryKeyInUse: to.Ptr(false), - QueueDelayMs: to.Ptr[int32](4000), - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerBlobAuditingSettings.json -func ExampleWorkspaceManagedSQLServerBlobAuditingPoliciesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("wsg-7398", - "testWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client_test.go deleted file mode 100644 index 18e8f5102270..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client_test.go +++ /dev/null @@ -1,99 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateWorkspaceManagedSqlServerDedicatedSQLminimalTlsSettings.json -func ExampleWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "workspace-6852", - "workspace-2080", - armsynapse.DedicatedSQLMinimalTLSSettingsNameDefault, - armsynapse.DedicatedSQLminimalTLSSettings{ - Properties: &armsynapse.DedicatedSQLminimalTLSSettingsProperties{ - MinimalTLSVersion: to.Ptr("1.1"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerDedicatedSQLminimalTlsSettings.json -func ExampleWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "workspace-6852", - "workspace-2080", - "default", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerDedicatedSQLminimalTlsSettings.json -func ExampleWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerDedicatedSQLMinimalTLSSettingsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("workspace-6852", - "workspace-2080", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverencryptionprotector_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverencryptionprotector_client_test.go deleted file mode 100644 index efcab85869b6..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverencryptionprotector_client_test.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerEncryptionProtector.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerEncryptionProtectorClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.EncryptionProtectorNameCurrent, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateKeyVault.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerEncryptionProtectorClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.EncryptionProtectorNameCurrent, - armsynapse.EncryptionProtector{ - Properties: &armsynapse.EncryptionProtectorProperties{ - ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), - ServerKeyType: to.Ptr(armsynapse.ServerKeyTypeAzureKeyVault), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerEncryptionProtectorList.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerEncryptionProtectorClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("wsg-7398", - "testWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorRevalidate.json -func ExampleWorkspaceManagedSQLServerEncryptionProtectorClient_BeginRevalidate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerEncryptionProtectorClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRevalidate(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.EncryptionProtectorNameCurrent, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverextendedblobauditingpolicies_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverextendedblobauditingpolicies_client_test.go deleted file mode 100644 index 7468578ea007..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverextendedblobauditingpolicies_client_test.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlExtendedServerBlobAuditingSettings.json -func ExampleWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.BlobAuditingPolicyNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerExtendedBlobAuditingSettingsWithAllParameters.json -func ExampleWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.BlobAuditingPolicyNameDefault, - armsynapse.ExtendedServerBlobAuditingPolicy{ - Properties: &armsynapse.ExtendedServerBlobAuditingPolicyProperties{ - AuditActionsAndGroups: []*string{ - to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), - to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), - to.Ptr("BATCH_COMPLETED_GROUP")}, - IsAzureMonitorTargetEnabled: to.Ptr(true), - IsStorageSecondaryKeyInUse: to.Ptr(false), - PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), - RetentionDays: to.Ptr[int32](6), - State: to.Ptr(armsynapse.BlobAuditingPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerExtendedBlobAuditingSettings.json -func ExampleWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient_NewListByWorkspacePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerExtendedBlobAuditingPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByWorkspacePager("wsg-7398", - "testWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverrecoverablesqlpools_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverrecoverablesqlpools_client_test.go deleted file mode 100644 index dd2d47b6e80e..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverrecoverablesqlpools_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerRecoverableSqlPool.json -func ExampleWorkspaceManagedSQLServerRecoverableSQLPoolsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("wsg-7398", - "testWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerRecoverableSqlPool.json -func ExampleWorkspaceManagedSQLServerRecoverableSQLPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerRecoverableSQLPoolsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "wsg-7398", - "testWorkspace", - "recoverableSqlpools-1235", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserversecurityalertpolicy_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserversecurityalertpolicy_client_test.go deleted file mode 100644 index 4c6ad9c740f0..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserversecurityalertpolicy_client_test.go +++ /dev/null @@ -1,108 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerSecurityAlertPolicy.json -func ExampleWorkspaceManagedSQLServerSecurityAlertPolicyClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerSecurityAlertPolicyClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.SecurityAlertPolicyNameAutoGeneratedDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerSecurityAlertWithAllParameters.json -func ExampleWorkspaceManagedSQLServerSecurityAlertPolicyClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerSecurityAlertPolicyClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.SecurityAlertPolicyNameAutoGeneratedDefault, - armsynapse.ServerSecurityAlertPolicy{ - Properties: &armsynapse.ServerSecurityAlertPolicyProperties{ - DisabledAlerts: []*string{ - to.Ptr("Access_Anomaly"), - to.Ptr("Usage_Anomaly")}, - EmailAccountAdmins: to.Ptr(true), - EmailAddresses: []*string{ - to.Ptr("testSecurityAlert@microsoft.com")}, - RetentionDays: to.Ptr[int32](5), - State: to.Ptr(armsynapse.SecurityAlertPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), - StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerSecurityAlertPolicies.json -func ExampleWorkspaceManagedSQLServerSecurityAlertPolicyClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerSecurityAlertPolicyClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("wsg-7398", - "testWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverusages_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverusages_client_test.go deleted file mode 100644 index ae1dd4a79fd2..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlserverusages_client_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerUsages.json -func ExampleWorkspaceManagedSQLServerUsagesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerUsagesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("wsg-7398", - "testWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlservervulnerabilityassessments_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlservervulnerabilityassessments_client_test.go deleted file mode 100644 index 5212684aff48..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacemanagedsqlservervulnerabilityassessments_client_test.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerVulnerabilityAssessment.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.VulnerabilityAssessmentNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceManagedSqlServerVulnerabilityAssessmentWithAllParameters.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.VulnerabilityAssessmentNameDefault, - armsynapse.ServerVulnerabilityAssessment{ - Properties: &armsynapse.ServerVulnerabilityAssessmentProperties{ - RecurringScans: &armsynapse.VulnerabilityAssessmentRecurringScansProperties{ - EmailSubscriptionAdmins: to.Ptr(true), - Emails: []*string{ - to.Ptr("email1@mail.com"), - to.Ptr("email2@mail.com")}, - IsEnabled: to.Ptr(true), - }, - StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), - StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceManagedSqlServerVulnerabilityAssessment.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "wsg-7398", - "testWorkspace", - armsynapse.VulnerabilityAssessmentNameDefault, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerVulnerabilityAssessmentPolicies.json -func ExampleWorkspaceManagedSQLServerVulnerabilityAssessmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceManagedSQLServerVulnerabilityAssessmentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("wsg-7398", - "testWorkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspaces_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspaces_client_test.go deleted file mode 100644 index 12cf79448ae6..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspaces_client_test.go +++ /dev/null @@ -1,261 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspacesInResourceGroup.json -func ExampleWorkspacesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("resourceGroup1", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspace.json -func ExampleWorkspacesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "resourceGroup1", - "workspace1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateWorkspace.json -func ExampleWorkspacesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "resourceGroup1", - "workspace1", - armsynapse.WorkspacePatchInfo{ - Identity: &armsynapse.ManagedIdentity{ - Type: to.Ptr(armsynapse.ResourceIdentityTypeSystemAssigned), - }, - Properties: &armsynapse.WorkspacePatchProperties{ - Encryption: &armsynapse.EncryptionDetails{ - Cmk: &armsynapse.CustomerManagedKeyDetails{ - Key: &armsynapse.WorkspaceKeyDetails{ - Name: to.Ptr("default"), - KeyVaultURL: to.Ptr("https://vault.azure.net/keys/key1"), - }, - }, - }, - ManagedVirtualNetworkSettings: &armsynapse.ManagedVirtualNetworkSettings{ - AllowedAADTenantIDsForLinking: []*string{ - to.Ptr("740239CE-A25B-485B-86A0-262F29F6EBDB")}, - LinkedAccessCheckOnTargetResource: to.Ptr(false), - PreventDataExfiltration: to.Ptr(false), - }, - PublicNetworkAccess: to.Ptr(armsynapse.WorkspacePublicNetworkAccessEnabled), - PurviewConfiguration: &armsynapse.PurviewConfiguration{ - PurviewResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1"), - }, - SQLAdministratorLoginPassword: to.Ptr("password"), - WorkspaceRepositoryConfiguration: &armsynapse.WorkspaceRepositoryConfiguration{ - Type: to.Ptr("FactoryGitHubConfiguration"), - AccountName: to.Ptr("adifferentacount"), - CollaborationBranch: to.Ptr("master"), - HostName: to.Ptr(""), - ProjectName: to.Ptr("myproject"), - RepositoryName: to.Ptr("myrepository"), - RootFolder: to.Ptr("/"), - }, - }, - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspace.json -func ExampleWorkspacesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "resourceGroup1", - "workspace1", - armsynapse.Workspace{ - Location: to.Ptr("East US"), - Tags: map[string]*string{ - "key": to.Ptr("value"), - }, - Identity: &armsynapse.ManagedIdentity{ - Type: to.Ptr(armsynapse.ResourceIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armsynapse.UserAssignedManagedIdentity{ - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1": {}, - }, - }, - Properties: &armsynapse.WorkspaceProperties{ - CspWorkspaceAdminProperties: &armsynapse.CspWorkspaceAdminProperties{ - InitialWorkspaceAdminObjectID: to.Ptr("6c20646f-8050-49ec-b3b1-80a0e58e454d"), - }, - DefaultDataLakeStorage: &armsynapse.DataLakeStorageAccountDetails{ - AccountURL: to.Ptr("https://accountname.dfs.core.windows.net"), - Filesystem: to.Ptr("default"), - }, - Encryption: &armsynapse.EncryptionDetails{ - Cmk: &armsynapse.CustomerManagedKeyDetails{ - KekIdentity: &armsynapse.KekIdentityProperties{ - UseSystemAssignedIdentity: false, - UserAssignedIdentity: to.Ptr("/subscriptions/b64d7b94-73e7-4d36-94b2-7764ea3fd74a/resourcegroups/SynapseCI/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"), - }, - Key: &armsynapse.WorkspaceKeyDetails{ - Name: to.Ptr("default"), - KeyVaultURL: to.Ptr("https://vault.azure.net/keys/key1"), - }, - }, - }, - ManagedResourceGroupName: to.Ptr("workspaceManagedResourceGroupUnique"), - ManagedVirtualNetwork: to.Ptr("default"), - ManagedVirtualNetworkSettings: &armsynapse.ManagedVirtualNetworkSettings{ - AllowedAADTenantIDsForLinking: []*string{ - to.Ptr("740239CE-A25B-485B-86A0-262F29F6EBDB")}, - LinkedAccessCheckOnTargetResource: to.Ptr(false), - PreventDataExfiltration: to.Ptr(false), - }, - PublicNetworkAccess: to.Ptr(armsynapse.WorkspacePublicNetworkAccessEnabled), - PurviewConfiguration: &armsynapse.PurviewConfiguration{ - PurviewResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1"), - }, - SQLAdministratorLogin: to.Ptr("login"), - SQLAdministratorLoginPassword: to.Ptr("password"), - WorkspaceRepositoryConfiguration: &armsynapse.WorkspaceRepositoryConfiguration{ - Type: to.Ptr("FactoryGitHubConfiguration"), - AccountName: to.Ptr("mygithubaccount"), - CollaborationBranch: to.Ptr("master"), - HostName: to.Ptr(""), - ProjectName: to.Ptr("myproject"), - RepositoryName: to.Ptr("myrepository"), - RootFolder: to.Ptr("/"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspace.json -func ExampleWorkspacesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "resourceGroup1", - "workspace1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspacesInSubscription.json -func ExampleWorkspacesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacesqlaadadmins_client_test.go b/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacesqlaadadmins_client_test.go deleted file mode 100644 index a2928f2f528f..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/ze_generated_example_workspacesqlaadadmins_client_test.go +++ /dev/null @@ -1,98 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceAadAdmin.json -func ExampleWorkspaceSQLAADAdminsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceSQLAADAdminsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "resourceGroup1", - "workspace1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspaceAadAdmin.json -func ExampleWorkspaceSQLAADAdminsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceSQLAADAdminsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "resourceGroup1", - "workspace1", - armsynapse.WorkspaceAADAdminInfo{ - Properties: &armsynapse.AADAdminProperties{ - AdministratorType: to.Ptr("ActiveDirectory"), - Login: to.Ptr("bob@contoso.com"), - Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceAadAdmin.json -func ExampleWorkspaceSQLAADAdminsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armsynapse.NewWorkspaceSQLAADAdminsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "resourceGroup1", - "workspace1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_models_serde.go b/sdk/resourcemanager/synapse/armsynapse/zz_generated_models_serde.go deleted file mode 100644 index 497b6df5d0bf..000000000000 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_models_serde.go +++ /dev/null @@ -1,3312 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armsynapse - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationProperties. -func (a AttachedDatabaseConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "attachedDatabaseNames", a.AttachedDatabaseNames) - populate(objectMap, "databaseName", a.DatabaseName) - populate(objectMap, "defaultPrincipalsModificationKind", a.DefaultPrincipalsModificationKind) - populate(objectMap, "clusterResourceId", a.KustoPoolResourceID) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "tableLevelSharingProperties", a.TableLevelSharingProperties) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthenticationProperties. -func (a AzureADOnlyAuthenticationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureADOnlyAuthentication", a.AzureADOnlyAuthentication) - populateTimeRFC3339(objectMap, "creationDate", a.CreationDate) - populate(objectMap, "state", a.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureADOnlyAuthenticationProperties. -func (a *AzureADOnlyAuthenticationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureADOnlyAuthentication": - err = unpopulate(val, "AzureADOnlyAuthentication", &a.AzureADOnlyAuthentication) - delete(rawMsg, key) - case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &a.CreationDate) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &a.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BigDataPoolPatchInfo. -func (b BigDataPoolPatchInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", b.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BigDataPoolResourceInfo. -func (b BigDataPoolResourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BigDataPoolResourceProperties. -func (b BigDataPoolResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoPause", b.AutoPause) - populate(objectMap, "autoScale", b.AutoScale) - populate(objectMap, "cacheSize", b.CacheSize) - populateTimeRFC3339(objectMap, "creationDate", b.CreationDate) - populate(objectMap, "customLibraries", b.CustomLibraries) - populate(objectMap, "defaultSparkLogFolder", b.DefaultSparkLogFolder) - populate(objectMap, "dynamicExecutorAllocation", b.DynamicExecutorAllocation) - populate(objectMap, "isComputeIsolationEnabled", b.IsComputeIsolationEnabled) - populateTimeRFC3339(objectMap, "lastSucceededTimestamp", b.LastSucceededTimestamp) - populate(objectMap, "libraryRequirements", b.LibraryRequirements) - populate(objectMap, "nodeCount", b.NodeCount) - populate(objectMap, "nodeSize", b.NodeSize) - populate(objectMap, "nodeSizeFamily", b.NodeSizeFamily) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "sessionLevelPackagesEnabled", b.SessionLevelPackagesEnabled) - populate(objectMap, "sparkConfigProperties", b.SparkConfigProperties) - populate(objectMap, "sparkEventsFolder", b.SparkEventsFolder) - populate(objectMap, "sparkVersion", b.SparkVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BigDataPoolResourceProperties. -func (b *BigDataPoolResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoPause": - err = unpopulate(val, "AutoPause", &b.AutoPause) - delete(rawMsg, key) - case "autoScale": - err = unpopulate(val, "AutoScale", &b.AutoScale) - delete(rawMsg, key) - case "cacheSize": - err = unpopulate(val, "CacheSize", &b.CacheSize) - delete(rawMsg, key) - case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &b.CreationDate) - delete(rawMsg, key) - case "customLibraries": - err = unpopulate(val, "CustomLibraries", &b.CustomLibraries) - delete(rawMsg, key) - case "defaultSparkLogFolder": - err = unpopulate(val, "DefaultSparkLogFolder", &b.DefaultSparkLogFolder) - delete(rawMsg, key) - case "dynamicExecutorAllocation": - err = unpopulate(val, "DynamicExecutorAllocation", &b.DynamicExecutorAllocation) - delete(rawMsg, key) - case "isComputeIsolationEnabled": - err = unpopulate(val, "IsComputeIsolationEnabled", &b.IsComputeIsolationEnabled) - delete(rawMsg, key) - case "lastSucceededTimestamp": - err = unpopulateTimeRFC3339(val, "LastSucceededTimestamp", &b.LastSucceededTimestamp) - delete(rawMsg, key) - case "libraryRequirements": - err = unpopulate(val, "LibraryRequirements", &b.LibraryRequirements) - delete(rawMsg, key) - case "nodeCount": - err = unpopulate(val, "NodeCount", &b.NodeCount) - delete(rawMsg, key) - case "nodeSize": - err = unpopulate(val, "NodeSize", &b.NodeSize) - delete(rawMsg, key) - case "nodeSizeFamily": - err = unpopulate(val, "NodeSizeFamily", &b.NodeSizeFamily) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "sessionLevelPackagesEnabled": - err = unpopulate(val, "SessionLevelPackagesEnabled", &b.SessionLevelPackagesEnabled) - delete(rawMsg, key) - case "sparkConfigProperties": - err = unpopulate(val, "SparkConfigProperties", &b.SparkConfigProperties) - delete(rawMsg, key) - case "sparkEventsFolder": - err = unpopulate(val, "SparkEventsFolder", &b.SparkEventsFolder) - delete(rawMsg, key) - case "sparkVersion": - err = unpopulate(val, "SparkVersion", &b.SparkVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CmdkeySetup. -func (c CmdkeySetup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["type"] = "CmdkeySetup" - populate(objectMap, "typeProperties", c.TypeProperties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CmdkeySetup. -func (c *CmdkeySetup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "typeProperties": - err = unpopulate(val, "TypeProperties", &c.TypeProperties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CmdkeySetupTypeProperties. -func (c CmdkeySetupTypeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "password", c.Password) - populate(objectMap, "targetName", &c.TargetName) - populate(objectMap, "userName", &c.UserName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CmdkeySetupTypeProperties. -func (c *CmdkeySetupTypeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "password": - c.Password, err = unmarshalSecretBaseClassification(val) - delete(rawMsg, key) - case "targetName": - err = unpopulate(val, "TargetName", &c.TargetName) - delete(rawMsg, key) - case "userName": - err = unpopulate(val, "UserName", &c.UserName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComponentSetup. -func (c ComponentSetup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["type"] = "ComponentSetup" - populate(objectMap, "typeProperties", c.TypeProperties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentSetup. -func (c *ComponentSetup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "typeProperties": - err = unpopulate(val, "TypeProperties", &c.TypeProperties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataConnection. -func (d DataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - objectMap["kind"] = d.Kind - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionListResult. -func (d *DataConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - d.Value, err = unmarshalDataConnectionClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidation. -func (d DataConnectionValidation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataConnectionName", d.DataConnectionName) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidation. -func (d *DataConnectionValidation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataConnectionName": - err = unpopulate(val, "DataConnectionName", &d.DataConnectionName) - delete(rawMsg, key) - case "properties": - d.Properties, err = unmarshalDataConnectionClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Database. -func (d Database) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - objectMap["kind"] = d.Kind - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult. -func (d *DatabaseListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - d.Value, err = unmarshalDatabaseClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariableSetup. -func (e EnvironmentVariableSetup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["type"] = "EnvironmentVariableSetup" - populate(objectMap, "typeProperties", e.TypeProperties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariableSetup. -func (e *EnvironmentVariableSetup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - case "typeProperties": - err = unpopulate(val, "TypeProperties", &e.TypeProperties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventGridDataConnection. -func (e EventGridDataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - objectMap["kind"] = DataConnectionKindEventGrid - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "systemData", e.SystemData) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridDataConnection. -func (e *EventGridDataConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &e.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventHubConnectionProperties. -func (e EventHubConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "compression", e.Compression) - populate(objectMap, "consumerGroup", e.ConsumerGroup) - populate(objectMap, "dataFormat", e.DataFormat) - populate(objectMap, "eventHubResourceId", e.EventHubResourceID) - populate(objectMap, "eventSystemProperties", e.EventSystemProperties) - populate(objectMap, "managedIdentityResourceId", e.ManagedIdentityResourceID) - populate(objectMap, "mappingRuleName", e.MappingRuleName) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "tableName", e.TableName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EventHubDataConnection. -func (e EventHubDataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - objectMap["kind"] = DataConnectionKindEventHub - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "systemData", e.SystemData) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubDataConnection. -func (e *EventHubDataConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &e.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExtendedSQLPoolBlobAuditingPolicyProperties. -func (e ExtendedSQLPoolBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auditActionsAndGroups", e.AuditActionsAndGroups) - populate(objectMap, "isAzureMonitorTargetEnabled", e.IsAzureMonitorTargetEnabled) - populate(objectMap, "isStorageSecondaryKeyInUse", e.IsStorageSecondaryKeyInUse) - populate(objectMap, "predicateExpression", e.PredicateExpression) - populate(objectMap, "queueDelayMs", e.QueueDelayMs) - populate(objectMap, "retentionDays", e.RetentionDays) - populate(objectMap, "state", e.State) - populate(objectMap, "storageAccountAccessKey", e.StorageAccountAccessKey) - populate(objectMap, "storageAccountSubscriptionId", e.StorageAccountSubscriptionID) - populate(objectMap, "storageEndpoint", e.StorageEndpoint) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicyProperties. -func (e ExtendedServerBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auditActionsAndGroups", e.AuditActionsAndGroups) - populate(objectMap, "isAzureMonitorTargetEnabled", e.IsAzureMonitorTargetEnabled) - populate(objectMap, "isDevopsAuditEnabled", e.IsDevopsAuditEnabled) - populate(objectMap, "isStorageSecondaryKeyInUse", e.IsStorageSecondaryKeyInUse) - populate(objectMap, "predicateExpression", e.PredicateExpression) - populate(objectMap, "queueDelayMs", e.QueueDelayMs) - populate(objectMap, "retentionDays", e.RetentionDays) - populate(objectMap, "state", e.State) - populate(objectMap, "storageAccountAccessKey", e.StorageAccountAccessKey) - populate(objectMap, "storageAccountSubscriptionId", e.StorageAccountSubscriptionID) - populate(objectMap, "storageEndpoint", e.StorageEndpoint) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntime. -func (i IntegrationRuntime) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", i.Description) - objectMap["type"] = i.Type - if i.AdditionalProperties != nil { - for key, val := range i.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntime. -func (i *IntegrationRuntime) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &i.Description) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeComputeProperties. -func (i IntegrationRuntimeComputeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataFlowProperties", i.DataFlowProperties) - populate(objectMap, "location", i.Location) - populate(objectMap, "maxParallelExecutionsPerNode", i.MaxParallelExecutionsPerNode) - populate(objectMap, "nodeSize", i.NodeSize) - populate(objectMap, "numberOfNodes", i.NumberOfNodes) - populate(objectMap, "vNetProperties", i.VNetProperties) - if i.AdditionalProperties != nil { - for key, val := range i.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeComputeProperties. -func (i *IntegrationRuntimeComputeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataFlowProperties": - err = unpopulate(val, "DataFlowProperties", &i.DataFlowProperties) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &i.Location) - delete(rawMsg, key) - case "maxParallelExecutionsPerNode": - err = unpopulate(val, "MaxParallelExecutionsPerNode", &i.MaxParallelExecutionsPerNode) - delete(rawMsg, key) - case "nodeSize": - err = unpopulate(val, "NodeSize", &i.NodeSize) - delete(rawMsg, key) - case "numberOfNodes": - err = unpopulate(val, "NumberOfNodes", &i.NumberOfNodes) - delete(rawMsg, key) - case "vNetProperties": - err = unpopulate(val, "VNetProperties", &i.VNetProperties) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeConnectionInfo. -func (i *IntegrationRuntimeConnectionInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hostServiceUri": - err = unpopulate(val, "HostServiceURI", &i.HostServiceURI) - delete(rawMsg, key) - case "identityCertThumbprint": - err = unpopulate(val, "IdentityCertThumbprint", &i.IdentityCertThumbprint) - delete(rawMsg, key) - case "isIdentityCertExprired": - err = unpopulate(val, "IsIdentityCertExprired", &i.IsIdentityCertExprired) - delete(rawMsg, key) - case "publicKey": - err = unpopulate(val, "PublicKey", &i.PublicKey) - delete(rawMsg, key) - case "serviceToken": - err = unpopulate(val, "ServiceToken", &i.ServiceToken) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &i.Version) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeDataFlowProperties. -func (i IntegrationRuntimeDataFlowProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cleanup", i.Cleanup) - populate(objectMap, "computeType", i.ComputeType) - populate(objectMap, "coreCount", i.CoreCount) - populate(objectMap, "timeToLive", i.TimeToLive) - if i.AdditionalProperties != nil { - for key, val := range i.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeDataFlowProperties. -func (i *IntegrationRuntimeDataFlowProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cleanup": - err = unpopulate(val, "Cleanup", &i.Cleanup) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &i.ComputeType) - delete(rawMsg, key) - case "coreCount": - err = unpopulate(val, "CoreCount", &i.CoreCount) - delete(rawMsg, key) - case "timeToLive": - err = unpopulate(val, "TimeToLive", &i.TimeToLive) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeNodeMonitoringData. -func (i *IntegrationRuntimeNodeMonitoringData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availableMemoryInMB": - err = unpopulate(val, "AvailableMemoryInMB", &i.AvailableMemoryInMB) - delete(rawMsg, key) - case "cpuUtilization": - err = unpopulate(val, "CPUUtilization", &i.CPUUtilization) - delete(rawMsg, key) - case "concurrentJobsLimit": - err = unpopulate(val, "ConcurrentJobsLimit", &i.ConcurrentJobsLimit) - delete(rawMsg, key) - case "concurrentJobsRunning": - err = unpopulate(val, "ConcurrentJobsRunning", &i.ConcurrentJobsRunning) - delete(rawMsg, key) - case "maxConcurrentJobs": - err = unpopulate(val, "MaxConcurrentJobs", &i.MaxConcurrentJobs) - delete(rawMsg, key) - case "nodeName": - err = unpopulate(val, "NodeName", &i.NodeName) - delete(rawMsg, key) - case "receivedBytes": - err = unpopulate(val, "ReceivedBytes", &i.ReceivedBytes) - delete(rawMsg, key) - case "sentBytes": - err = unpopulate(val, "SentBytes", &i.SentBytes) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeResource. -func (i IntegrationRuntimeResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeResource. -func (i *IntegrationRuntimeResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - i.Properties, err = unmarshalIntegrationRuntimeClassification(val) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeSsisCatalogInfo. -func (i IntegrationRuntimeSsisCatalogInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "catalogAdminPassword", i.CatalogAdminPassword) - populate(objectMap, "catalogAdminUserName", i.CatalogAdminUserName) - populate(objectMap, "catalogPricingTier", i.CatalogPricingTier) - populate(objectMap, "catalogServerEndpoint", i.CatalogServerEndpoint) - if i.AdditionalProperties != nil { - for key, val := range i.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeSsisCatalogInfo. -func (i *IntegrationRuntimeSsisCatalogInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "catalogAdminPassword": - err = unpopulate(val, "CatalogAdminPassword", &i.CatalogAdminPassword) - delete(rawMsg, key) - case "catalogAdminUserName": - err = unpopulate(val, "CatalogAdminUserName", &i.CatalogAdminUserName) - delete(rawMsg, key) - case "catalogPricingTier": - err = unpopulate(val, "CatalogPricingTier", &i.CatalogPricingTier) - delete(rawMsg, key) - case "catalogServerEndpoint": - err = unpopulate(val, "CatalogServerEndpoint", &i.CatalogServerEndpoint) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeSsisProperties. -func (i IntegrationRuntimeSsisProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "catalogInfo", i.CatalogInfo) - populate(objectMap, "customSetupScriptProperties", i.CustomSetupScriptProperties) - populate(objectMap, "dataProxyProperties", i.DataProxyProperties) - populate(objectMap, "edition", i.Edition) - populate(objectMap, "expressCustomSetupProperties", i.ExpressCustomSetupProperties) - populate(objectMap, "licenseType", i.LicenseType) - if i.AdditionalProperties != nil { - for key, val := range i.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeSsisProperties. -func (i *IntegrationRuntimeSsisProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "catalogInfo": - err = unpopulate(val, "CatalogInfo", &i.CatalogInfo) - delete(rawMsg, key) - case "customSetupScriptProperties": - err = unpopulate(val, "CustomSetupScriptProperties", &i.CustomSetupScriptProperties) - delete(rawMsg, key) - case "dataProxyProperties": - err = unpopulate(val, "DataProxyProperties", &i.DataProxyProperties) - delete(rawMsg, key) - case "edition": - err = unpopulate(val, "Edition", &i.Edition) - delete(rawMsg, key) - case "expressCustomSetupProperties": - i.ExpressCustomSetupProperties, err = unmarshalCustomSetupBaseClassificationArray(val) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &i.LicenseType) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeStatus. -func (i *IntegrationRuntimeStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataFactoryName": - err = unpopulate(val, "DataFactoryName", &i.DataFactoryName) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &i.State) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeStatusResponse. -func (i *IntegrationRuntimeStatusResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - i.Properties, err = unmarshalIntegrationRuntimeStatusClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeVNetProperties. -func (i IntegrationRuntimeVNetProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "publicIPs", i.PublicIPs) - populate(objectMap, "subnet", i.Subnet) - populate(objectMap, "subnetId", i.SubnetID) - populate(objectMap, "vNetId", i.VNetID) - if i.AdditionalProperties != nil { - for key, val := range i.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntegrationRuntimeVNetProperties. -func (i *IntegrationRuntimeVNetProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "publicIPs": - err = unpopulate(val, "PublicIPs", &i.PublicIPs) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &i.Subnet) - delete(rawMsg, key) - case "subnetId": - err = unpopulate(val, "SubnetID", &i.SubnetID) - delete(rawMsg, key) - case "vNetId": - err = unpopulate(val, "VNetID", &i.VNetID) - delete(rawMsg, key) - default: - if i.AdditionalProperties == nil { - i.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - i.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IotHubConnectionProperties. -func (i IotHubConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "consumerGroup", i.ConsumerGroup) - populate(objectMap, "dataFormat", i.DataFormat) - populate(objectMap, "eventSystemProperties", i.EventSystemProperties) - populate(objectMap, "iotHubResourceId", i.IotHubResourceID) - populate(objectMap, "mappingRuleName", i.MappingRuleName) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "sharedAccessPolicyName", i.SharedAccessPolicyName) - populate(objectMap, "tableName", i.TableName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IotHubDataConnection. -func (i IotHubDataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", i.ID) - objectMap["kind"] = DataConnectionKindIotHub - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "systemData", i.SystemData) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IotHubDataConnection. -func (i *IotHubDataConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &i.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &i.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &i.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KustoPool. -func (k KustoPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", k.Etag) - populate(objectMap, "id", k.ID) - populate(objectMap, "location", k.Location) - populate(objectMap, "name", k.Name) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "sku", k.SKU) - populate(objectMap, "systemData", k.SystemData) - populate(objectMap, "tags", k.Tags) - populate(objectMap, "type", k.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KustoPoolUpdate. -func (k KustoPoolUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", k.ID) - populate(objectMap, "name", k.Name) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "sku", k.SKU) - populate(objectMap, "tags", k.Tags) - populate(objectMap, "type", k.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LanguageExtensionsList. -func (l LanguageExtensionsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LibraryInfo. -func (l LibraryInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerName", l.ContainerName) - populate(objectMap, "creatorId", l.CreatorID) - populate(objectMap, "name", l.Name) - populate(objectMap, "path", l.Path) - populate(objectMap, "provisioningStatus", l.ProvisioningStatus) - populate(objectMap, "type", l.Type) - populateTimeRFC3339(objectMap, "uploadedTimestamp", l.UploadedTimestamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LibraryInfo. -func (l *LibraryInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerName": - err = unpopulate(val, "ContainerName", &l.ContainerName) - delete(rawMsg, key) - case "creatorId": - err = unpopulate(val, "CreatorID", &l.CreatorID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &l.Path) - delete(rawMsg, key) - case "provisioningStatus": - err = unpopulate(val, "ProvisioningStatus", &l.ProvisioningStatus) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &l.Type) - delete(rawMsg, key) - case "uploadedTimestamp": - err = unpopulateTimeRFC3339(val, "UploadedTimestamp", &l.UploadedTimestamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LibraryRequirements. -func (l LibraryRequirements) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "content", l.Content) - populate(objectMap, "filename", l.Filename) - populateTimeRFC3339(objectMap, "time", l.Time) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LibraryRequirements. -func (l *LibraryRequirements) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "content": - err = unpopulate(val, "Content", &l.Content) - delete(rawMsg, key) - case "filename": - err = unpopulate(val, "Filename", &l.Filename) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &l.Time) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LicensedComponentSetupTypeProperties. -func (l LicensedComponentSetupTypeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "componentName", l.ComponentName) - populate(objectMap, "licenseKey", l.LicenseKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LicensedComponentSetupTypeProperties. -func (l *LicensedComponentSetupTypeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "componentName": - err = unpopulate(val, "ComponentName", &l.ComponentName) - delete(rawMsg, key) - case "licenseKey": - l.LicenseKey, err = unmarshalSecretBaseClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedIntegrationRuntime. -func (l *LinkedIntegrationRuntime) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createTime": - err = unpopulateTimeRFC3339(val, "CreateTime", &l.CreateTime) - delete(rawMsg, key) - case "dataFactoryLocation": - err = unpopulate(val, "DataFactoryLocation", &l.DataFactoryLocation) - delete(rawMsg, key) - case "dataFactoryName": - err = unpopulate(val, "DataFactoryName", &l.DataFactoryName) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &l.SubscriptionID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LinkedIntegrationRuntimeKeyAuthorization. -func (l LinkedIntegrationRuntimeKeyAuthorization) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authorizationType"] = "Key" - populate(objectMap, "key", l.Key) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedIntegrationRuntimeKeyAuthorization. -func (l *LinkedIntegrationRuntimeKeyAuthorization) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationType": - err = unpopulate(val, "AuthorizationType", &l.AuthorizationType) - delete(rawMsg, key) - case "key": - err = unpopulate(val, "Key", &l.Key) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LinkedIntegrationRuntimeRbacAuthorization. -func (l LinkedIntegrationRuntimeRbacAuthorization) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authorizationType"] = "RBAC" - populate(objectMap, "resourceId", l.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedIntegrationRuntimeRbacAuthorization. -func (l *LinkedIntegrationRuntimeRbacAuthorization) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationType": - err = unpopulate(val, "AuthorizationType", &l.AuthorizationType) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &l.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowOptionsProperties. -func (m MaintenanceWindowOptionsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowMultipleMaintenanceWindowsPerCycle", m.AllowMultipleMaintenanceWindowsPerCycle) - populate(objectMap, "defaultDurationInMinutes", m.DefaultDurationInMinutes) - populate(objectMap, "isEnabled", m.IsEnabled) - populate(objectMap, "maintenanceWindowCycles", m.MaintenanceWindowCycles) - populate(objectMap, "minCycles", m.MinCycles) - populate(objectMap, "minDurationInMinutes", m.MinDurationInMinutes) - populate(objectMap, "timeGranularityInMinutes", m.TimeGranularityInMinutes) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowsProperties. -func (m MaintenanceWindowsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "timeRanges", m.TimeRanges) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedIdentity. -func (m ManagedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntime. -func (m ManagedIntegrationRuntime) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", m.Description) - populate(objectMap, "managedVirtualNetwork", m.ManagedVirtualNetwork) - populate(objectMap, "state", m.State) - objectMap["type"] = IntegrationRuntimeTypeManaged - populate(objectMap, "typeProperties", m.TypeProperties) - if m.AdditionalProperties != nil { - for key, val := range m.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntime. -func (m *ManagedIntegrationRuntime) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "managedVirtualNetwork": - err = unpopulate(val, "ManagedVirtualNetwork", &m.ManagedVirtualNetwork) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &m.State) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - case "typeProperties": - err = unpopulate(val, "TypeProperties", &m.TypeProperties) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeError. -func (m *ManagedIntegrationRuntimeError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &m.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &m.Message) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &m.Parameters) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &m.Time) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeNode. -func (m *ManagedIntegrationRuntimeNode) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errors": - err = unpopulate(val, "Errors", &m.Errors) - delete(rawMsg, key) - case "nodeId": - err = unpopulate(val, "NodeID", &m.NodeID) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeOperationResult. -func (m *ManagedIntegrationRuntimeOperationResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activityId": - err = unpopulate(val, "ActivityID", &m.ActivityID) - delete(rawMsg, key) - case "errorCode": - err = unpopulate(val, "ErrorCode", &m.ErrorCode) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &m.Parameters) - delete(rawMsg, key) - case "result": - err = unpopulate(val, "Result", &m.Result) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeStatus. -func (m *ManagedIntegrationRuntimeStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataFactoryName": - err = unpopulate(val, "DataFactoryName", &m.DataFactoryName) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &m.State) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - case "typeProperties": - err = unpopulate(val, "TypeProperties", &m.TypeProperties) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIntegrationRuntimeStatusTypeProperties. -func (m *ManagedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createTime": - err = unpopulateTimeRFC3339(val, "CreateTime", &m.CreateTime) - delete(rawMsg, key) - case "lastOperation": - err = unpopulate(val, "LastOperation", &m.LastOperation) - delete(rawMsg, key) - case "nodes": - err = unpopulate(val, "Nodes", &m.Nodes) - delete(rawMsg, key) - case "otherErrors": - err = unpopulate(val, "OtherErrors", &m.OtherErrors) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedVirtualNetworkSettings. -func (m ManagedVirtualNetworkSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAadTenantIdsForLinking", m.AllowedAADTenantIDsForLinking) - populate(objectMap, "linkedAccessCheckOnTargetResource", m.LinkedAccessCheckOnTargetResource) - populate(objectMap, "preventDataExfiltration", m.PreventDataExfiltration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResource. -func (o *OperationResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &o.Error) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "percentComplete": - err = unpopulate(val, "PercentComplete", &o.PercentComplete) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkHub. -func (p PrivateLinkHub) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkHubPatchInfo. -func (p PrivateLinkHubPatchInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkHubProperties. -func (p PrivateLinkHubProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateEndpointConnections", p.PrivateEndpointConnections) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QueryInterval. -func (q *QueryInterval) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "executionCount": - err = unpopulate(val, "ExecutionCount", &q.ExecutionCount) - delete(rawMsg, key) - case "intervalStartTime": - err = unpopulateTimeRFC3339(val, "IntervalStartTime", &q.IntervalStartTime) - delete(rawMsg, key) - case "metrics": - err = unpopulate(val, "Metrics", &q.Metrics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReadOnlyFollowingDatabase. -func (r ReadOnlyFollowingDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - objectMap["kind"] = KindReadOnlyFollowing - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReadOnlyFollowingDatabase. -func (r *ReadOnlyFollowingDatabase) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &r.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabase. -func (r ReadWriteDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - objectMap["kind"] = KindReadWrite - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabase. -func (r *ReadWriteDatabase) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &r.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdateList. -func (r RecommendedSensitivityLabelUpdateList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "operations", r.Operations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RecoverableSQLPoolProperties. -func (r RecoverableSQLPoolProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "edition", r.Edition) - populate(objectMap, "elasticPoolName", r.ElasticPoolName) - populateTimeRFC3339(objectMap, "lastAvailableBackupDate", r.LastAvailableBackupDate) - populate(objectMap, "serviceLevelObjective", r.ServiceLevelObjective) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableSQLPoolProperties. -func (r *RecoverableSQLPoolProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "edition": - err = unpopulate(val, "Edition", &r.Edition) - delete(rawMsg, key) - case "elasticPoolName": - err = unpopulate(val, "ElasticPoolName", &r.ElasticPoolName) - delete(rawMsg, key) - case "lastAvailableBackupDate": - err = unpopulateTimeRFC3339(val, "LastAvailableBackupDate", &r.LastAvailableBackupDate) - delete(rawMsg, key) - case "serviceLevelObjective": - err = unpopulate(val, "ServiceLevelObjective", &r.ServiceLevelObjective) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplaceAllIPFirewallRulesRequest. -func (r ReplaceAllIPFirewallRulesRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipFirewallRules", r.IPFirewallRules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationLinkProperties. -func (r ReplicationLinkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isTerminationAllowed", r.IsTerminationAllowed) - populate(objectMap, "partnerDatabase", r.PartnerDatabase) - populate(objectMap, "partnerLocation", r.PartnerLocation) - populate(objectMap, "partnerRole", r.PartnerRole) - populate(objectMap, "partnerServer", r.PartnerServer) - populate(objectMap, "percentComplete", r.PercentComplete) - populate(objectMap, "replicationMode", r.ReplicationMode) - populate(objectMap, "replicationState", r.ReplicationState) - populate(objectMap, "role", r.Role) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLinkProperties. -func (r *ReplicationLinkProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isTerminationAllowed": - err = unpopulate(val, "IsTerminationAllowed", &r.IsTerminationAllowed) - delete(rawMsg, key) - case "partnerDatabase": - err = unpopulate(val, "PartnerDatabase", &r.PartnerDatabase) - delete(rawMsg, key) - case "partnerLocation": - err = unpopulate(val, "PartnerLocation", &r.PartnerLocation) - delete(rawMsg, key) - case "partnerRole": - err = unpopulate(val, "PartnerRole", &r.PartnerRole) - delete(rawMsg, key) - case "partnerServer": - err = unpopulate(val, "PartnerServer", &r.PartnerServer) - delete(rawMsg, key) - case "percentComplete": - err = unpopulate(val, "PercentComplete", &r.PercentComplete) - delete(rawMsg, key) - case "replicationMode": - err = unpopulate(val, "ReplicationMode", &r.ReplicationMode) - delete(rawMsg, key) - case "replicationState": - err = unpopulate(val, "ReplicationState", &r.ReplicationState) - delete(rawMsg, key) - case "role": - err = unpopulate(val, "Role", &r.Role) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RestorableDroppedSQLPoolProperties. -func (r RestorableDroppedSQLPoolProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "creationDate", r.CreationDate) - populate(objectMap, "databaseName", r.DatabaseName) - populateTimeRFC3339(objectMap, "deletionDate", r.DeletionDate) - populateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) - populate(objectMap, "edition", r.Edition) - populate(objectMap, "elasticPoolName", r.ElasticPoolName) - populate(objectMap, "maxSizeBytes", r.MaxSizeBytes) - populate(objectMap, "serviceLevelObjective", r.ServiceLevelObjective) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedSQLPoolProperties. -func (r *RestorableDroppedSQLPoolProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &r.CreationDate) - delete(rawMsg, key) - case "databaseName": - err = unpopulate(val, "DatabaseName", &r.DatabaseName) - delete(rawMsg, key) - case "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &r.DeletionDate) - delete(rawMsg, key) - case "earliestRestoreDate": - err = unpopulateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) - delete(rawMsg, key) - case "edition": - err = unpopulate(val, "Edition", &r.Edition) - delete(rawMsg, key) - case "elasticPoolName": - err = unpopulate(val, "ElasticPoolName", &r.ElasticPoolName) - delete(rawMsg, key) - case "maxSizeBytes": - err = unpopulate(val, "MaxSizeBytes", &r.MaxSizeBytes) - delete(rawMsg, key) - case "serviceLevelObjective": - err = unpopulate(val, "ServiceLevelObjective", &r.ServiceLevelObjective) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RestorePointProperties. -func (r RestorePointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "earliestRestoreDate", r.EarliestRestoreDate) - populateTimeRFC3339(objectMap, "restorePointCreationDate", r.RestorePointCreationDate) - populate(objectMap, "restorePointLabel", r.RestorePointLabel) - populate(objectMap, "restorePointType", r.RestorePointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointProperties. -func (r *RestorePointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "earliestRestoreDate": - err = unpopulateTimeRFC3339(val, "EarliestRestoreDate", &r.EarliestRestoreDate) - delete(rawMsg, key) - case "restorePointCreationDate": - err = unpopulateTimeRFC3339(val, "RestorePointCreationDate", &r.RestorePointCreationDate) - delete(rawMsg, key) - case "restorePointLabel": - err = unpopulate(val, "RestorePointLabel", &r.RestorePointLabel) - delete(rawMsg, key) - case "restorePointType": - err = unpopulate(val, "RestorePointType", &r.RestorePointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SQLPool. -func (s SQLPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SQLPoolBlobAuditingPolicyProperties. -func (s SQLPoolBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auditActionsAndGroups", s.AuditActionsAndGroups) - populate(objectMap, "isAzureMonitorTargetEnabled", s.IsAzureMonitorTargetEnabled) - populate(objectMap, "isStorageSecondaryKeyInUse", s.IsStorageSecondaryKeyInUse) - populate(objectMap, "retentionDays", s.RetentionDays) - populate(objectMap, "state", s.State) - populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) - populate(objectMap, "storageAccountSubscriptionId", s.StorageAccountSubscriptionID) - populate(objectMap, "storageEndpoint", s.StorageEndpoint) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SQLPoolOperationProperties. -func (s SQLPoolOperationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "databaseName", s.DatabaseName) - populate(objectMap, "description", s.Description) - populate(objectMap, "errorCode", s.ErrorCode) - populate(objectMap, "errorDescription", s.ErrorDescription) - populate(objectMap, "errorSeverity", s.ErrorSeverity) - populateTimeRFC3339(objectMap, "estimatedCompletionTime", s.EstimatedCompletionTime) - populate(objectMap, "isCancellable", s.IsCancellable) - populate(objectMap, "isUserError", s.IsUserError) - populate(objectMap, "operation", s.Operation) - populate(objectMap, "operationFriendlyName", s.OperationFriendlyName) - populate(objectMap, "percentComplete", s.PercentComplete) - populate(objectMap, "serverName", s.ServerName) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) - populate(objectMap, "state", s.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolOperationProperties. -func (s *SQLPoolOperationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "databaseName": - err = unpopulate(val, "DatabaseName", &s.DatabaseName) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "errorCode": - err = unpopulate(val, "ErrorCode", &s.ErrorCode) - delete(rawMsg, key) - case "errorDescription": - err = unpopulate(val, "ErrorDescription", &s.ErrorDescription) - delete(rawMsg, key) - case "errorSeverity": - err = unpopulate(val, "ErrorSeverity", &s.ErrorSeverity) - delete(rawMsg, key) - case "estimatedCompletionTime": - err = unpopulateTimeRFC3339(val, "EstimatedCompletionTime", &s.EstimatedCompletionTime) - delete(rawMsg, key) - case "isCancellable": - err = unpopulate(val, "IsCancellable", &s.IsCancellable) - delete(rawMsg, key) - case "isUserError": - err = unpopulate(val, "IsUserError", &s.IsUserError) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &s.Operation) - delete(rawMsg, key) - case "operationFriendlyName": - err = unpopulate(val, "OperationFriendlyName", &s.OperationFriendlyName) - delete(rawMsg, key) - case "percentComplete": - err = unpopulate(val, "PercentComplete", &s.PercentComplete) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &s.ServerName) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SQLPoolPatchInfo. -func (s SQLPoolPatchInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "location", s.Location) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "tags", s.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SQLPoolResourceProperties. -func (s SQLPoolResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "collation", s.Collation) - populate(objectMap, "createMode", s.CreateMode) - populateTimeRFC3339(objectMap, "creationDate", s.CreationDate) - populate(objectMap, "maxSizeBytes", s.MaxSizeBytes) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "recoverableDatabaseId", s.RecoverableDatabaseID) - populateTimeRFC3339(objectMap, "restorePointInTime", s.RestorePointInTime) - populateTimeRFC3339(objectMap, "sourceDatabaseDeletionDate", s.SourceDatabaseDeletionDate) - populate(objectMap, "sourceDatabaseId", s.SourceDatabaseID) - populate(objectMap, "status", s.Status) - populate(objectMap, "storageAccountType", s.StorageAccountType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolResourceProperties. -func (s *SQLPoolResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "collation": - err = unpopulate(val, "Collation", &s.Collation) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &s.CreateMode) - delete(rawMsg, key) - case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &s.CreationDate) - delete(rawMsg, key) - case "maxSizeBytes": - err = unpopulate(val, "MaxSizeBytes", &s.MaxSizeBytes) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "recoverableDatabaseId": - err = unpopulate(val, "RecoverableDatabaseID", &s.RecoverableDatabaseID) - delete(rawMsg, key) - case "restorePointInTime": - err = unpopulateTimeRFC3339(val, "RestorePointInTime", &s.RestorePointInTime) - delete(rawMsg, key) - case "sourceDatabaseDeletionDate": - err = unpopulateTimeRFC3339(val, "SourceDatabaseDeletionDate", &s.SourceDatabaseDeletionDate) - delete(rawMsg, key) - case "sourceDatabaseId": - err = unpopulate(val, "SourceDatabaseID", &s.SourceDatabaseID) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - case "storageAccountType": - err = unpopulate(val, "StorageAccountType", &s.StorageAccountType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SQLPoolUsage. -func (s *SQLPoolUsage) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &s.CurrentValue) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &s.DisplayName) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &s.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) - delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &s.ResourceName) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &s.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentRuleBaselineItem. -func (s SQLPoolVulnerabilityAssessmentRuleBaselineItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "result", s.Result) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SQLPoolVulnerabilityAssessmentRuleBaselineProperties. -func (s SQLPoolVulnerabilityAssessmentRuleBaselineProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "baselineResults", s.BaselineResults) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SecureString. -func (s SecureString) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["type"] = "SecureString" - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecureString. -func (s *SecureString) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityAlertPolicyProperties. -func (s SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) - populate(objectMap, "disabledAlerts", s.DisabledAlerts) - populate(objectMap, "emailAccountAdmins", s.EmailAccountAdmins) - populate(objectMap, "emailAddresses", s.EmailAddresses) - populate(objectMap, "retentionDays", s.RetentionDays) - populate(objectMap, "state", s.State) - populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) - populate(objectMap, "storageEndpoint", s.StorageEndpoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAlertPolicyProperties. -func (s *SecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) - delete(rawMsg, key) - case "disabledAlerts": - err = unpopulate(val, "DisabledAlerts", &s.DisabledAlerts) - delete(rawMsg, key) - case "emailAccountAdmins": - err = unpopulate(val, "EmailAccountAdmins", &s.EmailAccountAdmins) - delete(rawMsg, key) - case "emailAddresses": - err = unpopulate(val, "EmailAddresses", &s.EmailAddresses) - delete(rawMsg, key) - case "retentionDays": - err = unpopulate(val, "RetentionDays", &s.RetentionDays) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "storageAccountAccessKey": - err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) - delete(rawMsg, key) - case "storageEndpoint": - err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntime. -func (s SelfHostedIntegrationRuntime) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", s.Description) - objectMap["type"] = IntegrationRuntimeTypeSelfHosted - populate(objectMap, "typeProperties", s.TypeProperties) - if s.AdditionalProperties != nil { - for key, val := range s.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntime. -func (s *SelfHostedIntegrationRuntime) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "typeProperties": - err = unpopulate(val, "TypeProperties", &s.TypeProperties) - delete(rawMsg, key) - default: - if s.AdditionalProperties == nil { - s.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - s.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntimeNode. -func (s *SelfHostedIntegrationRuntimeNode) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capabilities": - err = unpopulate(val, "Capabilities", &s.Capabilities) - delete(rawMsg, key) - case "concurrentJobsLimit": - err = unpopulate(val, "ConcurrentJobsLimit", &s.ConcurrentJobsLimit) - delete(rawMsg, key) - case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &s.ExpiryTime) - delete(rawMsg, key) - case "hostServiceUri": - err = unpopulate(val, "HostServiceURI", &s.HostServiceURI) - delete(rawMsg, key) - case "isActiveDispatcher": - err = unpopulate(val, "IsActiveDispatcher", &s.IsActiveDispatcher) - delete(rawMsg, key) - case "lastConnectTime": - err = unpopulateTimeRFC3339(val, "LastConnectTime", &s.LastConnectTime) - delete(rawMsg, key) - case "lastEndUpdateTime": - err = unpopulateTimeRFC3339(val, "LastEndUpdateTime", &s.LastEndUpdateTime) - delete(rawMsg, key) - case "lastStartTime": - err = unpopulateTimeRFC3339(val, "LastStartTime", &s.LastStartTime) - delete(rawMsg, key) - case "lastStartUpdateTime": - err = unpopulateTimeRFC3339(val, "LastStartUpdateTime", &s.LastStartUpdateTime) - delete(rawMsg, key) - case "lastStopTime": - err = unpopulateTimeRFC3339(val, "LastStopTime", &s.LastStopTime) - delete(rawMsg, key) - case "lastUpdateResult": - err = unpopulate(val, "LastUpdateResult", &s.LastUpdateResult) - delete(rawMsg, key) - case "machineName": - err = unpopulate(val, "MachineName", &s.MachineName) - delete(rawMsg, key) - case "maxConcurrentJobs": - err = unpopulate(val, "MaxConcurrentJobs", &s.MaxConcurrentJobs) - delete(rawMsg, key) - case "nodeName": - err = unpopulate(val, "NodeName", &s.NodeName) - delete(rawMsg, key) - case "registerTime": - err = unpopulateTimeRFC3339(val, "RegisterTime", &s.RegisterTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &s.Version) - delete(rawMsg, key) - case "versionStatus": - err = unpopulate(val, "VersionStatus", &s.VersionStatus) - delete(rawMsg, key) - default: - if s.AdditionalProperties == nil { - s.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - s.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntimeStatus. -func (s *SelfHostedIntegrationRuntimeStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataFactoryName": - err = unpopulate(val, "DataFactoryName", &s.DataFactoryName) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "typeProperties": - err = unpopulate(val, "TypeProperties", &s.TypeProperties) - delete(rawMsg, key) - default: - if s.AdditionalProperties == nil { - s.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - s.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntimeStatusTypeProperties. -func (s *SelfHostedIntegrationRuntimeStatusTypeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoUpdate": - err = unpopulate(val, "AutoUpdate", &s.AutoUpdate) - delete(rawMsg, key) - case "autoUpdateETA": - err = unpopulateTimeRFC3339(val, "AutoUpdateETA", &s.AutoUpdateETA) - delete(rawMsg, key) - case "capabilities": - err = unpopulate(val, "Capabilities", &s.Capabilities) - delete(rawMsg, key) - case "createTime": - err = unpopulateTimeRFC3339(val, "CreateTime", &s.CreateTime) - delete(rawMsg, key) - case "internalChannelEncryption": - err = unpopulate(val, "InternalChannelEncryption", &s.InternalChannelEncryption) - delete(rawMsg, key) - case "latestVersion": - err = unpopulate(val, "LatestVersion", &s.LatestVersion) - delete(rawMsg, key) - case "links": - err = unpopulate(val, "Links", &s.Links) - delete(rawMsg, key) - case "localTimeZoneOffset": - err = unpopulate(val, "LocalTimeZoneOffset", &s.LocalTimeZoneOffset) - delete(rawMsg, key) - case "newerVersions": - err = unpopulate(val, "NewerVersions", &s.NewerVersions) - delete(rawMsg, key) - case "nodeCommunicationChannelEncryptionMode": - err = unpopulate(val, "NodeCommunicationChannelEncryptionMode", &s.NodeCommunicationChannelEncryptionMode) - delete(rawMsg, key) - case "nodes": - err = unpopulate(val, "Nodes", &s.Nodes) - delete(rawMsg, key) - case "pushedVersion": - err = unpopulate(val, "PushedVersion", &s.PushedVersion) - delete(rawMsg, key) - case "scheduledUpdateDate": - err = unpopulateTimeRFC3339(val, "ScheduledUpdateDate", &s.ScheduledUpdateDate) - delete(rawMsg, key) - case "serviceRegion": - err = unpopulate(val, "ServiceRegion", &s.ServiceRegion) - delete(rawMsg, key) - case "serviceUrls": - err = unpopulate(val, "ServiceUrls", &s.ServiceUrls) - delete(rawMsg, key) - case "taskQueueId": - err = unpopulate(val, "TaskQueueID", &s.TaskQueueID) - delete(rawMsg, key) - case "updateDelayOffset": - err = unpopulate(val, "UpdateDelayOffset", &s.UpdateDelayOffset) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &s.Version) - delete(rawMsg, key) - case "versionStatus": - err = unpopulate(val, "VersionStatus", &s.VersionStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntimeTypeProperties. -func (s SelfHostedIntegrationRuntimeTypeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "linkedInfo", s.LinkedInfo) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SelfHostedIntegrationRuntimeTypeProperties. -func (s *SelfHostedIntegrationRuntimeTypeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "linkedInfo": - s.LinkedInfo, err = unmarshalLinkedIntegrationRuntimeTypeClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdateList. -func (s SensitivityLabelUpdateList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "operations", s.Operations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicyProperties. -func (s ServerBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auditActionsAndGroups", s.AuditActionsAndGroups) - populate(objectMap, "isAzureMonitorTargetEnabled", s.IsAzureMonitorTargetEnabled) - populate(objectMap, "isDevopsAuditEnabled", s.IsDevopsAuditEnabled) - populate(objectMap, "isStorageSecondaryKeyInUse", s.IsStorageSecondaryKeyInUse) - populate(objectMap, "queueDelayMs", s.QueueDelayMs) - populate(objectMap, "retentionDays", s.RetentionDays) - populate(objectMap, "state", s.State) - populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) - populate(objectMap, "storageAccountSubscriptionId", s.StorageAccountSubscriptionID) - populate(objectMap, "storageEndpoint", s.StorageEndpoint) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicyProperties. -func (s ServerSecurityAlertPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "creationTime", s.CreationTime) - populate(objectMap, "disabledAlerts", s.DisabledAlerts) - populate(objectMap, "emailAccountAdmins", s.EmailAccountAdmins) - populate(objectMap, "emailAddresses", s.EmailAddresses) - populate(objectMap, "retentionDays", s.RetentionDays) - populate(objectMap, "state", s.State) - populate(objectMap, "storageAccountAccessKey", s.StorageAccountAccessKey) - populate(objectMap, "storageEndpoint", s.StorageEndpoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicyProperties. -func (s *ServerSecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &s.CreationTime) - delete(rawMsg, key) - case "disabledAlerts": - err = unpopulate(val, "DisabledAlerts", &s.DisabledAlerts) - delete(rawMsg, key) - case "emailAccountAdmins": - err = unpopulate(val, "EmailAccountAdmins", &s.EmailAccountAdmins) - delete(rawMsg, key) - case "emailAddresses": - err = unpopulate(val, "EmailAddresses", &s.EmailAddresses) - delete(rawMsg, key) - case "retentionDays": - err = unpopulate(val, "RetentionDays", &s.RetentionDays) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "storageAccountAccessKey": - err = unpopulate(val, "StorageAccountAccessKey", &s.StorageAccountAccessKey) - delete(rawMsg, key) - case "storageEndpoint": - err = unpopulate(val, "StorageEndpoint", &s.StorageEndpoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServerUsage. -func (s *ServerUsage) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &s.CurrentValue) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &s.DisplayName) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &s.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &s.NextResetTime) - delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &s.ResourceName) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &s.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SparkConfigProperties. -func (s SparkConfigProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "configurationType", s.ConfigurationType) - populate(objectMap, "content", s.Content) - populate(objectMap, "filename", s.Filename) - populateTimeRFC3339(objectMap, "time", s.Time) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SparkConfigProperties. -func (s *SparkConfigProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "configurationType": - err = unpopulate(val, "ConfigurationType", &s.ConfigurationType) - delete(rawMsg, key) - case "content": - err = unpopulate(val, "Content", &s.Content) - delete(rawMsg, key) - case "filename": - err = unpopulate(val, "Filename", &s.Filename) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &s.Time) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SparkConfigurationInfo. -func (s SparkConfigurationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "annotations", s.Annotations) - populate(objectMap, "configs", s.Configs) - populateTimeRFC3339(objectMap, "created", s.Created) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "description", s.Description) - populate(objectMap, "notes", s.Notes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SparkConfigurationInfo. -func (s *SparkConfigurationInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "annotations": - err = unpopulate(val, "Annotations", &s.Annotations) - delete(rawMsg, key) - case "configs": - err = unpopulate(val, "Configs", &s.Configs) - delete(rawMsg, key) - case "created": - err = unpopulateTimeRFC3339(val, "Created", &s.Created) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "notes": - err = unpopulate(val, "Notes", &s.Notes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SsisEnvironment. -func (s *SsisEnvironment) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "folderId": - err = unpopulate(val, "FolderID", &s.FolderID) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "variables": - err = unpopulate(val, "Variables", &s.Variables) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SsisFolder. -func (s *SsisFolder) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SsisObjectMetadataListResponse. -func (s *SsisObjectMetadataListResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - s.Value, err = unmarshalSsisObjectMetadataClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SsisPackage. -func (s *SsisPackage) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "folderId": - err = unpopulate(val, "FolderID", &s.FolderID) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &s.Parameters) - delete(rawMsg, key) - case "projectId": - err = unpopulate(val, "ProjectID", &s.ProjectID) - delete(rawMsg, key) - case "projectVersion": - err = unpopulate(val, "ProjectVersion", &s.ProjectVersion) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SsisProject. -func (s *SsisProject) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "environmentRefs": - err = unpopulate(val, "EnvironmentRefs", &s.EnvironmentRefs) - delete(rawMsg, key) - case "folderId": - err = unpopulate(val, "FolderID", &s.FolderID) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &s.Parameters) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &s.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TableLevelSharingProperties. -func (t TableLevelSharingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "externalTablesToExclude", t.ExternalTablesToExclude) - populate(objectMap, "externalTablesToInclude", t.ExternalTablesToInclude) - populate(objectMap, "materializedViewsToExclude", t.MaterializedViewsToExclude) - populate(objectMap, "materializedViewsToInclude", t.MaterializedViewsToInclude) - populate(objectMap, "tablesToExclude", t.TablesToExclude) - populate(objectMap, "tablesToInclude", t.TablesToInclude) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TopQueries. -func (t *TopQueries) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aggregationFunction": - err = unpopulate(val, "AggregationFunction", &t.AggregationFunction) - delete(rawMsg, key) - case "executionType": - err = unpopulate(val, "ExecutionType", &t.ExecutionType) - delete(rawMsg, key) - case "intervalType": - err = unpopulate(val, "IntervalType", &t.IntervalType) - delete(rawMsg, key) - case "numberOfTopQueries": - err = unpopulate(val, "NumberOfTopQueries", &t.NumberOfTopQueries) - delete(rawMsg, key) - case "observationEndTime": - err = unpopulateTimeRFC3339(val, "ObservationEndTime", &t.ObservationEndTime) - delete(rawMsg, key) - case "observationStartTime": - err = unpopulateTimeRFC3339(val, "ObservationStartTime", &t.ObservationStartTime) - delete(rawMsg, key) - case "observedMetric": - err = unpopulate(val, "ObservedMetric", &t.ObservedMetric) - delete(rawMsg, key) - case "queries": - err = unpopulate(val, "Queries", &t.Queries) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrackedResource. -func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateIntegrationRuntimeNodeRequest. -func (u UpdateIntegrationRuntimeNodeRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "concurrentJobsLimit", u.ConcurrentJobsLimit) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateIntegrationRuntimeRequest. -func (u UpdateIntegrationRuntimeRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoUpdate", u.AutoUpdate) - populate(objectMap, "updateDelayOffset", u.UpdateDelayOffset) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentRecurringScansProperties. -func (v VulnerabilityAssessmentRecurringScansProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "emailSubscriptionAdmins", v.EmailSubscriptionAdmins) - populate(objectMap, "emails", v.Emails) - populate(objectMap, "isEnabled", v.IsEnabled) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordProperties. -func (v VulnerabilityAssessmentScanRecordProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endTime", v.EndTime) - populate(objectMap, "errors", v.Errors) - populate(objectMap, "numberOfFailedSecurityChecks", v.NumberOfFailedSecurityChecks) - populate(objectMap, "scanId", v.ScanID) - populateTimeRFC3339(objectMap, "startTime", v.StartTime) - populate(objectMap, "state", v.State) - populate(objectMap, "storageContainerPath", v.StorageContainerPath) - populate(objectMap, "triggerType", v.TriggerType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordProperties. -func (v *VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &v.EndTime) - delete(rawMsg, key) - case "errors": - err = unpopulate(val, "Errors", &v.Errors) - delete(rawMsg, key) - case "numberOfFailedSecurityChecks": - err = unpopulate(val, "NumberOfFailedSecurityChecks", &v.NumberOfFailedSecurityChecks) - delete(rawMsg, key) - case "scanId": - err = unpopulate(val, "ScanID", &v.ScanID) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &v.StartTime) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &v.State) - delete(rawMsg, key) - case "storageContainerPath": - err = unpopulate(val, "StorageContainerPath", &v.StorageContainerPath) - delete(rawMsg, key) - case "triggerType": - err = unpopulate(val, "TriggerType", &v.TriggerType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Workspace. -func (w Workspace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", w.ID) - populate(objectMap, "identity", w.Identity) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspacePatchInfo. -func (w WorkspacePatchInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "identity", w.Identity) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. -func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "adlaResourceId", w.AdlaResourceID) - populate(objectMap, "azureADOnlyAuthentication", w.AzureADOnlyAuthentication) - populate(objectMap, "connectivityEndpoints", w.ConnectivityEndpoints) - populate(objectMap, "cspWorkspaceAdminProperties", w.CspWorkspaceAdminProperties) - populate(objectMap, "defaultDataLakeStorage", w.DefaultDataLakeStorage) - populate(objectMap, "encryption", w.Encryption) - populate(objectMap, "extraProperties", w.ExtraProperties) - populate(objectMap, "managedResourceGroupName", w.ManagedResourceGroupName) - populate(objectMap, "managedVirtualNetwork", w.ManagedVirtualNetwork) - populate(objectMap, "managedVirtualNetworkSettings", w.ManagedVirtualNetworkSettings) - populate(objectMap, "privateEndpointConnections", w.PrivateEndpointConnections) - populate(objectMap, "provisioningState", w.ProvisioningState) - populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) - populate(objectMap, "purviewConfiguration", w.PurviewConfiguration) - populate(objectMap, "sqlAdministratorLogin", w.SQLAdministratorLogin) - populate(objectMap, "sqlAdministratorLoginPassword", w.SQLAdministratorLoginPassword) - populate(objectMap, "settings", w.Settings) - populate(objectMap, "trustedServiceBypassEnabled", w.TrustedServiceBypassEnabled) - populate(objectMap, "virtualNetworkProfile", w.VirtualNetworkProfile) - populate(objectMap, "workspaceRepositoryConfiguration", w.WorkspaceRepositoryConfiguration) - populate(objectMap, "workspaceUID", w.WorkspaceUID) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -}