From b7d86f0d223f47d46a8a46f8449147f53c2cc1b3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 15 Dec 2022 20:13:12 +0000 Subject: [PATCH] CodeGen from PR 2729 in test-repo-billy/azure-rest-api-specs Merge b9f356ab2ff3952571894dd712640b84a8cf7b52 into 7245d0f5cc01bf95df9d7ae893f252d4001b4ad7 --- .../synapse/armsynapse/CHANGELOG.md | 48 + .../synapse/armsynapse/autorest.md | 6 +- ...o => azureadonlyauthentications_client.go} | 2 +- ...pools_client.go => bigdatapools_client.go} | 2 +- ...zz_generated_constants.go => constants.go} | 97 +- ...lient.go => datamaskingpolicies_client.go} | 1 + ...s_client.go => datamaskingrules_client.go} | 2 +- ...ndedsqlpoolblobauditingpolicies_client.go} | 2 +- .../synapse/armsynapse/get_client.go | 190 + sdk/resourcemanager/synapse/armsynapse/go.mod | 14 +- sdk/resourcemanager/synapse/armsynapse/go.sum | 24 +- ...o => integrationruntimeauthkeys_client.go} | 1 + ...tegrationruntimeconnectioninfos_client.go} | 1 + ...> integrationruntimecredentials_client.go} | 1 + ...ntegrationruntimemonitoringdata_client.go} | 1 + ...integrationruntimenodeipaddress_client.go} | 1 + ...t.go => integrationruntimenodes_client.go} | 1 + ...ntegrationruntimeobjectmetadata_client.go} | 5 +- ...lient.go => integrationruntimes_client.go} | 6 +- ....go => integrationruntimestatus_client.go} | 1 + ...es_client.go => ipfirewallrules_client.go} | 2 +- ...enerated_keys_client.go => keys_client.go} | 2 +- ...ns_client.go => kustooperations_client.go} | 2 +- ...lattacheddatabaseconfigurations_client.go} | 2 +- ...nt.go => kustopoolchildresource_client.go} | 1 + ...ooldatabaseprincipalassignments_client.go} | 2 +- ...client.go => kustopooldatabases_client.go} | 2 +- ....go => kustopooldataconnections_client.go} | 2 +- ...> kustopoolprincipalassignments_client.go} | 2 +- .../kustopoolprivatelinkresources_client.go | 124 + ...topools_client.go => kustopools_client.go} | 5 +- ...ibraries_client.go => libraries_client.go} | 2 +- ...ed_library_client.go => library_client.go} | 1 + .../{zz_generated_models.go => models.go} | 152 +- .../synapse/armsynapse/models_serde.go | 12668 ++++++++++++++++ ...rations_client.go => operations_client.go} | 1 + ...phic_helpers.go => polymorphic_helpers.go} | 1 + ...o => privateendpointconnections_client.go} | 2 +- ...dpointconnectionsprivatelinkhub_client.go} | 2 +- ...vatelinkhubprivatelinkresources_client.go} | 2 +- ...bs_client.go => privatelinkhubs_client.go} | 3 +- ...ient.go => privatelinkresources_client.go} | 2 +- ...ed_response_types.go => response_types.go} | 69 +- ...go => restorabledroppedsqlpools_client.go} | 2 +- ...client.go => sparkconfiguration_client.go} | 1 + ...lient.go => sparkconfigurations_client.go} | 2 +- ... => sqlpoolblobauditingpolicies_client.go} | 2 +- ...mns_client.go => sqlpoolcolumns_client.go} | 1 + ...go => sqlpoolconnectionpolicies_client.go} | 1 + ...pooldatawarehouseuseractivities_client.go} | 1 + ....go => sqlpoolgeobackuppolicies_client.go} | 2 +- ...sqlpoolmaintenancewindowoptions_client.go} | 1 + ...go => sqlpoolmaintenancewindows_client.go} | 1 + ...o => sqlpoolmetadatasyncconfigs_client.go} | 5 +- ...t.go => sqlpooloperationresults_client.go} | 41 +- ..._client.go => sqlpooloperations_client.go} | 2 +- ...oolrecommendedsensitivitylabels_client.go} | 1 + ...t.go => sqlpoolreplicationlinks_client.go} | 2 +- ...ient.go => sqlpoolrestorepoints_client.go} | 2 +- ..._sqlpools_client.go => sqlpools_client.go} | 44 +- ...mas_client.go => sqlpoolschemas_client.go} | 2 +- ...=> sqlpoolsecurityalertpolicies_client.go} | 2 +- ....go => sqlpoolsensitivitylabels_client.go} | 3 +- ...lient.go => sqlpooltablecolumns_client.go} | 2 +- ...bles_client.go => sqlpooltables_client.go} | 2 +- ...lpooltransparentdataencryptions_client.go} | 2 +- ...ages_client.go => sqlpoolusages_client.go} | 2 +- ...rabilityassessmentrulebaselines_client.go} | 1 + ...sqlpoolvulnerabilityassessments_client.go} | 2 +- ...oolvulnerabilityassessmentscans_client.go} | 2 +- ...go => sqlpoolworkloadclassifier_client.go} | 2 +- ...ient.go => sqlpoolworkloadgroup_client.go} | 2 +- ...erated_time_rfc3339.go => time_rfc3339.go} | 1 + ...client.go => workspaceaadadmins_client.go} | 1 + ...nagedidentitysqlcontrolsettings_client.go} | 1 + ...edsqlserverblobauditingpolicies_client.go} | 2 +- ...rdedicatedsqlminimaltlssettings_client.go} | 2 +- ...gedsqlserverencryptionprotector_client.go} | 2 +- ...verextendedblobauditingpolicies_client.go} | 2 +- ...gedsqlserverrecoverablesqlpools_client.go} | 2 +- ...gedsqlserversecurityalertpolicy_client.go} | 2 +- ...workspacemanagedsqlserverusages_client.go} | 2 +- ...lservervulnerabilityassessments_client.go} | 2 +- ...kspaces_client.go => workspaces_client.go} | 3 +- ...ent.go => workspacesqlaadadmins_client.go} | 1 + ..._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, 13388 insertions(+), 10956 deletions(-) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_azureadonlyauthentications_client.go => azureadonlyauthentications_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_bigdatapools_client.go => bigdatapools_client.go} (99%) 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} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_datamaskingrules_client.go => datamaskingrules_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_extendedsqlpoolblobauditingpolicies_client.go => extendedsqlpoolblobauditingpolicies_client.go} (99%) create mode 100644 sdk/resourcemanager/synapse/armsynapse/get_client.go rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimeauthkeys_client.go => integrationruntimeauthkeys_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimeconnectioninfos_client.go => integrationruntimeconnectioninfos_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimecredentials_client.go => integrationruntimecredentials_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimemonitoringdata_client.go => integrationruntimemonitoringdata_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimenodeipaddress_client.go => integrationruntimenodeipaddress_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimenodes_client.go => integrationruntimenodes_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimeobjectmetadata_client.go => integrationruntimeobjectmetadata_client.go} (97%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimes_client.go => integrationruntimes_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_integrationruntimestatus_client.go => integrationruntimestatus_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_ipfirewallrules_client.go => ipfirewallrules_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_keys_client.go => keys_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustooperations_client.go => kustooperations_client.go} (98%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopoolattacheddatabaseconfigurations_client.go => kustopoolattacheddatabaseconfigurations_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopoolchildresource_client.go => kustopoolchildresource_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopooldatabaseprincipalassignments_client.go => kustopooldatabaseprincipalassignments_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopooldatabases_client.go => kustopooldatabases_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopooldataconnections_client.go => kustopooldataconnections_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopoolprincipalassignments_client.go => kustopoolprincipalassignments_client.go} (99%) create mode 100644 sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_kustopools_client.go => kustopools_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_libraries_client.go => libraries_client.go} (98%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_library_client.go => library_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_models.go => models.go} (97%) create mode 100644 sdk/resourcemanager/synapse/armsynapse/models_serde.go rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_operations_client.go => operations_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_polymorphic_helpers.go => polymorphic_helpers.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privateendpointconnections_client.go => privateendpointconnections_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privateendpointconnectionsprivatelinkhub_client.go => privateendpointconnectionsprivatelinkhub_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privatelinkhubprivatelinkresources_client.go => privatelinkhubprivatelinkresources_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privatelinkhubs_client.go => privatelinkhubs_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_privatelinkresources_client.go => privatelinkresources_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_response_types.go => response_types.go} (96%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_restorabledroppedsqlpools_client.go => restorabledroppedsqlpools_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sparkconfiguration_client.go => sparkconfiguration_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sparkconfigurations_client.go => sparkconfigurations_client.go} (98%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolblobauditingpolicies_client.go => sqlpoolblobauditingpolicies_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolcolumns_client.go => sqlpoolcolumns_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolconnectionpolicies_client.go => sqlpoolconnectionpolicies_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooldatawarehouseuseractivities_client.go => sqlpooldatawarehouseuseractivities_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolgeobackuppolicies_client.go => sqlpoolgeobackuppolicies_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolmaintenancewindowoptions_client.go => sqlpoolmaintenancewindowoptions_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolmaintenancewindows_client.go => sqlpoolmaintenancewindows_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolmetadatasyncconfigs_client.go => sqlpoolmetadatasyncconfigs_client.go} (98%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooloperationresults_client.go => sqlpooloperationresults_client.go} (75%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooloperations_client.go => sqlpooloperations_client.go} (98%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolrecommendedsensitivitylabels_client.go => sqlpoolrecommendedsensitivitylabels_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolreplicationlinks_client.go => sqlpoolreplicationlinks_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolrestorepoints_client.go => sqlpoolrestorepoints_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpools_client.go => sqlpools_client.go} (95%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolschemas_client.go => sqlpoolschemas_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolsecurityalertpolicies_client.go => sqlpoolsecurityalertpolicies_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolsensitivitylabels_client.go => sqlpoolsensitivitylabels_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooltablecolumns_client.go => sqlpooltablecolumns_client.go} (98%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooltables_client.go => sqlpooltables_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpooltransparentdataencryptions_client.go => sqlpooltransparentdataencryptions_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolusages_client.go => sqlpoolusages_client.go} (98%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolvulnerabilityassessmentrulebaselines_client.go => sqlpoolvulnerabilityassessmentrulebaselines_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolvulnerabilityassessments_client.go => sqlpoolvulnerabilityassessments_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolvulnerabilityassessmentscans_client.go => sqlpoolvulnerabilityassessmentscans_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolworkloadclassifier_client.go => sqlpoolworkloadclassifier_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_sqlpoolworkloadgroup_client.go => sqlpoolworkloadgroup_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_time_rfc3339.go => time_rfc3339.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspaceaadadmins_client.go => workspaceaadadmins_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedidentitysqlcontrolsettings_client.go => workspacemanagedidentitysqlcontrolsettings_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverblobauditingpolicies_client.go => workspacemanagedsqlserverblobauditingpolicies_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go => workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverencryptionprotector_client.go => workspacemanagedsqlserverencryptionprotector_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverextendedblobauditingpolicies_client.go => workspacemanagedsqlserverextendedblobauditingpolicies_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverrecoverablesqlpools_client.go => workspacemanagedsqlserverrecoverablesqlpools_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserversecurityalertpolicy_client.go => workspacemanagedsqlserversecurityalertpolicy_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlserverusages_client.go => workspacemanagedsqlserverusages_client.go} (98%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacemanagedsqlservervulnerabilityassessments_client.go => workspacemanagedsqlservervulnerabilityassessments_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspaces_client.go => workspaces_client.go} (99%) rename sdk/resourcemanager/synapse/armsynapse/{zz_generated_workspacesqlaadadmins_client.go => workspacesqlaadadmins_client.go} (99%) 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..a1493773a453 100644 --- a/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md +++ b/sdk/resourcemanager/synapse/armsynapse/CHANGELOG.md @@ -1,5 +1,53 @@ # Release History +## 0.6.0 (2022-12-15) +### Breaking Changes + +- Type of `ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity.DesiredState` has been changed from `*ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityDesiredState` to `*DesiredState` +- Type of `ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentity.ActualState` has been changed from `*ManagedIdentitySQLControlSettingsModelPropertiesGrantSQLControlToManagedIdentityActualState` to `*ActualState` +- 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.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 `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 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_azureadonlyauthentications_client.go rename to sdk/resourcemanager/synapse/armsynapse/azureadonlyauthentications_client.go index 40204f19763d..4d21ac9cf98f 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 @@ -188,7 +189,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_bigdatapools_client.go b/sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_bigdatapools_client.go rename to sdk/resourcemanager/synapse/armsynapse/bigdatapools_client.go index f65c5b48fdcd..27ce148958b3 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 @@ -261,7 +262,6 @@ 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. 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 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/datamaskingpolicies_client.go index edca8e449b69..f2c85143246c 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingrules_client.go b/sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_datamaskingrules_client.go rename to sdk/resourcemanager/synapse/armsynapse/datamaskingrules_client.go index ddb8094cc8aa..0109637c8f29 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 @@ -191,7 +192,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_extendedsqlpoolblobauditingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_extendedsqlpoolblobauditingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/extendedsqlpoolblobauditingpolicies_client.go index fab321633bb0..4127d2cfe0d9 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 @@ -182,7 +183,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/get_client.go b/sdk/resourcemanager/synapse/armsynapse/get_client.go new file mode 100644 index 000000000000..43e0f7aa732d --- /dev/null +++ b/sdk/resourcemanager/synapse/armsynapse/get_client.go @@ -0,0 +1,190 @@ +//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 +} + +// 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 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeauthkeys_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimeauthkeys_client.go index c8c792389e59..0d5c6596db30 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeconnectioninfos_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeconnectioninfos_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimeconnectioninfos_client.go index ea3d65d6300c..8d063bdfcd1b 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimecredentials_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimecredentials_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimecredentials_client.go index 5b27a4a9d43d..a42fd265ceb4 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimemonitoringdata_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimemonitoringdata_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimemonitoringdata_client.go index 0a0f53f3c077..ca6bd42b5e1b 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodeipaddress_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodeipaddress_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimenodeipaddress_client.go index 9fc8ee5ec19d..53548c3c7b90 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodes_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimenodes_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimenodes_client.go index c580ddc463e3..49f861a3f604 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeobjectmetadata_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go similarity index 97% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimeobjectmetadata_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimeobjectmetadata_client.go index 7ff9f7935c8a..8ef3a210a4c5 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 @@ -133,7 +134,9 @@ func (client *IntegrationRuntimeObjectMetadataClient) BeginRefresh(ctx context.C 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) } diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimes_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimes_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimes_client.go index b2780a1f0f30..03fb3de20bdb 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 @@ -395,7 +396,6 @@ 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. @@ -541,7 +541,9 @@ func (client *IntegrationRuntimesClient) BeginStart(ctx context.Context, resourc 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) } diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimestatus_client.go b/sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_integrationruntimestatus_client.go rename to sdk/resourcemanager/synapse/armsynapse/integrationruntimestatus_client.go index 184497b313fd..b53afd72017e 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_ipfirewallrules_client.go b/sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_ipfirewallrules_client.go rename to sdk/resourcemanager/synapse/armsynapse/ipfirewallrules_client.go index 8c615668ccb6..96026f895380 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 @@ -257,7 +258,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_keys_client.go b/sdk/resourcemanager/synapse/armsynapse/keys_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_keys_client.go rename to sdk/resourcemanager/synapse/armsynapse/keys_client.go index ceac39fe6b3f..8f96ac0ceedc 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 @@ -239,7 +240,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustooperations_client.go b/sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go similarity index 98% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustooperations_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustooperations_client.go index 09d862653e86..3ecb62f453a9 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 @@ -49,7 +50,6 @@ 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. func (client *KustoOperationsClient) NewListPager(options *KustoOperationsClientListOptions) *runtime.Pager[KustoOperationsClientListResponse] { diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolattacheddatabaseconfigurations_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolattacheddatabaseconfigurations_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopoolattacheddatabaseconfigurations_client.go index ac4cc6e08f32..35c0c133a1ee 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 @@ -269,7 +270,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolchildresource_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolchildresource_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopoolchildresource_client.go index e9cebb70db40..ba2632733180 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabaseprincipalassignments_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabaseprincipalassignments_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopooldatabaseprincipalassignments_client.go index 4a48ad9b64e8..0c0c74190f4e 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 @@ -352,7 +353,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabases_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldatabases_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopooldatabases_client.go index 40bd72299096..b52628cb5e0f 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 @@ -268,7 +269,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldataconnections_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopooldataconnections_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopooldataconnections_client.go index 3a6942e81e86..e6f1a86b7534 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 @@ -428,7 +429,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolprincipalassignments_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopoolprincipalassignments_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopoolprincipalassignments_client.go index 09ded771b7e4..5fc128921579 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 @@ -332,7 +333,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go b/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go new file mode 100644 index 000000000000..e34590dd9478 --- /dev/null +++ b/sdk/resourcemanager/synapse/armsynapse/kustopoolprivatelinkresources_client.go @@ -0,0 +1,124 @@ +//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.List +// 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 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_kustopools_client.go rename to sdk/resourcemanager/synapse/armsynapse/kustopools_client.go index 38ed14456f93..5c57ea3590d2 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 @@ -507,7 +508,6 @@ 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. @@ -576,7 +576,6 @@ 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. @@ -645,7 +644,6 @@ 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. func (client *KustoPoolsClient) NewListSKUsPager(options *KustoPoolsClientListSKUsOptions) *runtime.Pager[KustoPoolsClientListSKUsResponse] { @@ -698,7 +696,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_libraries_client.go b/sdk/resourcemanager/synapse/armsynapse/libraries_client.go similarity index 98% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_libraries_client.go rename to sdk/resourcemanager/synapse/armsynapse/libraries_client.go index 8fe333c60239..9c537a7c9c5a 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 @@ -55,7 +56,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_library_client.go b/sdk/resourcemanager/synapse/armsynapse/library_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_library_client.go rename to sdk/resourcemanager/synapse/armsynapse/library_client.go index 71502b259eaa..39b9b0bdea6a 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_models.go b/sdk/resourcemanager/synapse/armsynapse/models.go similarity index 97% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_models.go rename to sdk/resourcemanager/synapse/armsynapse/models.go index 27d2a5d6dd2a..91556128ceda 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 @@ -293,6 +294,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"` @@ -422,7 +426,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 +452,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"` @@ -581,7 +589,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"` } @@ -861,7 +870,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 +897,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"` @@ -1078,6 +1092,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. @@ -1491,6 +1524,16 @@ type GeoBackupPolicyProperties struct { StorageType *string `json:"storageType,omitempty" azure:"ro"` } +// 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. @@ -1806,6 +1849,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 interface{} `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 { @@ -1947,6 +2005,21 @@ 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 interface{} `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. @@ -2230,7 +2303,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"` } @@ -2387,6 +2461,30 @@ 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.List +// 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. @@ -2830,10 +2928,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. @@ -3439,6 +3537,12 @@ 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 @@ -3449,6 +3553,21 @@ 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. @@ -4300,10 +4419,11 @@ 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. @@ -4855,6 +4975,12 @@ 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 @@ -4870,11 +4996,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: @@ -5478,6 +5599,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"` diff --git a/sdk/resourcemanager/synapse/armsynapse/models_serde.go b/sdk/resourcemanager/synapse/armsynapse/models_serde.go new file mode 100644 index 000000000000..5999cbe12876 --- /dev/null +++ b/sdk/resourcemanager/synapse/armsynapse/models_serde.go @@ -0,0 +1,12668 @@ +//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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 AzureCapacity. +func (a AzureCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]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, "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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 CreateSQLPoolRestorePointDefinition. +func (c CreateSQLPoolRestorePointDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 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]interface{}) + 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]interface{}) + 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]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 DataConnectionValidationListResult. +func (d DataConnectionValidationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 EnvironmentVariableSetupTypeProperties. +func (e EnvironmentVariableSetupTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]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 ExtendedSQLPoolBlobAuditingPolicy. +func (e ExtendedSQLPoolBlobAuditingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 IntegrationRuntimeAuthKeys. +func (i IntegrationRuntimeAuthKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeConnectionInfo. +func (i IntegrationRuntimeConnectionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 IntegrationRuntimeCustomSetupScriptProperties. +func (i IntegrationRuntimeCustomSetupScriptProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeDataProxyProperties. +func (i IntegrationRuntimeDataProxyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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 IntegrationRuntimeListResponse. +func (i IntegrationRuntimeListResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 IntegrationRuntimeOperationStatus. +func (i IntegrationRuntimeOperationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type IntegrationRuntimeStatus. +func (i IntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 IntegrationRuntimeStatusResponse. +func (i IntegrationRuntimeStatusResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]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) +} + +// 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]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 KekIdentityProperties. +func (k KekIdentityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]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 LibraryListResponse. +func (l LibraryListResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 LibraryResource. +func (l LibraryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type LinkedIntegrationRuntime. +func (l LinkedIntegrationRuntime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 LinkedIntegrationRuntimeType. +func (l LinkedIntegrationRuntimeType) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeError. +func (m ManagedIntegrationRuntimeError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeManagedVirtualNetworkReference. +func (m ManagedIntegrationRuntimeManagedVirtualNetworkReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeOperationResult. +func (m ManagedIntegrationRuntimeOperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeStatus. +func (m ManagedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIntegrationRuntimeStatusTypeProperties. +func (m ManagedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]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 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 ReadOnlyFollowingDatabaseProperties. +func (r ReadOnlyFollowingDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 ReadWriteDatabaseProperties. +func (r ReadWriteDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 ReplaceAllFirewallRulesOperationResponse. +func (r ReplaceAllFirewallRulesOperationResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 RestorePoint. +func (r RestorePoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]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 SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type SQLPoolSchema. +func (s SQLPoolSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntimeNode. +func (s SelfHostedIntegrationRuntimeNode) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntimeStatus. +func (s SelfHostedIntegrationRuntimeStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type SelfHostedIntegrationRuntimeStatusTypeProperties. +func (s SelfHostedIntegrationRuntimeStatusTypeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]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 SensitivityLabel. +func (s SensitivityLabel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]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 +} + +// MarshalJSON implements the json.Marshaller interface for type ServerUsage. +func (s ServerUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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, "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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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 WorkloadClassifier. +func (w WorkloadClassifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]interface{}) + 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]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) +} + +// 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]interface{}) + 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]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 +} diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_operations_client.go b/sdk/resourcemanager/synapse/armsynapse/operations_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_operations_client.go rename to sdk/resourcemanager/synapse/armsynapse/operations_client.go index d7a94b995199..cc8d19f8490b 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_polymorphic_helpers.go b/sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_polymorphic_helpers.go rename to sdk/resourcemanager/synapse/armsynapse/polymorphic_helpers.go index 6c9ec057eebe..9c9c261c8cd5 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnections_client.go b/sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnections_client.go rename to sdk/resourcemanager/synapse/armsynapse/privateendpointconnections_client.go index e443ad9d9c16..7cd011d286eb 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 @@ -256,7 +257,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnectionsprivatelinkhub_client.go b/sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privateendpointconnectionsprivatelinkhub_client.go rename to sdk/resourcemanager/synapse/armsynapse/privateendpointconnectionsprivatelinkhub_client.go index 01a418bf2ec2..f6cdeeb00390 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 @@ -117,7 +118,6 @@ 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubprivatelinkresources_client.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubprivatelinkresources_client.go rename to sdk/resourcemanager/synapse/armsynapse/privatelinkhubprivatelinkresources_client.go index cedda6ffd143..53b3cecc182b 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 @@ -117,7 +118,6 @@ 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubs_client.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkhubs_client.go rename to sdk/resourcemanager/synapse/armsynapse/privatelinkhubs_client.go index eb7d90cdd38f..4dc822533cc7 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 @@ -232,7 +233,6 @@ 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. func (client *PrivateLinkHubsClient) NewListPager(options *PrivateLinkHubsClientListOptions) *runtime.Pager[PrivateLinkHubsClientListResponse] { @@ -291,7 +291,6 @@ 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkresources_client.go b/sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_privatelinkresources_client.go rename to sdk/resourcemanager/synapse/armsynapse/privatelinkresources_client.go index 5988548d93e6..80cac3a1b373 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 @@ -117,7 +118,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_response_types.go b/sdk/resourcemanager/synapse/armsynapse/response_types.go similarity index 96% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_response_types.go rename to sdk/resourcemanager/synapse/armsynapse/response_types.go index 496f3dfe15de..0f0c067ab4bc 100644 --- a/sdk/resourcemanager/synapse/armsynapse/zz_generated_response_types.go +++ b/sdk/resourcemanager/synapse/armsynapse/response_types.go @@ -5,11 +5,10 @@ // 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. type AzureADOnlyAuthenticationsClientCreateResponse struct { AzureADOnlyAuthentication @@ -32,13 +31,7 @@ type BigDataPoolsClientCreateOrUpdateResponse struct { // BigDataPoolsClientDeleteResponse contains the response from method BigDataPoolsClient.Delete. 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. @@ -96,6 +89,16 @@ type ExtendedSQLPoolBlobAuditingPoliciesClientListBySQLPoolResponse struct { ExtendedSQLPoolBlobAuditingPolicyListResult } +// 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.CreateOrUpdate. type IPFirewallRulesClientCreateOrUpdateResponse struct { IPFirewallRuleInfo @@ -103,13 +106,7 @@ type IPFirewallRulesClientCreateOrUpdateResponse struct { // IPFirewallRulesClientDeleteResponse contains the response from method IPFirewallRulesClient.Delete. 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. @@ -462,6 +459,11 @@ type KustoPoolPrincipalAssignmentsClientListResponse struct { ClusterPrincipalAssignmentListResult } +// KustoPoolPrivateLinkResourcesClientListResponse contains the response from method KustoPoolPrivateLinkResourcesClient.List. +type KustoPoolPrivateLinkResourcesClientListResponse struct { + PrivateLinkResources +} + // KustoPoolsClientAddLanguageExtensionsResponse contains the response from method KustoPoolsClient.AddLanguageExtensions. type KustoPoolsClientAddLanguageExtensionsResponse struct { // placeholder for future response values @@ -730,8 +732,7 @@ type SQLPoolMetadataSyncConfigsClientGetResponse struct { // SQLPoolOperationResultsClientGetLocationHeaderResultResponse contains the response from method SQLPoolOperationResultsClient.GetLocationHeaderResult. type SQLPoolOperationResultsClientGetLocationHeaderResultResponse struct { - // Anything - Interface interface{} + SQLPool } // SQLPoolOperationsClientListResponse contains the response from method SQLPoolOperationsClient.List. @@ -976,13 +977,7 @@ type SQLPoolsClientCreateResponse struct { // SQLPoolsClientDeleteResponse contains the response from method SQLPoolsClient.Delete. 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. @@ -997,13 +992,7 @@ type SQLPoolsClientListByWorkspaceResponse struct { // SQLPoolsClientPauseResponse contains the response from method SQLPoolsClient.Pause. 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. @@ -1013,13 +1002,7 @@ type SQLPoolsClientRenameResponse struct { // SQLPoolsClientResumeResponse contains the response from method SQLPoolsClient.Resume. 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. @@ -1199,13 +1182,7 @@ type WorkspacesClientCreateOrUpdateResponse struct { // WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.Delete. 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_restorabledroppedsqlpools_client.go b/sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_restorabledroppedsqlpools_client.go rename to sdk/resourcemanager/synapse/armsynapse/restorabledroppedsqlpools_client.go index 1e32ed0b4357..cf0cab64b5d0 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 @@ -117,7 +118,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfiguration_client.go b/sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfiguration_client.go rename to sdk/resourcemanager/synapse/armsynapse/sparkconfiguration_client.go index bfbc8912296b..590b5ebbd7f9 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfigurations_client.go b/sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go similarity index 98% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sparkconfigurations_client.go rename to sdk/resourcemanager/synapse/armsynapse/sparkconfigurations_client.go index 723b06a3b82e..012d807a2554 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 @@ -55,7 +56,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolblobauditingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolblobauditingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolblobauditingpolicies_client.go index 8b51de03f33a..f4ffcca1bfc8 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 @@ -182,7 +183,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolcolumns_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolcolumns_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolcolumns_client.go index 59dff98de894..62038ba3f866 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolconnectionpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolconnectionpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolconnectionpolicies_client.go index f54a34b17251..35336e188901 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooldatawarehouseuseractivities_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooldatawarehouseuseractivities_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooldatawarehouseuseractivities_client.go index 8cbb571ff86e..1beca777f2d5 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolgeobackuppolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolgeobackuppolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolgeobackuppolicies_client.go index f9d6a1a071a2..68cc6083bffa 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 @@ -190,7 +191,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindowoptions_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindowoptions_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindowoptions_client.go index 54889fce5661..32fd258c1cc1 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindows_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmaintenancewindows_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolmaintenancewindows_client.go index 3b936536d331..8c24564bfa9b 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmetadatasyncconfigs_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go similarity index 98% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolmetadatasyncconfigs_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolmetadatasyncconfigs_client.go index 583f36278de7..211e9014c92b 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 @@ -72,7 +73,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) @@ -134,7 +135,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 75% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooloperationresults_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooloperationresults_client.go index 9e81dd321ea2..03d2c1d09c98 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 @@ -54,32 +55,47 @@ func NewSQLPoolOperationResultsClient(subscriptionID string, credential azcore.T return client, nil } -// GetLocationHeaderResult - Get the status of a SQL pool operation +// 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 - SQLPoolOperationResultsClientGetLocationHeaderResultOptions contains the optional parameters for the SQLPoolOperationResultsClient.GetLocationHeaderResult +// options - SQLPoolOperationResultsClientBeginGetLocationHeaderResultOptions contains the optional parameters for the SQLPoolOperationResultsClient.BeginGetLocationHeaderResult // method. -func (client *SQLPoolOperationResultsClient) GetLocationHeaderResult(ctx context.Context, resourceGroupName string, workspaceName string, sqlPoolName string, operationID string, options *SQLPoolOperationResultsClientGetLocationHeaderResultOptions) (SQLPoolOperationResultsClientGetLocationHeaderResultResponse, error) { +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 +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 +127,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 98% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooloperations_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooloperations_client.go index a01af1648f09..c0a163de0806 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 @@ -55,7 +56,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrecommendedsensitivitylabels_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrecommendedsensitivitylabels_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolrecommendedsensitivitylabels_client.go index 7ac8b63e5c72..47b210d11c26 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolreplicationlinks_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolreplicationlinks_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolreplicationlinks_client.go index dfb77d0985a8..dd7b5a562606 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 @@ -122,7 +123,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrestorepoints_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolrestorepoints_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolrestorepoints_client.go index 35f8506e6d4a..b5cbbe0f8f75 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 @@ -250,7 +251,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpools_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go similarity index 95% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpools_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpools_client.go index 528526e8bf96..2b63afec1ebd 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 @@ -88,7 +89,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 @@ -255,7 +256,6 @@ 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. @@ -514,31 +514,46 @@ func (client *SQLPoolsClient) resumeCreateRequest(ctx context.Context, resourceG return req, nil } -// Update - Apply a partial update to a SQL pool +// 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 - 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) { +// 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 +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 +581,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 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolschemas_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolschemas_client.go index 712cac5627cf..18aa4c9b4edf 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 @@ -121,7 +122,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsecurityalertpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsecurityalertpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolsecurityalertpolicies_client.go index 25a631f70eb2..05b11bd00da6 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 @@ -190,7 +191,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsensitivitylabels_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolsensitivitylabels_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolsensitivitylabels_client.go index 8a88825f0e6d..cc9211592198 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 @@ -422,7 +423,6 @@ 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. @@ -500,7 +500,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltablecolumns_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go similarity index 98% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltablecolumns_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooltablecolumns_client.go index baa78e23aad4..5535c2bb0971 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 @@ -55,7 +56,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltables_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltables_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooltables_client.go index f2817e57de58..17d00247ec55 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 @@ -126,7 +127,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltransparentdataencryptions_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpooltransparentdataencryptions_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpooltransparentdataencryptions_client.go index 5aee0eafd4ce..eec1aedb07ad 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 @@ -190,7 +191,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolusages_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go similarity index 98% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolusages_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolusages_client.go index 5616fc07d591..698932e1a8ed 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 @@ -55,7 +56,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentrulebaselines_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentrulebaselines_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentrulebaselines_client.go index 098cca8b550c..047e55684304 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessments_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessments_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessments_client.go index 1019f30e7339..bc8d35d1db30 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 @@ -247,7 +248,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentscans_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolvulnerabilityassessmentscans_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolvulnerabilityassessmentscans_client.go index 5d0a21f6ddf0..03d53277be0a 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 @@ -276,7 +277,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadclassifier_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadclassifier_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadclassifier_client.go index afb9b3fbada2..1263ffac0390 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 @@ -283,7 +284,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadgroup_client.go b/sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_sqlpoolworkloadgroup_client.go rename to sdk/resourcemanager/synapse/armsynapse/sqlpoolworkloadgroup_client.go index e3370a925c9c..1b2af9f797fe 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 @@ -268,7 +269,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_time_rfc3339.go b/sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_time_rfc3339.go rename to sdk/resourcemanager/synapse/armsynapse/time_rfc3339.go index 66a34145e8a9..ceb3669b5d03 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaceaadadmins_client.go b/sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaceaadadmins_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspaceaadadmins_client.go index 8fa8fb39b3f1..600ff619be0c 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedidentitysqlcontrolsettings_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedidentitysqlcontrolsettings_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedidentitysqlcontrolsettings_client.go index 19b71db53ecd..632d59efd947 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverblobauditingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverblobauditingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverblobauditingpolicies_client.go index 6c856d002a9e..71f3f4ff5973 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 @@ -186,7 +187,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverdedicatedsqlminimaltlssettings_client.go index b48bf49c1882..d5dfa1401874 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 @@ -117,7 +118,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverencryptionprotector_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverencryptionprotector_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverencryptionprotector_client.go index 5e58019aa011..af6543039a4c 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 @@ -186,7 +187,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverextendedblobauditingpolicies_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverextendedblobauditingpolicies_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverextendedblobauditingpolicies_client.go index 1a1fe28469fb..ee0ae86a5566 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 @@ -186,7 +187,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverrecoverablesqlpools_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverrecoverablesqlpools_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverrecoverablesqlpools_client.go index 66eb42b7b82a..6fd73af13a25 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 @@ -117,7 +118,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserversecurityalertpolicy_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserversecurityalertpolicy_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserversecurityalertpolicy_client.go index d79ed3a78019..b5d3c3d27da6 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 @@ -186,7 +187,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverusages_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go similarity index 98% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlserverusages_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlserverusages_client.go index be5c0fe428cc..38bdffb3b888 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 @@ -55,7 +56,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlservervulnerabilityassessments_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacemanagedsqlservervulnerabilityassessments_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacemanagedsqlservervulnerabilityassessments_client.go index e38360ad2abe..8170985944ec 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 @@ -232,7 +233,6 @@ 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. diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaces_client.go b/sdk/resourcemanager/synapse/armsynapse/workspaces_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspaces_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspaces_client.go index 7e93015e47d5..1b3f16e9a44e 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 @@ -241,7 +242,6 @@ 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. func (client *WorkspacesClient) NewListPager(options *WorkspacesClientListOptions) *runtime.Pager[WorkspacesClientListResponse] { @@ -300,7 +300,6 @@ 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 diff --git a/sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacesqlaadadmins_client.go b/sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go similarity index 99% rename from sdk/resourcemanager/synapse/armsynapse/zz_generated_workspacesqlaadadmins_client.go rename to sdk/resourcemanager/synapse/armsynapse/workspacesqlaadadmins_client.go index 714ee6829437..745d2d80125d 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 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 -}