diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/CHANGELOG.md b/sdk/resourcemanager/databoxedge/armdataboxedge/CHANGELOG.md index a0181551fe4d..73fb73a4ced3 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/CHANGELOG.md +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/CHANGELOG.md @@ -1,5 +1,1466 @@ # Release History +## 0.2.0 (2022-01-21) +### Breaking Changes + +- Function `*BandwidthSchedulesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, BandwidthSchedule, *BandwidthSchedulesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, BandwidthSchedule, *BandwidthSchedulesClientBeginCreateOrUpdateOptions)` +- Function `*BandwidthSchedulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(BandwidthSchedulesCreateOrUpdatePollerResponse, error)` to `(BandwidthSchedulesClientCreateOrUpdatePollerResponse, error)` +- Function `*TriggersClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, TriggerClassification, *TriggersBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, TriggerClassification, *TriggersClientBeginCreateOrUpdateOptions)` +- Function `*TriggersClient.BeginCreateOrUpdate` return value(s) have been changed from `(TriggersCreateOrUpdatePollerResponse, error)` to `(TriggersClientCreateOrUpdatePollerResponse, error)` +- Function `*RolesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *RolesBeginDeleteOptions)` to `(context.Context, string, string, string, *RolesClientBeginDeleteOptions)` +- Function `*RolesClient.BeginDelete` return value(s) have been changed from `(RolesDeletePollerResponse, error)` to `(RolesClientDeletePollerResponse, error)` +- Function `*DiagnosticSettingsClient.GetDiagnosticProactiveLogCollectionSettings` parameter(s) have been changed from `(context.Context, string, string, *DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptions)` to `(context.Context, string, string, *DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsOptions)` +- Function `*DiagnosticSettingsClient.GetDiagnosticProactiveLogCollectionSettings` return value(s) have been changed from `(DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse, error)` to `(DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse, error)` +- Function `*RolesClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *RolesListByDataBoxEdgeDeviceOptions)` to `(string, string, *RolesClientListByDataBoxEdgeDeviceOptions)` +- Function `*RolesClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*RolesListByDataBoxEdgeDevicePager)` to `(*RolesClientListByDataBoxEdgeDevicePager)` +- Function `*StorageAccountsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, StorageAccount, *StorageAccountsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, StorageAccount, *StorageAccountsClientBeginCreateOrUpdateOptions)` +- Function `*StorageAccountsClient.BeginCreateOrUpdate` return value(s) have been changed from `(StorageAccountsCreateOrUpdatePollerResponse, error)` to `(StorageAccountsClientCreateOrUpdatePollerResponse, error)` +- Function `*SharesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *SharesBeginDeleteOptions)` to `(context.Context, string, string, string, *SharesClientBeginDeleteOptions)` +- Function `*SharesClient.BeginDelete` return value(s) have been changed from `(SharesDeletePollerResponse, error)` to `(SharesClientDeletePollerResponse, error)` +- Function `*ContainersClient.ListByStorageAccount` parameter(s) have been changed from `(string, string, string, *ContainersListByStorageAccountOptions)` to `(string, string, string, *ContainersClientListByStorageAccountOptions)` +- Function `*ContainersClient.ListByStorageAccount` return value(s) have been changed from `(*ContainersListByStorageAccountPager)` to `(*ContainersClientListByStorageAccountPager)` +- Function `*ContainersClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *ContainersGetOptions)` to `(context.Context, string, string, string, string, *ContainersClientGetOptions)` +- Function `*ContainersClient.Get` return value(s) have been changed from `(ContainersGetResponse, error)` to `(ContainersClientGetResponse, error)` +- Function `*DevicesClient.BeginScanForUpdates` parameter(s) have been changed from `(context.Context, string, string, *DevicesBeginScanForUpdatesOptions)` to `(context.Context, string, string, *DevicesClientBeginScanForUpdatesOptions)` +- Function `*DevicesClient.BeginScanForUpdates` return value(s) have been changed from `(DevicesScanForUpdatesPollerResponse, error)` to `(DevicesClientScanForUpdatesPollerResponse, error)` +- Function `*BandwidthSchedulesClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *BandwidthSchedulesListByDataBoxEdgeDeviceOptions)` to `(string, string, *BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions)` +- Function `*BandwidthSchedulesClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*BandwidthSchedulesListByDataBoxEdgeDevicePager)` to `(*BandwidthSchedulesClientListByDataBoxEdgeDevicePager)` +- Function `*RolesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, RoleClassification, *RolesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, RoleClassification, *RolesClientBeginCreateOrUpdateOptions)` +- Function `*RolesClient.BeginCreateOrUpdate` return value(s) have been changed from `(RolesCreateOrUpdatePollerResponse, error)` to `(RolesClientCreateOrUpdatePollerResponse, error)` +- Function `*AddonsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, string, *AddonsBeginDeleteOptions)` to `(context.Context, string, string, string, string, *AddonsClientBeginDeleteOptions)` +- Function `*AddonsClient.BeginDelete` return value(s) have been changed from `(AddonsDeletePollerResponse, error)` to `(AddonsClientDeletePollerResponse, error)` +- Function `*StorageAccountsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *StorageAccountsGetOptions)` to `(context.Context, string, string, string, *StorageAccountsClientGetOptions)` +- Function `*StorageAccountsClient.Get` return value(s) have been changed from `(StorageAccountsGetResponse, error)` to `(StorageAccountsClientGetResponse, error)` +- Function `*MonitoringConfigClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *MonitoringConfigGetOptions)` to `(context.Context, string, string, string, *MonitoringConfigClientGetOptions)` +- Function `*MonitoringConfigClient.Get` return value(s) have been changed from `(MonitoringConfigGetResponse, error)` to `(MonitoringConfigClientGetResponse, error)` +- Function `*DevicesClient.UploadCertificate` parameter(s) have been changed from `(context.Context, string, string, UploadCertificateRequest, *DevicesUploadCertificateOptions)` to `(context.Context, string, string, UploadCertificateRequest, *DevicesClientUploadCertificateOptions)` +- Function `*DevicesClient.UploadCertificate` return value(s) have been changed from `(DevicesUploadCertificateResponse, error)` to `(DevicesClientUploadCertificateResponse, error)` +- Function `*OrdersClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *OrdersListByDataBoxEdgeDeviceOptions)` to `(string, string, *OrdersClientListByDataBoxEdgeDeviceOptions)` +- Function `*OrdersClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*OrdersListByDataBoxEdgeDevicePager)` to `(*OrdersClientListByDataBoxEdgeDevicePager)` +- Function `*DevicesClient.GenerateCertificate` parameter(s) have been changed from `(context.Context, string, string, *DevicesGenerateCertificateOptions)` to `(context.Context, string, string, *DevicesClientGenerateCertificateOptions)` +- Function `*DevicesClient.GenerateCertificate` return value(s) have been changed from `(DevicesGenerateCertificateResponse, error)` to `(DevicesClientGenerateCertificateResponse, error)` +- Function `*NodesClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *NodesListByDataBoxEdgeDeviceOptions)` to `(string, string, *NodesClientListByDataBoxEdgeDeviceOptions)` +- Function `*NodesClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*NodesListByDataBoxEdgeDevicePager)` to `(*NodesClientListByDataBoxEdgeDevicePager)` +- Function `*SharesClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *SharesListByDataBoxEdgeDeviceOptions)` to `(string, string, *SharesClientListByDataBoxEdgeDeviceOptions)` +- Function `*SharesClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*SharesListByDataBoxEdgeDevicePager)` to `(*SharesClientListByDataBoxEdgeDevicePager)` +- Function `*StorageAccountCredentialsClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *StorageAccountCredentialsListByDataBoxEdgeDeviceOptions)` to `(string, string, *StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions)` +- Function `*StorageAccountCredentialsClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*StorageAccountCredentialsListByDataBoxEdgeDevicePager)` to `(*StorageAccountCredentialsClientListByDataBoxEdgeDevicePager)` +- Function `*SharesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *SharesGetOptions)` to `(context.Context, string, string, string, *SharesClientGetOptions)` +- Function `*SharesClient.Get` return value(s) have been changed from `(SharesGetResponse, error)` to `(SharesClientGetResponse, error)` +- Function `*SharesClient.BeginRefresh` parameter(s) have been changed from `(context.Context, string, string, string, *SharesBeginRefreshOptions)` to `(context.Context, string, string, string, *SharesClientBeginRefreshOptions)` +- Function `*SharesClient.BeginRefresh` return value(s) have been changed from `(SharesRefreshPollerResponse, error)` to `(SharesClientRefreshPollerResponse, error)` +- Function `*StorageAccountCredentialsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *StorageAccountCredentialsBeginDeleteOptions)` to `(context.Context, string, string, string, *StorageAccountCredentialsClientBeginDeleteOptions)` +- Function `*StorageAccountCredentialsClient.BeginDelete` return value(s) have been changed from `(StorageAccountCredentialsDeletePollerResponse, error)` to `(StorageAccountCredentialsClientDeletePollerResponse, error)` +- Function `*DevicesClient.Update` parameter(s) have been changed from `(context.Context, string, string, DataBoxEdgeDevicePatch, *DevicesUpdateOptions)` to `(context.Context, string, string, DevicePatch, *DevicesClientUpdateOptions)` +- Function `*DevicesClient.Update` return value(s) have been changed from `(DevicesUpdateResponse, error)` to `(DevicesClientUpdateResponse, error)` +- Function `*AlertsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *AlertsGetOptions)` to `(context.Context, string, string, string, *AlertsClientGetOptions)` +- Function `*AlertsClient.Get` return value(s) have been changed from `(AlertsGetResponse, error)` to `(AlertsClientGetResponse, error)` +- Function `*BandwidthSchedulesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *BandwidthSchedulesBeginDeleteOptions)` to `(context.Context, string, string, string, *BandwidthSchedulesClientBeginDeleteOptions)` +- Function `*BandwidthSchedulesClient.BeginDelete` return value(s) have been changed from `(BandwidthSchedulesDeletePollerResponse, error)` to `(BandwidthSchedulesClientDeletePollerResponse, error)` +- Function `*MonitoringConfigClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *MonitoringConfigBeginDeleteOptions)` to `(context.Context, string, string, string, *MonitoringConfigClientBeginDeleteOptions)` +- Function `*MonitoringConfigClient.BeginDelete` return value(s) have been changed from `(MonitoringConfigDeletePollerResponse, error)` to `(MonitoringConfigClientDeletePollerResponse, error)` +- Function `*DevicesClient.GetUpdateSummary` parameter(s) have been changed from `(context.Context, string, string, *DevicesGetUpdateSummaryOptions)` to `(context.Context, string, string, *DevicesClientGetUpdateSummaryOptions)` +- Function `*DevicesClient.GetUpdateSummary` return value(s) have been changed from `(DevicesGetUpdateSummaryResponse, error)` to `(DevicesClientGetUpdateSummaryResponse, error)` +- Function `*StorageAccountCredentialsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, StorageAccountCredential, *StorageAccountCredentialsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, StorageAccountCredential, *StorageAccountCredentialsClientBeginCreateOrUpdateOptions)` +- Function `*StorageAccountCredentialsClient.BeginCreateOrUpdate` return value(s) have been changed from `(StorageAccountCredentialsCreateOrUpdatePollerResponse, error)` to `(StorageAccountCredentialsClientCreateOrUpdatePollerResponse, error)` +- Function `*DevicesClient.ListByResourceGroup` parameter(s) have been changed from `(string, *DevicesListByResourceGroupOptions)` to `(string, *DevicesClientListByResourceGroupOptions)` +- Function `*DevicesClient.ListByResourceGroup` return value(s) have been changed from `(*DevicesListByResourceGroupPager)` to `(*DevicesClientListByResourceGroupPager)` +- Function `*OperationsClient.List` parameter(s) have been changed from `(*OperationsListOptions)` to `(*OperationsClientListOptions)` +- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsListPager)` to `(*OperationsClientListPager)` +- Function `*OrdersClient.Get` parameter(s) have been changed from `(context.Context, string, string, *OrdersGetOptions)` to `(context.Context, string, string, *OrdersClientGetOptions)` +- Function `*OrdersClient.Get` return value(s) have been changed from `(OrdersGetResponse, error)` to `(OrdersClientGetResponse, error)` +- Function `*ContainersClient.BeginRefresh` parameter(s) have been changed from `(context.Context, string, string, string, string, *ContainersBeginRefreshOptions)` to `(context.Context, string, string, string, string, *ContainersClientBeginRefreshOptions)` +- Function `*ContainersClient.BeginRefresh` return value(s) have been changed from `(ContainersRefreshPollerResponse, error)` to `(ContainersClientRefreshPollerResponse, error)` +- Function `*AlertsClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *AlertsListByDataBoxEdgeDeviceOptions)` to `(string, string, *AlertsClientListByDataBoxEdgeDeviceOptions)` +- Function `*AlertsClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*AlertsListByDataBoxEdgeDevicePager)` to `(*AlertsClientListByDataBoxEdgeDevicePager)` +- Function `*UsersClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, User, *UsersBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, User, *UsersClientBeginCreateOrUpdateOptions)` +- Function `*UsersClient.BeginCreateOrUpdate` return value(s) have been changed from `(UsersCreateOrUpdatePollerResponse, error)` to `(UsersClientCreateOrUpdatePollerResponse, error)` +- Function `*OrdersClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, Order, *OrdersBeginCreateOrUpdateOptions)` to `(context.Context, string, string, Order, *OrdersClientBeginCreateOrUpdateOptions)` +- Function `*OrdersClient.BeginCreateOrUpdate` return value(s) have been changed from `(OrdersCreateOrUpdatePollerResponse, error)` to `(OrdersClientCreateOrUpdatePollerResponse, error)` +- Function `*DevicesClient.GetNetworkSettings` parameter(s) have been changed from `(context.Context, string, string, *DevicesGetNetworkSettingsOptions)` to `(context.Context, string, string, *DevicesClientGetNetworkSettingsOptions)` +- Function `*DevicesClient.GetNetworkSettings` return value(s) have been changed from `(DevicesGetNetworkSettingsResponse, error)` to `(DevicesClientGetNetworkSettingsResponse, error)` +- Function `*SharesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, Share, *SharesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, Share, *SharesClientBeginCreateOrUpdateOptions)` +- Function `*SharesClient.BeginCreateOrUpdate` return value(s) have been changed from `(SharesCreateOrUpdatePollerResponse, error)` to `(SharesClientCreateOrUpdatePollerResponse, error)` +- Function `*DiagnosticSettingsClient.GetDiagnosticRemoteSupportSettings` parameter(s) have been changed from `(context.Context, string, string, *DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptions)` to `(context.Context, string, string, *DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsOptions)` +- Function `*DiagnosticSettingsClient.GetDiagnosticRemoteSupportSettings` return value(s) have been changed from `(DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse, error)` to `(DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse, error)` +- Function `*AddonsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *AddonsGetOptions)` to `(context.Context, string, string, string, string, *AddonsClientGetOptions)` +- Function `*AddonsClient.Get` return value(s) have been changed from `(AddonsGetResponse, error)` to `(AddonsClientGetResponse, error)` +- Function `*DiagnosticSettingsClient.BeginUpdateDiagnosticProactiveLogCollectionSettings` parameter(s) have been changed from `(context.Context, string, string, DiagnosticProactiveLogCollectionSettings, *DiagnosticSettingsBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions)` to `(context.Context, string, string, DiagnosticProactiveLogCollectionSettings, *DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions)` +- Function `*DiagnosticSettingsClient.BeginUpdateDiagnosticProactiveLogCollectionSettings` return value(s) have been changed from `(DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse, error)` to `(DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse, error)` +- Function `*DevicesClient.BeginCreateOrUpdateSecuritySettings` parameter(s) have been changed from `(context.Context, string, string, SecuritySettings, *DevicesBeginCreateOrUpdateSecuritySettingsOptions)` to `(context.Context, string, string, SecuritySettings, *DevicesClientBeginCreateOrUpdateSecuritySettingsOptions)` +- Function `*DevicesClient.BeginCreateOrUpdateSecuritySettings` return value(s) have been changed from `(DevicesCreateOrUpdateSecuritySettingsPollerResponse, error)` to `(DevicesClientCreateOrUpdateSecuritySettingsPollerResponse, error)` +- Function `*DevicesClient.BeginInstallUpdates` parameter(s) have been changed from `(context.Context, string, string, *DevicesBeginInstallUpdatesOptions)` to `(context.Context, string, string, *DevicesClientBeginInstallUpdatesOptions)` +- Function `*DevicesClient.BeginInstallUpdates` return value(s) have been changed from `(DevicesInstallUpdatesPollerResponse, error)` to `(DevicesClientInstallUpdatesPollerResponse, error)` +- Function `*TriggersClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *TriggersBeginDeleteOptions)` to `(context.Context, string, string, string, *TriggersClientBeginDeleteOptions)` +- Function `*TriggersClient.BeginDelete` return value(s) have been changed from `(TriggersDeletePollerResponse, error)` to `(TriggersClientDeletePollerResponse, error)` +- Function `*UsersClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *UsersBeginDeleteOptions)` to `(context.Context, string, string, string, *UsersClientBeginDeleteOptions)` +- Function `*UsersClient.BeginDelete` return value(s) have been changed from `(UsersDeletePollerResponse, error)` to `(UsersClientDeletePollerResponse, error)` +- Function `*BandwidthSchedulesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BandwidthSchedulesGetOptions)` to `(context.Context, string, string, string, *BandwidthSchedulesClientGetOptions)` +- Function `*BandwidthSchedulesClient.Get` return value(s) have been changed from `(BandwidthSchedulesGetResponse, error)` to `(BandwidthSchedulesClientGetResponse, error)` +- Function `*AddonsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, AddonClassification, *AddonsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, AddonClassification, *AddonsClientBeginCreateOrUpdateOptions)` +- Function `*AddonsClient.BeginCreateOrUpdate` return value(s) have been changed from `(AddonsCreateOrUpdatePollerResponse, error)` to `(AddonsClientCreateOrUpdatePollerResponse, error)` +- Function `*ContainersClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, string, *ContainersBeginDeleteOptions)` to `(context.Context, string, string, string, string, *ContainersClientBeginDeleteOptions)` +- Function `*ContainersClient.BeginDelete` return value(s) have been changed from `(ContainersDeletePollerResponse, error)` to `(ContainersClientDeletePollerResponse, error)` +- Function `*OrdersClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *OrdersBeginDeleteOptions)` to `(context.Context, string, string, *OrdersClientBeginDeleteOptions)` +- Function `*OrdersClient.BeginDelete` return value(s) have been changed from `(OrdersDeletePollerResponse, error)` to `(OrdersClientDeletePollerResponse, error)` +- Function `*TriggersClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *TriggersListByDataBoxEdgeDeviceOptions)` to `(string, string, *TriggersClientListByDataBoxEdgeDeviceOptions)` +- Function `*TriggersClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*TriggersListByDataBoxEdgeDevicePager)` to `(*TriggersClientListByDataBoxEdgeDevicePager)` +- Function `*DevicesClient.GetExtendedInformation` parameter(s) have been changed from `(context.Context, string, string, *DevicesGetExtendedInformationOptions)` to `(context.Context, string, string, *DevicesClientGetExtendedInformationOptions)` +- Function `*DevicesClient.GetExtendedInformation` return value(s) have been changed from `(DevicesGetExtendedInformationResponse, error)` to `(DevicesClientGetExtendedInformationResponse, error)` +- Function `*MonitoringConfigClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, MonitoringMetricConfiguration, *MonitoringConfigBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, MonitoringMetricConfiguration, *MonitoringConfigClientBeginCreateOrUpdateOptions)` +- Function `*MonitoringConfigClient.BeginCreateOrUpdate` return value(s) have been changed from `(MonitoringConfigCreateOrUpdatePollerResponse, error)` to `(MonitoringConfigClientCreateOrUpdatePollerResponse, error)` +- Function `*UsersClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *UsersListByDataBoxEdgeDeviceOptions)` to `(string, string, *UsersClientListByDataBoxEdgeDeviceOptions)` +- Function `*UsersClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*UsersListByDataBoxEdgeDevicePager)` to `(*UsersClientListByDataBoxEdgeDevicePager)` +- Function `*SupportPackagesClient.BeginTriggerSupportPackage` parameter(s) have been changed from `(context.Context, string, string, TriggerSupportPackageRequest, *SupportPackagesBeginTriggerSupportPackageOptions)` to `(context.Context, string, string, TriggerSupportPackageRequest, *SupportPackagesClientBeginTriggerSupportPackageOptions)` +- Function `*SupportPackagesClient.BeginTriggerSupportPackage` return value(s) have been changed from `(SupportPackagesTriggerSupportPackagePollerResponse, error)` to `(SupportPackagesClientTriggerSupportPackagePollerResponse, error)` +- Function `*DevicesClient.ListBySubscription` parameter(s) have been changed from `(*DevicesListBySubscriptionOptions)` to `(*DevicesClientListBySubscriptionOptions)` +- Function `*DevicesClient.ListBySubscription` return value(s) have been changed from `(*DevicesListBySubscriptionPager)` to `(*DevicesClientListBySubscriptionPager)` +- Function `*OrdersClient.ListDCAccessCode` parameter(s) have been changed from `(context.Context, string, string, *OrdersListDCAccessCodeOptions)` to `(context.Context, string, string, *OrdersClientListDCAccessCodeOptions)` +- Function `*OrdersClient.ListDCAccessCode` return value(s) have been changed from `(OrdersListDCAccessCodeResponse, error)` to `(OrdersClientListDCAccessCodeResponse, error)` +- Function `*DevicesClient.UpdateExtendedInformation` parameter(s) have been changed from `(context.Context, string, string, DataBoxEdgeDeviceExtendedInfoPatch, *DevicesUpdateExtendedInformationOptions)` to `(context.Context, string, string, DeviceExtendedInfoPatch, *DevicesClientUpdateExtendedInformationOptions)` +- Function `*DevicesClient.UpdateExtendedInformation` return value(s) have been changed from `(DevicesUpdateExtendedInformationResponse, error)` to `(DevicesClientUpdateExtendedInformationResponse, error)` +- Function `*DevicesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, DataBoxEdgeDevice, *DevicesCreateOrUpdateOptions)` to `(context.Context, string, string, Device, *DevicesClientCreateOrUpdateOptions)` +- Function `*DevicesClient.CreateOrUpdate` return value(s) have been changed from `(DevicesCreateOrUpdateResponse, error)` to `(DevicesClientCreateOrUpdateResponse, error)` +- Function `*StorageAccountsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *StorageAccountsBeginDeleteOptions)` to `(context.Context, string, string, string, *StorageAccountsClientBeginDeleteOptions)` +- Function `*StorageAccountsClient.BeginDelete` return value(s) have been changed from `(StorageAccountsDeletePollerResponse, error)` to `(StorageAccountsClientDeletePollerResponse, error)` +- Function `*DevicesClient.BeginDownloadUpdates` parameter(s) have been changed from `(context.Context, string, string, *DevicesBeginDownloadUpdatesOptions)` to `(context.Context, string, string, *DevicesClientBeginDownloadUpdatesOptions)` +- Function `*DevicesClient.BeginDownloadUpdates` return value(s) have been changed from `(DevicesDownloadUpdatesPollerResponse, error)` to `(DevicesClientDownloadUpdatesPollerResponse, error)` +- Function `*AddonsClient.ListByRole` parameter(s) have been changed from `(string, string, string, *AddonsListByRoleOptions)` to `(string, string, string, *AddonsClientListByRoleOptions)` +- Function `*AddonsClient.ListByRole` return value(s) have been changed from `(*AddonsListByRolePager)` to `(*AddonsClientListByRolePager)` +- Function `*OperationsStatusClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *OperationsStatusGetOptions)` to `(context.Context, string, string, string, *OperationsStatusClientGetOptions)` +- Function `*OperationsStatusClient.Get` return value(s) have been changed from `(OperationsStatusGetResponse, error)` to `(OperationsStatusClientGetResponse, error)` +- Function `*StorageAccountCredentialsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *StorageAccountCredentialsGetOptions)` to `(context.Context, string, string, string, *StorageAccountCredentialsClientGetOptions)` +- Function `*StorageAccountCredentialsClient.Get` return value(s) have been changed from `(StorageAccountCredentialsGetResponse, error)` to `(StorageAccountCredentialsClientGetResponse, error)` +- Function `*TriggersClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *TriggersGetOptions)` to `(context.Context, string, string, string, *TriggersClientGetOptions)` +- Function `*TriggersClient.Get` return value(s) have been changed from `(TriggersGetResponse, error)` to `(TriggersClientGetResponse, error)` +- Function `*MonitoringConfigClient.List` parameter(s) have been changed from `(string, string, string, *MonitoringConfigListOptions)` to `(string, string, string, *MonitoringConfigClientListOptions)` +- Function `*MonitoringConfigClient.List` return value(s) have been changed from `(*MonitoringConfigListPager)` to `(*MonitoringConfigClientListPager)` +- Function `*DiagnosticSettingsClient.BeginUpdateDiagnosticRemoteSupportSettings` parameter(s) have been changed from `(context.Context, string, string, DiagnosticRemoteSupportSettings, *DiagnosticSettingsBeginUpdateDiagnosticRemoteSupportSettingsOptions)` to `(context.Context, string, string, DiagnosticRemoteSupportSettings, *DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions)` +- Function `*DiagnosticSettingsClient.BeginUpdateDiagnosticRemoteSupportSettings` return value(s) have been changed from `(DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse, error)` to `(DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse, error)` +- Function `*AvailableSKUsClient.List` parameter(s) have been changed from `(*AvailableSKUsListOptions)` to `(*AvailableSKUsClientListOptions)` +- Function `*AvailableSKUsClient.List` return value(s) have been changed from `(*AvailableSKUsListPager)` to `(*AvailableSKUsClientListPager)` +- Function `*JobsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *JobsGetOptions)` to `(context.Context, string, string, string, *JobsClientGetOptions)` +- Function `*JobsClient.Get` return value(s) have been changed from `(JobsGetResponse, error)` to `(JobsClientGetResponse, error)` +- Function `*DevicesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *DevicesBeginDeleteOptions)` to `(context.Context, string, string, *DevicesClientBeginDeleteOptions)` +- Function `*DevicesClient.BeginDelete` return value(s) have been changed from `(DevicesDeletePollerResponse, error)` to `(DevicesClientDeletePollerResponse, error)` +- Function `*UsersClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *UsersGetOptions)` to `(context.Context, string, string, string, *UsersClientGetOptions)` +- Function `*UsersClient.Get` return value(s) have been changed from `(UsersGetResponse, error)` to `(UsersClientGetResponse, error)` +- Function `*RolesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *RolesGetOptions)` to `(context.Context, string, string, string, *RolesClientGetOptions)` +- Function `*RolesClient.Get` return value(s) have been changed from `(RolesGetResponse, error)` to `(RolesClientGetResponse, error)` +- Function `*ContainersClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, Container, *ContainersBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, Container, *ContainersClientBeginCreateOrUpdateOptions)` +- Function `*ContainersClient.BeginCreateOrUpdate` return value(s) have been changed from `(ContainersCreateOrUpdatePollerResponse, error)` to `(ContainersClientCreateOrUpdatePollerResponse, error)` +- Function `*DevicesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *DevicesGetOptions)` to `(context.Context, string, string, *DevicesClientGetOptions)` +- Function `*DevicesClient.Get` return value(s) have been changed from `(DevicesGetResponse, error)` to `(DevicesClientGetResponse, error)` +- Function `*StorageAccountsClient.ListByDataBoxEdgeDevice` parameter(s) have been changed from `(string, string, *StorageAccountsListByDataBoxEdgeDeviceOptions)` to `(string, string, *StorageAccountsClientListByDataBoxEdgeDeviceOptions)` +- Function `*StorageAccountsClient.ListByDataBoxEdgeDevice` return value(s) have been changed from `(*StorageAccountsListByDataBoxEdgeDevicePager)` to `(*StorageAccountsClientListByDataBoxEdgeDevicePager)` +- Function `*StorageAccountCredentialsDeletePoller.FinalResponse` has been removed +- Function `*TriggersDeletePoller.Poll` has been removed +- Function `*DevicesScanForUpdatesPoller.Poll` has been removed +- Function `*SharesDeletePoller.Poll` has been removed +- Function `BandwidthSchedulesCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `StorageAccountCredentialsDeletePollerResponse.PollUntilDone` has been removed +- Function `*SharesRefreshPollerResponse.Resume` has been removed +- Function `*ContainersRefreshPoller.FinalResponse` has been removed +- Function `ResourceTypeSKU.MarshalJSON` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller.FinalResponse` has been removed +- Function `*SharesCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ContainersDeletePollerResponse.Resume` has been removed +- Function `*ContainersCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*StorageAccountsCreateOrUpdatePoller.Done` has been removed +- Function `*UsersListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `*SharesListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `MonitoringMetricConfiguration.MarshalJSON` has been removed +- Function `*BandwidthSchedule.UnmarshalJSON` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse.Resume` has been removed +- Function `*AlertsListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `*NodesListByDataBoxEdgeDevicePager.Err` has been removed +- Function `*AddonsDeletePoller.ResumeToken` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse.Resume` has been removed +- Function `Container.MarshalJSON` has been removed +- Function `*SharesRefreshPoller.Poll` has been removed +- Function `*ContainersCreateOrUpdatePoller.Poll` has been removed +- Function `*OrdersDeletePoller.Poll` has been removed +- Function `*MonitoringConfigDeletePoller.ResumeToken` has been removed +- Function `*DevicesListBySubscriptionPager.Err` has been removed +- Function `*DevicesDownloadUpdatesPoller.Poll` has been removed +- Function `*Alert.UnmarshalJSON` has been removed +- Function `*AvailableSKUsListPager.Err` has been removed +- Function `*UsersListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `*StorageAccountsListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `*AddonsListByRolePager.PageResponse` has been removed +- Function `*OrdersCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*BandwidthSchedulesDeletePoller.Poll` has been removed +- Function `*DevicesListBySubscriptionPager.PageResponse` has been removed +- Function `*ContainersRefreshPoller.ResumeToken` has been removed +- Function `*AddonsCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*DataBoxEdgeDeviceExtendedInfo.UnmarshalJSON` has been removed +- Function `*AddonsDeletePoller.Poll` has been removed +- Function `*SharesCreateOrUpdatePoller.Done` has been removed +- Function `*OperationsListPager.Err` has been removed +- Function `*SharesListByDataBoxEdgeDevicePager.Err` has been removed +- Function `*SharesRefreshPoller.Done` has been removed +- Function `*TriggersCreateOrUpdatePoller.Poll` has been removed +- Function `*AlertsListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `MonitoringConfigCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*DevicesDeletePollerResponse.Resume` has been removed +- Function `*StorageAccountsCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*DevicesScanForUpdatesPoller.FinalResponse` has been removed +- Function `*RolesListByDataBoxEdgeDevicePager.Err` has been removed +- Function `*ContainersCreateOrUpdatePoller.Done` has been removed +- Function `*RolesDeletePoller.ResumeToken` has been removed +- Function `*DevicesScanForUpdatesPoller.Done` has been removed +- Function `Alert.MarshalJSON` has been removed +- Function `*DevicesListByResourceGroupPager.NextPage` has been removed +- Function `*TriggersDeletePollerResponse.Resume` has been removed +- Function `*BandwidthSchedulesCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*StorageAccountCredentialsCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*BandwidthSchedulesCreateOrUpdatePollerResponse.Resume` has been removed +- Function `ContainersRefreshPollerResponse.PollUntilDone` has been removed +- Function `*ContainersDeletePoller.FinalResponse` has been removed +- Function `*DevicesDeletePoller.FinalResponse` has been removed +- Function `*DevicesCreateOrUpdateSecuritySettingsPoller.Poll` has been removed +- Function `*RolesDeletePoller.Poll` has been removed +- Function `*RolesCreateOrUpdatePoller.ResumeToken` has been removed +- Function `OrdersCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller.Poll` has been removed +- Function `*DevicesDownloadUpdatesPoller.Done` has been removed +- Function `*AddonsDeletePoller.Done` has been removed +- Function `*ContainersRefreshPollerResponse.Resume` has been removed +- Function `*RolesCreateOrUpdatePoller.Done` has been removed +- Function `CloudErrorBody.MarshalJSON` has been removed +- Function `SharesRefreshPollerResponse.PollUntilDone` has been removed +- Function `ContainersDeletePollerResponse.PollUntilDone` has been removed +- Function `*MonitoringConfigCreateOrUpdatePoller.Done` has been removed +- Function `*ContainersRefreshPoller.Done` has been removed +- Function `DataBoxEdgeSKUList.MarshalJSON` has been removed +- Function `*SharesDeletePoller.FinalResponse` has been removed +- Function `*AddonsListByRolePager.NextPage` has been removed +- Function `*ContainersListByStorageAccountPager.Err` has been removed +- Function `*StorageAccountCredentialsCreateOrUpdatePoller.Poll` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller.ResumeToken` has been removed +- Function `*OrdersDeletePoller.Done` has been removed +- Function `SharesCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*MonitoringConfigDeletePoller.Done` has been removed +- Function `UsersDeletePollerResponse.PollUntilDone` has been removed +- Function `*StorageAccountsDeletePoller.Done` has been removed +- Function `*Role.UnmarshalJSON` has been removed +- Function `*NodesListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `StorageAccountCredentialsCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*MonitoringConfigDeletePoller.Poll` has been removed +- Function `*StorageAccount.UnmarshalJSON` has been removed +- Function `UsersCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `SKUInformationList.MarshalJSON` has been removed +- Function `SKUInformation.MarshalJSON` has been removed +- Function `*BandwidthSchedulesDeletePoller.FinalResponse` has been removed +- Function `DataBoxEdgeDeviceProperties.MarshalJSON` has been removed +- Function `*TriggersCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*DevicesListByResourceGroupPager.Err` has been removed +- Function `*DevicesInstallUpdatesPoller.FinalResponse` has been removed +- Function `*SupportPackagesTriggerSupportPackagePollerResponse.Resume` has been removed +- Function `NetworkSettings.MarshalJSON` has been removed +- Function `*AvailableSKUsListPager.NextPage` has been removed +- Function `*ContainersCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*TriggersCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*DiagnosticProactiveLogCollectionSettings.UnmarshalJSON` has been removed +- Function `*TriggersCreateOrUpdateResult.UnmarshalJSON` has been removed +- Function `CloudError.Error` has been removed +- Function `*OperationsListPager.PageResponse` has been removed +- Function `DataBoxEdgeDevice.MarshalJSON` has been removed +- Function `*BandwidthSchedulesDeletePoller.ResumeToken` has been removed +- Function `*OrdersCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*AlertsListByDataBoxEdgeDevicePager.Err` has been removed +- Function `RolesDeletePollerResponse.PollUntilDone` has been removed +- Function `Order.MarshalJSON` has been removed +- Function `*UsersCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*UpdateSummary.UnmarshalJSON` has been removed +- Function `*TriggersListByDataBoxEdgeDevicePager.Err` has been removed +- Function `DataBoxEdgeDeviceExtendedInfoProperties.MarshalJSON` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller.Done` has been removed +- Function `*RolesCreateOrUpdateResult.UnmarshalJSON` has been removed +- Function `*TriggerSupportPackageRequest.UnmarshalJSON` has been removed +- Function `*UsersDeletePoller.FinalResponse` has been removed +- Function `*DevicesCreateOrUpdateSecuritySettingsPoller.FinalResponse` has been removed +- Function `*StorageAccountsDeletePoller.FinalResponse` has been removed +- Function `*TriggersCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*UsersDeletePoller.Done` has been removed +- Function `AddonsDeletePollerResponse.PollUntilDone` has been removed +- Function `*DevicesDeletePoller.Done` has been removed +- Function `*AddonsDeletePoller.FinalResponse` has been removed +- Function `ContainersCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*DevicesDeletePoller.ResumeToken` has been removed +- Function `*SharesCreateOrUpdatePoller.Poll` has been removed +- Function `*StorageAccountCredentialsDeletePoller.ResumeToken` has been removed +- Function `*Share.UnmarshalJSON` has been removed +- Function `Share.MarshalJSON` has been removed +- Function `*DevicesListByResourceGroupPager.PageResponse` has been removed +- Function `*StorageAccountsCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*DevicesInstallUpdatesPoller.Poll` has been removed +- Function `*SharesRefreshPoller.FinalResponse` has been removed +- Function `*BandwidthSchedulesListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `*BandwidthSchedulesCreateOrUpdatePoller.Done` has been removed +- Function `*DataBoxEdgeDevice.UnmarshalJSON` has been removed +- Function `StorageAccountsCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*RolesListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `*MonitoringMetricConfiguration.UnmarshalJSON` has been removed +- Function `*UsersListByDataBoxEdgeDevicePager.Err` has been removed +- Function `SharesDeletePollerResponse.PollUntilDone` has been removed +- Function `*DevicesDownloadUpdatesPollerResponse.Resume` has been removed +- Function `*RolesCreateOrUpdatePoller.Poll` has been removed +- Function `DiagnosticRemoteSupportSettings.MarshalJSON` has been removed +- Function `*BandwidthSchedulesCreateOrUpdatePoller.ResumeToken` has been removed +- Function `AddonsCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `TriggersCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `SecuritySettings.MarshalJSON` has been removed +- Function `StorageAccount.MarshalJSON` has been removed +- Function `SupportPackagesTriggerSupportPackagePollerResponse.PollUntilDone` has been removed +- Function `*DevicesScanForUpdatesPollerResponse.Resume` has been removed +- Function `*AvailableSKUsListPager.PageResponse` has been removed +- Function `*OperationsListPager.NextPage` has been removed +- Function `*OrdersListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `*ContainersDeletePoller.Poll` has been removed +- Function `*User.UnmarshalJSON` has been removed +- Function `*DevicesInstallUpdatesPollerResponse.Resume` has been removed +- Function `*DevicesInstallUpdatesPoller.ResumeToken` has been removed +- Function `*UsersDeletePoller.ResumeToken` has been removed +- Function `*Node.UnmarshalJSON` has been removed +- Function `*BandwidthSchedulesListByDataBoxEdgeDevicePager.Err` has been removed +- Function `*SharesCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*AddonsCreateOrUpdatePoller.Poll` has been removed +- Function `*SupportPackagesTriggerSupportPackagePoller.ResumeToken` has been removed +- Function `*MonitoringConfigDeletePoller.FinalResponse` has been removed +- Function `DataBoxEdgeDeviceExtendedInfo.MarshalJSON` has been removed +- Function `*MonitoringConfigListPager.PageResponse` has been removed +- Function `BandwidthSchedulesDeletePollerResponse.PollUntilDone` has been removed +- Function `*DevicesCreateOrUpdateSecuritySettingsPollerResponse.Resume` has been removed +- Function `*UsersDeletePollerResponse.Resume` has been removed +- Function `*StorageAccountCredentialsDeletePoller.Poll` has been removed +- Function `DataBoxEdgeSKU.MarshalJSON` has been removed +- Function `TriggersDeletePollerResponse.PollUntilDone` has been removed +- Function `*SharesCreateOrUpdatePoller.FinalResponse` has been removed +- Function `DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse.PollUntilDone` has been removed +- Function `*Trigger.UnmarshalJSON` has been removed +- Function `*ContainersDeletePoller.Done` has been removed +- Function `*AddonsCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ContainersListByStorageAccountPager.PageResponse` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller.ResumeToken` has been removed +- Function `*StorageAccountCredentialsListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `*UsersCreateOrUpdatePoller.Done` has been removed +- Function `DataBoxEdgeMoveRequest.MarshalJSON` has been removed +- Function `*StorageAccountsDeletePollerResponse.Resume` has been removed +- Function `DevicesDeletePollerResponse.PollUntilDone` has been removed +- Function `StorageAccountsDeletePollerResponse.PollUntilDone` has been removed +- Function `*OrdersDeletePoller.FinalResponse` has been removed +- Function `*MonitoringConfigDeletePollerResponse.Resume` has been removed +- Function `*StorageAccountCredentialsDeletePoller.Done` has been removed +- Function `*Order.UnmarshalJSON` has been removed +- Function `*DevicesInstallUpdatesPoller.Done` has been removed +- Function `*RolesCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*DevicesDeletePoller.Poll` has been removed +- Function `*DevicesCreateOrUpdateSecuritySettingsPoller.ResumeToken` has been removed +- Function `DevicesInstallUpdatesPollerResponse.PollUntilDone` has been removed +- Function `MonitoringConfigDeletePollerResponse.PollUntilDone` has been removed +- Function `DevicesDownloadUpdatesPollerResponse.PollUntilDone` has been removed +- Function `*RolesDeletePoller.Done` has been removed +- Function `*AddonsGetResult.UnmarshalJSON` has been removed +- Function `*RolesCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*DevicesDownloadUpdatesPoller.ResumeToken` has been removed +- Function `*TriggersListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `*RolesGetResult.UnmarshalJSON` has been removed +- Function `*StorageAccountsListByDataBoxEdgeDevicePager.Err` has been removed +- Function `*TriggersDeletePoller.ResumeToken` has been removed +- Function `*TriggersListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `*NodesListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `*BandwidthSchedulesCreateOrUpdatePoller.Poll` has been removed +- Function `*MonitoringConfigListPager.Err` has been removed +- Function `*DevicesListBySubscriptionPager.NextPage` has been removed +- Function `Node.MarshalJSON` has been removed +- Function `BandwidthSchedule.MarshalJSON` has been removed +- Function `*StorageAccountCredentialsDeletePollerResponse.Resume` has been removed +- Function `*OrdersCreateOrUpdatePoller.Done` has been removed +- Function `*OrdersDeletePollerResponse.Resume` has been removed +- Function `*RolesListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `DevicesScanForUpdatesPollerResponse.PollUntilDone` has been removed +- Function `*BandwidthSchedulesDeletePoller.Done` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller.Done` has been removed +- Function `*StorageAccountCredentialsCreateOrUpdatePoller.ResumeToken` has been removed +- Function `ARMBaseModel.MarshalJSON` has been removed +- Function `*DevicesDownloadUpdatesPoller.FinalResponse` has been removed +- Function `DataBoxEdgeDeviceList.MarshalJSON` has been removed +- Function `RolesCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*DevicesScanForUpdatesPoller.ResumeToken` has been removed +- Function `User.MarshalJSON` has been removed +- Function `*StorageAccountsDeletePoller.Poll` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller.Poll` has been removed +- Function `*OrdersCreateOrUpdatePoller.FinalResponse` has been removed +- Function `OrdersDeletePollerResponse.PollUntilDone` has been removed +- Function `TriggerSupportPackageRequest.MarshalJSON` has been removed +- Function `*DiagnosticRemoteSupportSettings.UnmarshalJSON` has been removed +- Function `DataBoxEdgeDevicePatch.MarshalJSON` has been removed +- Function `*RolesDeletePollerResponse.Resume` has been removed +- Function `*MonitoringConfigListPager.NextPage` has been removed +- Function `*BandwidthSchedulesDeletePollerResponse.Resume` has been removed +- Function `*SecuritySettings.UnmarshalJSON` has been removed +- Function `*TriggersDeletePoller.FinalResponse` has been removed +- Function `*Addon.UnmarshalJSON` has been removed +- Function `*SupportPackagesTriggerSupportPackagePoller.Poll` has been removed +- Function `*StorageAccountsDeletePoller.ResumeToken` has been removed +- Function `*ContainersRefreshPoller.Poll` has been removed +- Function `*OrdersListByDataBoxEdgeDevicePager.Err` has been removed +- Function `*StorageAccountCredentialsCreateOrUpdatePoller.Done` has been removed +- Function `*MonitoringConfigCreateOrUpdatePoller.Poll` has been removed +- Function `*AddonsCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*NetworkSettings.UnmarshalJSON` has been removed +- Function `*SupportPackagesTriggerSupportPackagePoller.FinalResponse` has been removed +- Function `*OrdersCreateOrUpdatePoller.Poll` has been removed +- Function `*SharesDeletePoller.ResumeToken` has been removed +- Function `*SharesListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse.PollUntilDone` has been removed +- Function `*MonitoringConfigCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*MonitoringConfigCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*AddonsDeletePollerResponse.Resume` has been removed +- Function `*BandwidthSchedulesListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `*UsersCreateOrUpdatePoller.Poll` has been removed +- Function `*OrdersListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `*StorageAccountCredential.UnmarshalJSON` has been removed +- Function `*SharesDeletePollerResponse.Resume` has been removed +- Function `*UsersCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*UsersCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*OrdersDeletePoller.ResumeToken` has been removed +- Function `StorageAccountCredential.MarshalJSON` has been removed +- Function `DevicesCreateOrUpdateSecuritySettingsPollerResponse.PollUntilDone` has been removed +- Function `*AddonsCreateOrUpdateResult.UnmarshalJSON` has been removed +- Function `*SharesDeletePoller.Done` has been removed +- Function `*RolesDeletePoller.FinalResponse` has been removed +- Function `DiagnosticProactiveLogCollectionSettings.MarshalJSON` has been removed +- Function `*TriggersCreateOrUpdatePoller.Done` has been removed +- Function `*ContainersCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*StorageAccountsListByDataBoxEdgeDevicePager.NextPage` has been removed +- Function `*StorageAccountCredentialsListByDataBoxEdgeDevicePager.Err` has been removed +- Function `*UsersDeletePoller.Poll` has been removed +- Function `*AddonsListByRolePager.Err` has been removed +- Function `*SupportPackagesTriggerSupportPackagePoller.Done` has been removed +- Function `*TriggersGetResult.UnmarshalJSON` has been removed +- Function `*DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller.FinalResponse` has been removed +- Function `*DevicesCreateOrUpdateSecuritySettingsPoller.Done` has been removed +- Function `*StorageAccountCredentialsListByDataBoxEdgeDevicePager.PageResponse` has been removed +- Function `*ARMBaseModel.UnmarshalJSON` has been removed +- Function `UpdateSummary.MarshalJSON` has been removed +- Function `*StorageAccountsCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*ContainersListByStorageAccountPager.NextPage` has been removed +- Function `*StorageAccountsCreateOrUpdatePoller.Poll` has been removed +- Function `*StorageAccountCredentialsCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*Container.UnmarshalJSON` has been removed +- Function `*TriggersDeletePoller.Done` has been removed +- Function `*SharesRefreshPoller.ResumeToken` has been removed +- Function `*MonitoringConfigCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*AddonsCreateOrUpdatePoller.Done` has been removed +- Function `*ContainersDeletePoller.ResumeToken` has been removed +- Struct `AddonsBeginCreateOrUpdateOptions` has been removed +- Struct `AddonsBeginDeleteOptions` has been removed +- Struct `AddonsCreateOrUpdatePoller` has been removed +- Struct `AddonsCreateOrUpdatePollerResponse` has been removed +- Struct `AddonsCreateOrUpdateResponse` has been removed +- Struct `AddonsCreateOrUpdateResult` has been removed +- Struct `AddonsDeletePoller` has been removed +- Struct `AddonsDeletePollerResponse` has been removed +- Struct `AddonsDeleteResponse` has been removed +- Struct `AddonsGetOptions` has been removed +- Struct `AddonsGetResponse` has been removed +- Struct `AddonsGetResult` has been removed +- Struct `AddonsListByRoleOptions` has been removed +- Struct `AddonsListByRolePager` has been removed +- Struct `AddonsListByRoleResponse` has been removed +- Struct `AddonsListByRoleResult` has been removed +- Struct `AlertsGetOptions` has been removed +- Struct `AlertsGetResponse` has been removed +- Struct `AlertsGetResult` has been removed +- Struct `AlertsListByDataBoxEdgeDeviceOptions` has been removed +- Struct `AlertsListByDataBoxEdgeDevicePager` has been removed +- Struct `AlertsListByDataBoxEdgeDeviceResponse` has been removed +- Struct `AlertsListByDataBoxEdgeDeviceResult` has been removed +- Struct `AvailableSKUsListOptions` has been removed +- Struct `AvailableSKUsListPager` has been removed +- Struct `AvailableSKUsListResponse` has been removed +- Struct `AvailableSKUsListResult` has been removed +- Struct `BandwidthSchedulesBeginCreateOrUpdateOptions` has been removed +- Struct `BandwidthSchedulesBeginDeleteOptions` has been removed +- Struct `BandwidthSchedulesCreateOrUpdatePoller` has been removed +- Struct `BandwidthSchedulesCreateOrUpdatePollerResponse` has been removed +- Struct `BandwidthSchedulesCreateOrUpdateResponse` has been removed +- Struct `BandwidthSchedulesCreateOrUpdateResult` has been removed +- Struct `BandwidthSchedulesDeletePoller` has been removed +- Struct `BandwidthSchedulesDeletePollerResponse` has been removed +- Struct `BandwidthSchedulesDeleteResponse` has been removed +- Struct `BandwidthSchedulesGetOptions` has been removed +- Struct `BandwidthSchedulesGetResponse` has been removed +- Struct `BandwidthSchedulesGetResult` has been removed +- Struct `BandwidthSchedulesListByDataBoxEdgeDeviceOptions` has been removed +- Struct `BandwidthSchedulesListByDataBoxEdgeDevicePager` has been removed +- Struct `BandwidthSchedulesListByDataBoxEdgeDeviceResponse` has been removed +- Struct `BandwidthSchedulesListByDataBoxEdgeDeviceResult` has been removed +- Struct `CloudError` has been removed +- Struct `CloudErrorBody` has been removed +- Struct `ContainersBeginCreateOrUpdateOptions` has been removed +- Struct `ContainersBeginDeleteOptions` has been removed +- Struct `ContainersBeginRefreshOptions` has been removed +- Struct `ContainersCreateOrUpdatePoller` has been removed +- Struct `ContainersCreateOrUpdatePollerResponse` has been removed +- Struct `ContainersCreateOrUpdateResponse` has been removed +- Struct `ContainersCreateOrUpdateResult` has been removed +- Struct `ContainersDeletePoller` has been removed +- Struct `ContainersDeletePollerResponse` has been removed +- Struct `ContainersDeleteResponse` has been removed +- Struct `ContainersGetOptions` has been removed +- Struct `ContainersGetResponse` has been removed +- Struct `ContainersGetResult` has been removed +- Struct `ContainersListByStorageAccountOptions` has been removed +- Struct `ContainersListByStorageAccountPager` has been removed +- Struct `ContainersListByStorageAccountResponse` has been removed +- Struct `ContainersListByStorageAccountResult` has been removed +- Struct `ContainersRefreshPoller` has been removed +- Struct `ContainersRefreshPollerResponse` has been removed +- Struct `ContainersRefreshResponse` has been removed +- Struct `DataBoxEdgeDevice` has been removed +- Struct `DataBoxEdgeDeviceExtendedInfo` has been removed +- Struct `DataBoxEdgeDeviceExtendedInfoPatch` has been removed +- Struct `DataBoxEdgeDeviceExtendedInfoProperties` has been removed +- Struct `DataBoxEdgeDeviceList` has been removed +- Struct `DataBoxEdgeDevicePatch` has been removed +- Struct `DataBoxEdgeDeviceProperties` has been removed +- Struct `DataBoxEdgeDevicePropertiesPatch` has been removed +- Struct `DataBoxEdgeMoveRequest` has been removed +- Struct `DataBoxEdgeSKU` has been removed +- Struct `DataBoxEdgeSKUList` has been removed +- Struct `DevicesBeginCreateOrUpdateSecuritySettingsOptions` has been removed +- Struct `DevicesBeginDeleteOptions` has been removed +- Struct `DevicesBeginDownloadUpdatesOptions` has been removed +- Struct `DevicesBeginInstallUpdatesOptions` has been removed +- Struct `DevicesBeginScanForUpdatesOptions` has been removed +- Struct `DevicesCreateOrUpdateOptions` has been removed +- Struct `DevicesCreateOrUpdateResponse` has been removed +- Struct `DevicesCreateOrUpdateResult` has been removed +- Struct `DevicesCreateOrUpdateSecuritySettingsPoller` has been removed +- Struct `DevicesCreateOrUpdateSecuritySettingsPollerResponse` has been removed +- Struct `DevicesCreateOrUpdateSecuritySettingsResponse` has been removed +- Struct `DevicesDeletePoller` has been removed +- Struct `DevicesDeletePollerResponse` has been removed +- Struct `DevicesDeleteResponse` has been removed +- Struct `DevicesDownloadUpdatesPoller` has been removed +- Struct `DevicesDownloadUpdatesPollerResponse` has been removed +- Struct `DevicesDownloadUpdatesResponse` has been removed +- Struct `DevicesGenerateCertificateOptions` has been removed +- Struct `DevicesGenerateCertificateResponse` has been removed +- Struct `DevicesGenerateCertificateResult` has been removed +- Struct `DevicesGetExtendedInformationOptions` has been removed +- Struct `DevicesGetExtendedInformationResponse` has been removed +- Struct `DevicesGetExtendedInformationResult` has been removed +- Struct `DevicesGetNetworkSettingsOptions` has been removed +- Struct `DevicesGetNetworkSettingsResponse` has been removed +- Struct `DevicesGetNetworkSettingsResult` has been removed +- Struct `DevicesGetOptions` has been removed +- Struct `DevicesGetResponse` has been removed +- Struct `DevicesGetResult` has been removed +- Struct `DevicesGetUpdateSummaryOptions` has been removed +- Struct `DevicesGetUpdateSummaryResponse` has been removed +- Struct `DevicesGetUpdateSummaryResult` has been removed +- Struct `DevicesInstallUpdatesPoller` has been removed +- Struct `DevicesInstallUpdatesPollerResponse` has been removed +- Struct `DevicesInstallUpdatesResponse` has been removed +- Struct `DevicesListByResourceGroupOptions` has been removed +- Struct `DevicesListByResourceGroupPager` has been removed +- Struct `DevicesListByResourceGroupResponse` has been removed +- Struct `DevicesListByResourceGroupResult` has been removed +- Struct `DevicesListBySubscriptionOptions` has been removed +- Struct `DevicesListBySubscriptionPager` has been removed +- Struct `DevicesListBySubscriptionResponse` has been removed +- Struct `DevicesListBySubscriptionResult` has been removed +- Struct `DevicesScanForUpdatesPoller` has been removed +- Struct `DevicesScanForUpdatesPollerResponse` has been removed +- Struct `DevicesScanForUpdatesResponse` has been removed +- Struct `DevicesUpdateExtendedInformationOptions` has been removed +- Struct `DevicesUpdateExtendedInformationResponse` has been removed +- Struct `DevicesUpdateExtendedInformationResult` has been removed +- Struct `DevicesUpdateOptions` has been removed +- Struct `DevicesUpdateResponse` has been removed +- Struct `DevicesUpdateResult` has been removed +- Struct `DevicesUploadCertificateOptions` has been removed +- Struct `DevicesUploadCertificateResponse` has been removed +- Struct `DevicesUploadCertificateResult` has been removed +- Struct `DiagnosticSettingsBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions` has been removed +- Struct `DiagnosticSettingsBeginUpdateDiagnosticRemoteSupportSettingsOptions` has been removed +- Struct `DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptions` has been removed +- Struct `DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse` has been removed +- Struct `DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResult` has been removed +- Struct `DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptions` has been removed +- Struct `DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse` has been removed +- Struct `DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResult` has been removed +- Struct `DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller` has been removed +- Struct `DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse` has been removed +- Struct `DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse` has been removed +- Struct `DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResult` has been removed +- Struct `DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller` has been removed +- Struct `DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse` has been removed +- Struct `DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse` has been removed +- Struct `DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResult` has been removed +- Struct `JobsGetOptions` has been removed +- Struct `JobsGetResponse` has been removed +- Struct `JobsGetResult` has been removed +- Struct `MonitoringConfigBeginCreateOrUpdateOptions` has been removed +- Struct `MonitoringConfigBeginDeleteOptions` has been removed +- Struct `MonitoringConfigCreateOrUpdatePoller` has been removed +- Struct `MonitoringConfigCreateOrUpdatePollerResponse` has been removed +- Struct `MonitoringConfigCreateOrUpdateResponse` has been removed +- Struct `MonitoringConfigCreateOrUpdateResult` has been removed +- Struct `MonitoringConfigDeletePoller` has been removed +- Struct `MonitoringConfigDeletePollerResponse` has been removed +- Struct `MonitoringConfigDeleteResponse` has been removed +- Struct `MonitoringConfigGetOptions` has been removed +- Struct `MonitoringConfigGetResponse` has been removed +- Struct `MonitoringConfigGetResult` has been removed +- Struct `MonitoringConfigListOptions` has been removed +- Struct `MonitoringConfigListPager` has been removed +- Struct `MonitoringConfigListResponse` has been removed +- Struct `MonitoringConfigListResult` has been removed +- Struct `NodesListByDataBoxEdgeDeviceOptions` has been removed +- Struct `NodesListByDataBoxEdgeDevicePager` has been removed +- Struct `NodesListByDataBoxEdgeDeviceResponse` has been removed +- Struct `NodesListByDataBoxEdgeDeviceResult` has been removed +- Struct `OperationsListOptions` has been removed +- Struct `OperationsListPager` has been removed +- Struct `OperationsListResponse` has been removed +- Struct `OperationsListResult` has been removed +- Struct `OperationsStatusGetOptions` has been removed +- Struct `OperationsStatusGetResponse` has been removed +- Struct `OperationsStatusGetResult` has been removed +- Struct `OrdersBeginCreateOrUpdateOptions` has been removed +- Struct `OrdersBeginDeleteOptions` has been removed +- Struct `OrdersCreateOrUpdatePoller` has been removed +- Struct `OrdersCreateOrUpdatePollerResponse` has been removed +- Struct `OrdersCreateOrUpdateResponse` has been removed +- Struct `OrdersCreateOrUpdateResult` has been removed +- Struct `OrdersDeletePoller` has been removed +- Struct `OrdersDeletePollerResponse` has been removed +- Struct `OrdersDeleteResponse` has been removed +- Struct `OrdersGetOptions` has been removed +- Struct `OrdersGetResponse` has been removed +- Struct `OrdersGetResult` has been removed +- Struct `OrdersListByDataBoxEdgeDeviceOptions` has been removed +- Struct `OrdersListByDataBoxEdgeDevicePager` has been removed +- Struct `OrdersListByDataBoxEdgeDeviceResponse` has been removed +- Struct `OrdersListByDataBoxEdgeDeviceResult` has been removed +- Struct `OrdersListDCAccessCodeOptions` has been removed +- Struct `OrdersListDCAccessCodeResponse` has been removed +- Struct `OrdersListDCAccessCodeResult` has been removed +- Struct `ResourceTypeSKU` has been removed +- Struct `RolesBeginCreateOrUpdateOptions` has been removed +- Struct `RolesBeginDeleteOptions` has been removed +- Struct `RolesCreateOrUpdatePoller` has been removed +- Struct `RolesCreateOrUpdatePollerResponse` has been removed +- Struct `RolesCreateOrUpdateResponse` has been removed +- Struct `RolesCreateOrUpdateResult` has been removed +- Struct `RolesDeletePoller` has been removed +- Struct `RolesDeletePollerResponse` has been removed +- Struct `RolesDeleteResponse` has been removed +- Struct `RolesGetOptions` has been removed +- Struct `RolesGetResponse` has been removed +- Struct `RolesGetResult` has been removed +- Struct `RolesListByDataBoxEdgeDeviceOptions` has been removed +- Struct `RolesListByDataBoxEdgeDevicePager` has been removed +- Struct `RolesListByDataBoxEdgeDeviceResponse` has been removed +- Struct `RolesListByDataBoxEdgeDeviceResult` has been removed +- Struct `SKUInformation` has been removed +- Struct `SKUInformationList` has been removed +- Struct `SharesBeginCreateOrUpdateOptions` has been removed +- Struct `SharesBeginDeleteOptions` has been removed +- Struct `SharesBeginRefreshOptions` has been removed +- Struct `SharesCreateOrUpdatePoller` has been removed +- Struct `SharesCreateOrUpdatePollerResponse` has been removed +- Struct `SharesCreateOrUpdateResponse` has been removed +- Struct `SharesCreateOrUpdateResult` has been removed +- Struct `SharesDeletePoller` has been removed +- Struct `SharesDeletePollerResponse` has been removed +- Struct `SharesDeleteResponse` has been removed +- Struct `SharesGetOptions` has been removed +- Struct `SharesGetResponse` has been removed +- Struct `SharesGetResult` has been removed +- Struct `SharesListByDataBoxEdgeDeviceOptions` has been removed +- Struct `SharesListByDataBoxEdgeDevicePager` has been removed +- Struct `SharesListByDataBoxEdgeDeviceResponse` has been removed +- Struct `SharesListByDataBoxEdgeDeviceResult` has been removed +- Struct `SharesRefreshPoller` has been removed +- Struct `SharesRefreshPollerResponse` has been removed +- Struct `SharesRefreshResponse` has been removed +- Struct `StorageAccountCredentialsBeginCreateOrUpdateOptions` has been removed +- Struct `StorageAccountCredentialsBeginDeleteOptions` has been removed +- Struct `StorageAccountCredentialsCreateOrUpdatePoller` has been removed +- Struct `StorageAccountCredentialsCreateOrUpdatePollerResponse` has been removed +- Struct `StorageAccountCredentialsCreateOrUpdateResponse` has been removed +- Struct `StorageAccountCredentialsCreateOrUpdateResult` has been removed +- Struct `StorageAccountCredentialsDeletePoller` has been removed +- Struct `StorageAccountCredentialsDeletePollerResponse` has been removed +- Struct `StorageAccountCredentialsDeleteResponse` has been removed +- Struct `StorageAccountCredentialsGetOptions` has been removed +- Struct `StorageAccountCredentialsGetResponse` has been removed +- Struct `StorageAccountCredentialsGetResult` has been removed +- Struct `StorageAccountCredentialsListByDataBoxEdgeDeviceOptions` has been removed +- Struct `StorageAccountCredentialsListByDataBoxEdgeDevicePager` has been removed +- Struct `StorageAccountCredentialsListByDataBoxEdgeDeviceResponse` has been removed +- Struct `StorageAccountCredentialsListByDataBoxEdgeDeviceResult` has been removed +- Struct `StorageAccountsBeginCreateOrUpdateOptions` has been removed +- Struct `StorageAccountsBeginDeleteOptions` has been removed +- Struct `StorageAccountsCreateOrUpdatePoller` has been removed +- Struct `StorageAccountsCreateOrUpdatePollerResponse` has been removed +- Struct `StorageAccountsCreateOrUpdateResponse` has been removed +- Struct `StorageAccountsCreateOrUpdateResult` has been removed +- Struct `StorageAccountsDeletePoller` has been removed +- Struct `StorageAccountsDeletePollerResponse` has been removed +- Struct `StorageAccountsDeleteResponse` has been removed +- Struct `StorageAccountsGetOptions` has been removed +- Struct `StorageAccountsGetResponse` has been removed +- Struct `StorageAccountsGetResult` has been removed +- Struct `StorageAccountsListByDataBoxEdgeDeviceOptions` has been removed +- Struct `StorageAccountsListByDataBoxEdgeDevicePager` has been removed +- Struct `StorageAccountsListByDataBoxEdgeDeviceResponse` has been removed +- Struct `StorageAccountsListByDataBoxEdgeDeviceResult` has been removed +- Struct `SupportPackagesBeginTriggerSupportPackageOptions` has been removed +- Struct `SupportPackagesTriggerSupportPackagePoller` has been removed +- Struct `SupportPackagesTriggerSupportPackagePollerResponse` has been removed +- Struct `SupportPackagesTriggerSupportPackageResponse` has been removed +- Struct `TriggersBeginCreateOrUpdateOptions` has been removed +- Struct `TriggersBeginDeleteOptions` has been removed +- Struct `TriggersCreateOrUpdatePoller` has been removed +- Struct `TriggersCreateOrUpdatePollerResponse` has been removed +- Struct `TriggersCreateOrUpdateResponse` has been removed +- Struct `TriggersCreateOrUpdateResult` has been removed +- Struct `TriggersDeletePoller` has been removed +- Struct `TriggersDeletePollerResponse` has been removed +- Struct `TriggersDeleteResponse` has been removed +- Struct `TriggersGetOptions` has been removed +- Struct `TriggersGetResponse` has been removed +- Struct `TriggersGetResult` has been removed +- Struct `TriggersListByDataBoxEdgeDeviceOptions` has been removed +- Struct `TriggersListByDataBoxEdgeDevicePager` has been removed +- Struct `TriggersListByDataBoxEdgeDeviceResponse` has been removed +- Struct `TriggersListByDataBoxEdgeDeviceResult` has been removed +- Struct `UsersBeginCreateOrUpdateOptions` has been removed +- Struct `UsersBeginDeleteOptions` has been removed +- Struct `UsersCreateOrUpdatePoller` has been removed +- Struct `UsersCreateOrUpdatePollerResponse` has been removed +- Struct `UsersCreateOrUpdateResponse` has been removed +- Struct `UsersCreateOrUpdateResult` has been removed +- Struct `UsersDeletePoller` has been removed +- Struct `UsersDeletePollerResponse` has been removed +- Struct `UsersDeleteResponse` has been removed +- Struct `UsersGetOptions` has been removed +- Struct `UsersGetResponse` has been removed +- Struct `UsersGetResult` has been removed +- Struct `UsersListByDataBoxEdgeDeviceOptions` has been removed +- Struct `UsersListByDataBoxEdgeDevicePager` has been removed +- Struct `UsersListByDataBoxEdgeDeviceResponse` has been removed +- Struct `UsersListByDataBoxEdgeDeviceResult` has been removed +- Field `ARMBaseModel` of struct `Share` has been removed +- Field `ARMBaseModel` of struct `Trigger` has been removed +- Field `ARMBaseModel` of struct `DiagnosticProactiveLogCollectionSettings` has been removed +- Field `ARMBaseModel` of struct `User` has been removed +- Field `Trigger` of struct `FileEventTrigger` has been removed +- Field `ARMBaseModel` of struct `StorageAccountCredential` has been removed +- Field `ARMBaseModel` of struct `Order` has been removed +- Field `ARMBaseModel` of struct `StorageAccount` has been removed +- Field `ARMBaseModel` of struct `SecuritySettings` has been removed +- Field `ARMBaseModel` of struct `MonitoringMetricConfiguration` has been removed +- Field `Trigger` of struct `PeriodicTimerEventTrigger` has been removed +- Field `ARMBaseModel` of struct `Node` has been removed +- Field `ARMBaseModel` of struct `Addon` has been removed +- Field `ARMBaseModel` of struct `Alert` has been removed +- Field `ARMBaseModel` of struct `DiagnosticRemoteSupportSettings` has been removed +- Field `ARMBaseModel` of struct `TriggerSupportPackageRequest` has been removed +- Field `ARMBaseModel` of struct `BandwidthSchedule` has been removed +- Field `Addon` of struct `ArcAddon` has been removed +- Field `Role` of struct `KubernetesRole` has been removed +- Field `ARMBaseModel` of struct `Container` has been removed +- Field `Role` of struct `MECRole` has been removed +- Field `ARMBaseModel` of struct `Role` has been removed +- Field `ARMBaseModel` of struct `UpdateSummary` has been removed +- Field `Role` of struct `IoTRole` has been removed +- Field `ARMBaseModel` of struct `NetworkSettings` has been removed +- Field `Addon` of struct `IoTAddon` has been removed +- Field `Role` of struct `CloudEdgeManagementRole` has been removed + +### Features Added + +- New function `DevicesClientDownloadUpdatesPollerResponse.PollUntilDone(context.Context, time.Duration) (DevicesClientDownloadUpdatesResponse, error)` +- New function `*RolesClientDeletePoller.Done() bool` +- New function `*BandwidthSchedulesClientDeletePoller.Done() bool` +- New function `DeviceList.MarshalJSON() ([]byte, error)` +- New function `DevicesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (DevicesClientDeleteResponse, error)` +- New function `*StorageAccountsClientDeletePoller.ResumeToken() (string, error)` +- New function `*BandwidthSchedulesClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `StorageAccountsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (StorageAccountsClientDeleteResponse, error)` +- New function `DevicesClientCreateOrUpdateSecuritySettingsPollerResponse.PollUntilDone(context.Context, time.Duration) (DevicesClientCreateOrUpdateSecuritySettingsResponse, error)` +- New function `*BandwidthSchedulesClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `SKUList.MarshalJSON() ([]byte, error)` +- New function `*DevicesClientCreateOrUpdateSecuritySettingsPoller.Poll(context.Context) (*http.Response, error)` +- New function `*TriggersClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*RolesClientCreateOrUpdatePoller.FinalResponse(context.Context) (RolesClientCreateOrUpdateResponse, error)` +- New function `*AlertsClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `*DevicesClientScanForUpdatesPoller.FinalResponse(context.Context) (DevicesClientScanForUpdatesResponse, error)` +- New function `*StorageAccountCredentialsClientDeletePollerResponse.Resume(context.Context, *StorageAccountCredentialsClient, string) error` +- New function `*UsersClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `*MonitoringConfigClientCreateOrUpdatePoller.FinalResponse(context.Context) (MonitoringConfigClientCreateOrUpdateResponse, error)` +- New function `*UsersClientDeletePoller.FinalResponse(context.Context) (UsersClientDeleteResponse, error)` +- New function `*DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller.Poll(context.Context) (*http.Response, error)` +- New function `*ContainersClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `*MonitoringConfigClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `UsersClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (UsersClientDeleteResponse, error)` +- New function `*SharesClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse.PollUntilDone(context.Context, time.Duration) (DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse, error)` +- New function `*RolesClientCreateOrUpdateResult.UnmarshalJSON([]byte) error` +- New function `RolesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (RolesClientDeleteResponse, error)` +- New function `*DevicesClientDownloadUpdatesPoller.ResumeToken() (string, error)` +- New function `*DevicesClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*StorageAccountCredentialsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*UsersClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*AddonsClientCreateOrUpdateResult.UnmarshalJSON([]byte) error` +- New function `*SupportPackagesClientTriggerSupportPackagePoller.FinalResponse(context.Context) (SupportPackagesClientTriggerSupportPackageResponse, error)` +- New function `*UsersClientDeletePoller.ResumeToken() (string, error)` +- New function `*ArcAddon.GetAddon() *Addon` +- New function `*SupportPackagesClientTriggerSupportPackagePoller.Done() bool` +- New function `*RolesClientGetResult.UnmarshalJSON([]byte) error` +- New function `*OrdersClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `*AddonsClientCreateOrUpdatePoller.Done() bool` +- New function `*MonitoringConfigClientCreateOrUpdatePollerResponse.Resume(context.Context, *MonitoringConfigClient, string) error` +- New function `*ContainersClientDeletePollerResponse.Resume(context.Context, *ContainersClient, string) error` +- New function `*SupportPackagesClientTriggerSupportPackagePoller.ResumeToken() (string, error)` +- New function `*MonitoringConfigClientListPager.Err() error` +- New function `*StorageAccountsClientListByDataBoxEdgeDevicePager.PageResponse() StorageAccountsClientListByDataBoxEdgeDeviceResponse` +- New function `*SharesClientRefreshPoller.Done() bool` +- New function `*RolesClientDeletePoller.FinalResponse(context.Context) (RolesClientDeleteResponse, error)` +- New function `*OrdersClientCreateOrUpdatePoller.Done() bool` +- New function `*RolesClientCreateOrUpdatePoller.Done() bool` +- New function `*SharesClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `*DevicesClientCreateOrUpdateSecuritySettingsPollerResponse.Resume(context.Context, *DevicesClient, string) error` +- New function `*OrdersClientCreateOrUpdatePollerResponse.Resume(context.Context, *OrdersClient, string) error` +- New function `*StorageAccountsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*StorageAccountsClientDeletePoller.FinalResponse(context.Context) (StorageAccountsClientDeleteResponse, error)` +- New function `*DevicesClientDeletePoller.FinalResponse(context.Context) (DevicesClientDeleteResponse, error)` +- New function `*ContainersClientDeletePoller.FinalResponse(context.Context) (ContainersClientDeleteResponse, error)` +- New function `DeviceProperties.MarshalJSON() ([]byte, error)` +- New function `*RolesClientDeletePollerResponse.Resume(context.Context, *RolesClient, string) error` +- New function `*StorageAccountsClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `*AddonsClientCreateOrUpdatePoller.FinalResponse(context.Context) (AddonsClientCreateOrUpdateResponse, error)` +- New function `*TriggersClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*SharesClientRefreshPollerResponse.Resume(context.Context, *SharesClient, string) error` +- New function `*StorageAccountCredentialsClientDeletePoller.ResumeToken() (string, error)` +- New function `DevicesClientScanForUpdatesPollerResponse.PollUntilDone(context.Context, time.Duration) (DevicesClientScanForUpdatesResponse, error)` +- New function `RolesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (RolesClientCreateOrUpdateResponse, error)` +- New function `OrdersClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (OrdersClientDeleteResponse, error)` +- New function `*OrdersClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `*StorageAccountCredentialsClientCreateOrUpdatePoller.FinalResponse(context.Context) (StorageAccountCredentialsClientCreateOrUpdateResponse, error)` +- New function `*AddonsClientCreateOrUpdatePollerResponse.Resume(context.Context, *AddonsClient, string) error` +- New function `*StorageAccountsClientCreateOrUpdatePollerResponse.Resume(context.Context, *StorageAccountsClient, string) error` +- New function `*ContainersClientCreateOrUpdatePoller.FinalResponse(context.Context) (ContainersClientCreateOrUpdateResponse, error)` +- New function `*AddonsClientListByRolePager.PageResponse() AddonsClientListByRoleResponse` +- New function `*BandwidthSchedulesClientCreateOrUpdatePoller.Done() bool` +- New function `OrdersClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (OrdersClientCreateOrUpdateResponse, error)` +- New function `*StorageAccountCredentialsClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*DevicesClientInstallUpdatesPoller.Poll(context.Context) (*http.Response, error)` +- New function `*OperationsClientListPager.PageResponse() OperationsClientListResponse` +- New function `*DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller.ResumeToken() (string, error)` +- New function `*UsersClientCreateOrUpdatePoller.FinalResponse(context.Context) (UsersClientCreateOrUpdateResponse, error)` +- New function `*ContainersClientRefreshPoller.ResumeToken() (string, error)` +- New function `*AddonsClientDeletePoller.FinalResponse(context.Context) (AddonsClientDeleteResponse, error)` +- New function `*AddonsClientListByRolePager.Err() error` +- New function `*RolesClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `*RolesClientListByDataBoxEdgeDevicePager.PageResponse() RolesClientListByDataBoxEdgeDeviceResponse` +- New function `*OperationsClientListPager.Err() error` +- New function `*UsersClientDeletePoller.Done() bool` +- New function `*DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller.Done() bool` +- New function `*OrdersClientDeletePollerResponse.Resume(context.Context, *OrdersClient, string) error` +- New function `*AddonsClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `*MonitoringConfigClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `DeviceExtendedInfoProperties.MarshalJSON() ([]byte, error)` +- New function `*OrdersClientDeletePoller.FinalResponse(context.Context) (OrdersClientDeleteResponse, error)` +- New function `*SharesClientRefreshPoller.FinalResponse(context.Context) (SharesClientRefreshResponse, error)` +- New function `*UsersClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*StorageAccountsClientDeletePollerResponse.Resume(context.Context, *StorageAccountsClient, string) error` +- New function `SharesClientRefreshPollerResponse.PollUntilDone(context.Context, time.Duration) (SharesClientRefreshResponse, error)` +- New function `*IoTAddon.GetAddon() *Addon` +- New function `*BandwidthSchedulesClientDeletePollerResponse.Resume(context.Context, *BandwidthSchedulesClient, string) error` +- New function `*FileEventTrigger.GetTrigger() *Trigger` +- New function `*DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller.Done() bool` +- New function `*DevicesClientScanForUpdatesPoller.Poll(context.Context) (*http.Response, error)` +- New function `*AddonsClientDeletePoller.Done() bool` +- New function `*DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller.Poll(context.Context) (*http.Response, error)` +- New function `*DevicesClientScanForUpdatesPoller.Done() bool` +- New function `*MonitoringConfigClientCreateOrUpdatePoller.Done() bool` +- New function `*BandwidthSchedulesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*BandwidthSchedulesClientCreateOrUpdatePollerResponse.Resume(context.Context, *BandwidthSchedulesClient, string) error` +- New function `AddonsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (AddonsClientDeleteResponse, error)` +- New function `*TriggersClientDeletePoller.ResumeToken() (string, error)` +- New function `*StorageAccountCredentialsClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*StorageAccountsClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*IoTRole.GetRole() *Role` +- New function `*DevicesClientInstallUpdatesPoller.Done() bool` +- New function `*DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse.Resume(context.Context, *DiagnosticSettingsClient, string) error` +- New function `*BandwidthSchedulesClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*SharesClientRefreshPoller.ResumeToken() (string, error)` +- New function `*UsersClientDeletePollerResponse.Resume(context.Context, *UsersClient, string) error` +- New function `*SharesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*DevicesClientCreateOrUpdateSecuritySettingsPoller.FinalResponse(context.Context) (DevicesClientCreateOrUpdateSecuritySettingsResponse, error)` +- New function `*ContainersClientListByStorageAccountPager.PageResponse() ContainersClientListByStorageAccountResponse` +- New function `*TriggersClientCreateOrUpdateResult.UnmarshalJSON([]byte) error` +- New function `*NodesClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*StorageAccountsClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `*NodesClientListByDataBoxEdgeDevicePager.PageResponse() NodesClientListByDataBoxEdgeDeviceResponse` +- New function `*AddonsClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*OperationsClientListPager.NextPage(context.Context) bool` +- New function `MonitoringConfigClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (MonitoringConfigClientCreateOrUpdateResponse, error)` +- New function `*StorageAccountCredentialsClientDeletePoller.Done() bool` +- New function `StorageAccountCredentialsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (StorageAccountCredentialsClientDeleteResponse, error)` +- New function `*DevicesClientListBySubscriptionPager.NextPage(context.Context) bool` +- New function `*DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse.Resume(context.Context, *DiagnosticSettingsClient, string) error` +- New function `*RolesClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `TriggersClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (TriggersClientDeleteResponse, error)` +- New function `*AlertsClientListByDataBoxEdgeDevicePager.Err() error` +- New function `ContainersClientRefreshPollerResponse.PollUntilDone(context.Context, time.Duration) (ContainersClientRefreshResponse, error)` +- New function `*AddonsClientDeletePoller.ResumeToken() (string, error)` +- New function `*KubernetesRole.GetRole() *Role` +- New function `SupportPackagesClientTriggerSupportPackagePollerResponse.PollUntilDone(context.Context, time.Duration) (SupportPackagesClientTriggerSupportPackageResponse, error)` +- New function `*OrdersClientDeletePoller.Done() bool` +- New function `*DevicesClientListByResourceGroupPager.Err() error` +- New function `*ContainersClientRefreshPollerResponse.Resume(context.Context, *ContainersClient, string) error` +- New function `*DevicesClientInstallUpdatesPoller.FinalResponse(context.Context) (DevicesClientInstallUpdatesResponse, error)` +- New function `*ContainersClientRefreshPoller.Poll(context.Context) (*http.Response, error)` +- New function `*OrdersClientDeletePoller.ResumeToken() (string, error)` +- New function `*PeriodicTimerEventTrigger.GetTrigger() *Trigger` +- New function `*DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller.ResumeToken() (string, error)` +- New function `*RolesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*AddonsClientDeletePollerResponse.Resume(context.Context, *AddonsClient, string) error` +- New function `*DevicesClientDeletePoller.ResumeToken() (string, error)` +- New function `*DevicesClientInstallUpdatesPoller.ResumeToken() (string, error)` +- New function `*TriggersClientGetResult.UnmarshalJSON([]byte) error` +- New function `*DevicesClientDownloadUpdatesPoller.FinalResponse(context.Context) (DevicesClientDownloadUpdatesResponse, error)` +- New function `*TriggersClientCreateOrUpdatePollerResponse.Resume(context.Context, *TriggersClient, string) error` +- New function `*RolesClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*TriggersClientListByDataBoxEdgeDevicePager.PageResponse() TriggersClientListByDataBoxEdgeDeviceResponse` +- New function `*StorageAccountCredentialsClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `*AvailableSKUsClientListPager.PageResponse() AvailableSKUsClientListResponse` +- New function `*DevicesClientDownloadUpdatesPoller.Done() bool` +- New function `*SharesClientDeletePoller.Done() bool` +- New function `*DevicesClientListBySubscriptionPager.Err() error` +- New function `*DevicesClientInstallUpdatesPollerResponse.Resume(context.Context, *DevicesClient, string) error` +- New function `*StorageAccountCredentialsClientDeletePoller.FinalResponse(context.Context) (StorageAccountCredentialsClientDeleteResponse, error)` +- New function `*OrdersClientCreateOrUpdatePoller.FinalResponse(context.Context) (OrdersClientCreateOrUpdateResponse, error)` +- New function `*DevicesClientDeletePollerResponse.Resume(context.Context, *DevicesClient, string) error` +- New function `*MonitoringConfigClientDeletePollerResponse.Resume(context.Context, *MonitoringConfigClient, string) error` +- New function `DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse.PollUntilDone(context.Context, time.Duration) (DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse, error)` +- New function `*TriggersClientDeletePoller.FinalResponse(context.Context) (TriggersClientDeleteResponse, error)` +- New function `*DevicesClientDeletePoller.Done() bool` +- New function `*StorageAccountCredentialsClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `*DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller.FinalResponse(context.Context) (DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse, error)` +- New function `*DevicesClientCreateOrUpdateSecuritySettingsPoller.ResumeToken() (string, error)` +- New function `*AddonsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*OrdersClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*TriggersClientCreateOrUpdatePoller.Done() bool` +- New function `StorageAccountCredentialsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (StorageAccountCredentialsClientCreateOrUpdateResponse, error)` +- New function `*DevicesClientListByResourceGroupPager.PageResponse() DevicesClientListByResourceGroupResponse` +- New function `*SharesClientDeletePoller.ResumeToken() (string, error)` +- New function `*UsersClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*DevicesClientDownloadUpdatesPollerResponse.Resume(context.Context, *DevicesClient, string) error` +- New function `UsersClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (UsersClientCreateOrUpdateResponse, error)` +- New function `*ContainersClientCreateOrUpdatePollerResponse.Resume(context.Context, *ContainersClient, string) error` +- New function `*DevicesClientListByResourceGroupPager.NextPage(context.Context) bool` +- New function `*SharesClientDeletePollerResponse.Resume(context.Context, *SharesClient, string) error` +- New function `*RolesClientDeletePoller.ResumeToken() (string, error)` +- New function `*TriggersClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `TriggersClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (TriggersClientCreateOrUpdateResponse, error)` +- New function `AddonsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (AddonsClientCreateOrUpdateResponse, error)` +- New function `Device.MarshalJSON() ([]byte, error)` +- New function `*OrdersClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*SharesClientCreateOrUpdatePollerResponse.Resume(context.Context, *SharesClient, string) error` +- New function `*TriggersClientCreateOrUpdatePoller.FinalResponse(context.Context) (TriggersClientCreateOrUpdateResponse, error)` +- New function `SharesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (SharesClientCreateOrUpdateResponse, error)` +- New function `*ContainersClientListByStorageAccountPager.Err() error` +- New function `*DevicesClientScanForUpdatesPollerResponse.Resume(context.Context, *DevicesClient, string) error` +- New function `*SupportPackagesClientTriggerSupportPackagePollerResponse.Resume(context.Context, *SupportPackagesClient, string) error` +- New function `*BandwidthSchedulesClientDeletePoller.ResumeToken() (string, error)` +- New function `MonitoringConfigClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (MonitoringConfigClientDeleteResponse, error)` +- New function `*TriggersClientDeletePollerResponse.Resume(context.Context, *TriggersClient, string) error` +- New function `*TriggersClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `*CloudEdgeManagementRole.GetRole() *Role` +- New function `*TriggersClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*MECRole.GetRole() *Role` +- New function `*SharesClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*StorageAccountsClientCreateOrUpdatePoller.FinalResponse(context.Context) (StorageAccountsClientCreateOrUpdateResponse, error)` +- New function `*OrdersClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*StorageAccountsClientDeletePoller.Done() bool` +- New function `*MonitoringConfigClientDeletePoller.Done() bool` +- New function `*ContainersClientDeletePoller.Done() bool` +- New function `*ContainersClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `*ContainersClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*BandwidthSchedulesClientListByDataBoxEdgeDevicePager.PageResponse() BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse` +- New function `*SharesClientDeletePoller.FinalResponse(context.Context) (SharesClientDeleteResponse, error)` +- New function `*StorageAccountCredentialsClientListByDataBoxEdgeDevicePager.PageResponse() StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse` +- New function `*UsersClientCreateOrUpdatePollerResponse.Resume(context.Context, *UsersClient, string) error` +- New function `*AvailableSKUsClientListPager.NextPage(context.Context) bool` +- New function `*DevicesClientDownloadUpdatesPoller.Poll(context.Context) (*http.Response, error)` +- New function `DevicePatch.MarshalJSON() ([]byte, error)` +- New function `*StorageAccountsClientCreateOrUpdatePoller.Done() bool` +- New function `ContainersClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (ContainersClientDeleteResponse, error)` +- New function `*SupportPackagesClientTriggerSupportPackagePoller.Poll(context.Context) (*http.Response, error)` +- New function `*BandwidthSchedulesClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller.FinalResponse(context.Context) (DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse, error)` +- New function `*DevicesClientScanForUpdatesPoller.ResumeToken() (string, error)` +- New function `*ContainersClientRefreshPoller.FinalResponse(context.Context) (ContainersClientRefreshResponse, error)` +- New function `*ContainersClientRefreshPoller.Done() bool` +- New function `BandwidthSchedulesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BandwidthSchedulesClientCreateOrUpdateResponse, error)` +- New function `*DevicesClientCreateOrUpdateSecuritySettingsPoller.Done() bool` +- New function `BandwidthSchedulesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (BandwidthSchedulesClientDeleteResponse, error)` +- New function `*AddonsClientListByRolePager.NextPage(context.Context) bool` +- New function `*StorageAccountsClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*MonitoringConfigClientListPager.NextPage(context.Context) bool` +- New function `*UsersClientCreateOrUpdatePoller.ResumeToken() (string, error)` +- New function `SharesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (SharesClientDeleteResponse, error)` +- New function `*AddonsClientGetResult.UnmarshalJSON([]byte) error` +- New function `*ContainersClientListByStorageAccountPager.NextPage(context.Context) bool` +- New function `*ContainersClientDeletePoller.ResumeToken() (string, error)` +- New function `*SharesClientRefreshPoller.Poll(context.Context) (*http.Response, error)` +- New function `*UsersClientListByDataBoxEdgeDevicePager.PageResponse() UsersClientListByDataBoxEdgeDeviceResponse` +- New function `*StorageAccountCredentialsClientCreateOrUpdatePoller.Done() bool` +- New function `*UsersClientCreateOrUpdatePoller.Done() bool` +- New function `*DevicesClientListBySubscriptionPager.PageResponse() DevicesClientListBySubscriptionResponse` +- New function `*SharesClientListByDataBoxEdgeDevicePager.PageResponse() SharesClientListByDataBoxEdgeDeviceResponse` +- New function `*NodesClientListByDataBoxEdgeDevicePager.NextPage(context.Context) bool` +- New function `*SharesClientCreateOrUpdatePoller.FinalResponse(context.Context) (SharesClientCreateOrUpdateResponse, error)` +- New function `*MonitoringConfigClientDeletePoller.ResumeToken() (string, error)` +- New function `*TriggersClientDeletePoller.Done() bool` +- New function `SKU.MarshalJSON() ([]byte, error)` +- New function `*ContainersClientCreateOrUpdatePoller.Done() bool` +- New function `*SharesClientListByDataBoxEdgeDevicePager.Err() error` +- New function `*BandwidthSchedulesClientDeletePoller.FinalResponse(context.Context) (BandwidthSchedulesClientDeleteResponse, error)` +- New function `*BandwidthSchedulesClientCreateOrUpdatePoller.FinalResponse(context.Context) (BandwidthSchedulesClientCreateOrUpdateResponse, error)` +- New function `*MonitoringConfigClientDeletePoller.FinalResponse(context.Context) (MonitoringConfigClientDeleteResponse, error)` +- New function `*MonitoringConfigClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` +- New function `DevicesClientInstallUpdatesPollerResponse.PollUntilDone(context.Context, time.Duration) (DevicesClientInstallUpdatesResponse, error)` +- New function `StorageAccountsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (StorageAccountsClientCreateOrUpdateResponse, error)` +- New function `*AvailableSKUsClientListPager.Err() error` +- New function `ContainersClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ContainersClientCreateOrUpdateResponse, error)` +- New function `*StorageAccountCredentialsClientCreateOrUpdatePollerResponse.Resume(context.Context, *StorageAccountCredentialsClient, string) error` +- New function `*OrdersClientListByDataBoxEdgeDevicePager.PageResponse() OrdersClientListByDataBoxEdgeDeviceResponse` +- New function `*RolesClientDeletePoller.Poll(context.Context) (*http.Response, error)` +- New function `*AlertsClientListByDataBoxEdgeDevicePager.PageResponse() AlertsClientListByDataBoxEdgeDeviceResponse` +- New function `*SharesClientCreateOrUpdatePoller.Done() bool` +- New function `*RolesClientCreateOrUpdatePollerResponse.Resume(context.Context, *RolesClient, string) error` +- New function `*MonitoringConfigClientListPager.PageResponse() MonitoringConfigClientListResponse` +- New struct `AddonsClientBeginCreateOrUpdateOptions` +- New struct `AddonsClientBeginDeleteOptions` +- New struct `AddonsClientCreateOrUpdatePoller` +- New struct `AddonsClientCreateOrUpdatePollerResponse` +- New struct `AddonsClientCreateOrUpdateResponse` +- New struct `AddonsClientCreateOrUpdateResult` +- New struct `AddonsClientDeletePoller` +- New struct `AddonsClientDeletePollerResponse` +- New struct `AddonsClientDeleteResponse` +- New struct `AddonsClientGetOptions` +- New struct `AddonsClientGetResponse` +- New struct `AddonsClientGetResult` +- New struct `AddonsClientListByRoleOptions` +- New struct `AddonsClientListByRolePager` +- New struct `AddonsClientListByRoleResponse` +- New struct `AddonsClientListByRoleResult` +- New struct `AlertsClientGetOptions` +- New struct `AlertsClientGetResponse` +- New struct `AlertsClientGetResult` +- New struct `AlertsClientListByDataBoxEdgeDeviceOptions` +- New struct `AlertsClientListByDataBoxEdgeDevicePager` +- New struct `AlertsClientListByDataBoxEdgeDeviceResponse` +- New struct `AlertsClientListByDataBoxEdgeDeviceResult` +- New struct `AvailableSKUsClientListOptions` +- New struct `AvailableSKUsClientListPager` +- New struct `AvailableSKUsClientListResponse` +- New struct `AvailableSKUsClientListResult` +- New struct `BandwidthSchedulesClientBeginCreateOrUpdateOptions` +- New struct `BandwidthSchedulesClientBeginDeleteOptions` +- New struct `BandwidthSchedulesClientCreateOrUpdatePoller` +- New struct `BandwidthSchedulesClientCreateOrUpdatePollerResponse` +- New struct `BandwidthSchedulesClientCreateOrUpdateResponse` +- New struct `BandwidthSchedulesClientCreateOrUpdateResult` +- New struct `BandwidthSchedulesClientDeletePoller` +- New struct `BandwidthSchedulesClientDeletePollerResponse` +- New struct `BandwidthSchedulesClientDeleteResponse` +- New struct `BandwidthSchedulesClientGetOptions` +- New struct `BandwidthSchedulesClientGetResponse` +- New struct `BandwidthSchedulesClientGetResult` +- New struct `BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions` +- New struct `BandwidthSchedulesClientListByDataBoxEdgeDevicePager` +- New struct `BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse` +- New struct `BandwidthSchedulesClientListByDataBoxEdgeDeviceResult` +- New struct `ContainersClientBeginCreateOrUpdateOptions` +- New struct `ContainersClientBeginDeleteOptions` +- New struct `ContainersClientBeginRefreshOptions` +- New struct `ContainersClientCreateOrUpdatePoller` +- New struct `ContainersClientCreateOrUpdatePollerResponse` +- New struct `ContainersClientCreateOrUpdateResponse` +- New struct `ContainersClientCreateOrUpdateResult` +- New struct `ContainersClientDeletePoller` +- New struct `ContainersClientDeletePollerResponse` +- New struct `ContainersClientDeleteResponse` +- New struct `ContainersClientGetOptions` +- New struct `ContainersClientGetResponse` +- New struct `ContainersClientGetResult` +- New struct `ContainersClientListByStorageAccountOptions` +- New struct `ContainersClientListByStorageAccountPager` +- New struct `ContainersClientListByStorageAccountResponse` +- New struct `ContainersClientListByStorageAccountResult` +- New struct `ContainersClientRefreshPoller` +- New struct `ContainersClientRefreshPollerResponse` +- New struct `ContainersClientRefreshResponse` +- New struct `Device` +- New struct `DeviceExtendedInfo` +- New struct `DeviceExtendedInfoPatch` +- New struct `DeviceExtendedInfoProperties` +- New struct `DeviceList` +- New struct `DevicePatch` +- New struct `DeviceProperties` +- New struct `DevicePropertiesPatch` +- New struct `DevicesClientBeginCreateOrUpdateSecuritySettingsOptions` +- New struct `DevicesClientBeginDeleteOptions` +- New struct `DevicesClientBeginDownloadUpdatesOptions` +- New struct `DevicesClientBeginInstallUpdatesOptions` +- New struct `DevicesClientBeginScanForUpdatesOptions` +- New struct `DevicesClientCreateOrUpdateOptions` +- New struct `DevicesClientCreateOrUpdateResponse` +- New struct `DevicesClientCreateOrUpdateResult` +- New struct `DevicesClientCreateOrUpdateSecuritySettingsPoller` +- New struct `DevicesClientCreateOrUpdateSecuritySettingsPollerResponse` +- New struct `DevicesClientCreateOrUpdateSecuritySettingsResponse` +- New struct `DevicesClientDeletePoller` +- New struct `DevicesClientDeletePollerResponse` +- New struct `DevicesClientDeleteResponse` +- New struct `DevicesClientDownloadUpdatesPoller` +- New struct `DevicesClientDownloadUpdatesPollerResponse` +- New struct `DevicesClientDownloadUpdatesResponse` +- New struct `DevicesClientGenerateCertificateOptions` +- New struct `DevicesClientGenerateCertificateResponse` +- New struct `DevicesClientGenerateCertificateResult` +- New struct `DevicesClientGetExtendedInformationOptions` +- New struct `DevicesClientGetExtendedInformationResponse` +- New struct `DevicesClientGetExtendedInformationResult` +- New struct `DevicesClientGetNetworkSettingsOptions` +- New struct `DevicesClientGetNetworkSettingsResponse` +- New struct `DevicesClientGetNetworkSettingsResult` +- New struct `DevicesClientGetOptions` +- New struct `DevicesClientGetResponse` +- New struct `DevicesClientGetResult` +- New struct `DevicesClientGetUpdateSummaryOptions` +- New struct `DevicesClientGetUpdateSummaryResponse` +- New struct `DevicesClientGetUpdateSummaryResult` +- New struct `DevicesClientInstallUpdatesPoller` +- New struct `DevicesClientInstallUpdatesPollerResponse` +- New struct `DevicesClientInstallUpdatesResponse` +- New struct `DevicesClientListByResourceGroupOptions` +- New struct `DevicesClientListByResourceGroupPager` +- New struct `DevicesClientListByResourceGroupResponse` +- New struct `DevicesClientListByResourceGroupResult` +- New struct `DevicesClientListBySubscriptionOptions` +- New struct `DevicesClientListBySubscriptionPager` +- New struct `DevicesClientListBySubscriptionResponse` +- New struct `DevicesClientListBySubscriptionResult` +- New struct `DevicesClientScanForUpdatesPoller` +- New struct `DevicesClientScanForUpdatesPollerResponse` +- New struct `DevicesClientScanForUpdatesResponse` +- New struct `DevicesClientUpdateExtendedInformationOptions` +- New struct `DevicesClientUpdateExtendedInformationResponse` +- New struct `DevicesClientUpdateExtendedInformationResult` +- New struct `DevicesClientUpdateOptions` +- New struct `DevicesClientUpdateResponse` +- New struct `DevicesClientUpdateResult` +- New struct `DevicesClientUploadCertificateOptions` +- New struct `DevicesClientUploadCertificateResponse` +- New struct `DevicesClientUploadCertificateResult` +- New struct `DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions` +- New struct `DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions` +- New struct `DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsOptions` +- New struct `DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse` +- New struct `DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResult` +- New struct `DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsOptions` +- New struct `DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse` +- New struct `DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResult` +- New struct `DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller` +- New struct `DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse` +- New struct `DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse` +- New struct `DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResult` +- New struct `DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller` +- New struct `DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse` +- New struct `DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse` +- New struct `DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResult` +- New struct `JobsClientGetOptions` +- New struct `JobsClientGetResponse` +- New struct `JobsClientGetResult` +- New struct `MonitoringConfigClientBeginCreateOrUpdateOptions` +- New struct `MonitoringConfigClientBeginDeleteOptions` +- New struct `MonitoringConfigClientCreateOrUpdatePoller` +- New struct `MonitoringConfigClientCreateOrUpdatePollerResponse` +- New struct `MonitoringConfigClientCreateOrUpdateResponse` +- New struct `MonitoringConfigClientCreateOrUpdateResult` +- New struct `MonitoringConfigClientDeletePoller` +- New struct `MonitoringConfigClientDeletePollerResponse` +- New struct `MonitoringConfigClientDeleteResponse` +- New struct `MonitoringConfigClientGetOptions` +- New struct `MonitoringConfigClientGetResponse` +- New struct `MonitoringConfigClientGetResult` +- New struct `MonitoringConfigClientListOptions` +- New struct `MonitoringConfigClientListPager` +- New struct `MonitoringConfigClientListResponse` +- New struct `MonitoringConfigClientListResult` +- New struct `NodesClientListByDataBoxEdgeDeviceOptions` +- New struct `NodesClientListByDataBoxEdgeDevicePager` +- New struct `NodesClientListByDataBoxEdgeDeviceResponse` +- New struct `NodesClientListByDataBoxEdgeDeviceResult` +- New struct `OperationsClientListOptions` +- New struct `OperationsClientListPager` +- New struct `OperationsClientListResponse` +- New struct `OperationsClientListResult` +- New struct `OperationsStatusClientGetOptions` +- New struct `OperationsStatusClientGetResponse` +- New struct `OperationsStatusClientGetResult` +- New struct `OrdersClientBeginCreateOrUpdateOptions` +- New struct `OrdersClientBeginDeleteOptions` +- New struct `OrdersClientCreateOrUpdatePoller` +- New struct `OrdersClientCreateOrUpdatePollerResponse` +- New struct `OrdersClientCreateOrUpdateResponse` +- New struct `OrdersClientCreateOrUpdateResult` +- New struct `OrdersClientDeletePoller` +- New struct `OrdersClientDeletePollerResponse` +- New struct `OrdersClientDeleteResponse` +- New struct `OrdersClientGetOptions` +- New struct `OrdersClientGetResponse` +- New struct `OrdersClientGetResult` +- New struct `OrdersClientListByDataBoxEdgeDeviceOptions` +- New struct `OrdersClientListByDataBoxEdgeDevicePager` +- New struct `OrdersClientListByDataBoxEdgeDeviceResponse` +- New struct `OrdersClientListByDataBoxEdgeDeviceResult` +- New struct `OrdersClientListDCAccessCodeOptions` +- New struct `OrdersClientListDCAccessCodeResponse` +- New struct `OrdersClientListDCAccessCodeResult` +- New struct `RolesClientBeginCreateOrUpdateOptions` +- New struct `RolesClientBeginDeleteOptions` +- New struct `RolesClientCreateOrUpdatePoller` +- New struct `RolesClientCreateOrUpdatePollerResponse` +- New struct `RolesClientCreateOrUpdateResponse` +- New struct `RolesClientCreateOrUpdateResult` +- New struct `RolesClientDeletePoller` +- New struct `RolesClientDeletePollerResponse` +- New struct `RolesClientDeleteResponse` +- New struct `RolesClientGetOptions` +- New struct `RolesClientGetResponse` +- New struct `RolesClientGetResult` +- New struct `RolesClientListByDataBoxEdgeDeviceOptions` +- New struct `RolesClientListByDataBoxEdgeDevicePager` +- New struct `RolesClientListByDataBoxEdgeDeviceResponse` +- New struct `RolesClientListByDataBoxEdgeDeviceResult` +- New struct `SKUInfo` +- New struct `SKUList` +- New struct `SharesClientBeginCreateOrUpdateOptions` +- New struct `SharesClientBeginDeleteOptions` +- New struct `SharesClientBeginRefreshOptions` +- New struct `SharesClientCreateOrUpdatePoller` +- New struct `SharesClientCreateOrUpdatePollerResponse` +- New struct `SharesClientCreateOrUpdateResponse` +- New struct `SharesClientCreateOrUpdateResult` +- New struct `SharesClientDeletePoller` +- New struct `SharesClientDeletePollerResponse` +- New struct `SharesClientDeleteResponse` +- New struct `SharesClientGetOptions` +- New struct `SharesClientGetResponse` +- New struct `SharesClientGetResult` +- New struct `SharesClientListByDataBoxEdgeDeviceOptions` +- New struct `SharesClientListByDataBoxEdgeDevicePager` +- New struct `SharesClientListByDataBoxEdgeDeviceResponse` +- New struct `SharesClientListByDataBoxEdgeDeviceResult` +- New struct `SharesClientRefreshPoller` +- New struct `SharesClientRefreshPollerResponse` +- New struct `SharesClientRefreshResponse` +- New struct `StorageAccountCredentialsClientBeginCreateOrUpdateOptions` +- New struct `StorageAccountCredentialsClientBeginDeleteOptions` +- New struct `StorageAccountCredentialsClientCreateOrUpdatePoller` +- New struct `StorageAccountCredentialsClientCreateOrUpdatePollerResponse` +- New struct `StorageAccountCredentialsClientCreateOrUpdateResponse` +- New struct `StorageAccountCredentialsClientCreateOrUpdateResult` +- New struct `StorageAccountCredentialsClientDeletePoller` +- New struct `StorageAccountCredentialsClientDeletePollerResponse` +- New struct `StorageAccountCredentialsClientDeleteResponse` +- New struct `StorageAccountCredentialsClientGetOptions` +- New struct `StorageAccountCredentialsClientGetResponse` +- New struct `StorageAccountCredentialsClientGetResult` +- New struct `StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions` +- New struct `StorageAccountCredentialsClientListByDataBoxEdgeDevicePager` +- New struct `StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse` +- New struct `StorageAccountCredentialsClientListByDataBoxEdgeDeviceResult` +- New struct `StorageAccountsClientBeginCreateOrUpdateOptions` +- New struct `StorageAccountsClientBeginDeleteOptions` +- New struct `StorageAccountsClientCreateOrUpdatePoller` +- New struct `StorageAccountsClientCreateOrUpdatePollerResponse` +- New struct `StorageAccountsClientCreateOrUpdateResponse` +- New struct `StorageAccountsClientCreateOrUpdateResult` +- New struct `StorageAccountsClientDeletePoller` +- New struct `StorageAccountsClientDeletePollerResponse` +- New struct `StorageAccountsClientDeleteResponse` +- New struct `StorageAccountsClientGetOptions` +- New struct `StorageAccountsClientGetResponse` +- New struct `StorageAccountsClientGetResult` +- New struct `StorageAccountsClientListByDataBoxEdgeDeviceOptions` +- New struct `StorageAccountsClientListByDataBoxEdgeDevicePager` +- New struct `StorageAccountsClientListByDataBoxEdgeDeviceResponse` +- New struct `StorageAccountsClientListByDataBoxEdgeDeviceResult` +- New struct `SupportPackagesClientBeginTriggerSupportPackageOptions` +- New struct `SupportPackagesClientTriggerSupportPackagePoller` +- New struct `SupportPackagesClientTriggerSupportPackagePollerResponse` +- New struct `SupportPackagesClientTriggerSupportPackageResponse` +- New struct `TriggersClientBeginCreateOrUpdateOptions` +- New struct `TriggersClientBeginDeleteOptions` +- New struct `TriggersClientCreateOrUpdatePoller` +- New struct `TriggersClientCreateOrUpdatePollerResponse` +- New struct `TriggersClientCreateOrUpdateResponse` +- New struct `TriggersClientCreateOrUpdateResult` +- New struct `TriggersClientDeletePoller` +- New struct `TriggersClientDeletePollerResponse` +- New struct `TriggersClientDeleteResponse` +- New struct `TriggersClientGetOptions` +- New struct `TriggersClientGetResponse` +- New struct `TriggersClientGetResult` +- New struct `TriggersClientListByDataBoxEdgeDeviceOptions` +- New struct `TriggersClientListByDataBoxEdgeDevicePager` +- New struct `TriggersClientListByDataBoxEdgeDeviceResponse` +- New struct `TriggersClientListByDataBoxEdgeDeviceResult` +- New struct `UsersClientBeginCreateOrUpdateOptions` +- New struct `UsersClientBeginDeleteOptions` +- New struct `UsersClientCreateOrUpdatePoller` +- New struct `UsersClientCreateOrUpdatePollerResponse` +- New struct `UsersClientCreateOrUpdateResponse` +- New struct `UsersClientCreateOrUpdateResult` +- New struct `UsersClientDeletePoller` +- New struct `UsersClientDeletePollerResponse` +- New struct `UsersClientDeleteResponse` +- New struct `UsersClientGetOptions` +- New struct `UsersClientGetResponse` +- New struct `UsersClientGetResult` +- New struct `UsersClientListByDataBoxEdgeDeviceOptions` +- New struct `UsersClientListByDataBoxEdgeDevicePager` +- New struct `UsersClientListByDataBoxEdgeDeviceResponse` +- New struct `UsersClientListByDataBoxEdgeDeviceResult` +- New field `ID` in struct `Share` +- New field `Name` in struct `Share` +- New field `Type` in struct `Share` +- New field `ID` in struct `KubernetesRole` +- New field `Name` in struct `KubernetesRole` +- New field `SystemData` in struct `KubernetesRole` +- New field `Type` in struct `KubernetesRole` +- New field `Kind` in struct `KubernetesRole` +- New field `ID` in struct `User` +- New field `Name` in struct `User` +- New field `Type` in struct `User` +- New field `ID` in struct `UpdateSummary` +- New field `Name` in struct `UpdateSummary` +- New field `Type` in struct `UpdateSummary` +- New field `ID` in struct `MonitoringMetricConfiguration` +- New field `Name` in struct `MonitoringMetricConfiguration` +- New field `Type` in struct `MonitoringMetricConfiguration` +- New field `SystemData` in struct `MECRole` +- New field `Type` in struct `MECRole` +- New field `Kind` in struct `MECRole` +- New field `ID` in struct `MECRole` +- New field `Name` in struct `MECRole` +- New field `Kind` in struct `CloudEdgeManagementRole` +- New field `ID` in struct `CloudEdgeManagementRole` +- New field `Name` in struct `CloudEdgeManagementRole` +- New field `SystemData` in struct `CloudEdgeManagementRole` +- New field `Type` in struct `CloudEdgeManagementRole` +- New field `Type` in struct `ArcAddon` +- New field `Kind` in struct `ArcAddon` +- New field `ID` in struct `ArcAddon` +- New field `Name` in struct `ArcAddon` +- New field `SystemData` in struct `ArcAddon` +- New field `APIVersions` in struct `SKU` +- New field `Size` in struct `SKU` +- New field `Capabilities` in struct `SKU` +- New field `Costs` in struct `SKU` +- New field `SignupOption` in struct `SKU` +- New field `Availability` in struct `SKU` +- New field `Version` in struct `SKU` +- New field `LocationInfo` in struct `SKU` +- New field `ShipmentTypes` in struct `SKU` +- New field `Family` in struct `SKU` +- New field `Kind` in struct `SKU` +- New field `ResourceType` in struct `SKU` +- New field `Locations` in struct `SKU` +- New field `ID` in struct `FileEventTrigger` +- New field `Name` in struct `FileEventTrigger` +- New field `SystemData` in struct `FileEventTrigger` +- New field `Type` in struct `FileEventTrigger` +- New field `Kind` in struct `FileEventTrigger` +- New field `Type` in struct `Order` +- New field `ID` in struct `Order` +- New field `Name` in struct `Order` +- New field `ID` in struct `DiagnosticRemoteSupportSettings` +- New field `Name` in struct `DiagnosticRemoteSupportSettings` +- New field `Type` in struct `DiagnosticRemoteSupportSettings` +- New field `Kind` in struct `IoTAddon` +- New field `ID` in struct `IoTAddon` +- New field `Name` in struct `IoTAddon` +- New field `SystemData` in struct `IoTAddon` +- New field `Type` in struct `IoTAddon` +- New field `ID` in struct `Alert` +- New field `Name` in struct `Alert` +- New field `Type` in struct `Alert` +- New field `ID` in struct `BandwidthSchedule` +- New field `Name` in struct `BandwidthSchedule` +- New field `Type` in struct `BandwidthSchedule` +- New field `ID` in struct `Trigger` +- New field `Name` in struct `Trigger` +- New field `Type` in struct `Trigger` +- New field `Name` in struct `Node` +- New field `Type` in struct `Node` +- New field `ID` in struct `Node` +- New field `ID` in struct `StorageAccount` +- New field `Name` in struct `StorageAccount` +- New field `Type` in struct `StorageAccount` +- New field `ID` in struct `StorageAccountCredential` +- New field `Name` in struct `StorageAccountCredential` +- New field `Type` in struct `StorageAccountCredential` +- New field `Name` in struct `NetworkSettings` +- New field `Type` in struct `NetworkSettings` +- New field `ID` in struct `NetworkSettings` +- New field `ID` in struct `Container` +- New field `Name` in struct `Container` +- New field `Type` in struct `Container` +- New field `Type` in struct `Addon` +- New field `ID` in struct `Addon` +- New field `Name` in struct `Addon` +- New field `Name` in struct `Role` +- New field `Type` in struct `Role` +- New field `ID` in struct `Role` +- New field `ID` in struct `IoTRole` +- New field `Name` in struct `IoTRole` +- New field `SystemData` in struct `IoTRole` +- New field `Type` in struct `IoTRole` +- New field `Kind` in struct `IoTRole` +- New field `ID` in struct `PeriodicTimerEventTrigger` +- New field `Name` in struct `PeriodicTimerEventTrigger` +- New field `SystemData` in struct `PeriodicTimerEventTrigger` +- New field `Type` in struct `PeriodicTimerEventTrigger` +- New field `Kind` in struct `PeriodicTimerEventTrigger` +- New field `Type` in struct `DiagnosticProactiveLogCollectionSettings` +- New field `ID` in struct `DiagnosticProactiveLogCollectionSettings` +- New field `Name` in struct `DiagnosticProactiveLogCollectionSettings` +- New field `Name` in struct `SecuritySettings` +- New field `Type` in struct `SecuritySettings` +- New field `ID` in struct `SecuritySettings` +- New field `ID` in struct `TriggerSupportPackageRequest` +- New field `Name` in struct `TriggerSupportPackageRequest` +- New field `Type` in struct `TriggerSupportPackageRequest` + + ## 0.1.0 (2021-12-01) - Initial preview release. diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/autorest.md b/sdk/resourcemanager/databoxedge/armdataboxedge/autorest.md index 2afc1f95f7d2..4cac8464c16c 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/autorest.md +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/754938e4cb9416358b02dcc11f444adf14b3b7b6/specification/databoxedge/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/754938e4cb9416358b02dcc11f444adf14b3b7b6/specification/databoxedge/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/cf47fa91b882618a1043e3aeb5803b3a7397cd08/specification/databoxedge/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/cf47fa91b882618a1043e3aeb5803b3a7397cd08/specification/databoxedge/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.1.0 +module-version: 0.2.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/go.mod b/sdk/resourcemanager/databoxedge/armdataboxedge/go.mod index 725790aff351..afb3cfbc3a6e 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/go.mod +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdata go 1.16 require ( - github.com/Azure/azure-sdk-for-go v59.3.0+incompatible - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.20.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.12.0 + github.com/Azure/azure-sdk-for-go v61.3.0+incompatible + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.0 ) diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/go.sum b/sdk/resourcemanager/databoxedge/armdataboxedge/go.sum index aad393cff856..666ec1c36f73 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/go.sum +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/go.sum @@ -1,18 +1,28 @@ -github.com/Azure/azure-sdk-for-go v59.3.0+incompatible h1:dPIm0BO4jsMXFcCI/sLTPkBtE7mk8WMuRHA0JeWhlcQ= -github.com/Azure/azure-sdk-for-go v59.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.20.0 h1:KQgdWmEOmaJKxaUUZwHAYh12t+b+ZJf8q3friycK1kA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.20.0/go.mod h1:ZPW/Z0kLCTdDZaDbYTetxc9Cxl/2lNqxYHYNOF2bti0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.12.0 h1:VBvHGLJbaY0+c66NZHdS9cgjHVYSH6DDa0XJMyrblsI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.12.0/go.mod h1:GJzjM4SR9T0KyX5gKCVyz1ytD8FeWeUPCwtFCt1AyfE= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.1 h1:BUYIbDf/mMZ8945v3QkG3OuqGVyS4Iek0AOLwdRAYoc= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.1/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go v61.3.0+incompatible h1:k7MKrYcGwX5qh+fC9xVhcEuaZajFfbDYMEgo8oemTLo= +github.com/Azure/azure-sdk-for-go v61.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0 h1:8wVJL0HUP5yDFXvotdewORTw7Yu88JbreWN/mobSvsQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.0 h1:bLRntPH25SkY1uZ/YZW+dmxNky9r1fAHvDFrzluo+4Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.0/go.mod h1:TmXReXZ9yPp5D5TBRMTAtyz+UyOl15Py4hL5E5p6igQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +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.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +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/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/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -24,21 +34,27 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNm golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_addons_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_addons_client_test.go index 176c774d87d9..7e463d88465e 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_addons_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_addons_client_test.go @@ -31,12 +31,16 @@ func ExampleAddonsClient_ListByRole() { "", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("AddonClassification.GetAddon().ID: %s\n", *v.GetAddon().ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -58,7 +62,7 @@ func ExampleAddonsClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("AddonClassification.GetAddon().ID: %s\n", *res.GetAddon().ID) + log.Printf("Response result: %#v\n", res.AddonsClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/PutAddons.json @@ -75,9 +79,7 @@ func ExampleAddonsClient_BeginCreateOrUpdate() { "", "", &armdataboxedge.ArcAddon{ - Addon: armdataboxedge.Addon{ - Kind: armdataboxedge.AddonTypeArcForKubernetes.ToPtr(), - }, + Kind: armdataboxedge.AddonType("ArcForKubernetes").ToPtr(), Properties: &armdataboxedge.ArcAddonProperties{ ResourceGroupName: to.StringPtr(""), ResourceLocation: to.StringPtr(""), @@ -93,7 +95,7 @@ func ExampleAddonsClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("AddonClassification.GetAddon().ID: %s\n", *res.GetAddon().ID) + log.Printf("Response result: %#v\n", res.AddonsClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/DeleteAddons.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_alerts_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_alerts_client_test.go index cadd79a76da6..e1423e7c162a 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_alerts_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_alerts_client_test.go @@ -27,12 +27,16 @@ func ExampleAlertsClient_ListByDataBoxEdgeDevice() { pager := client.ListByDataBoxEdgeDevice("", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("Alert.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -53,5 +57,5 @@ func ExampleAlertsClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("Alert.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.AlertsClientGetResult) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_availableskus_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_availableskus_client_test.go index 1445b4eed90d..b4c14b63161d 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_availableskus_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_availableskus_client_test.go @@ -25,9 +25,16 @@ func ExampleAvailableSKUsClient_List() { ctx := context.Background() client := armdataboxedge.NewAvailableSKUsClient("", cred, nil) pager := client.List(nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } + for _, v := range pager.PageResponse().Value { + log.Printf("Pager result: %#v\n", v) + } } } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_bandwidthschedules_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_bandwidthschedules_client_test.go index 8b948c158631..899ef118c462 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_bandwidthschedules_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_bandwidthschedules_client_test.go @@ -30,12 +30,16 @@ func ExampleBandwidthSchedulesClient_ListByDataBoxEdgeDevice() { pager := client.ListByDataBoxEdgeDevice("", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("BandwidthSchedule.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -56,7 +60,7 @@ func ExampleBandwidthSchedulesClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("BandwidthSchedule.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.BandwidthSchedulesClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/BandwidthSchedulePut.json @@ -74,8 +78,8 @@ func ExampleBandwidthSchedulesClient_BeginCreateOrUpdate() { armdataboxedge.BandwidthSchedule{ Properties: &armdataboxedge.BandwidthScheduleProperties{ Days: []*armdataboxedge.DayOfWeek{ - armdataboxedge.DayOfWeekSunday.ToPtr(), - armdataboxedge.DayOfWeekMonday.ToPtr()}, + armdataboxedge.DayOfWeek("Sunday").ToPtr(), + armdataboxedge.DayOfWeek("Monday").ToPtr()}, RateInMbps: to.Int32Ptr(100), Start: to.StringPtr(""), Stop: to.StringPtr(""), @@ -89,7 +93,7 @@ func ExampleBandwidthSchedulesClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("BandwidthSchedule.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.BandwidthSchedulesClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/BandwidthScheduleDelete.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_containers_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_containers_client_test.go index 093f6847c191..de751ce1f8d4 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_containers_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_containers_client_test.go @@ -30,12 +30,16 @@ func ExampleContainersClient_ListByStorageAccount() { "", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("Container.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -57,7 +61,7 @@ func ExampleContainersClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("Container.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.ContainersClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/ContainerPut.json @@ -75,7 +79,7 @@ func ExampleContainersClient_BeginCreateOrUpdate() { "", armdataboxedge.Container{ Properties: &armdataboxedge.ContainerProperties{ - DataFormat: armdataboxedge.AzureContainerDataFormatBlockBlob.ToPtr(), + DataFormat: armdataboxedge.AzureContainerDataFormat("BlockBlob").ToPtr(), }, }, nil) @@ -86,7 +90,7 @@ func ExampleContainersClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("Container.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.ContainersClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/ContainerDelete.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devices_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devices_client_test.go index 369c16047027..8bd787fc9713 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devices_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devices_client_test.go @@ -27,13 +27,17 @@ func ExampleDevicesClient_ListBySubscription() { } ctx := context.Background() client := armdataboxedge.NewDevicesClient("", cred, nil) - pager := client.ListBySubscription(&armdataboxedge.DevicesListBySubscriptionOptions{Expand: nil}) - for pager.NextPage(ctx) { + pager := client.ListBySubscription(&armdataboxedge.DevicesClientListBySubscriptionOptions{Expand: nil}) + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("DataBoxEdgeDevice.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -47,13 +51,17 @@ func ExampleDevicesClient_ListByResourceGroup() { ctx := context.Background() client := armdataboxedge.NewDevicesClient("", cred, nil) pager := client.ListByResourceGroup("", - &armdataboxedge.DevicesListByResourceGroupOptions{Expand: nil}) - for pager.NextPage(ctx) { + &armdataboxedge.DevicesClientListByResourceGroupOptions{Expand: nil}) + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("DataBoxEdgeDevice.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -73,7 +81,7 @@ func ExampleDevicesClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("DataBoxEdgeDevice.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DevicesClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/DataBoxEdgeDevicePut.json @@ -87,11 +95,11 @@ func ExampleDevicesClient_CreateOrUpdate() { res, err := client.CreateOrUpdate(ctx, "", "", - armdataboxedge.DataBoxEdgeDevice{ + armdataboxedge.Device{ Location: to.StringPtr(""), - SKU: &armdataboxedge.SKU{ - Name: armdataboxedge.SKUNameEdge.ToPtr(), - Tier: armdataboxedge.SKUTierStandard.ToPtr(), + SKU: &armdataboxedge.SKUInfo{ + Name: armdataboxedge.SKUName("Edge").ToPtr(), + Tier: armdataboxedge.SKUTier("Standard").ToPtr(), }, Tags: map[string]*string{}, }, @@ -99,7 +107,7 @@ func ExampleDevicesClient_CreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("DataBoxEdgeDevice.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DevicesClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/DataBoxEdgeDeviceDelete.json @@ -134,8 +142,8 @@ func ExampleDevicesClient_Update() { res, err := client.Update(ctx, "", "", - armdataboxedge.DataBoxEdgeDevicePatch{ - Properties: &armdataboxedge.DataBoxEdgeDevicePropertiesPatch{ + armdataboxedge.DevicePatch{ + Properties: &armdataboxedge.DevicePropertiesPatch{ EdgeProfile: &armdataboxedge.EdgeProfilePatch{ Subscription: &armdataboxedge.EdgeProfileSubscriptionPatch{ ID: to.StringPtr(""), @@ -147,7 +155,7 @@ func ExampleDevicesClient_Update() { if err != nil { log.Fatal(err) } - log.Printf("DataBoxEdgeDevice.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DevicesClientUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/DownloadUpdatesPost.json @@ -179,13 +187,14 @@ func ExampleDevicesClient_GenerateCertificate() { } ctx := context.Background() client := armdataboxedge.NewDevicesClient("", cred, nil) - _, err = client.GenerateCertificate(ctx, + res, err := client.GenerateCertificate(ctx, "", "", nil) if err != nil { log.Fatal(err) } + log.Printf("Response result: %#v\n", res.DevicesClientGenerateCertificateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/ExtendedInfoPost.json @@ -203,7 +212,7 @@ func ExampleDevicesClient_GetExtendedInformation() { if err != nil { log.Fatal(err) } - log.Printf("DataBoxEdgeDeviceExtendedInfo.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DevicesClientGetExtendedInformationResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/InstallUpdatesPost.json @@ -242,7 +251,7 @@ func ExampleDevicesClient_GetNetworkSettings() { if err != nil { log.Fatal(err) } - log.Printf("NetworkSettings.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DevicesClientGetNetworkSettingsResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/ScanForUpdatesPost.json @@ -280,7 +289,7 @@ func ExampleDevicesClient_BeginCreateOrUpdateSecuritySettings() { armdataboxedge.SecuritySettings{ Properties: &armdataboxedge.SecuritySettingsProperties{ DeviceAdminPassword: &armdataboxedge.AsymmetricEncryptedSecret{ - EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithmAES256.ToPtr(), + EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithm("AES256").ToPtr(), EncryptionCertThumbprint: to.StringPtr(""), Value: to.StringPtr(""), }, @@ -307,12 +316,12 @@ func ExampleDevicesClient_UpdateExtendedInformation() { res, err := client.UpdateExtendedInformation(ctx, "", "", - armdataboxedge.DataBoxEdgeDeviceExtendedInfoPatch{}, + armdataboxedge.DeviceExtendedInfoPatch{}, nil) if err != nil { log.Fatal(err) } - log.Printf("DataBoxEdgeDeviceExtendedInfo.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DevicesClientUpdateExtendedInformationResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/UpdateSummaryGet.json @@ -330,7 +339,7 @@ func ExampleDevicesClient_GetUpdateSummary() { if err != nil { log.Fatal(err) } - log.Printf("UpdateSummary.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DevicesClientGetUpdateSummaryResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/UploadCertificatePost.json @@ -341,7 +350,7 @@ func ExampleDevicesClient_UploadCertificate() { } ctx := context.Background() client := armdataboxedge.NewDevicesClient("", cred, nil) - _, err = client.UploadCertificate(ctx, + res, err := client.UploadCertificate(ctx, "", "", armdataboxedge.UploadCertificateRequest{ @@ -353,4 +362,5 @@ func ExampleDevicesClient_UploadCertificate() { if err != nil { log.Fatal(err) } + log.Printf("Response result: %#v\n", res.DevicesClientUploadCertificateResult) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_diagnosticsettings_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_diagnosticsettings_client_test.go index 91cbae9c3381..cc6b56403082 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_diagnosticsettings_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_diagnosticsettings_client_test.go @@ -34,7 +34,7 @@ func ExampleDiagnosticSettingsClient_GetDiagnosticProactiveLogCollectionSettings if err != nil { log.Fatal(err) } - log.Printf("DiagnosticProactiveLogCollectionSettings.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/UpdateDiagnosticProactiveLogCollectionSettings.json @@ -50,7 +50,7 @@ func ExampleDiagnosticSettingsClient_BeginUpdateDiagnosticProactiveLogCollection "", armdataboxedge.DiagnosticProactiveLogCollectionSettings{ Properties: &armdataboxedge.ProactiveLogCollectionSettingsProperties{ - UserConsent: armdataboxedge.ProactiveDiagnosticsConsentEnabled.ToPtr(), + UserConsent: armdataboxedge.ProactiveDiagnosticsConsent("Enabled").ToPtr(), }, }, nil) @@ -61,7 +61,7 @@ func ExampleDiagnosticSettingsClient_BeginUpdateDiagnosticProactiveLogCollection if err != nil { log.Fatal(err) } - log.Printf("DiagnosticProactiveLogCollectionSettings.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/GetDiagnosticRemoteSupportSettings.json @@ -79,7 +79,7 @@ func ExampleDiagnosticSettingsClient_GetDiagnosticRemoteSupportSettings() { if err != nil { log.Fatal(err) } - log.Printf("DiagnosticRemoteSupportSettings.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/UpdateDiagnosticRemoteSupportSettings.json @@ -97,9 +97,9 @@ func ExampleDiagnosticSettingsClient_BeginUpdateDiagnosticRemoteSupportSettings( Properties: &armdataboxedge.DiagnosticRemoteSupportSettingsProperties{ RemoteSupportSettingsList: []*armdataboxedge.RemoteSupportSettings{ { - AccessLevel: armdataboxedge.AccessLevelReadWrite.ToPtr(), + AccessLevel: armdataboxedge.AccessLevel("ReadWrite").ToPtr(), ExpirationTimeStampInUTC: to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-07T00:00:00+00:00"); return t }()), - RemoteApplicationType: armdataboxedge.RemoteApplicationTypePowershell.ToPtr(), + RemoteApplicationType: armdataboxedge.RemoteApplicationType("Powershell").ToPtr(), }}, }, }, @@ -111,5 +111,5 @@ func ExampleDiagnosticSettingsClient_BeginUpdateDiagnosticRemoteSupportSettings( if err != nil { log.Fatal(err) } - log.Printf("DiagnosticRemoteSupportSettings.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResult) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_jobs_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_jobs_client_test.go index 228487e7db5c..01a948aa2aeb 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_jobs_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_jobs_client_test.go @@ -32,5 +32,5 @@ func ExampleJobsClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("Job.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.JobsClientGetResult) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_monitoringconfig_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_monitoringconfig_client_test.go index 8702c6f5a897..68c876d1654f 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_monitoringconfig_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_monitoringconfig_client_test.go @@ -31,12 +31,16 @@ func ExampleMonitoringConfigClient_List() { "", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("MonitoringMetricConfiguration.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -57,7 +61,7 @@ func ExampleMonitoringConfigClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("MonitoringMetricConfiguration.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.MonitoringConfigClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/PutMonitoringConfig.json @@ -97,7 +101,7 @@ func ExampleMonitoringConfigClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("MonitoringMetricConfiguration.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.MonitoringConfigClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/DeleteMonitoringConfig.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_nodes_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_nodes_client_test.go index 623ed5f6f537..98d81d5bebb0 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_nodes_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_nodes_client_test.go @@ -27,12 +27,16 @@ func ExampleNodesClient_ListByDataBoxEdgeDevice() { pager := client.ListByDataBoxEdgeDevice("", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("Node.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_operations_client_test.go index d0fad5f6faa1..2333ffd99895 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_operations_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_operations_client_test.go @@ -25,9 +25,16 @@ func ExampleOperationsClient_List() { ctx := context.Background() client := armdataboxedge.NewOperationsClient(cred, nil) pager := client.List(nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } + for _, v := range pager.PageResponse().Value { + log.Printf("Pager result: %#v\n", v) + } } } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_operationsstatus_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_operationsstatus_client_test.go index 910f2216d104..73465eff4821 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_operationsstatus_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_operationsstatus_client_test.go @@ -32,5 +32,5 @@ func ExampleOperationsStatusClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("Job.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.OperationsStatusClientGetResult) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_orders_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_orders_client_test.go index 28bf41621ded..423ffef92ef9 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_orders_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_orders_client_test.go @@ -30,12 +30,16 @@ func ExampleOrdersClient_ListByDataBoxEdgeDevice() { pager := client.ListByDataBoxEdgeDevice("", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("Order.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -55,7 +59,7 @@ func ExampleOrdersClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("Order.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.OrdersClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/OrderPut.json @@ -97,7 +101,7 @@ func ExampleOrdersClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("Order.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.OrdersClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/OrderDelete.json @@ -129,11 +133,12 @@ func ExampleOrdersClient_ListDCAccessCode() { } ctx := context.Background() client := armdataboxedge.NewOrdersClient("", cred, nil) - _, err = client.ListDCAccessCode(ctx, + res, err := client.ListDCAccessCode(ctx, "", "", nil) if err != nil { log.Fatal(err) } + log.Printf("Response result: %#v\n", res.OrdersClientListDCAccessCodeResult) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_roles_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_roles_client_test.go index 60eb9cee41fa..8b0f9f83da91 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_roles_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_roles_client_test.go @@ -30,12 +30,16 @@ func ExampleRolesClient_ListByDataBoxEdgeDevice() { pager := client.ListByDataBoxEdgeDevice("", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("RoleClassification.GetRole().ID: %s\n", *v.GetRole().ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -56,7 +60,7 @@ func ExampleRolesClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("RoleClassification.GetRole().ID: %s\n", *res.GetRole().ID) + log.Printf("Response result: %#v\n", res.RolesClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/RolePut.json @@ -72,16 +76,14 @@ func ExampleRolesClient_BeginCreateOrUpdate() { "", "", &armdataboxedge.IoTRole{ - Role: armdataboxedge.Role{ - Kind: armdataboxedge.RoleTypesIOT.ToPtr(), - }, + Kind: armdataboxedge.RoleTypes("IOT").ToPtr(), Properties: &armdataboxedge.IoTRoleProperties{ - HostPlatform: armdataboxedge.PlatformTypeLinux.ToPtr(), + HostPlatform: armdataboxedge.PlatformType("Linux").ToPtr(), IoTDeviceDetails: &armdataboxedge.IoTDeviceInfo{ Authentication: &armdataboxedge.Authentication{ SymmetricKey: &armdataboxedge.SymmetricKey{ ConnectionString: &armdataboxedge.AsymmetricEncryptedSecret{ - EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithmAES256.ToPtr(), + EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithm("AES256").ToPtr(), EncryptionCertThumbprint: to.StringPtr(""), Value: to.StringPtr(""), }, @@ -94,7 +96,7 @@ func ExampleRolesClient_BeginCreateOrUpdate() { Authentication: &armdataboxedge.Authentication{ SymmetricKey: &armdataboxedge.SymmetricKey{ ConnectionString: &armdataboxedge.AsymmetricEncryptedSecret{ - EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithmAES256.ToPtr(), + EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithm("AES256").ToPtr(), EncryptionCertThumbprint: to.StringPtr(""), Value: to.StringPtr(""), }, @@ -103,7 +105,7 @@ func ExampleRolesClient_BeginCreateOrUpdate() { DeviceID: to.StringPtr(""), IoTHostHub: to.StringPtr(""), }, - RoleStatus: armdataboxedge.RoleStatusEnabled.ToPtr(), + RoleStatus: armdataboxedge.RoleStatus("Enabled").ToPtr(), ShareMappings: []*armdataboxedge.MountPointMap{}, }, }, @@ -115,7 +117,7 @@ func ExampleRolesClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("RoleClassification.GetRole().ID: %s\n", *res.GetRole().ID) + log.Printf("Response result: %#v\n", res.RolesClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/RoleDelete.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_shares_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_shares_client_test.go index 8cecae7afb4c..c3780cb7a83e 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_shares_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_shares_client_test.go @@ -30,12 +30,16 @@ func ExampleSharesClient_ListByDataBoxEdgeDevice() { pager := client.ListByDataBoxEdgeDevice("", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("Share.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -56,7 +60,7 @@ func ExampleSharesClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("Share.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.SharesClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/SharePut.json @@ -74,18 +78,18 @@ func ExampleSharesClient_BeginCreateOrUpdate() { armdataboxedge.Share{ Properties: &armdataboxedge.ShareProperties{ Description: to.StringPtr(""), - AccessProtocol: armdataboxedge.ShareAccessProtocolSMB.ToPtr(), + AccessProtocol: armdataboxedge.ShareAccessProtocol("SMB").ToPtr(), AzureContainerInfo: &armdataboxedge.AzureContainerInfo{ ContainerName: to.StringPtr(""), - DataFormat: armdataboxedge.AzureContainerDataFormatBlockBlob.ToPtr(), + DataFormat: armdataboxedge.AzureContainerDataFormat("BlockBlob").ToPtr(), StorageAccountCredentialID: to.StringPtr(""), }, - DataPolicy: armdataboxedge.DataPolicyCloud.ToPtr(), - MonitoringStatus: armdataboxedge.MonitoringStatusEnabled.ToPtr(), - ShareStatus: armdataboxedge.ShareStatusOffline.ToPtr(), + DataPolicy: armdataboxedge.DataPolicy("Cloud").ToPtr(), + MonitoringStatus: armdataboxedge.MonitoringStatus("Enabled").ToPtr(), + ShareStatus: armdataboxedge.ShareStatus("Online").ToPtr(), UserAccessRights: []*armdataboxedge.UserAccessRight{ { - AccessType: armdataboxedge.ShareAccessTypeChange.ToPtr(), + AccessType: armdataboxedge.ShareAccessType("Change").ToPtr(), UserID: to.StringPtr(""), }}, }, @@ -98,7 +102,7 @@ func ExampleSharesClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("Share.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.SharesClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/ShareDelete.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_storageaccountcredentials_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_storageaccountcredentials_client_test.go index f2d2b25fa53d..e7d1bb31e118 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_storageaccountcredentials_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_storageaccountcredentials_client_test.go @@ -30,12 +30,16 @@ func ExampleStorageAccountCredentialsClient_ListByDataBoxEdgeDevice() { pager := client.ListByDataBoxEdgeDevice("", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("StorageAccountCredential.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -56,7 +60,7 @@ func ExampleStorageAccountCredentialsClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("StorageAccountCredential.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.StorageAccountCredentialsClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/SACPut.json @@ -74,13 +78,13 @@ func ExampleStorageAccountCredentialsClient_BeginCreateOrUpdate() { armdataboxedge.StorageAccountCredential{ Properties: &armdataboxedge.StorageAccountCredentialProperties{ AccountKey: &armdataboxedge.AsymmetricEncryptedSecret{ - EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithmAES256.ToPtr(), + EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithm("AES256").ToPtr(), EncryptionCertThumbprint: to.StringPtr(""), Value: to.StringPtr(""), }, - AccountType: armdataboxedge.AccountTypeBlobStorage.ToPtr(), + AccountType: armdataboxedge.AccountType("BlobStorage").ToPtr(), Alias: to.StringPtr(""), - SSLStatus: armdataboxedge.SSLStatusDisabled.ToPtr(), + SSLStatus: armdataboxedge.SSLStatus("Disabled").ToPtr(), UserName: to.StringPtr(""), }, }, @@ -92,7 +96,7 @@ func ExampleStorageAccountCredentialsClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("StorageAccountCredential.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.StorageAccountCredentialsClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/SACDelete.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_storageaccounts_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_storageaccounts_client_test.go index 8c69255f4237..64baee584b29 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_storageaccounts_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_storageaccounts_client_test.go @@ -30,12 +30,16 @@ func ExampleStorageAccountsClient_ListByDataBoxEdgeDevice() { pager := client.ListByDataBoxEdgeDevice("", "", nil) - for pager.NextPage(ctx) { + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("StorageAccount.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -56,7 +60,7 @@ func ExampleStorageAccountsClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("StorageAccount.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.StorageAccountsClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/StorageAccountPut.json @@ -74,9 +78,9 @@ func ExampleStorageAccountsClient_BeginCreateOrUpdate() { armdataboxedge.StorageAccount{ Properties: &armdataboxedge.StorageAccountProperties{ Description: to.StringPtr(""), - DataPolicy: armdataboxedge.DataPolicyCloud.ToPtr(), + DataPolicy: armdataboxedge.DataPolicy("Cloud").ToPtr(), StorageAccountCredentialID: to.StringPtr(""), - StorageAccountStatus: armdataboxedge.StorageAccountStatusOK.ToPtr(), + StorageAccountStatus: armdataboxedge.StorageAccountStatus("OK").ToPtr(), }, }, nil) @@ -87,7 +91,7 @@ func ExampleStorageAccountsClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("StorageAccount.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.StorageAccountsClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/StorageAccountDelete.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_triggers_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_triggers_client_test.go index 5962e6d1d9e8..a4273de92bad 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_triggers_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_triggers_client_test.go @@ -29,13 +29,17 @@ func ExampleTriggersClient_ListByDataBoxEdgeDevice() { client := armdataboxedge.NewTriggersClient("", cred, nil) pager := client.ListByDataBoxEdgeDevice("", "", - &armdataboxedge.TriggersListByDataBoxEdgeDeviceOptions{Filter: nil}) - for pager.NextPage(ctx) { + &armdataboxedge.TriggersClientListByDataBoxEdgeDeviceOptions{Filter: nil}) + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("TriggerClassification.GetTrigger().ID: %s\n", *v.GetTrigger().ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -56,7 +60,7 @@ func ExampleTriggersClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("TriggerClassification.GetTrigger().ID: %s\n", *res.GetTrigger().ID) + log.Printf("Response result: %#v\n", res.TriggersClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/TriggerPut.json @@ -72,9 +76,7 @@ func ExampleTriggersClient_BeginCreateOrUpdate() { "", "", &armdataboxedge.FileEventTrigger{ - Trigger: armdataboxedge.Trigger{ - Kind: armdataboxedge.TriggerEventTypeFileEvent.ToPtr(), - }, + Kind: armdataboxedge.TriggerEventType("FileEvent").ToPtr(), Properties: &armdataboxedge.FileTriggerProperties{ CustomContextTag: to.StringPtr(""), SinkInfo: &armdataboxedge.RoleSinkInfo{ @@ -93,7 +95,7 @@ func ExampleTriggersClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("TriggerClassification.GetTrigger().ID: %s\n", *res.GetTrigger().ID) + log.Printf("Response result: %#v\n", res.TriggersClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/TriggerDelete.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_users_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_users_client_test.go index 034b1ccaf053..06922231505d 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_users_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_users_client_test.go @@ -29,13 +29,17 @@ func ExampleUsersClient_ListByDataBoxEdgeDevice() { client := armdataboxedge.NewUsersClient("", cred, nil) pager := client.ListByDataBoxEdgeDevice("", "", - &armdataboxedge.UsersListByDataBoxEdgeDeviceOptions{Filter: nil}) - for pager.NextPage(ctx) { + &armdataboxedge.UsersClientListByDataBoxEdgeDeviceOptions{Filter: nil}) + for { + nextResult := pager.NextPage(ctx) if err := pager.Err(); err != nil { log.Fatalf("failed to advance page: %v", err) } + if !nextResult { + break + } for _, v := range pager.PageResponse().Value { - log.Printf("User.ID: %s\n", *v.ID) + log.Printf("Pager result: %#v\n", v) } } } @@ -56,7 +60,7 @@ func ExampleUsersClient_Get() { if err != nil { log.Fatal(err) } - log.Printf("User.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.UsersClientGetResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/UserPut.json @@ -74,11 +78,11 @@ func ExampleUsersClient_BeginCreateOrUpdate() { armdataboxedge.User{ Properties: &armdataboxedge.UserProperties{ EncryptedPassword: &armdataboxedge.AsymmetricEncryptedSecret{ - EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithmNone.ToPtr(), + EncryptionAlgorithm: armdataboxedge.EncryptionAlgorithm("None").ToPtr(), EncryptionCertThumbprint: to.StringPtr(""), Value: to.StringPtr(""), }, - UserType: armdataboxedge.UserTypeShare.ToPtr(), + UserType: armdataboxedge.UserType("Share").ToPtr(), }, }, nil) @@ -89,7 +93,7 @@ func ExampleUsersClient_BeginCreateOrUpdate() { if err != nil { log.Fatal(err) } - log.Printf("User.ID: %s\n", *res.ID) + log.Printf("Response result: %#v\n", res.UsersClientCreateOrUpdateResult) } // x-ms-original-file: specification/databoxedge/resource-manager/Microsoft.DataBoxEdge/stable/2021-06-01/examples/UserDelete.json diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_addons_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_addons_client.go index 5b7c86d49217..8551db0f9eb5 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_addons_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_addons_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,61 @@ import ( // AddonsClient contains the methods for the Addons group. // Don't use this type directly, use NewAddonsClient() instead. type AddonsClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewAddonsClient creates a new instance of AddonsClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewAddonsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AddonsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &AddonsClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &AddonsClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } // BeginCreateOrUpdate - Create or update a addon. -// If the operation fails it returns the *CloudError error type. -func (client *AddonsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, addon AddonClassification, options *AddonsBeginCreateOrUpdateOptions) (AddonsCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// roleName - The role name. +// addonName - The addon name. +// resourceGroupName - The resource group name. +// addon - The addon properties. +// options - AddonsClientBeginCreateOrUpdateOptions contains the optional parameters for the AddonsClient.BeginCreateOrUpdate +// method. +func (client *AddonsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, addon AddonClassification, options *AddonsClientBeginCreateOrUpdateOptions) (AddonsClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, roleName, addonName, resourceGroupName, addon, options) if err != nil { - return AddonsCreateOrUpdatePollerResponse{}, err + return AddonsClientCreateOrUpdatePollerResponse{}, err } - result := AddonsCreateOrUpdatePollerResponse{ + result := AddonsClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("AddonsClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("AddonsClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return AddonsCreateOrUpdatePollerResponse{}, err + return AddonsClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &AddonsCreateOrUpdatePoller{ + result.Poller = &AddonsClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Create or update a addon. -// If the operation fails it returns the *CloudError error type. -func (client *AddonsClient) createOrUpdate(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, addon AddonClassification, options *AddonsBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *AddonsClient) createOrUpdate(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, addon AddonClassification, options *AddonsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, roleName, addonName, resourceGroupName, addon, options) if err != nil { return nil, err @@ -74,13 +88,13 @@ func (client *AddonsClient) createOrUpdate(ctx context.Context, deviceName strin return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AddonsClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, addon AddonClassification, options *AddonsBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *AddonsClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, addon AddonClassification, options *AddonsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -102,7 +116,7 @@ func (client *AddonsClient) createOrUpdateCreateRequest(ctx context.Context, dev return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -113,42 +127,34 @@ func (client *AddonsClient) createOrUpdateCreateRequest(ctx context.Context, dev return req, runtime.MarshalAsJSON(req, addon) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *AddonsClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the addon on the device. -// If the operation fails it returns the *CloudError error type. -func (client *AddonsClient) BeginDelete(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsBeginDeleteOptions) (AddonsDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// roleName - The role name. +// addonName - The addon name. +// resourceGroupName - The resource group name. +// options - AddonsClientBeginDeleteOptions contains the optional parameters for the AddonsClient.BeginDelete method. +func (client *AddonsClient) BeginDelete(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsClientBeginDeleteOptions) (AddonsClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, roleName, addonName, resourceGroupName, options) if err != nil { - return AddonsDeletePollerResponse{}, err + return AddonsClientDeletePollerResponse{}, err } - result := AddonsDeletePollerResponse{ + result := AddonsClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("AddonsClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("AddonsClient.Delete", "", resp, client.pl) if err != nil { - return AddonsDeletePollerResponse{}, err + return AddonsClientDeletePollerResponse{}, err } - result.Poller = &AddonsDeletePoller{ + result.Poller = &AddonsClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the addon on the device. -// If the operation fails it returns the *CloudError error type. -func (client *AddonsClient) deleteOperation(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *AddonsClient) deleteOperation(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, roleName, addonName, resourceGroupName, options) if err != nil { return nil, err @@ -158,13 +164,13 @@ func (client *AddonsClient) deleteOperation(ctx context.Context, deviceName stri return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *AddonsClient) deleteCreateRequest(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsBeginDeleteOptions) (*policy.Request, error) { +func (client *AddonsClient) deleteCreateRequest(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -186,7 +192,7 @@ func (client *AddonsClient) deleteCreateRequest(ctx context.Context, deviceName return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -197,38 +203,30 @@ func (client *AddonsClient) deleteCreateRequest(ctx context.Context, deviceName return req, nil } -// deleteHandleError handles the Delete error response. -func (client *AddonsClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets a specific addon by name. -// If the operation fails it returns the *CloudError error type. -func (client *AddonsClient) Get(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsGetOptions) (AddonsGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// roleName - The role name. +// addonName - The addon name. +// resourceGroupName - The resource group name. +// options - AddonsClientGetOptions contains the optional parameters for the AddonsClient.Get method. +func (client *AddonsClient) Get(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsClientGetOptions) (AddonsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, roleName, addonName, resourceGroupName, options) if err != nil { - return AddonsGetResponse{}, err + return AddonsClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return AddonsGetResponse{}, err + return AddonsClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return AddonsGetResponse{}, client.getHandleError(resp) + return AddonsClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *AddonsClient) getCreateRequest(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsGetOptions) (*policy.Request, error) { +func (client *AddonsClient) getCreateRequest(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -250,7 +248,7 @@ func (client *AddonsClient) getCreateRequest(ctx context.Context, deviceName str return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -262,43 +260,34 @@ func (client *AddonsClient) getCreateRequest(ctx context.Context, deviceName str } // getHandleResponse handles the Get response. -func (client *AddonsClient) getHandleResponse(resp *http.Response) (AddonsGetResponse, error) { - result := AddonsGetResponse{RawResponse: resp} +func (client *AddonsClient) getHandleResponse(resp *http.Response) (AddonsClientGetResponse, error) { + result := AddonsClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return AddonsGetResponse{}, runtime.NewResponseError(err, resp) + return AddonsClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *AddonsClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByRole - Lists all the addons configured in the role. -// If the operation fails it returns the *CloudError error type. -func (client *AddonsClient) ListByRole(deviceName string, roleName string, resourceGroupName string, options *AddonsListByRoleOptions) *AddonsListByRolePager { - return &AddonsListByRolePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// roleName - The role name. +// resourceGroupName - The resource group name. +// options - AddonsClientListByRoleOptions contains the optional parameters for the AddonsClient.ListByRole method. +func (client *AddonsClient) ListByRole(deviceName string, roleName string, resourceGroupName string, options *AddonsClientListByRoleOptions) *AddonsClientListByRolePager { + return &AddonsClientListByRolePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByRoleCreateRequest(ctx, deviceName, roleName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp AddonsListByRoleResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp AddonsClientListByRoleResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.AddonList.NextLink) }, } } // listByRoleCreateRequest creates the ListByRole request. -func (client *AddonsClient) listByRoleCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *AddonsListByRoleOptions) (*policy.Request, error) { +func (client *AddonsClient) listByRoleCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *AddonsClientListByRoleOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -316,7 +305,7 @@ func (client *AddonsClient) listByRoleCreateRequest(ctx context.Context, deviceN return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -328,23 +317,10 @@ func (client *AddonsClient) listByRoleCreateRequest(ctx context.Context, deviceN } // listByRoleHandleResponse handles the ListByRole response. -func (client *AddonsClient) listByRoleHandleResponse(resp *http.Response) (AddonsListByRoleResponse, error) { - result := AddonsListByRoleResponse{RawResponse: resp} +func (client *AddonsClient) listByRoleHandleResponse(resp *http.Response) (AddonsClientListByRoleResponse, error) { + result := AddonsClientListByRoleResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.AddonList); err != nil { - return AddonsListByRoleResponse{}, runtime.NewResponseError(err, resp) + return AddonsClientListByRoleResponse{}, err } return result, nil } - -// listByRoleHandleError handles the ListByRole error response. -func (client *AddonsClient) listByRoleHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_alerts_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_alerts_client.go index 39dd5a663759..0540e6827a8e 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_alerts_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_alerts_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,42 +24,54 @@ import ( // AlertsClient contains the methods for the Alerts group. // Don't use this type directly, use NewAlertsClient() instead. type AlertsClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewAlertsClient creates a new instance of AlertsClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewAlertsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AlertsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &AlertsClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &AlertsClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // Get - Gets an alert by name. -// If the operation fails it returns the *CloudError error type. -func (client *AlertsClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *AlertsGetOptions) (AlertsGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The alert name. +// resourceGroupName - The resource group name. +// options - AlertsClientGetOptions contains the optional parameters for the AlertsClient.Get method. +func (client *AlertsClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *AlertsClientGetOptions) (AlertsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return AlertsGetResponse{}, err + return AlertsClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return AlertsGetResponse{}, err + return AlertsClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertsGetResponse{}, client.getHandleError(resp) + return AlertsClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *AlertsClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *AlertsGetOptions) (*policy.Request, error) { +func (client *AlertsClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *AlertsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -78,7 +89,7 @@ func (client *AlertsClient) getCreateRequest(ctx context.Context, deviceName str return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -90,43 +101,34 @@ func (client *AlertsClient) getCreateRequest(ctx context.Context, deviceName str } // getHandleResponse handles the Get response. -func (client *AlertsClient) getHandleResponse(resp *http.Response) (AlertsGetResponse, error) { - result := AlertsGetResponse{RawResponse: resp} +func (client *AlertsClient) getHandleResponse(resp *http.Response) (AlertsClientGetResponse, error) { + result := AlertsClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.Alert); err != nil { - return AlertsGetResponse{}, runtime.NewResponseError(err, resp) + return AlertsClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *AlertsClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Gets all the alerts for a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *AlertsClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *AlertsListByDataBoxEdgeDeviceOptions) *AlertsListByDataBoxEdgeDevicePager { - return &AlertsListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - AlertsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the AlertsClient.ListByDataBoxEdgeDevice +// method. +func (client *AlertsClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *AlertsClientListByDataBoxEdgeDeviceOptions) *AlertsClientListByDataBoxEdgeDevicePager { + return &AlertsClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp AlertsListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp AlertsClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.AlertList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *AlertsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *AlertsListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *AlertsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *AlertsClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -140,7 +142,7 @@ func (client *AlertsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -152,23 +154,10 @@ func (client *AlertsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *AlertsClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (AlertsListByDataBoxEdgeDeviceResponse, error) { - result := AlertsListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *AlertsClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (AlertsClientListByDataBoxEdgeDeviceResponse, error) { + result := AlertsClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.AlertList); err != nil { - return AlertsListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return AlertsClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } - -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *AlertsClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_availableskus_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_availableskus_client.go index b5ef8be47dfd..601d3f684bc0 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_availableskus_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_availableskus_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,45 +24,54 @@ import ( // AvailableSKUsClient contains the methods for the AvailableSKUs group. // Don't use this type directly, use NewAvailableSKUsClient() instead. type AvailableSKUsClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewAvailableSKUsClient creates a new instance of AvailableSKUsClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewAvailableSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AvailableSKUsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &AvailableSKUsClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &AvailableSKUsClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // List - List all the available Skus and information related to them. -// If the operation fails it returns the *CloudError error type. -func (client *AvailableSKUsClient) List(options *AvailableSKUsListOptions) *AvailableSKUsListPager { - return &AvailableSKUsListPager{ +// If the operation fails it returns an *azcore.ResponseError type. +// options - AvailableSKUsClientListOptions contains the optional parameters for the AvailableSKUsClient.List method. +func (client *AvailableSKUsClient) List(options *AvailableSKUsClientListOptions) *AvailableSKUsClientListPager { + return &AvailableSKUsClientListPager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listCreateRequest(ctx, options) }, - advancer: func(ctx context.Context, resp AvailableSKUsListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.DataBoxEdgeSKUList.NextLink) + advancer: func(ctx context.Context, resp AvailableSKUsClientListResponse) (*policy.Request, error) { + return runtime.NewRequest(ctx, http.MethodGet, *resp.SKUList.NextLink) }, } } // listCreateRequest creates the List request. -func (client *AvailableSKUsClient) listCreateRequest(ctx context.Context, options *AvailableSKUsListOptions) (*policy.Request, error) { +func (client *AvailableSKUsClient) listCreateRequest(ctx context.Context, options *AvailableSKUsClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -75,23 +83,10 @@ func (client *AvailableSKUsClient) listCreateRequest(ctx context.Context, option } // listHandleResponse handles the List response. -func (client *AvailableSKUsClient) listHandleResponse(resp *http.Response) (AvailableSKUsListResponse, error) { - result := AvailableSKUsListResponse{RawResponse: resp} - if err := runtime.UnmarshalAsJSON(resp, &result.DataBoxEdgeSKUList); err != nil { - return AvailableSKUsListResponse{}, runtime.NewResponseError(err, resp) +func (client *AvailableSKUsClient) listHandleResponse(resp *http.Response) (AvailableSKUsClientListResponse, error) { + result := AvailableSKUsClientListResponse{RawResponse: resp} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUList); err != nil { + return AvailableSKUsClientListResponse{}, err } return result, nil } - -// listHandleError handles the List error response. -func (client *AvailableSKUsClient) listHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_bandwidthschedules_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_bandwidthschedules_client.go index acb1dbbadba1..7475b07c2b78 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_bandwidthschedules_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_bandwidthschedules_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,60 @@ import ( // BandwidthSchedulesClient contains the methods for the BandwidthSchedules group. // Don't use this type directly, use NewBandwidthSchedulesClient() instead. type BandwidthSchedulesClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewBandwidthSchedulesClient creates a new instance of BandwidthSchedulesClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewBandwidthSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *BandwidthSchedulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &BandwidthSchedulesClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &BandwidthSchedulesClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } // BeginCreateOrUpdate - Creates or updates a bandwidth schedule. -// If the operation fails it returns the *CloudError error type. -func (client *BandwidthSchedulesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, parameters BandwidthSchedule, options *BandwidthSchedulesBeginCreateOrUpdateOptions) (BandwidthSchedulesCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The bandwidth schedule name which needs to be added/updated. +// resourceGroupName - The resource group name. +// parameters - The bandwidth schedule to be added or updated. +// options - BandwidthSchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the BandwidthSchedulesClient.BeginCreateOrUpdate +// method. +func (client *BandwidthSchedulesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, parameters BandwidthSchedule, options *BandwidthSchedulesClientBeginCreateOrUpdateOptions) (BandwidthSchedulesClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, parameters, options) if err != nil { - return BandwidthSchedulesCreateOrUpdatePollerResponse{}, err + return BandwidthSchedulesClientCreateOrUpdatePollerResponse{}, err } - result := BandwidthSchedulesCreateOrUpdatePollerResponse{ + result := BandwidthSchedulesClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("BandwidthSchedulesClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("BandwidthSchedulesClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return BandwidthSchedulesCreateOrUpdatePollerResponse{}, err + return BandwidthSchedulesClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &BandwidthSchedulesCreateOrUpdatePoller{ + result.Poller = &BandwidthSchedulesClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates or updates a bandwidth schedule. -// If the operation fails it returns the *CloudError error type. -func (client *BandwidthSchedulesClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, parameters BandwidthSchedule, options *BandwidthSchedulesBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *BandwidthSchedulesClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, parameters BandwidthSchedule, options *BandwidthSchedulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, name, resourceGroupName, parameters, options) if err != nil { return nil, err @@ -74,13 +87,13 @@ func (client *BandwidthSchedulesClient) createOrUpdate(ctx context.Context, devi return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BandwidthSchedulesClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, parameters BandwidthSchedule, options *BandwidthSchedulesBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *BandwidthSchedulesClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, parameters BandwidthSchedule, options *BandwidthSchedulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -98,7 +111,7 @@ func (client *BandwidthSchedulesClient) createOrUpdateCreateRequest(ctx context. return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -109,42 +122,34 @@ func (client *BandwidthSchedulesClient) createOrUpdateCreateRequest(ctx context. return req, runtime.MarshalAsJSON(req, parameters) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *BandwidthSchedulesClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the specified bandwidth schedule. -// If the operation fails it returns the *CloudError error type. -func (client *BandwidthSchedulesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesBeginDeleteOptions) (BandwidthSchedulesDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The bandwidth schedule name. +// resourceGroupName - The resource group name. +// options - BandwidthSchedulesClientBeginDeleteOptions contains the optional parameters for the BandwidthSchedulesClient.BeginDelete +// method. +func (client *BandwidthSchedulesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesClientBeginDeleteOptions) (BandwidthSchedulesClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return BandwidthSchedulesDeletePollerResponse{}, err + return BandwidthSchedulesClientDeletePollerResponse{}, err } - result := BandwidthSchedulesDeletePollerResponse{ + result := BandwidthSchedulesClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("BandwidthSchedulesClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("BandwidthSchedulesClient.Delete", "", resp, client.pl) if err != nil { - return BandwidthSchedulesDeletePollerResponse{}, err + return BandwidthSchedulesClientDeletePollerResponse{}, err } - result.Poller = &BandwidthSchedulesDeletePoller{ + result.Poller = &BandwidthSchedulesClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the specified bandwidth schedule. -// If the operation fails it returns the *CloudError error type. -func (client *BandwidthSchedulesClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *BandwidthSchedulesClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err @@ -154,13 +159,13 @@ func (client *BandwidthSchedulesClient) deleteOperation(ctx context.Context, dev return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *BandwidthSchedulesClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesBeginDeleteOptions) (*policy.Request, error) { +func (client *BandwidthSchedulesClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -178,7 +183,7 @@ func (client *BandwidthSchedulesClient) deleteCreateRequest(ctx context.Context, return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -189,38 +194,29 @@ func (client *BandwidthSchedulesClient) deleteCreateRequest(ctx context.Context, return req, nil } -// deleteHandleError handles the Delete error response. -func (client *BandwidthSchedulesClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets the properties of the specified bandwidth schedule. -// If the operation fails it returns the *CloudError error type. -func (client *BandwidthSchedulesClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesGetOptions) (BandwidthSchedulesGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The bandwidth schedule name. +// resourceGroupName - The resource group name. +// options - BandwidthSchedulesClientGetOptions contains the optional parameters for the BandwidthSchedulesClient.Get method. +func (client *BandwidthSchedulesClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesClientGetOptions) (BandwidthSchedulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return BandwidthSchedulesGetResponse{}, err + return BandwidthSchedulesClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return BandwidthSchedulesGetResponse{}, err + return BandwidthSchedulesClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return BandwidthSchedulesGetResponse{}, client.getHandleError(resp) + return BandwidthSchedulesClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *BandwidthSchedulesClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesGetOptions) (*policy.Request, error) { +func (client *BandwidthSchedulesClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -238,7 +234,7 @@ func (client *BandwidthSchedulesClient) getCreateRequest(ctx context.Context, de return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -250,43 +246,34 @@ func (client *BandwidthSchedulesClient) getCreateRequest(ctx context.Context, de } // getHandleResponse handles the Get response. -func (client *BandwidthSchedulesClient) getHandleResponse(resp *http.Response) (BandwidthSchedulesGetResponse, error) { - result := BandwidthSchedulesGetResponse{RawResponse: resp} +func (client *BandwidthSchedulesClient) getHandleResponse(resp *http.Response) (BandwidthSchedulesClientGetResponse, error) { + result := BandwidthSchedulesClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.BandwidthSchedule); err != nil { - return BandwidthSchedulesGetResponse{}, runtime.NewResponseError(err, resp) + return BandwidthSchedulesClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *BandwidthSchedulesClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *BandwidthSchedulesClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *BandwidthSchedulesListByDataBoxEdgeDeviceOptions) *BandwidthSchedulesListByDataBoxEdgeDevicePager { - return &BandwidthSchedulesListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the BandwidthSchedulesClient.ListByDataBoxEdgeDevice +// method. +func (client *BandwidthSchedulesClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions) *BandwidthSchedulesClientListByDataBoxEdgeDevicePager { + return &BandwidthSchedulesClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp BandwidthSchedulesListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.BandwidthSchedulesList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *BandwidthSchedulesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *BandwidthSchedulesListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *BandwidthSchedulesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -300,7 +287,7 @@ func (client *BandwidthSchedulesClient) listByDataBoxEdgeDeviceCreateRequest(ctx return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -312,23 +299,10 @@ func (client *BandwidthSchedulesClient) listByDataBoxEdgeDeviceCreateRequest(ctx } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *BandwidthSchedulesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (BandwidthSchedulesListByDataBoxEdgeDeviceResponse, error) { - result := BandwidthSchedulesListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *BandwidthSchedulesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse, error) { + result := BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.BandwidthSchedulesList); err != nil { - return BandwidthSchedulesListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } - -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *BandwidthSchedulesClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_constants.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_constants.go index 98f1ea91a8cd..67c8e82a6b27 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_constants.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_constants.go @@ -9,8 +9,8 @@ package armdataboxedge const ( - module = "armdataboxedge" - version = "v0.1.0" + moduleName = "armdataboxedge" + moduleVersion = "v0.2.0" ) // AccessLevel - Access level allowed for this remote application type @@ -581,7 +581,8 @@ func (c JobType) ToPtr() *JobType { return &c } -// KeyVaultSyncStatus - For changing or to initiate the resync to key-vault set the status to KeyVaultSyncPending, rest of the status will not be applicable. +// KeyVaultSyncStatus - For changing or to initiate the resync to key-vault set the status to KeyVaultSyncPending, rest of +// the status will not be applicable. type KeyVaultSyncStatus string const ( diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_containers_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_containers_client.go index ad6ab30e9390..858eb00841b3 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_containers_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_containers_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,61 @@ import ( // ContainersClient contains the methods for the Containers group. // Don't use this type directly, use NewContainersClient() instead. type ContainersClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewContainersClient creates a new instance of ContainersClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ContainersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &ContainersClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &ContainersClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // BeginCreateOrUpdate - Creates a new container or updates an existing container on the device. -// If the operation fails it returns the *CloudError error type. -func (client *ContainersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, containerParam Container, options *ContainersBeginCreateOrUpdateOptions) (ContainersCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// storageAccountName - The Storage Account Name +// containerName - The container name. +// resourceGroupName - The resource group name. +// containerParam - The container properties. +// options - ContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainersClient.BeginCreateOrUpdate +// method. +func (client *ContainersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, containerParam Container, options *ContainersClientBeginCreateOrUpdateOptions) (ContainersClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, storageAccountName, containerName, resourceGroupName, containerParam, options) if err != nil { - return ContainersCreateOrUpdatePollerResponse{}, err + return ContainersClientCreateOrUpdatePollerResponse{}, err } - result := ContainersCreateOrUpdatePollerResponse{ + result := ContainersClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("ContainersClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("ContainersClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return ContainersCreateOrUpdatePollerResponse{}, err + return ContainersClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &ContainersCreateOrUpdatePoller{ + result.Poller = &ContainersClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates a new container or updates an existing container on the device. -// If the operation fails it returns the *CloudError error type. -func (client *ContainersClient) createOrUpdate(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, containerParam Container, options *ContainersBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *ContainersClient) createOrUpdate(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, containerParam Container, options *ContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, storageAccountName, containerName, resourceGroupName, containerParam, options) if err != nil { return nil, err @@ -74,13 +88,13 @@ func (client *ContainersClient) createOrUpdate(ctx context.Context, deviceName s return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ContainersClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, containerParam Container, options *ContainersBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ContainersClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, containerParam Container, options *ContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -102,7 +116,7 @@ func (client *ContainersClient) createOrUpdateCreateRequest(ctx context.Context, return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -113,42 +127,34 @@ func (client *ContainersClient) createOrUpdateCreateRequest(ctx context.Context, return req, runtime.MarshalAsJSON(req, containerParam) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *ContainersClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the container on the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *ContainersClient) BeginDelete(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersBeginDeleteOptions) (ContainersDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// storageAccountName - The Storage Account Name +// containerName - The container name. +// resourceGroupName - The resource group name. +// options - ContainersClientBeginDeleteOptions contains the optional parameters for the ContainersClient.BeginDelete method. +func (client *ContainersClient) BeginDelete(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientBeginDeleteOptions) (ContainersClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, storageAccountName, containerName, resourceGroupName, options) if err != nil { - return ContainersDeletePollerResponse{}, err + return ContainersClientDeletePollerResponse{}, err } - result := ContainersDeletePollerResponse{ + result := ContainersClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("ContainersClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("ContainersClient.Delete", "", resp, client.pl) if err != nil { - return ContainersDeletePollerResponse{}, err + return ContainersClientDeletePollerResponse{}, err } - result.Poller = &ContainersDeletePoller{ + result.Poller = &ContainersClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the container on the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *ContainersClient) deleteOperation(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *ContainersClient) deleteOperation(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, storageAccountName, containerName, resourceGroupName, options) if err != nil { return nil, err @@ -158,13 +164,13 @@ func (client *ContainersClient) deleteOperation(ctx context.Context, deviceName return nil, err } if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *ContainersClient) deleteCreateRequest(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersBeginDeleteOptions) (*policy.Request, error) { +func (client *ContainersClient) deleteCreateRequest(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -186,7 +192,7 @@ func (client *ContainersClient) deleteCreateRequest(ctx context.Context, deviceN return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -197,38 +203,30 @@ func (client *ContainersClient) deleteCreateRequest(ctx context.Context, deviceN return req, nil } -// deleteHandleError handles the Delete error response. -func (client *ContainersClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets a container by name. -// If the operation fails it returns the *CloudError error type. -func (client *ContainersClient) Get(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersGetOptions) (ContainersGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// storageAccountName - The Storage Account Name +// containerName - The container Name +// resourceGroupName - The resource group name. +// options - ContainersClientGetOptions contains the optional parameters for the ContainersClient.Get method. +func (client *ContainersClient) Get(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientGetOptions) (ContainersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, storageAccountName, containerName, resourceGroupName, options) if err != nil { - return ContainersGetResponse{}, err + return ContainersClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return ContainersGetResponse{}, err + return ContainersClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainersGetResponse{}, client.getHandleError(resp) + return ContainersClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *ContainersClient) getCreateRequest(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersGetOptions) (*policy.Request, error) { +func (client *ContainersClient) getCreateRequest(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -250,7 +248,7 @@ func (client *ContainersClient) getCreateRequest(ctx context.Context, deviceName return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -262,43 +260,35 @@ func (client *ContainersClient) getCreateRequest(ctx context.Context, deviceName } // getHandleResponse handles the Get response. -func (client *ContainersClient) getHandleResponse(resp *http.Response) (ContainersGetResponse, error) { - result := ContainersGetResponse{RawResponse: resp} +func (client *ContainersClient) getHandleResponse(resp *http.Response) (ContainersClientGetResponse, error) { + result := ContainersClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.Container); err != nil { - return ContainersGetResponse{}, runtime.NewResponseError(err, resp) + return ContainersClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *ContainersClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByStorageAccount - Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *ContainersClient) ListByStorageAccount(deviceName string, storageAccountName string, resourceGroupName string, options *ContainersListByStorageAccountOptions) *ContainersListByStorageAccountPager { - return &ContainersListByStorageAccountPager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// storageAccountName - The storage Account name. +// resourceGroupName - The resource group name. +// options - ContainersClientListByStorageAccountOptions contains the optional parameters for the ContainersClient.ListByStorageAccount +// method. +func (client *ContainersClient) ListByStorageAccount(deviceName string, storageAccountName string, resourceGroupName string, options *ContainersClientListByStorageAccountOptions) *ContainersClientListByStorageAccountPager { + return &ContainersClientListByStorageAccountPager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByStorageAccountCreateRequest(ctx, deviceName, storageAccountName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp ContainersListByStorageAccountResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp ContainersClientListByStorageAccountResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.ContainerList.NextLink) }, } } // listByStorageAccountCreateRequest creates the ListByStorageAccount request. -func (client *ContainersClient) listByStorageAccountCreateRequest(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *ContainersListByStorageAccountOptions) (*policy.Request, error) { +func (client *ContainersClient) listByStorageAccountCreateRequest(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *ContainersClientListByStorageAccountOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -316,7 +306,7 @@ func (client *ContainersClient) listByStorageAccountCreateRequest(ctx context.Co return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -328,50 +318,42 @@ func (client *ContainersClient) listByStorageAccountCreateRequest(ctx context.Co } // listByStorageAccountHandleResponse handles the ListByStorageAccount response. -func (client *ContainersClient) listByStorageAccountHandleResponse(resp *http.Response) (ContainersListByStorageAccountResponse, error) { - result := ContainersListByStorageAccountResponse{RawResponse: resp} +func (client *ContainersClient) listByStorageAccountHandleResponse(resp *http.Response) (ContainersClientListByStorageAccountResponse, error) { + result := ContainersClientListByStorageAccountResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.ContainerList); err != nil { - return ContainersListByStorageAccountResponse{}, runtime.NewResponseError(err, resp) + return ContainersClientListByStorageAccountResponse{}, err } return result, nil } -// listByStorageAccountHandleError handles the ListByStorageAccount error response. -func (client *ContainersClient) listByStorageAccountHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginRefresh - Refreshes the container metadata with the data from the cloud. -// If the operation fails it returns the *CloudError error type. -func (client *ContainersClient) BeginRefresh(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersBeginRefreshOptions) (ContainersRefreshPollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// storageAccountName - The Storage Account Name +// containerName - The container name. +// resourceGroupName - The resource group name. +// options - ContainersClientBeginRefreshOptions contains the optional parameters for the ContainersClient.BeginRefresh method. +func (client *ContainersClient) BeginRefresh(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientBeginRefreshOptions) (ContainersClientRefreshPollerResponse, error) { resp, err := client.refresh(ctx, deviceName, storageAccountName, containerName, resourceGroupName, options) if err != nil { - return ContainersRefreshPollerResponse{}, err + return ContainersClientRefreshPollerResponse{}, err } - result := ContainersRefreshPollerResponse{ + result := ContainersClientRefreshPollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("ContainersClient.Refresh", "", resp, client.pl, client.refreshHandleError) + pt, err := armruntime.NewPoller("ContainersClient.Refresh", "", resp, client.pl) if err != nil { - return ContainersRefreshPollerResponse{}, err + return ContainersClientRefreshPollerResponse{}, err } - result.Poller = &ContainersRefreshPoller{ + result.Poller = &ContainersClientRefreshPoller{ pt: pt, } return result, nil } // Refresh - Refreshes the container metadata with the data from the cloud. -// If the operation fails it returns the *CloudError error type. -func (client *ContainersClient) refresh(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersBeginRefreshOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *ContainersClient) refresh(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientBeginRefreshOptions) (*http.Response, error) { req, err := client.refreshCreateRequest(ctx, deviceName, storageAccountName, containerName, resourceGroupName, options) if err != nil { return nil, err @@ -381,13 +363,13 @@ func (client *ContainersClient) refresh(ctx context.Context, deviceName string, return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.refreshHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // refreshCreateRequest creates the Refresh request. -func (client *ContainersClient) refreshCreateRequest(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersBeginRefreshOptions) (*policy.Request, error) { +func (client *ContainersClient) refreshCreateRequest(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientBeginRefreshOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -409,7 +391,7 @@ func (client *ContainersClient) refreshCreateRequest(ctx context.Context, device return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -419,16 +401,3 @@ func (client *ContainersClient) refreshCreateRequest(ctx context.Context, device req.Raw().Header.Set("Accept", "application/json") return req, nil } - -// refreshHandleError handles the Refresh error response. -func (client *ContainersClient) refreshHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devices_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devices_client.go index 4835db76ac9d..3a5d8d8efa38 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devices_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devices_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,42 +24,54 @@ import ( // DevicesClient contains the methods for the Devices group. // Don't use this type directly, use NewDevicesClient() instead. type DevicesClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewDevicesClient creates a new instance of DevicesClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewDevicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DevicesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &DevicesClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &DevicesClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } // CreateOrUpdate - Creates or updates a Data Box Edge/Data Box Gateway resource. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) CreateOrUpdate(ctx context.Context, deviceName string, resourceGroupName string, dataBoxEdgeDevice DataBoxEdgeDevice, options *DevicesCreateOrUpdateOptions) (DevicesCreateOrUpdateResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// dataBoxEdgeDevice - The resource object. +// options - DevicesClientCreateOrUpdateOptions contains the optional parameters for the DevicesClient.CreateOrUpdate method. +func (client *DevicesClient) CreateOrUpdate(ctx context.Context, deviceName string, resourceGroupName string, dataBoxEdgeDevice Device, options *DevicesClientCreateOrUpdateOptions) (DevicesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, resourceGroupName, dataBoxEdgeDevice, options) if err != nil { - return DevicesCreateOrUpdateResponse{}, err + return DevicesClientCreateOrUpdateResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesCreateOrUpdateResponse{}, err + return DevicesClientCreateOrUpdateResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesCreateOrUpdateResponse{}, client.createOrUpdateHandleError(resp) + return DevicesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) } return client.createOrUpdateHandleResponse(resp) } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DevicesClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, dataBoxEdgeDevice DataBoxEdgeDevice, options *DevicesCreateOrUpdateOptions) (*policy.Request, error) { +func (client *DevicesClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, dataBoxEdgeDevice Device, options *DevicesClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -74,7 +85,7 @@ func (client *DevicesClient) createOrUpdateCreateRequest(ctx context.Context, de return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -86,50 +97,42 @@ func (client *DevicesClient) createOrUpdateCreateRequest(ctx context.Context, de } // createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *DevicesClient) createOrUpdateHandleResponse(resp *http.Response) (DevicesCreateOrUpdateResponse, error) { - result := DevicesCreateOrUpdateResponse{RawResponse: resp} - if err := runtime.UnmarshalAsJSON(resp, &result.DataBoxEdgeDevice); err != nil { - return DevicesCreateOrUpdateResponse{}, runtime.NewResponseError(err, resp) +func (client *DevicesClient) createOrUpdateHandleResponse(resp *http.Response) (DevicesClientCreateOrUpdateResponse, error) { + result := DevicesClientCreateOrUpdateResponse{RawResponse: resp} + if err := runtime.UnmarshalAsJSON(resp, &result.Device); err != nil { + return DevicesClientCreateOrUpdateResponse{}, err } return result, nil } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *DevicesClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginCreateOrUpdateSecuritySettings - Updates the security settings on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) BeginCreateOrUpdateSecuritySettings(ctx context.Context, deviceName string, resourceGroupName string, securitySettings SecuritySettings, options *DevicesBeginCreateOrUpdateSecuritySettingsOptions) (DevicesCreateOrUpdateSecuritySettingsPollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// securitySettings - The security settings. +// options - DevicesClientBeginCreateOrUpdateSecuritySettingsOptions contains the optional parameters for the DevicesClient.BeginCreateOrUpdateSecuritySettings +// method. +func (client *DevicesClient) BeginCreateOrUpdateSecuritySettings(ctx context.Context, deviceName string, resourceGroupName string, securitySettings SecuritySettings, options *DevicesClientBeginCreateOrUpdateSecuritySettingsOptions) (DevicesClientCreateOrUpdateSecuritySettingsPollerResponse, error) { resp, err := client.createOrUpdateSecuritySettings(ctx, deviceName, resourceGroupName, securitySettings, options) if err != nil { - return DevicesCreateOrUpdateSecuritySettingsPollerResponse{}, err + return DevicesClientCreateOrUpdateSecuritySettingsPollerResponse{}, err } - result := DevicesCreateOrUpdateSecuritySettingsPollerResponse{ + result := DevicesClientCreateOrUpdateSecuritySettingsPollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("DevicesClient.CreateOrUpdateSecuritySettings", "", resp, client.pl, client.createOrUpdateSecuritySettingsHandleError) + pt, err := armruntime.NewPoller("DevicesClient.CreateOrUpdateSecuritySettings", "", resp, client.pl) if err != nil { - return DevicesCreateOrUpdateSecuritySettingsPollerResponse{}, err + return DevicesClientCreateOrUpdateSecuritySettingsPollerResponse{}, err } - result.Poller = &DevicesCreateOrUpdateSecuritySettingsPoller{ + result.Poller = &DevicesClientCreateOrUpdateSecuritySettingsPoller{ pt: pt, } return result, nil } // CreateOrUpdateSecuritySettings - Updates the security settings on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) createOrUpdateSecuritySettings(ctx context.Context, deviceName string, resourceGroupName string, securitySettings SecuritySettings, options *DevicesBeginCreateOrUpdateSecuritySettingsOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *DevicesClient) createOrUpdateSecuritySettings(ctx context.Context, deviceName string, resourceGroupName string, securitySettings SecuritySettings, options *DevicesClientBeginCreateOrUpdateSecuritySettingsOptions) (*http.Response, error) { req, err := client.createOrUpdateSecuritySettingsCreateRequest(ctx, deviceName, resourceGroupName, securitySettings, options) if err != nil { return nil, err @@ -139,13 +142,13 @@ func (client *DevicesClient) createOrUpdateSecuritySettings(ctx context.Context, return nil, err } if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, client.createOrUpdateSecuritySettingsHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateSecuritySettingsCreateRequest creates the CreateOrUpdateSecuritySettings request. -func (client *DevicesClient) createOrUpdateSecuritySettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, securitySettings SecuritySettings, options *DevicesBeginCreateOrUpdateSecuritySettingsOptions) (*policy.Request, error) { +func (client *DevicesClient) createOrUpdateSecuritySettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, securitySettings SecuritySettings, options *DevicesClientBeginCreateOrUpdateSecuritySettingsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -159,7 +162,7 @@ func (client *DevicesClient) createOrUpdateSecuritySettingsCreateRequest(ctx con return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -170,42 +173,32 @@ func (client *DevicesClient) createOrUpdateSecuritySettingsCreateRequest(ctx con return req, runtime.MarshalAsJSON(req, securitySettings) } -// createOrUpdateSecuritySettingsHandleError handles the CreateOrUpdateSecuritySettings error response. -func (client *DevicesClient) createOrUpdateSecuritySettingsHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) BeginDelete(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginDeleteOptions) (DevicesDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientBeginDeleteOptions contains the optional parameters for the DevicesClient.BeginDelete method. +func (client *DevicesClient) BeginDelete(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginDeleteOptions) (DevicesClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesDeletePollerResponse{}, err + return DevicesClientDeletePollerResponse{}, err } - result := DevicesDeletePollerResponse{ + result := DevicesClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("DevicesClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("DevicesClient.Delete", "", resp, client.pl) if err != nil { - return DevicesDeletePollerResponse{}, err + return DevicesClientDeletePollerResponse{}, err } - result.Poller = &DevicesDeletePoller{ + result.Poller = &DevicesClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) deleteOperation(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *DevicesClient) deleteOperation(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err @@ -215,13 +208,13 @@ func (client *DevicesClient) deleteOperation(ctx context.Context, deviceName str return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *DevicesClient) deleteCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginDeleteOptions) (*policy.Request, error) { +func (client *DevicesClient) deleteCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -235,7 +228,7 @@ func (client *DevicesClient) deleteCreateRequest(ctx context.Context, deviceName return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -246,42 +239,33 @@ func (client *DevicesClient) deleteCreateRequest(ctx context.Context, deviceName return req, nil } -// deleteHandleError handles the Delete error response. -func (client *DevicesClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDownloadUpdates - Downloads the updates on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) BeginDownloadUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginDownloadUpdatesOptions) (DevicesDownloadUpdatesPollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientBeginDownloadUpdatesOptions contains the optional parameters for the DevicesClient.BeginDownloadUpdates +// method. +func (client *DevicesClient) BeginDownloadUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginDownloadUpdatesOptions) (DevicesClientDownloadUpdatesPollerResponse, error) { resp, err := client.downloadUpdates(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesDownloadUpdatesPollerResponse{}, err + return DevicesClientDownloadUpdatesPollerResponse{}, err } - result := DevicesDownloadUpdatesPollerResponse{ + result := DevicesClientDownloadUpdatesPollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("DevicesClient.DownloadUpdates", "", resp, client.pl, client.downloadUpdatesHandleError) + pt, err := armruntime.NewPoller("DevicesClient.DownloadUpdates", "", resp, client.pl) if err != nil { - return DevicesDownloadUpdatesPollerResponse{}, err + return DevicesClientDownloadUpdatesPollerResponse{}, err } - result.Poller = &DevicesDownloadUpdatesPoller{ + result.Poller = &DevicesClientDownloadUpdatesPoller{ pt: pt, } return result, nil } // DownloadUpdates - Downloads the updates on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) downloadUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginDownloadUpdatesOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *DevicesClient) downloadUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginDownloadUpdatesOptions) (*http.Response, error) { req, err := client.downloadUpdatesCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err @@ -291,13 +275,13 @@ func (client *DevicesClient) downloadUpdates(ctx context.Context, deviceName str return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.downloadUpdatesHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // downloadUpdatesCreateRequest creates the DownloadUpdates request. -func (client *DevicesClient) downloadUpdatesCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginDownloadUpdatesOptions) (*policy.Request, error) { +func (client *DevicesClient) downloadUpdatesCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginDownloadUpdatesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -311,7 +295,7 @@ func (client *DevicesClient) downloadUpdatesCreateRequest(ctx context.Context, d return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -322,38 +306,29 @@ func (client *DevicesClient) downloadUpdatesCreateRequest(ctx context.Context, d return req, nil } -// downloadUpdatesHandleError handles the DownloadUpdates error response. -func (client *DevicesClient) downloadUpdatesHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // GenerateCertificate - Generates certificate for activation key. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) GenerateCertificate(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGenerateCertificateOptions) (DevicesGenerateCertificateResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientGenerateCertificateOptions contains the optional parameters for the DevicesClient.GenerateCertificate +// method. +func (client *DevicesClient) GenerateCertificate(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGenerateCertificateOptions) (DevicesClientGenerateCertificateResponse, error) { req, err := client.generateCertificateCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesGenerateCertificateResponse{}, err + return DevicesClientGenerateCertificateResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesGenerateCertificateResponse{}, err + return DevicesClientGenerateCertificateResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesGenerateCertificateResponse{}, client.generateCertificateHandleError(resp) + return DevicesClientGenerateCertificateResponse{}, runtime.NewResponseError(resp) } return client.generateCertificateHandleResponse(resp) } // generateCertificateCreateRequest creates the GenerateCertificate request. -func (client *DevicesClient) generateCertificateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGenerateCertificateOptions) (*policy.Request, error) { +func (client *DevicesClient) generateCertificateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGenerateCertificateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/generateCertificate" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -367,7 +342,7 @@ func (client *DevicesClient) generateCertificateCreateRequest(ctx context.Contex return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -379,46 +354,36 @@ func (client *DevicesClient) generateCertificateCreateRequest(ctx context.Contex } // generateCertificateHandleResponse handles the GenerateCertificate response. -func (client *DevicesClient) generateCertificateHandleResponse(resp *http.Response) (DevicesGenerateCertificateResponse, error) { - result := DevicesGenerateCertificateResponse{RawResponse: resp} +func (client *DevicesClient) generateCertificateHandleResponse(resp *http.Response) (DevicesClientGenerateCertificateResponse, error) { + result := DevicesClientGenerateCertificateResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.GenerateCertResponse); err != nil { - return DevicesGenerateCertificateResponse{}, runtime.NewResponseError(err, resp) + return DevicesClientGenerateCertificateResponse{}, err } return result, nil } -// generateCertificateHandleError handles the GenerateCertificate error response. -func (client *DevicesClient) generateCertificateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets the properties of the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) Get(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGetOptions) (DevicesGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientGetOptions contains the optional parameters for the DevicesClient.Get method. +func (client *DevicesClient) Get(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGetOptions) (DevicesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesGetResponse{}, err + return DevicesClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesGetResponse{}, err + return DevicesClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesGetResponse{}, client.getHandleError(resp) + return DevicesClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *DevicesClient) getCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGetOptions) (*policy.Request, error) { +func (client *DevicesClient) getCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -432,7 +397,7 @@ func (client *DevicesClient) getCreateRequest(ctx context.Context, deviceName st return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -444,46 +409,37 @@ func (client *DevicesClient) getCreateRequest(ctx context.Context, deviceName st } // getHandleResponse handles the Get response. -func (client *DevicesClient) getHandleResponse(resp *http.Response) (DevicesGetResponse, error) { - result := DevicesGetResponse{RawResponse: resp} - if err := runtime.UnmarshalAsJSON(resp, &result.DataBoxEdgeDevice); err != nil { - return DevicesGetResponse{}, runtime.NewResponseError(err, resp) +func (client *DevicesClient) getHandleResponse(resp *http.Response) (DevicesClientGetResponse, error) { + result := DevicesClientGetResponse{RawResponse: resp} + if err := runtime.UnmarshalAsJSON(resp, &result.Device); err != nil { + return DevicesClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *DevicesClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // GetExtendedInformation - Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) GetExtendedInformation(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGetExtendedInformationOptions) (DevicesGetExtendedInformationResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientGetExtendedInformationOptions contains the optional parameters for the DevicesClient.GetExtendedInformation +// method. +func (client *DevicesClient) GetExtendedInformation(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGetExtendedInformationOptions) (DevicesClientGetExtendedInformationResponse, error) { req, err := client.getExtendedInformationCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesGetExtendedInformationResponse{}, err + return DevicesClientGetExtendedInformationResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesGetExtendedInformationResponse{}, err + return DevicesClientGetExtendedInformationResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesGetExtendedInformationResponse{}, client.getExtendedInformationHandleError(resp) + return DevicesClientGetExtendedInformationResponse{}, runtime.NewResponseError(resp) } return client.getExtendedInformationHandleResponse(resp) } // getExtendedInformationCreateRequest creates the GetExtendedInformation request. -func (client *DevicesClient) getExtendedInformationCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGetExtendedInformationOptions) (*policy.Request, error) { +func (client *DevicesClient) getExtendedInformationCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGetExtendedInformationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -497,7 +453,7 @@ func (client *DevicesClient) getExtendedInformationCreateRequest(ctx context.Con return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -509,46 +465,37 @@ func (client *DevicesClient) getExtendedInformationCreateRequest(ctx context.Con } // getExtendedInformationHandleResponse handles the GetExtendedInformation response. -func (client *DevicesClient) getExtendedInformationHandleResponse(resp *http.Response) (DevicesGetExtendedInformationResponse, error) { - result := DevicesGetExtendedInformationResponse{RawResponse: resp} - if err := runtime.UnmarshalAsJSON(resp, &result.DataBoxEdgeDeviceExtendedInfo); err != nil { - return DevicesGetExtendedInformationResponse{}, runtime.NewResponseError(err, resp) +func (client *DevicesClient) getExtendedInformationHandleResponse(resp *http.Response) (DevicesClientGetExtendedInformationResponse, error) { + result := DevicesClientGetExtendedInformationResponse{RawResponse: resp} + if err := runtime.UnmarshalAsJSON(resp, &result.DeviceExtendedInfo); err != nil { + return DevicesClientGetExtendedInformationResponse{}, err } return result, nil } -// getExtendedInformationHandleError handles the GetExtendedInformation error response. -func (client *DevicesClient) getExtendedInformationHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // GetNetworkSettings - Gets the network settings of the specified Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) GetNetworkSettings(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGetNetworkSettingsOptions) (DevicesGetNetworkSettingsResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientGetNetworkSettingsOptions contains the optional parameters for the DevicesClient.GetNetworkSettings +// method. +func (client *DevicesClient) GetNetworkSettings(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGetNetworkSettingsOptions) (DevicesClientGetNetworkSettingsResponse, error) { req, err := client.getNetworkSettingsCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesGetNetworkSettingsResponse{}, err + return DevicesClientGetNetworkSettingsResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesGetNetworkSettingsResponse{}, err + return DevicesClientGetNetworkSettingsResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesGetNetworkSettingsResponse{}, client.getNetworkSettingsHandleError(resp) + return DevicesClientGetNetworkSettingsResponse{}, runtime.NewResponseError(resp) } return client.getNetworkSettingsHandleResponse(resp) } // getNetworkSettingsCreateRequest creates the GetNetworkSettings request. -func (client *DevicesClient) getNetworkSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGetNetworkSettingsOptions) (*policy.Request, error) { +func (client *DevicesClient) getNetworkSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGetNetworkSettingsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -562,7 +509,7 @@ func (client *DevicesClient) getNetworkSettingsCreateRequest(ctx context.Context return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -574,47 +521,38 @@ func (client *DevicesClient) getNetworkSettingsCreateRequest(ctx context.Context } // getNetworkSettingsHandleResponse handles the GetNetworkSettings response. -func (client *DevicesClient) getNetworkSettingsHandleResponse(resp *http.Response) (DevicesGetNetworkSettingsResponse, error) { - result := DevicesGetNetworkSettingsResponse{RawResponse: resp} +func (client *DevicesClient) getNetworkSettingsHandleResponse(resp *http.Response) (DevicesClientGetNetworkSettingsResponse, error) { + result := DevicesClientGetNetworkSettingsResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSettings); err != nil { - return DevicesGetNetworkSettingsResponse{}, runtime.NewResponseError(err, resp) + return DevicesClientGetNetworkSettingsResponse{}, err } return result, nil } -// getNetworkSettingsHandleError handles the GetNetworkSettings error response. -func (client *DevicesClient) getNetworkSettingsHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - -// GetUpdateSummary - Gets information about the availability of updates based on the last scan of the device. It also gets information about any ongoing -// download or install jobs on the device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) GetUpdateSummary(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGetUpdateSummaryOptions) (DevicesGetUpdateSummaryResponse, error) { +// GetUpdateSummary - Gets information about the availability of updates based on the last scan of the device. It also gets +// information about any ongoing download or install jobs on the device. +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientGetUpdateSummaryOptions contains the optional parameters for the DevicesClient.GetUpdateSummary +// method. +func (client *DevicesClient) GetUpdateSummary(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGetUpdateSummaryOptions) (DevicesClientGetUpdateSummaryResponse, error) { req, err := client.getUpdateSummaryCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesGetUpdateSummaryResponse{}, err + return DevicesClientGetUpdateSummaryResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesGetUpdateSummaryResponse{}, err + return DevicesClientGetUpdateSummaryResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesGetUpdateSummaryResponse{}, client.getUpdateSummaryHandleError(resp) + return DevicesClientGetUpdateSummaryResponse{}, runtime.NewResponseError(resp) } return client.getUpdateSummaryHandleResponse(resp) } // getUpdateSummaryCreateRequest creates the GetUpdateSummary request. -func (client *DevicesClient) getUpdateSummaryCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesGetUpdateSummaryOptions) (*policy.Request, error) { +func (client *DevicesClient) getUpdateSummaryCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientGetUpdateSummaryOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -628,7 +566,7 @@ func (client *DevicesClient) getUpdateSummaryCreateRequest(ctx context.Context, return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -640,50 +578,41 @@ func (client *DevicesClient) getUpdateSummaryCreateRequest(ctx context.Context, } // getUpdateSummaryHandleResponse handles the GetUpdateSummary response. -func (client *DevicesClient) getUpdateSummaryHandleResponse(resp *http.Response) (DevicesGetUpdateSummaryResponse, error) { - result := DevicesGetUpdateSummaryResponse{RawResponse: resp} +func (client *DevicesClient) getUpdateSummaryHandleResponse(resp *http.Response) (DevicesClientGetUpdateSummaryResponse, error) { + result := DevicesClientGetUpdateSummaryResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.UpdateSummary); err != nil { - return DevicesGetUpdateSummaryResponse{}, runtime.NewResponseError(err, resp) + return DevicesClientGetUpdateSummaryResponse{}, err } return result, nil } -// getUpdateSummaryHandleError handles the GetUpdateSummary error response. -func (client *DevicesClient) getUpdateSummaryHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginInstallUpdates - Installs the updates on the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) BeginInstallUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginInstallUpdatesOptions) (DevicesInstallUpdatesPollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientBeginInstallUpdatesOptions contains the optional parameters for the DevicesClient.BeginInstallUpdates +// method. +func (client *DevicesClient) BeginInstallUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginInstallUpdatesOptions) (DevicesClientInstallUpdatesPollerResponse, error) { resp, err := client.installUpdates(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesInstallUpdatesPollerResponse{}, err + return DevicesClientInstallUpdatesPollerResponse{}, err } - result := DevicesInstallUpdatesPollerResponse{ + result := DevicesClientInstallUpdatesPollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("DevicesClient.InstallUpdates", "", resp, client.pl, client.installUpdatesHandleError) + pt, err := armruntime.NewPoller("DevicesClient.InstallUpdates", "", resp, client.pl) if err != nil { - return DevicesInstallUpdatesPollerResponse{}, err + return DevicesClientInstallUpdatesPollerResponse{}, err } - result.Poller = &DevicesInstallUpdatesPoller{ + result.Poller = &DevicesClientInstallUpdatesPoller{ pt: pt, } return result, nil } // InstallUpdates - Installs the updates on the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) installUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginInstallUpdatesOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *DevicesClient) installUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginInstallUpdatesOptions) (*http.Response, error) { req, err := client.installUpdatesCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err @@ -693,13 +622,13 @@ func (client *DevicesClient) installUpdates(ctx context.Context, deviceName stri return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.installUpdatesHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // installUpdatesCreateRequest creates the InstallUpdates request. -func (client *DevicesClient) installUpdatesCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginInstallUpdatesOptions) (*policy.Request, error) { +func (client *DevicesClient) installUpdatesCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginInstallUpdatesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -713,7 +642,7 @@ func (client *DevicesClient) installUpdatesCreateRequest(ctx context.Context, de return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -724,35 +653,25 @@ func (client *DevicesClient) installUpdatesCreateRequest(ctx context.Context, de return req, nil } -// installUpdatesHandleError handles the InstallUpdates error response. -func (client *DevicesClient) installUpdatesHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByResourceGroup - Gets all the Data Box Edge/Data Box Gateway devices in a resource group. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) ListByResourceGroup(resourceGroupName string, options *DevicesListByResourceGroupOptions) *DevicesListByResourceGroupPager { - return &DevicesListByResourceGroupPager{ +// If the operation fails it returns an *azcore.ResponseError type. +// resourceGroupName - The resource group name. +// options - DevicesClientListByResourceGroupOptions contains the optional parameters for the DevicesClient.ListByResourceGroup +// method. +func (client *DevicesClient) ListByResourceGroup(resourceGroupName string, options *DevicesClientListByResourceGroupOptions) *DevicesClientListByResourceGroupPager { + return &DevicesClientListByResourceGroupPager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp DevicesListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.DataBoxEdgeDeviceList.NextLink) + advancer: func(ctx context.Context, resp DevicesClientListByResourceGroupResponse) (*policy.Request, error) { + return runtime.NewRequest(ctx, http.MethodGet, *resp.DeviceList.NextLink) }, } } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *DevicesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DevicesListByResourceGroupOptions) (*policy.Request, error) { +func (client *DevicesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DevicesClientListByResourceGroupOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -762,7 +681,7 @@ func (client *DevicesClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -777,49 +696,38 @@ func (client *DevicesClient) listByResourceGroupCreateRequest(ctx context.Contex } // listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *DevicesClient) listByResourceGroupHandleResponse(resp *http.Response) (DevicesListByResourceGroupResponse, error) { - result := DevicesListByResourceGroupResponse{RawResponse: resp} - if err := runtime.UnmarshalAsJSON(resp, &result.DataBoxEdgeDeviceList); err != nil { - return DevicesListByResourceGroupResponse{}, runtime.NewResponseError(err, resp) +func (client *DevicesClient) listByResourceGroupHandleResponse(resp *http.Response) (DevicesClientListByResourceGroupResponse, error) { + result := DevicesClientListByResourceGroupResponse{RawResponse: resp} + if err := runtime.UnmarshalAsJSON(resp, &result.DeviceList); err != nil { + return DevicesClientListByResourceGroupResponse{}, err } return result, nil } -// listByResourceGroupHandleError handles the ListByResourceGroup error response. -func (client *DevicesClient) listByResourceGroupHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListBySubscription - Gets all the Data Box Edge/Data Box Gateway devices in a subscription. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) ListBySubscription(options *DevicesListBySubscriptionOptions) *DevicesListBySubscriptionPager { - return &DevicesListBySubscriptionPager{ +// If the operation fails it returns an *azcore.ResponseError type. +// options - DevicesClientListBySubscriptionOptions contains the optional parameters for the DevicesClient.ListBySubscription +// method. +func (client *DevicesClient) ListBySubscription(options *DevicesClientListBySubscriptionOptions) *DevicesClientListBySubscriptionPager { + return &DevicesClientListBySubscriptionPager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listBySubscriptionCreateRequest(ctx, options) }, - advancer: func(ctx context.Context, resp DevicesListBySubscriptionResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.DataBoxEdgeDeviceList.NextLink) + advancer: func(ctx context.Context, resp DevicesClientListBySubscriptionResponse) (*policy.Request, error) { + return runtime.NewRequest(ctx, http.MethodGet, *resp.DeviceList.NextLink) }, } } // listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *DevicesClient) listBySubscriptionCreateRequest(ctx context.Context, options *DevicesListBySubscriptionOptions) (*policy.Request, error) { +func (client *DevicesClient) listBySubscriptionCreateRequest(ctx context.Context, options *DevicesClientListBySubscriptionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -834,50 +742,41 @@ func (client *DevicesClient) listBySubscriptionCreateRequest(ctx context.Context } // listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *DevicesClient) listBySubscriptionHandleResponse(resp *http.Response) (DevicesListBySubscriptionResponse, error) { - result := DevicesListBySubscriptionResponse{RawResponse: resp} - if err := runtime.UnmarshalAsJSON(resp, &result.DataBoxEdgeDeviceList); err != nil { - return DevicesListBySubscriptionResponse{}, runtime.NewResponseError(err, resp) +func (client *DevicesClient) listBySubscriptionHandleResponse(resp *http.Response) (DevicesClientListBySubscriptionResponse, error) { + result := DevicesClientListBySubscriptionResponse{RawResponse: resp} + if err := runtime.UnmarshalAsJSON(resp, &result.DeviceList); err != nil { + return DevicesClientListBySubscriptionResponse{}, err } return result, nil } -// listBySubscriptionHandleError handles the ListBySubscription error response. -func (client *DevicesClient) listBySubscriptionHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginScanForUpdates - Scans for updates on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) BeginScanForUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginScanForUpdatesOptions) (DevicesScanForUpdatesPollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DevicesClientBeginScanForUpdatesOptions contains the optional parameters for the DevicesClient.BeginScanForUpdates +// method. +func (client *DevicesClient) BeginScanForUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginScanForUpdatesOptions) (DevicesClientScanForUpdatesPollerResponse, error) { resp, err := client.scanForUpdates(ctx, deviceName, resourceGroupName, options) if err != nil { - return DevicesScanForUpdatesPollerResponse{}, err + return DevicesClientScanForUpdatesPollerResponse{}, err } - result := DevicesScanForUpdatesPollerResponse{ + result := DevicesClientScanForUpdatesPollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("DevicesClient.ScanForUpdates", "", resp, client.pl, client.scanForUpdatesHandleError) + pt, err := armruntime.NewPoller("DevicesClient.ScanForUpdates", "", resp, client.pl) if err != nil { - return DevicesScanForUpdatesPollerResponse{}, err + return DevicesClientScanForUpdatesPollerResponse{}, err } - result.Poller = &DevicesScanForUpdatesPoller{ + result.Poller = &DevicesClientScanForUpdatesPoller{ pt: pt, } return result, nil } // ScanForUpdates - Scans for updates on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) scanForUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginScanForUpdatesOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *DevicesClient) scanForUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginScanForUpdatesOptions) (*http.Response, error) { req, err := client.scanForUpdatesCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err @@ -887,13 +786,13 @@ func (client *DevicesClient) scanForUpdates(ctx context.Context, deviceName stri return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.scanForUpdatesHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // scanForUpdatesCreateRequest creates the ScanForUpdates request. -func (client *DevicesClient) scanForUpdatesCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesBeginScanForUpdatesOptions) (*policy.Request, error) { +func (client *DevicesClient) scanForUpdatesCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginScanForUpdatesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -907,7 +806,7 @@ func (client *DevicesClient) scanForUpdatesCreateRequest(ctx context.Context, de return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -918,38 +817,29 @@ func (client *DevicesClient) scanForUpdatesCreateRequest(ctx context.Context, de return req, nil } -// scanForUpdatesHandleError handles the ScanForUpdates error response. -func (client *DevicesClient) scanForUpdatesHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Update - Modifies a Data Box Edge/Data Box Gateway resource. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) Update(ctx context.Context, deviceName string, resourceGroupName string, parameters DataBoxEdgeDevicePatch, options *DevicesUpdateOptions) (DevicesUpdateResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// parameters - The resource parameters. +// options - DevicesClientUpdateOptions contains the optional parameters for the DevicesClient.Update method. +func (client *DevicesClient) Update(ctx context.Context, deviceName string, resourceGroupName string, parameters DevicePatch, options *DevicesClientUpdateOptions) (DevicesClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, deviceName, resourceGroupName, parameters, options) if err != nil { - return DevicesUpdateResponse{}, err + return DevicesClientUpdateResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesUpdateResponse{}, err + return DevicesClientUpdateResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesUpdateResponse{}, client.updateHandleError(resp) + return DevicesClientUpdateResponse{}, runtime.NewResponseError(resp) } return client.updateHandleResponse(resp) } // updateCreateRequest creates the Update request. -func (client *DevicesClient) updateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, parameters DataBoxEdgeDevicePatch, options *DevicesUpdateOptions) (*policy.Request, error) { +func (client *DevicesClient) updateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, parameters DevicePatch, options *DevicesClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -963,7 +853,7 @@ func (client *DevicesClient) updateCreateRequest(ctx context.Context, deviceName return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -975,46 +865,38 @@ func (client *DevicesClient) updateCreateRequest(ctx context.Context, deviceName } // updateHandleResponse handles the Update response. -func (client *DevicesClient) updateHandleResponse(resp *http.Response) (DevicesUpdateResponse, error) { - result := DevicesUpdateResponse{RawResponse: resp} - if err := runtime.UnmarshalAsJSON(resp, &result.DataBoxEdgeDevice); err != nil { - return DevicesUpdateResponse{}, runtime.NewResponseError(err, resp) +func (client *DevicesClient) updateHandleResponse(resp *http.Response) (DevicesClientUpdateResponse, error) { + result := DevicesClientUpdateResponse{RawResponse: resp} + if err := runtime.UnmarshalAsJSON(resp, &result.Device); err != nil { + return DevicesClientUpdateResponse{}, err } return result, nil } -// updateHandleError handles the Update error response. -func (client *DevicesClient) updateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // UpdateExtendedInformation - Gets additional information for the specified Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) UpdateExtendedInformation(ctx context.Context, deviceName string, resourceGroupName string, parameters DataBoxEdgeDeviceExtendedInfoPatch, options *DevicesUpdateExtendedInformationOptions) (DevicesUpdateExtendedInformationResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// parameters - The patch object. +// options - DevicesClientUpdateExtendedInformationOptions contains the optional parameters for the DevicesClient.UpdateExtendedInformation +// method. +func (client *DevicesClient) UpdateExtendedInformation(ctx context.Context, deviceName string, resourceGroupName string, parameters DeviceExtendedInfoPatch, options *DevicesClientUpdateExtendedInformationOptions) (DevicesClientUpdateExtendedInformationResponse, error) { req, err := client.updateExtendedInformationCreateRequest(ctx, deviceName, resourceGroupName, parameters, options) if err != nil { - return DevicesUpdateExtendedInformationResponse{}, err + return DevicesClientUpdateExtendedInformationResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesUpdateExtendedInformationResponse{}, err + return DevicesClientUpdateExtendedInformationResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesUpdateExtendedInformationResponse{}, client.updateExtendedInformationHandleError(resp) + return DevicesClientUpdateExtendedInformationResponse{}, runtime.NewResponseError(resp) } return client.updateExtendedInformationHandleResponse(resp) } // updateExtendedInformationCreateRequest creates the UpdateExtendedInformation request. -func (client *DevicesClient) updateExtendedInformationCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, parameters DataBoxEdgeDeviceExtendedInfoPatch, options *DevicesUpdateExtendedInformationOptions) (*policy.Request, error) { +func (client *DevicesClient) updateExtendedInformationCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, parameters DeviceExtendedInfoPatch, options *DevicesClientUpdateExtendedInformationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateExtendedInformation" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -1028,7 +910,7 @@ func (client *DevicesClient) updateExtendedInformationCreateRequest(ctx context. return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -1040,46 +922,38 @@ func (client *DevicesClient) updateExtendedInformationCreateRequest(ctx context. } // updateExtendedInformationHandleResponse handles the UpdateExtendedInformation response. -func (client *DevicesClient) updateExtendedInformationHandleResponse(resp *http.Response) (DevicesUpdateExtendedInformationResponse, error) { - result := DevicesUpdateExtendedInformationResponse{RawResponse: resp} - if err := runtime.UnmarshalAsJSON(resp, &result.DataBoxEdgeDeviceExtendedInfo); err != nil { - return DevicesUpdateExtendedInformationResponse{}, runtime.NewResponseError(err, resp) +func (client *DevicesClient) updateExtendedInformationHandleResponse(resp *http.Response) (DevicesClientUpdateExtendedInformationResponse, error) { + result := DevicesClientUpdateExtendedInformationResponse{RawResponse: resp} + if err := runtime.UnmarshalAsJSON(resp, &result.DeviceExtendedInfo); err != nil { + return DevicesClientUpdateExtendedInformationResponse{}, err } return result, nil } -// updateExtendedInformationHandleError handles the UpdateExtendedInformation error response. -func (client *DevicesClient) updateExtendedInformationHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // UploadCertificate - Uploads registration certificate for the device. -// If the operation fails it returns the *CloudError error type. -func (client *DevicesClient) UploadCertificate(ctx context.Context, deviceName string, resourceGroupName string, parameters UploadCertificateRequest, options *DevicesUploadCertificateOptions) (DevicesUploadCertificateResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// parameters - The upload certificate request. +// options - DevicesClientUploadCertificateOptions contains the optional parameters for the DevicesClient.UploadCertificate +// method. +func (client *DevicesClient) UploadCertificate(ctx context.Context, deviceName string, resourceGroupName string, parameters UploadCertificateRequest, options *DevicesClientUploadCertificateOptions) (DevicesClientUploadCertificateResponse, error) { req, err := client.uploadCertificateCreateRequest(ctx, deviceName, resourceGroupName, parameters, options) if err != nil { - return DevicesUploadCertificateResponse{}, err + return DevicesClientUploadCertificateResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DevicesUploadCertificateResponse{}, err + return DevicesClientUploadCertificateResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DevicesUploadCertificateResponse{}, client.uploadCertificateHandleError(resp) + return DevicesClientUploadCertificateResponse{}, runtime.NewResponseError(resp) } return client.uploadCertificateHandleResponse(resp) } // uploadCertificateCreateRequest creates the UploadCertificate request. -func (client *DevicesClient) uploadCertificateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, parameters UploadCertificateRequest, options *DevicesUploadCertificateOptions) (*policy.Request, error) { +func (client *DevicesClient) uploadCertificateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, parameters UploadCertificateRequest, options *DevicesClientUploadCertificateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -1093,7 +967,7 @@ func (client *DevicesClient) uploadCertificateCreateRequest(ctx context.Context, return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -1105,23 +979,10 @@ func (client *DevicesClient) uploadCertificateCreateRequest(ctx context.Context, } // uploadCertificateHandleResponse handles the UploadCertificate response. -func (client *DevicesClient) uploadCertificateHandleResponse(resp *http.Response) (DevicesUploadCertificateResponse, error) { - result := DevicesUploadCertificateResponse{RawResponse: resp} +func (client *DevicesClient) uploadCertificateHandleResponse(resp *http.Response) (DevicesClientUploadCertificateResponse, error) { + result := DevicesClientUploadCertificateResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.UploadCertificateResponse); err != nil { - return DevicesUploadCertificateResponse{}, runtime.NewResponseError(err, resp) + return DevicesClientUploadCertificateResponse{}, err } return result, nil } - -// uploadCertificateHandleError handles the UploadCertificate error response. -func (client *DevicesClient) uploadCertificateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_diagnosticsettings_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_diagnosticsettings_client.go index 080d41c55f66..107f15216d75 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_diagnosticsettings_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_diagnosticsettings_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,42 +24,55 @@ import ( // DiagnosticSettingsClient contains the methods for the DiagnosticSettings group. // Don't use this type directly, use NewDiagnosticSettingsClient() instead. type DiagnosticSettingsClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewDiagnosticSettingsClient creates a new instance of DiagnosticSettingsClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewDiagnosticSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DiagnosticSettingsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &DiagnosticSettingsClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &DiagnosticSettingsClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } -// GetDiagnosticProactiveLogCollectionSettings - Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DiagnosticSettingsClient) GetDiagnosticProactiveLogCollectionSettings(ctx context.Context, deviceName string, resourceGroupName string, options *DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptions) (DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse, error) { +// GetDiagnosticProactiveLogCollectionSettings - Gets the proactive log collection settings of the specified Data Box Edge/Data +// Box Gateway device. +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsOptions contains the optional parameters for +// the DiagnosticSettingsClient.GetDiagnosticProactiveLogCollectionSettings method. +func (client *DiagnosticSettingsClient) GetDiagnosticProactiveLogCollectionSettings(ctx context.Context, deviceName string, resourceGroupName string, options *DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsOptions) (DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse, error) { req, err := client.getDiagnosticProactiveLogCollectionSettingsCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse{}, err + return DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse{}, err + return DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse{}, client.getDiagnosticProactiveLogCollectionSettingsHandleError(resp) + return DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse{}, runtime.NewResponseError(resp) } return client.getDiagnosticProactiveLogCollectionSettingsHandleResponse(resp) } // getDiagnosticProactiveLogCollectionSettingsCreateRequest creates the GetDiagnosticProactiveLogCollectionSettings request. -func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptions) (*policy.Request, error) { +func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticProactiveLogCollectionSettings/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -74,7 +86,7 @@ func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSetti return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -86,46 +98,38 @@ func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSetti } // getDiagnosticProactiveLogCollectionSettingsHandleResponse handles the GetDiagnosticProactiveLogCollectionSettings response. -func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSettingsHandleResponse(resp *http.Response) (DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse, error) { - result := DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse{RawResponse: resp} +func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSettingsHandleResponse(resp *http.Response) (DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse, error) { + result := DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticProactiveLogCollectionSettings); err != nil { - return DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse{}, runtime.NewResponseError(err, resp) + return DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse{}, err } return result, nil } -// getDiagnosticProactiveLogCollectionSettingsHandleError handles the GetDiagnosticProactiveLogCollectionSettings error response. -func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSettingsHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - -// GetDiagnosticRemoteSupportSettings - Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DiagnosticSettingsClient) GetDiagnosticRemoteSupportSettings(ctx context.Context, deviceName string, resourceGroupName string, options *DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptions) (DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse, error) { +// GetDiagnosticRemoteSupportSettings - Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box +// Gateway device. +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsOptions contains the optional parameters for the DiagnosticSettingsClient.GetDiagnosticRemoteSupportSettings +// method. +func (client *DiagnosticSettingsClient) GetDiagnosticRemoteSupportSettings(ctx context.Context, deviceName string, resourceGroupName string, options *DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsOptions) (DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse, error) { req, err := client.getDiagnosticRemoteSupportSettingsCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse{}, err + return DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse{}, err + return DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse{}, client.getDiagnosticRemoteSupportSettingsHandleError(resp) + return DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse{}, runtime.NewResponseError(resp) } return client.getDiagnosticRemoteSupportSettingsHandleResponse(resp) } // getDiagnosticRemoteSupportSettingsCreateRequest creates the GetDiagnosticRemoteSupportSettings request. -func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptions) (*policy.Request, error) { +func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticRemoteSupportSettings/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -139,7 +143,7 @@ func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsCreate return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -151,50 +155,44 @@ func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsCreate } // getDiagnosticRemoteSupportSettingsHandleResponse handles the GetDiagnosticRemoteSupportSettings response. -func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsHandleResponse(resp *http.Response) (DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse, error) { - result := DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse{RawResponse: resp} +func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsHandleResponse(resp *http.Response) (DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse, error) { + result := DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticRemoteSupportSettings); err != nil { - return DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse{}, runtime.NewResponseError(err, resp) + return DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse{}, err } return result, nil } -// getDiagnosticRemoteSupportSettingsHandleError handles the GetDiagnosticRemoteSupportSettings error response. -func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - -// BeginUpdateDiagnosticProactiveLogCollectionSettings - Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DiagnosticSettingsClient) BeginUpdateDiagnosticProactiveLogCollectionSettings(ctx context.Context, deviceName string, resourceGroupName string, proactiveLogCollectionSettings DiagnosticProactiveLogCollectionSettings, options *DiagnosticSettingsBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions) (DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse, error) { +// BeginUpdateDiagnosticProactiveLogCollectionSettings - Updates the proactive log collection settings on a Data Box Edge/Data +// Box Gateway device. +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// proactiveLogCollectionSettings - The proactive log collection settings. +// options - DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions contains the optional parameters +// for the DiagnosticSettingsClient.BeginUpdateDiagnosticProactiveLogCollectionSettings method. +func (client *DiagnosticSettingsClient) BeginUpdateDiagnosticProactiveLogCollectionSettings(ctx context.Context, deviceName string, resourceGroupName string, proactiveLogCollectionSettings DiagnosticProactiveLogCollectionSettings, options *DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions) (DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse, error) { resp, err := client.updateDiagnosticProactiveLogCollectionSettings(ctx, deviceName, resourceGroupName, proactiveLogCollectionSettings, options) if err != nil { - return DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse{}, err + return DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse{}, err } - result := DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse{ + result := DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("DiagnosticSettingsClient.UpdateDiagnosticProactiveLogCollectionSettings", "", resp, client.pl, client.updateDiagnosticProactiveLogCollectionSettingsHandleError) + pt, err := armruntime.NewPoller("DiagnosticSettingsClient.UpdateDiagnosticProactiveLogCollectionSettings", "", resp, client.pl) if err != nil { - return DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse{}, err + return DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse{}, err } - result.Poller = &DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller{ + result.Poller = &DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller{ pt: pt, } return result, nil } -// UpdateDiagnosticProactiveLogCollectionSettings - Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSettings(ctx context.Context, deviceName string, resourceGroupName string, proactiveLogCollectionSettings DiagnosticProactiveLogCollectionSettings, options *DiagnosticSettingsBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions) (*http.Response, error) { +// UpdateDiagnosticProactiveLogCollectionSettings - Updates the proactive log collection settings on a Data Box Edge/Data +// Box Gateway device. +// If the operation fails it returns an *azcore.ResponseError type. +func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSettings(ctx context.Context, deviceName string, resourceGroupName string, proactiveLogCollectionSettings DiagnosticProactiveLogCollectionSettings, options *DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions) (*http.Response, error) { req, err := client.updateDiagnosticProactiveLogCollectionSettingsCreateRequest(ctx, deviceName, resourceGroupName, proactiveLogCollectionSettings, options) if err != nil { return nil, err @@ -204,13 +202,13 @@ func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSe return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.updateDiagnosticProactiveLogCollectionSettingsHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // updateDiagnosticProactiveLogCollectionSettingsCreateRequest creates the UpdateDiagnosticProactiveLogCollectionSettings request. -func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, proactiveLogCollectionSettings DiagnosticProactiveLogCollectionSettings, options *DiagnosticSettingsBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions) (*policy.Request, error) { +func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, proactiveLogCollectionSettings DiagnosticProactiveLogCollectionSettings, options *DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticProactiveLogCollectionSettings/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -224,7 +222,7 @@ func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSe return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -235,42 +233,36 @@ func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSe return req, runtime.MarshalAsJSON(req, proactiveLogCollectionSettings) } -// updateDiagnosticProactiveLogCollectionSettingsHandleError handles the UpdateDiagnosticProactiveLogCollectionSettings error response. -func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSettingsHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - -// BeginUpdateDiagnosticRemoteSupportSettings - Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DiagnosticSettingsClient) BeginUpdateDiagnosticRemoteSupportSettings(ctx context.Context, deviceName string, resourceGroupName string, diagnosticRemoteSupportSettings DiagnosticRemoteSupportSettings, options *DiagnosticSettingsBeginUpdateDiagnosticRemoteSupportSettingsOptions) (DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse, error) { +// BeginUpdateDiagnosticRemoteSupportSettings - Updates the diagnostic remote support settings on a Data Box Edge/Data Box +// Gateway device. +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// diagnosticRemoteSupportSettings - The diagnostic remote support settings. +// options - DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions contains the optional parameters for +// the DiagnosticSettingsClient.BeginUpdateDiagnosticRemoteSupportSettings method. +func (client *DiagnosticSettingsClient) BeginUpdateDiagnosticRemoteSupportSettings(ctx context.Context, deviceName string, resourceGroupName string, diagnosticRemoteSupportSettings DiagnosticRemoteSupportSettings, options *DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions) (DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse, error) { resp, err := client.updateDiagnosticRemoteSupportSettings(ctx, deviceName, resourceGroupName, diagnosticRemoteSupportSettings, options) if err != nil { - return DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse{}, err + return DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse{}, err } - result := DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse{ + result := DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("DiagnosticSettingsClient.UpdateDiagnosticRemoteSupportSettings", "", resp, client.pl, client.updateDiagnosticRemoteSupportSettingsHandleError) + pt, err := armruntime.NewPoller("DiagnosticSettingsClient.UpdateDiagnosticRemoteSupportSettings", "", resp, client.pl) if err != nil { - return DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse{}, err + return DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse{}, err } - result.Poller = &DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller{ + result.Poller = &DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller{ pt: pt, } return result, nil } -// UpdateDiagnosticRemoteSupportSettings - Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettings(ctx context.Context, deviceName string, resourceGroupName string, diagnosticRemoteSupportSettings DiagnosticRemoteSupportSettings, options *DiagnosticSettingsBeginUpdateDiagnosticRemoteSupportSettingsOptions) (*http.Response, error) { +// UpdateDiagnosticRemoteSupportSettings - Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway +// device. +// If the operation fails it returns an *azcore.ResponseError type. +func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettings(ctx context.Context, deviceName string, resourceGroupName string, diagnosticRemoteSupportSettings DiagnosticRemoteSupportSettings, options *DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions) (*http.Response, error) { req, err := client.updateDiagnosticRemoteSupportSettingsCreateRequest(ctx, deviceName, resourceGroupName, diagnosticRemoteSupportSettings, options) if err != nil { return nil, err @@ -280,13 +272,13 @@ func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettings(ct return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.updateDiagnosticRemoteSupportSettingsHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // updateDiagnosticRemoteSupportSettingsCreateRequest creates the UpdateDiagnosticRemoteSupportSettings request. -func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, diagnosticRemoteSupportSettings DiagnosticRemoteSupportSettings, options *DiagnosticSettingsBeginUpdateDiagnosticRemoteSupportSettingsOptions) (*policy.Request, error) { +func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettingsCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, diagnosticRemoteSupportSettings DiagnosticRemoteSupportSettings, options *DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticRemoteSupportSettings/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -300,7 +292,7 @@ func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettingsCre return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -310,16 +302,3 @@ func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettingsCre req.Raw().Header.Set("Accept", "application/json") return req, runtime.MarshalAsJSON(req, diagnosticRemoteSupportSettings) } - -// updateDiagnosticRemoteSupportSettingsHandleError handles the UpdateDiagnosticRemoteSupportSettings error response. -func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettingsHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_jobs_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_jobs_client.go index 509dceecbdf8..773ca9505c58 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_jobs_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_jobs_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,42 +24,54 @@ import ( // JobsClient contains the methods for the Jobs group. // Don't use this type directly, use NewJobsClient() instead. type JobsClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewJobsClient creates a new instance of JobsClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *JobsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &JobsClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &JobsClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // Get - Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *JobsClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *JobsGetOptions) (JobsGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The job name. +// resourceGroupName - The resource group name. +// options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +func (client *JobsClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *JobsClientGetOptions) (JobsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return JobsGetResponse{}, err + return JobsClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return JobsGetResponse{}, err + return JobsClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobsGetResponse{}, client.getHandleError(resp) + return JobsClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *JobsClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *JobsGetOptions) (*policy.Request, error) { +func (client *JobsClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *JobsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -78,7 +89,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, deviceName strin return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -90,23 +101,10 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, deviceName strin } // getHandleResponse handles the Get response. -func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsGetResponse, error) { - result := JobsGetResponse{RawResponse: resp} +func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetResponse, error) { + result := JobsClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.Job); err != nil { - return JobsGetResponse{}, runtime.NewResponseError(err, resp) + return JobsClientGetResponse{}, err } return result, nil } - -// getHandleError handles the Get error response. -func (client *JobsClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models.go index 4a586b312012..10a2e1ca21e4 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models.go @@ -27,49 +27,6 @@ type ARMBaseModel struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ARMBaseModel. -func (a ARMBaseModel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - a.marshalInternal(objectMap) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ARMBaseModel. -func (a *ARMBaseModel) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - return a.unmarshalInternal(rawMsg) -} - -func (a ARMBaseModel) marshalInternal(objectMap map[string]interface{}) { - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "type", a.Type) -} - -func (a *ARMBaseModel) unmarshalInternal(rawMsg map[string]json.RawMessage) error { - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, &a.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, &a.Type) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // AddonClassification provides polymorphic access to related types. // Call the interface's GetAddon() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -81,54 +38,25 @@ type AddonClassification interface { // Addon - Role Addon type Addon struct { - ARMBaseModel // REQUIRED; Addon type. Kind *AddonType `json:"kind,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Addon type SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // GetAddon implements the AddonClassification interface for type Addon. func (a *Addon) GetAddon() *Addon { return a } -// UnmarshalJSON implements the json.Unmarshaller interface for type Addon. -func (a *Addon) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - return a.unmarshalInternal(rawMsg) -} - -func (a Addon) marshalInternal(objectMap map[string]interface{}, discValue AddonType) { - a.ARMBaseModel.marshalInternal(objectMap) - a.Kind = &discValue - objectMap["kind"] = a.Kind - populate(objectMap, "systemData", a.SystemData) -} - -func (a *Addon) unmarshalInternal(rawMsg map[string]json.RawMessage) error { - for key, val := range rawMsg { - var err error - switch key { - case "kind": - err = unpopulate(val, &a.Kind) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &a.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := a.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil -} - // AddonList - Collection of all the Role addon on the Azure Stack Edge device. type AddonList struct { // READ-ONLY; Link to the next set of results. @@ -169,23 +97,23 @@ func (a *AddonList) UnmarshalJSON(data []byte) error { return nil } -// AddonsBeginCreateOrUpdateOptions contains the optional parameters for the Addons.BeginCreateOrUpdate method. -type AddonsBeginCreateOrUpdateOptions struct { +// AddonsClientBeginCreateOrUpdateOptions contains the optional parameters for the AddonsClient.BeginCreateOrUpdate method. +type AddonsClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// AddonsBeginDeleteOptions contains the optional parameters for the Addons.BeginDelete method. -type AddonsBeginDeleteOptions struct { +// AddonsClientBeginDeleteOptions contains the optional parameters for the AddonsClient.BeginDelete method. +type AddonsClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// AddonsGetOptions contains the optional parameters for the Addons.Get method. -type AddonsGetOptions struct { +// AddonsClientGetOptions contains the optional parameters for the AddonsClient.Get method. +type AddonsClientGetOptions struct { // placeholder for future optional parameters } -// AddonsListByRoleOptions contains the optional parameters for the Addons.ListByRole method. -type AddonsListByRoleOptions struct { +// AddonsClientListByRoleOptions contains the optional parameters for the AddonsClient.ListByRole method. +type AddonsClientListByRoleOptions struct { // placeholder for future optional parameters } @@ -215,47 +143,20 @@ type Address struct { // Alert on the data box edge/gateway device. type Alert struct { - ARMBaseModel + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Properties of alert. Properties *AlertProperties `json:"properties,omitempty" azure:"ro"` // READ-ONLY; Alert generated in the resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type Alert. -func (a Alert) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - a.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type Alert. -func (a *Alert) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &a.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := a.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // AlertErrorDetails - Error details for the alert. @@ -362,28 +263,58 @@ func (a *AlertProperties) UnmarshalJSON(data []byte) error { return nil } -// AlertsGetOptions contains the optional parameters for the Alerts.Get method. -type AlertsGetOptions struct { +// AlertsClientGetOptions contains the optional parameters for the AlertsClient.Get method. +type AlertsClientGetOptions struct { // placeholder for future optional parameters } -// AlertsListByDataBoxEdgeDeviceOptions contains the optional parameters for the Alerts.ListByDataBoxEdgeDevice method. -type AlertsListByDataBoxEdgeDeviceOptions struct { +// AlertsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the AlertsClient.ListByDataBoxEdgeDevice +// method. +type AlertsClientListByDataBoxEdgeDeviceOptions struct { // placeholder for future optional parameters } // ArcAddon - Arc Addon. type ArcAddon struct { - Addon + // REQUIRED; Addon type. + Kind *AddonType `json:"kind,omitempty"` + // REQUIRED; Properties specific to Arc addon. Properties *ArcAddonProperties `json:"properties,omitempty"` + + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Addon type + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetAddon implements the AddonClassification interface for type ArcAddon. +func (a *ArcAddon) GetAddon() *Addon { + return &Addon{ + Kind: a.Kind, + SystemData: a.SystemData, + ID: a.ID, + Name: a.Name, + Type: a.Type, + } } // MarshalJSON implements the json.Marshaller interface for type ArcAddon. func (a ArcAddon) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - a.Addon.marshalInternal(objectMap, AddonTypeArcForKubernetes) + populate(objectMap, "id", a.ID) + objectMap["kind"] = AddonTypeArcForKubernetes + populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) return json.Marshal(objectMap) } @@ -396,17 +327,29 @@ func (a *ArcAddon) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &a.Name) + delete(rawMsg, key) case "properties": err = unpopulate(val, &a.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, &a.Type) + delete(rawMsg, key) } if err != nil { return err } } - if err := a.Addon.unmarshalInternal(rawMsg); err != nil { - return err - } return nil } @@ -455,8 +398,8 @@ type Authentication struct { SymmetricKey *SymmetricKey `json:"symmetricKey,omitempty"` } -// AvailableSKUsListOptions contains the optional parameters for the AvailableSKUs.List method. -type AvailableSKUsListOptions struct { +// AvailableSKUsClientListOptions contains the optional parameters for the AvailableSKUsClient.List method. +type AvailableSKUsClientListOptions struct { // placeholder for future optional parameters } @@ -474,47 +417,20 @@ type AzureContainerInfo struct { // BandwidthSchedule - The bandwidth schedule details. type BandwidthSchedule struct { - ARMBaseModel // REQUIRED; The properties of the bandwidth schedule. Properties *BandwidthScheduleProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Bandwidth object related to ASE resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} -// MarshalJSON implements the json.Marshaller interface for type BandwidthSchedule. -func (b BandwidthSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - b.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BandwidthSchedule. -func (b *BandwidthSchedule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &b.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &b.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := b.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // BandwidthScheduleProperties - The properties of the bandwidth schedule. @@ -542,18 +458,26 @@ func (b BandwidthScheduleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// BandwidthSchedulesBeginCreateOrUpdateOptions contains the optional parameters for the BandwidthSchedules.BeginCreateOrUpdate method. -type BandwidthSchedulesBeginCreateOrUpdateOptions struct { +// BandwidthSchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the BandwidthSchedulesClient.BeginCreateOrUpdate +// method. +type BandwidthSchedulesClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// BandwidthSchedulesBeginDeleteOptions contains the optional parameters for the BandwidthSchedules.BeginDelete method. -type BandwidthSchedulesBeginDeleteOptions struct { +// BandwidthSchedulesClientBeginDeleteOptions contains the optional parameters for the BandwidthSchedulesClient.BeginDelete +// method. +type BandwidthSchedulesClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// BandwidthSchedulesGetOptions contains the optional parameters for the BandwidthSchedules.Get method. -type BandwidthSchedulesGetOptions struct { +// BandwidthSchedulesClientGetOptions contains the optional parameters for the BandwidthSchedulesClient.Get method. +type BandwidthSchedulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the BandwidthSchedulesClient.ListByDataBoxEdgeDevice +// method. +type BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions struct { // placeholder for future optional parameters } @@ -574,11 +498,6 @@ func (b BandwidthSchedulesList) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// BandwidthSchedulesListByDataBoxEdgeDeviceOptions contains the optional parameters for the BandwidthSchedules.ListByDataBoxEdgeDevice method. -type BandwidthSchedulesListByDataBoxEdgeDeviceOptions struct { - // placeholder for future optional parameters -} - // ClientAccessRight - The mapping between a particular client IP and the type of access client has on the NFS share. type ClientAccessRight struct { // REQUIRED; Type of access to be allowed for the client. @@ -590,16 +509,45 @@ type ClientAccessRight struct { // CloudEdgeManagementRole role. type CloudEdgeManagementRole struct { - Role + // REQUIRED; Role type. + Kind *RoleTypes `json:"kind,omitempty"` + // Properties specific to CloudEdgeManagementRole role. Properties *CloudEdgeManagementRoleProperties `json:"properties,omitempty"` + + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Role configured on ASE resource + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetRole implements the RoleClassification interface for type CloudEdgeManagementRole. +func (c *CloudEdgeManagementRole) GetRole() *Role { + return &Role{ + Kind: c.Kind, + SystemData: c.SystemData, + ID: c.ID, + Name: c.Name, + Type: c.Type, + } } // MarshalJSON implements the json.Marshaller interface for type CloudEdgeManagementRole. func (c CloudEdgeManagementRole) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - c.Role.marshalInternal(objectMap, RoleTypesCloudEdgeManagement) + populate(objectMap, "id", c.ID) + objectMap["kind"] = RoleTypesCloudEdgeManagement + populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) return json.Marshal(objectMap) } @@ -612,17 +560,29 @@ func (c *CloudEdgeManagementRole) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &c.Name) + delete(rawMsg, key) case "properties": err = unpopulate(val, &c.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, &c.Type) + delete(rawMsg, key) } if err != nil { return err } } - if err := c.Role.unmarshalInternal(rawMsg); err != nil { - return err - } return nil } @@ -638,41 +598,6 @@ type CloudEdgeManagementRoleProperties struct { LocalManagementStatus *RoleStatus `json:"localManagementStatus,omitempty" azure:"ro"` } -// CloudError - An error response from the service. -// Implements the error and azcore.HTTPResponse interfaces. -type CloudError struct { - raw string - // The error details. - InnerError *CloudErrorBody `json:"error,omitempty"` -} - -// Error implements the error interface for type CloudError. -// The contents of the error text are not contractual and subject to change. -func (e CloudError) Error() string { - return e.raw -} - -// CloudErrorBody - An error response from the service. -type CloudErrorBody struct { - // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - - // A list of additional details about the error. - Details []*CloudErrorBody `json:"details,omitempty"` - - // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` -} - -// MarshalJSON implements the json.Marshaller interface for type CloudErrorBody. -func (c CloudErrorBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", c.Code) - populate(objectMap, "details", c.Details) - populate(objectMap, "message", c.Message) - return json.Marshal(objectMap) -} - // CniConfig - Cni configuration type CniConfig struct { // READ-ONLY; Pod Subnet @@ -724,47 +649,20 @@ func (c ContactDetails) MarshalJSON() ([]byte, error) { // Container - Represents a container on the Data Box Edge/Gateway device. type Container struct { - ARMBaseModel // REQUIRED; The container properties. Properties *ContainerProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Container in DataBoxEdge Resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type Container. -func (c Container) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - c.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type Container. -func (c *Container) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &c.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &c.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := c.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // ContainerList - Collection of all the containers on the Data Box Edge/Gateway device. @@ -838,28 +736,30 @@ func (c *ContainerProperties) UnmarshalJSON(data []byte) error { return nil } -// ContainersBeginCreateOrUpdateOptions contains the optional parameters for the Containers.BeginCreateOrUpdate method. -type ContainersBeginCreateOrUpdateOptions struct { +// ContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainersClient.BeginCreateOrUpdate +// method. +type ContainersClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// ContainersBeginDeleteOptions contains the optional parameters for the Containers.BeginDelete method. -type ContainersBeginDeleteOptions struct { +// ContainersClientBeginDeleteOptions contains the optional parameters for the ContainersClient.BeginDelete method. +type ContainersClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// ContainersBeginRefreshOptions contains the optional parameters for the Containers.BeginRefresh method. -type ContainersBeginRefreshOptions struct { +// ContainersClientBeginRefreshOptions contains the optional parameters for the ContainersClient.BeginRefresh method. +type ContainersClientBeginRefreshOptions struct { // placeholder for future optional parameters } -// ContainersGetOptions contains the optional parameters for the Containers.Get method. -type ContainersGetOptions struct { +// ContainersClientGetOptions contains the optional parameters for the ContainersClient.Get method. +type ContainersClientGetOptions struct { // placeholder for future optional parameters } -// ContainersListByStorageAccountOptions contains the optional parameters for the Containers.ListByStorageAccount method. -type ContainersListByStorageAccountOptions struct { +// ContainersClientListByStorageAccountOptions contains the optional parameters for the ContainersClient.ListByStorageAccount +// method. +type ContainersClientListByStorageAccountOptions struct { // placeholder for future optional parameters } @@ -875,11 +775,16 @@ type DCAccessCodeProperties struct { AuthCode *string `json:"authCode,omitempty"` } -// DataBoxEdgeDevice - The Data Box Edge/Gateway device. -type DataBoxEdgeDevice struct { - ARMBaseModel - // REQUIRED; The location of the device. This is a supported and registered Azure geographical region (for example, West US, East US, or Southeast Asia). - // The geographical region of a device cannot be changed once +// DataResidency - Wraps data-residency related information for edge-resource and this should be used with ARM layer. +type DataResidency struct { + // DataResidencyType enum + Type *DataResidencyType `json:"type,omitempty"` +} + +// Device - The Data Box Edge/Gateway device. +type Device struct { + // REQUIRED; The location of the device. This is a supported and registered Azure geographical region (for example, West US, + // East US, or Southeast Asia). The geographical region of a device cannot be changed once // it is created, but if an identical geographical region is specified on update, the request will succeed. Location *string `json:"location,omitempty"` @@ -893,117 +798,61 @@ type DataBoxEdgeDevice struct { Kind *DataBoxEdgeDeviceKind `json:"kind,omitempty"` // The properties of the Data Box Edge/Gateway device. - Properties *DataBoxEdgeDeviceProperties `json:"properties,omitempty"` + Properties *DeviceProperties `json:"properties,omitempty"` // The SKU type. - SKU *SKU `json:"sku,omitempty"` + SKU *SKUInfo `json:"sku,omitempty"` // The list of tags that describe the device. These tags can be used to view and group this device (across resource groups). Tags map[string]*string `json:"tags,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; DataBoxEdge Resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeDevice. -func (d DataBoxEdgeDevice) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Device. +func (d Device) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - d.ARMBaseModel.marshalInternal(objectMap) populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) populate(objectMap, "identity", d.Identity) populate(objectMap, "kind", d.Kind) populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) populate(objectMap, "properties", d.Properties) populate(objectMap, "sku", d.SKU) populate(objectMap, "systemData", d.SystemData) populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type DataBoxEdgeDevice. -func (d *DataBoxEdgeDevice) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, &d.Etag) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, &d.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, &d.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, &d.Location) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, &d.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, &d.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &d.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, &d.Tags) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := d.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil -} - -// DataBoxEdgeDeviceExtendedInfo - The extended Info of the Data Box Edge/Gateway device. -type DataBoxEdgeDeviceExtendedInfo struct { - ARMBaseModel +// DeviceExtendedInfo - The extended Info of the Data Box Edge/Gateway device. +type DeviceExtendedInfo struct { // The extended info properties. - Properties *DataBoxEdgeDeviceExtendedInfoProperties `json:"properties,omitempty"` -} + Properties *DeviceExtendedInfoProperties `json:"properties,omitempty"` -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeDeviceExtendedInfo. -func (d DataBoxEdgeDeviceExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - d.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` -// UnmarshalJSON implements the json.Unmarshaller interface for type DataBoxEdgeDeviceExtendedInfo. -func (d *DataBoxEdgeDeviceExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &d.Properties) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := d.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } -// DataBoxEdgeDeviceExtendedInfoPatch - The Data Box Edge/Gateway device extended info patch. -type DataBoxEdgeDeviceExtendedInfoPatch struct { +// DeviceExtendedInfoPatch - The Data Box Edge/Gateway device extended info patch. +type DeviceExtendedInfoPatch struct { // The name for Channel Integrity Key stored in the Client Key Vault ChannelIntegrityKeyName *string `json:"channelIntegrityKeyName,omitempty"` @@ -1016,12 +865,13 @@ type DataBoxEdgeDeviceExtendedInfoPatch struct { // The url to access the Client Key Vault ClientSecretStoreURL *string `json:"clientSecretStoreUrl,omitempty"` - // For changing or to initiate the resync to key-vault set the status to KeyVaultSyncPending, rest of the status will not be applicable. + // For changing or to initiate the resync to key-vault set the status to KeyVaultSyncPending, rest of the status will not + // be applicable. SyncStatus *KeyVaultSyncStatus `json:"syncStatus,omitempty"` } -// DataBoxEdgeDeviceExtendedInfoProperties - The properties of the Data Box Edge/Gateway device extended info. -type DataBoxEdgeDeviceExtendedInfoProperties struct { +// DeviceExtendedInfoProperties - The properties of the Data Box Edge/Gateway device extended info. +type DeviceExtendedInfoProperties struct { // The name of Channel Integrity Key stored in the Client Key Vault ChannelIntegrityKeyName *string `json:"channelIntegrityKeyName,omitempty"` @@ -1050,8 +900,8 @@ type DataBoxEdgeDeviceExtendedInfoProperties struct { ResourceKey *string `json:"resourceKey,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeDeviceExtendedInfoProperties. -func (d DataBoxEdgeDeviceExtendedInfoProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeviceExtendedInfoProperties. +func (d DeviceExtendedInfoProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) populate(objectMap, "channelIntegrityKeyName", d.ChannelIntegrityKeyName) populate(objectMap, "channelIntegrityKeyVersion", d.ChannelIntegrityKeyVersion) @@ -1065,37 +915,37 @@ func (d DataBoxEdgeDeviceExtendedInfoProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// DataBoxEdgeDeviceList - The collection of Data Box Edge/Gateway devices. -type DataBoxEdgeDeviceList struct { +// DeviceList - The collection of Data Box Edge/Gateway devices. +type DeviceList struct { // READ-ONLY; Link to the next set of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; The list of Data Box Edge/Gateway devices. - Value []*DataBoxEdgeDevice `json:"value,omitempty" azure:"ro"` + Value []*Device `json:"value,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeDeviceList. -func (d DataBoxEdgeDeviceList) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeviceList. +func (d DeviceList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } -// DataBoxEdgeDevicePatch - The Data Box Edge/Gateway device patch. -type DataBoxEdgeDevicePatch struct { +// DevicePatch - The Data Box Edge/Gateway device patch. +type DevicePatch struct { // Msi identity of the resource Identity *ResourceIdentity `json:"identity,omitempty"` // The properties associated with the Data Box Edge/Gateway resource - Properties *DataBoxEdgeDevicePropertiesPatch `json:"properties,omitempty"` + Properties *DevicePropertiesPatch `json:"properties,omitempty"` // The tags attached to the Data Box Edge/Gateway resource. Tags map[string]*string `json:"tags,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeDevicePatch. -func (d DataBoxEdgeDevicePatch) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DevicePatch. +func (d DevicePatch) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) populate(objectMap, "identity", d.Identity) populate(objectMap, "properties", d.Properties) @@ -1103,8 +953,8 @@ func (d DataBoxEdgeDevicePatch) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// DataBoxEdgeDeviceProperties - The properties of the Data Box Edge/Gateway device. -type DataBoxEdgeDeviceProperties struct { +// DeviceProperties - The properties of the Data Box Edge/Gateway device. +type DeviceProperties struct { // The status of the Data Box Edge/Gateway device. DataBoxEdgeDeviceStatus *DataBoxEdgeDeviceStatus `json:"dataBoxEdgeDeviceStatus,omitempty"` @@ -1160,8 +1010,8 @@ type DataBoxEdgeDeviceProperties struct { TimeZone *string `json:"timeZone,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeDeviceProperties. -func (d DataBoxEdgeDeviceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type DeviceProperties. +func (d DeviceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) populate(objectMap, "configuredRoleTypes", d.ConfiguredRoleTypes) populate(objectMap, "culture", d.Culture) @@ -1184,291 +1034,133 @@ func (d DataBoxEdgeDeviceProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// DataBoxEdgeDevicePropertiesPatch - The Data Box Edge/Gateway device properties patch. -type DataBoxEdgeDevicePropertiesPatch struct { +// DevicePropertiesPatch - The Data Box Edge/Gateway device properties patch. +type DevicePropertiesPatch struct { // Edge Profile property of the Data Box Edge/Gateway device EdgeProfile *EdgeProfilePatch `json:"edgeProfile,omitempty"` } -// DataBoxEdgeMoveRequest - Resource Move details -type DataBoxEdgeMoveRequest struct { - // REQUIRED; List of resources to be moved - Resources []*string `json:"resources,omitempty"` - - // REQUIRED; Target resource group ARMId - TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` -} - -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeMoveRequest. -func (d DataBoxEdgeMoveRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resources", d.Resources) - populate(objectMap, "targetResourceGroup", d.TargetResourceGroup) - return json.Marshal(objectMap) -} - -// DataBoxEdgeSKU - The Sku information. -type DataBoxEdgeSKU struct { - // READ-ONLY; The API versions in which Sku is available. - APIVersions []*string `json:"apiVersions,omitempty" azure:"ro"` - - // READ-ONLY; Links to the next set of results - Availability *SKUAvailability `json:"availability,omitempty" azure:"ro"` - - // READ-ONLY; The capability info of the SKU. - Capabilities []*SKUCapability `json:"capabilities,omitempty" azure:"ro"` - - // READ-ONLY; The pricing info of the Sku. - Costs []*SKUCost `json:"costs,omitempty" azure:"ro"` - - // READ-ONLY; The Sku family. - Family *string `json:"family,omitempty" azure:"ro"` - - // READ-ONLY; The Sku kind. - Kind *string `json:"kind,omitempty" azure:"ro"` - - // READ-ONLY; Availability of the Sku for the location/zone/site. - LocationInfo []*SKULocationInfo `json:"locationInfo,omitempty" azure:"ro"` - - // READ-ONLY; Availability of the Sku for the region. - Locations []*string `json:"locations,omitempty" azure:"ro"` - - // READ-ONLY; The Sku name. - Name *SKUName `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - ResourceType *string `json:"resourceType,omitempty" azure:"ro"` - - // READ-ONLY; List of Shipment Types supported by this SKU - ShipmentTypes []*ShipmentType `json:"shipmentTypes,omitempty" azure:"ro"` - - // READ-ONLY; Sku can be signed up by customer or not. - SignupOption *SKUSignupOption `json:"signupOption,omitempty" azure:"ro"` - - // READ-ONLY; The Sku kind. - Size *string `json:"size,omitempty" azure:"ro"` - - // READ-ONLY; The Sku tier. - Tier *SKUTier `json:"tier,omitempty" azure:"ro"` - - // READ-ONLY; Availability of the Sku as preview/stable. - Version *SKUVersion `json:"version,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeSKU. -func (d DataBoxEdgeSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "apiVersions", d.APIVersions) - populate(objectMap, "availability", d.Availability) - populate(objectMap, "capabilities", d.Capabilities) - populate(objectMap, "costs", d.Costs) - populate(objectMap, "family", d.Family) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "locationInfo", d.LocationInfo) - populate(objectMap, "locations", d.Locations) - populate(objectMap, "name", d.Name) - populate(objectMap, "resourceType", d.ResourceType) - populate(objectMap, "shipmentTypes", d.ShipmentTypes) - populate(objectMap, "signupOption", d.SignupOption) - populate(objectMap, "size", d.Size) - populate(objectMap, "tier", d.Tier) - populate(objectMap, "version", d.Version) - return json.Marshal(objectMap) -} - -// DataBoxEdgeSKUList - List of SKU Information objects. -type DataBoxEdgeSKUList struct { - // READ-ONLY; Links to the next set of results - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; List of ResourceType Sku - Value []*DataBoxEdgeSKU `json:"value,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type DataBoxEdgeSKUList. -func (d DataBoxEdgeSKUList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// DataResidency - Wraps data-residency related information for edge-resource and this should be used with ARM layer. -type DataResidency struct { - // DataResidencyType enum - Type *DataResidencyType `json:"type,omitempty"` -} - -// DevicesBeginCreateOrUpdateSecuritySettingsOptions contains the optional parameters for the Devices.BeginCreateOrUpdateSecuritySettings method. -type DevicesBeginCreateOrUpdateSecuritySettingsOptions struct { +// DevicesClientBeginCreateOrUpdateSecuritySettingsOptions contains the optional parameters for the DevicesClient.BeginCreateOrUpdateSecuritySettings +// method. +type DevicesClientBeginCreateOrUpdateSecuritySettingsOptions struct { // placeholder for future optional parameters } -// DevicesBeginDeleteOptions contains the optional parameters for the Devices.BeginDelete method. -type DevicesBeginDeleteOptions struct { +// DevicesClientBeginDeleteOptions contains the optional parameters for the DevicesClient.BeginDelete method. +type DevicesClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// DevicesBeginDownloadUpdatesOptions contains the optional parameters for the Devices.BeginDownloadUpdates method. -type DevicesBeginDownloadUpdatesOptions struct { +// DevicesClientBeginDownloadUpdatesOptions contains the optional parameters for the DevicesClient.BeginDownloadUpdates method. +type DevicesClientBeginDownloadUpdatesOptions struct { // placeholder for future optional parameters } -// DevicesBeginInstallUpdatesOptions contains the optional parameters for the Devices.BeginInstallUpdates method. -type DevicesBeginInstallUpdatesOptions struct { +// DevicesClientBeginInstallUpdatesOptions contains the optional parameters for the DevicesClient.BeginInstallUpdates method. +type DevicesClientBeginInstallUpdatesOptions struct { // placeholder for future optional parameters } -// DevicesBeginScanForUpdatesOptions contains the optional parameters for the Devices.BeginScanForUpdates method. -type DevicesBeginScanForUpdatesOptions struct { +// DevicesClientBeginScanForUpdatesOptions contains the optional parameters for the DevicesClient.BeginScanForUpdates method. +type DevicesClientBeginScanForUpdatesOptions struct { // placeholder for future optional parameters } -// DevicesCreateOrUpdateOptions contains the optional parameters for the Devices.CreateOrUpdate method. -type DevicesCreateOrUpdateOptions struct { +// DevicesClientCreateOrUpdateOptions contains the optional parameters for the DevicesClient.CreateOrUpdate method. +type DevicesClientCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// DevicesGenerateCertificateOptions contains the optional parameters for the Devices.GenerateCertificate method. -type DevicesGenerateCertificateOptions struct { +// DevicesClientGenerateCertificateOptions contains the optional parameters for the DevicesClient.GenerateCertificate method. +type DevicesClientGenerateCertificateOptions struct { // placeholder for future optional parameters } -// DevicesGetExtendedInformationOptions contains the optional parameters for the Devices.GetExtendedInformation method. -type DevicesGetExtendedInformationOptions struct { +// DevicesClientGetExtendedInformationOptions contains the optional parameters for the DevicesClient.GetExtendedInformation +// method. +type DevicesClientGetExtendedInformationOptions struct { // placeholder for future optional parameters } -// DevicesGetNetworkSettingsOptions contains the optional parameters for the Devices.GetNetworkSettings method. -type DevicesGetNetworkSettingsOptions struct { +// DevicesClientGetNetworkSettingsOptions contains the optional parameters for the DevicesClient.GetNetworkSettings method. +type DevicesClientGetNetworkSettingsOptions struct { // placeholder for future optional parameters } -// DevicesGetOptions contains the optional parameters for the Devices.Get method. -type DevicesGetOptions struct { +// DevicesClientGetOptions contains the optional parameters for the DevicesClient.Get method. +type DevicesClientGetOptions struct { // placeholder for future optional parameters } -// DevicesGetUpdateSummaryOptions contains the optional parameters for the Devices.GetUpdateSummary method. -type DevicesGetUpdateSummaryOptions struct { +// DevicesClientGetUpdateSummaryOptions contains the optional parameters for the DevicesClient.GetUpdateSummary method. +type DevicesClientGetUpdateSummaryOptions struct { // placeholder for future optional parameters } -// DevicesListByResourceGroupOptions contains the optional parameters for the Devices.ListByResourceGroup method. -type DevicesListByResourceGroupOptions struct { - // Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next page in the list. +// DevicesClientListByResourceGroupOptions contains the optional parameters for the DevicesClient.ListByResourceGroup method. +type DevicesClientListByResourceGroupOptions struct { + // Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next + // page in the list. Expand *string } -// DevicesListBySubscriptionOptions contains the optional parameters for the Devices.ListBySubscription method. -type DevicesListBySubscriptionOptions struct { - // Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next page in the list. +// DevicesClientListBySubscriptionOptions contains the optional parameters for the DevicesClient.ListBySubscription method. +type DevicesClientListBySubscriptionOptions struct { + // Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next + // page in the list. Expand *string } -// DevicesUpdateExtendedInformationOptions contains the optional parameters for the Devices.UpdateExtendedInformation method. -type DevicesUpdateExtendedInformationOptions struct { +// DevicesClientUpdateExtendedInformationOptions contains the optional parameters for the DevicesClient.UpdateExtendedInformation +// method. +type DevicesClientUpdateExtendedInformationOptions struct { // placeholder for future optional parameters } -// DevicesUpdateOptions contains the optional parameters for the Devices.Update method. -type DevicesUpdateOptions struct { +// DevicesClientUpdateOptions contains the optional parameters for the DevicesClient.Update method. +type DevicesClientUpdateOptions struct { // placeholder for future optional parameters } -// DevicesUploadCertificateOptions contains the optional parameters for the Devices.UploadCertificate method. -type DevicesUploadCertificateOptions struct { +// DevicesClientUploadCertificateOptions contains the optional parameters for the DevicesClient.UploadCertificate method. +type DevicesClientUploadCertificateOptions struct { // placeholder for future optional parameters } // DiagnosticProactiveLogCollectionSettings - The diagnostic proactive log collection settings of a device. type DiagnosticProactiveLogCollectionSettings struct { - ARMBaseModel // REQUIRED; Properties of the diagnostic proactive log collection settings. Properties *ProactiveLogCollectionSettingsProperties `json:"properties,omitempty"` - // READ-ONLY; DiagnosticProactiveLogCollectionSettings - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` -// MarshalJSON implements the json.Marshaller interface for type DiagnosticProactiveLogCollectionSettings. -func (d DiagnosticProactiveLogCollectionSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - d.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - return json.Marshal(objectMap) -} + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticProactiveLogCollectionSettings. -func (d *DiagnosticProactiveLogCollectionSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &d.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &d.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := d.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; DiagnosticProactiveLogCollectionSettings + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // DiagnosticRemoteSupportSettings - The remote support settings of a device. type DiagnosticRemoteSupportSettings struct { - ARMBaseModel // REQUIRED; Properties of the remote support settings. Properties *DiagnosticRemoteSupportSettingsProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; DiagnosticRemoteSupportSettings SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} -// MarshalJSON implements the json.Marshaller interface for type DiagnosticRemoteSupportSettings. -func (d DiagnosticRemoteSupportSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - d.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticRemoteSupportSettings. -func (d *DiagnosticRemoteSupportSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &d.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &d.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := d.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // DiagnosticRemoteSupportSettingsProperties - The properties of remote support settings. @@ -1484,27 +1176,27 @@ func (d DiagnosticRemoteSupportSettingsProperties) MarshalJSON() ([]byte, error) return json.Marshal(objectMap) } -// DiagnosticSettingsBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions contains the optional parameters for the DiagnosticSettings.BeginUpdateDiagnosticProactiveLogCollectionSettings -// method. -type DiagnosticSettingsBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions struct { +// DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions contains the optional parameters for +// the DiagnosticSettingsClient.BeginUpdateDiagnosticProactiveLogCollectionSettings method. +type DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions struct { // placeholder for future optional parameters } -// DiagnosticSettingsBeginUpdateDiagnosticRemoteSupportSettingsOptions contains the optional parameters for the DiagnosticSettings.BeginUpdateDiagnosticRemoteSupportSettings +// DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions contains the optional parameters for the DiagnosticSettingsClient.BeginUpdateDiagnosticRemoteSupportSettings // method. -type DiagnosticSettingsBeginUpdateDiagnosticRemoteSupportSettingsOptions struct { +type DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions struct { // placeholder for future optional parameters } -// DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptions contains the optional parameters for the DiagnosticSettings.GetDiagnosticProactiveLogCollectionSettings +// DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsOptions contains the optional parameters for the DiagnosticSettingsClient.GetDiagnosticProactiveLogCollectionSettings // method. -type DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptions struct { +type DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsOptions struct { // placeholder for future optional parameters } -// DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptions contains the optional parameters for the DiagnosticSettings.GetDiagnosticRemoteSupportSettings +// DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsOptions contains the optional parameters for the DiagnosticSettingsClient.GetDiagnosticRemoteSupportSettings // method. -type DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptions struct { +type DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsOptions struct { // placeholder for future optional parameters } @@ -1550,16 +1242,45 @@ type EtcdInfo struct { // FileEventTrigger - Trigger details. type FileEventTrigger struct { - Trigger + // REQUIRED; Trigger Kind. + Kind *TriggerEventType `json:"kind,omitempty"` + // REQUIRED; File trigger properties. Properties *FileTriggerProperties `json:"properties,omitempty"` + + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Trigger in DataBoxEdge Resource + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetTrigger implements the TriggerClassification interface for type FileEventTrigger. +func (f *FileEventTrigger) GetTrigger() *Trigger { + return &Trigger{ + SystemData: f.SystemData, + Kind: f.Kind, + ID: f.ID, + Name: f.Name, + Type: f.Type, + } } // MarshalJSON implements the json.Marshaller interface for type FileEventTrigger. func (f FileEventTrigger) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - f.Trigger.marshalInternal(objectMap, TriggerEventTypeFileEvent) + populate(objectMap, "id", f.ID) + objectMap["kind"] = TriggerEventTypeFileEvent + populate(objectMap, "name", f.Name) populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) return json.Marshal(objectMap) } @@ -1572,17 +1293,29 @@ func (f *FileEventTrigger) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, &f.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, &f.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &f.Name) + delete(rawMsg, key) case "properties": err = unpopulate(val, &f.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, &f.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, &f.Type) + delete(rawMsg, key) } if err != nil { return err } } - if err := f.Trigger.unmarshalInternal(rawMsg); err != nil { - return err - } return nil } @@ -1600,8 +1333,8 @@ type FileTriggerProperties struct { // REQUIRED; File event source details. SourceInfo *FileSourceInfo `json:"sourceInfo,omitempty"` - // A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger is intended for certain specific - // IoT modules in the device, the tag can be the + // A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger + // is intended for certain specific IoT modules in the device, the tag can be the // name or the image URL of the module. CustomContextTag *string `json:"customContextTag,omitempty"` } @@ -1656,16 +1389,45 @@ type ImageRepositoryCredential struct { // IoTAddon - IoT Addon. type IoTAddon struct { - Addon + // REQUIRED; Addon type. + Kind *AddonType `json:"kind,omitempty"` + // REQUIRED; Properties specific to IOT addon. Properties *IoTAddonProperties `json:"properties,omitempty"` + + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Addon type + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetAddon implements the AddonClassification interface for type IoTAddon. +func (i *IoTAddon) GetAddon() *Addon { + return &Addon{ + Kind: i.Kind, + SystemData: i.SystemData, + ID: i.ID, + Name: i.Name, + Type: i.Type, + } } // MarshalJSON implements the json.Marshaller interface for type IoTAddon. func (i IoTAddon) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - i.Addon.marshalInternal(objectMap, AddonTypeIotEdge) + populate(objectMap, "id", i.ID) + objectMap["kind"] = AddonTypeIotEdge + populate(objectMap, "name", i.Name) populate(objectMap, "properties", i.Properties) + populate(objectMap, "systemData", i.SystemData) + populate(objectMap, "type", i.Type) return json.Marshal(objectMap) } @@ -1678,17 +1440,29 @@ func (i *IoTAddon) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, &i.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, &i.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &i.Name) + delete(rawMsg, key) case "properties": err = unpopulate(val, &i.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, &i.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, &i.Type) + delete(rawMsg, key) } if err != nil { return err } } - if err := i.Addon.unmarshalInternal(rawMsg); err != nil { - return err - } return nil } @@ -1728,7 +1502,8 @@ type IoTDeviceInfo struct { IoTHostHubID *string `json:"ioTHostHubId,omitempty"` } -// IoTEdgeAgentInfo - IoT edge agent details is optional, this will be used for download system Agent module while bootstrapping IoT Role if specified. +// IoTEdgeAgentInfo - IoT edge agent details is optional, this will be used for download system Agent module while bootstrapping +// IoT Role if specified. type IoTEdgeAgentInfo struct { // REQUIRED; Name of the IoT edge agent image. ImageName *string `json:"imageName,omitempty"` @@ -1742,16 +1517,45 @@ type IoTEdgeAgentInfo struct { // IoTRole - Compute role. type IoTRole struct { - Role + // REQUIRED; Role type. + Kind *RoleTypes `json:"kind,omitempty"` + // Properties specific to IoT role. Properties *IoTRoleProperties `json:"properties,omitempty"` + + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Role configured on ASE resource + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetRole implements the RoleClassification interface for type IoTRole. +func (i *IoTRole) GetRole() *Role { + return &Role{ + Kind: i.Kind, + SystemData: i.SystemData, + ID: i.ID, + Name: i.Name, + Type: i.Type, + } } // MarshalJSON implements the json.Marshaller interface for type IoTRole. func (i IoTRole) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - i.Role.marshalInternal(objectMap, RoleTypesIOT) + populate(objectMap, "id", i.ID) + objectMap["kind"] = RoleTypesIOT + populate(objectMap, "name", i.Name) populate(objectMap, "properties", i.Properties) + populate(objectMap, "systemData", i.SystemData) + populate(objectMap, "type", i.Type) return json.Marshal(objectMap) } @@ -1764,17 +1568,29 @@ func (i *IoTRole) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, &i.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, &i.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &i.Name) + delete(rawMsg, key) case "properties": err = unpopulate(val, &i.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, &i.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, &i.Type) + delete(rawMsg, key) } if err != nil { return err } } - if err := i.Role.unmarshalInternal(rawMsg); err != nil { - return err - } return nil } @@ -1952,7 +1768,8 @@ func (j JobErrorItem) MarshalJSON() ([]byte, error) { // JobProperties - The properties for the job. type JobProperties struct { - // If only subfolders need to be refreshed, then the subfolder path inside the share or container. (The path is empty if there are no subfolders.) + // If only subfolders need to be refreshed, then the subfolder path inside the share or container. (The path is empty if there + // are no subfolders.) Folder *string `json:"folder,omitempty"` // READ-ONLY; Current stage of the update operation. @@ -1977,8 +1794,8 @@ type JobProperties struct { TotalRefreshErrors *int32 `json:"totalRefreshErrors,omitempty" azure:"ro"` } -// JobsGetOptions contains the optional parameters for the Jobs.Get method. -type JobsGetOptions struct { +// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +type JobsClientGetOptions struct { // placeholder for future optional parameters } @@ -2014,16 +1831,45 @@ type KubernetesIPConfiguration struct { // KubernetesRole - Kubernetes role. type KubernetesRole struct { - Role + // REQUIRED; Role type. + Kind *RoleTypes `json:"kind,omitempty"` + // Properties specific to Kubernetes role. Properties *KubernetesRoleProperties `json:"properties,omitempty"` + + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Role configured on ASE resource + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetRole implements the RoleClassification interface for type KubernetesRole. +func (k *KubernetesRole) GetRole() *Role { + return &Role{ + Kind: k.Kind, + SystemData: k.SystemData, + ID: k.ID, + Name: k.Name, + Type: k.Type, + } } // MarshalJSON implements the json.Marshaller interface for type KubernetesRole. func (k KubernetesRole) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - k.Role.marshalInternal(objectMap, RoleTypesKubernetes) + populate(objectMap, "id", k.ID) + objectMap["kind"] = RoleTypesKubernetes + populate(objectMap, "name", k.Name) populate(objectMap, "properties", k.Properties) + populate(objectMap, "systemData", k.SystemData) + populate(objectMap, "type", k.Type) return json.Marshal(objectMap) } @@ -2036,17 +1882,29 @@ func (k *KubernetesRole) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, &k.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, &k.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &k.Name) + delete(rawMsg, key) case "properties": err = unpopulate(val, &k.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, &k.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, &k.Type) + delete(rawMsg, key) } if err != nil { return err } } - if err := k.Role.unmarshalInternal(rawMsg); err != nil { - return err - } return nil } @@ -2144,16 +2002,45 @@ type LoadBalancerConfig struct { // MECRole - MEC role. type MECRole struct { - Role + // REQUIRED; Role type. + Kind *RoleTypes `json:"kind,omitempty"` + // Properties specific to MEC role. Properties *MECRoleProperties `json:"properties,omitempty"` + + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Role configured on ASE resource + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetRole implements the RoleClassification interface for type MECRole. +func (m *MECRole) GetRole() *Role { + return &Role{ + Kind: m.Kind, + SystemData: m.SystemData, + ID: m.ID, + Name: m.Name, + Type: m.Type, + } } // MarshalJSON implements the json.Marshaller interface for type MECRole. func (m MECRole) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - m.Role.marshalInternal(objectMap, RoleTypesMEC) + populate(objectMap, "id", m.ID) + objectMap["kind"] = RoleTypesMEC + populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } @@ -2166,17 +2053,29 @@ func (m *MECRole) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &m.Name) + delete(rawMsg, key) case "properties": err = unpopulate(val, &m.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, &m.Type) + delete(rawMsg, key) } if err != nil { return err } } - if err := m.Role.unmarshalInternal(rawMsg); err != nil { - return err - } return nil } @@ -2332,69 +2231,43 @@ func (m MetricSpecificationV1) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MonitoringConfigBeginCreateOrUpdateOptions contains the optional parameters for the MonitoringConfig.BeginCreateOrUpdate method. -type MonitoringConfigBeginCreateOrUpdateOptions struct { +// MonitoringConfigClientBeginCreateOrUpdateOptions contains the optional parameters for the MonitoringConfigClient.BeginCreateOrUpdate +// method. +type MonitoringConfigClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// MonitoringConfigBeginDeleteOptions contains the optional parameters for the MonitoringConfig.BeginDelete method. -type MonitoringConfigBeginDeleteOptions struct { +// MonitoringConfigClientBeginDeleteOptions contains the optional parameters for the MonitoringConfigClient.BeginDelete method. +type MonitoringConfigClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// MonitoringConfigGetOptions contains the optional parameters for the MonitoringConfig.Get method. -type MonitoringConfigGetOptions struct { +// MonitoringConfigClientGetOptions contains the optional parameters for the MonitoringConfigClient.Get method. +type MonitoringConfigClientGetOptions struct { // placeholder for future optional parameters } -// MonitoringConfigListOptions contains the optional parameters for the MonitoringConfig.List method. -type MonitoringConfigListOptions struct { +// MonitoringConfigClientListOptions contains the optional parameters for the MonitoringConfigClient.List method. +type MonitoringConfigClientListOptions struct { // placeholder for future optional parameters } // MonitoringMetricConfiguration - The metric setting details for the role type MonitoringMetricConfiguration struct { - ARMBaseModel // REQUIRED; The metric setting properties. Properties *MonitoringMetricConfigurationProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; MonitoringConfiguration on ASE device SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type MonitoringMetricConfiguration. -func (m MonitoringMetricConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - m.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringMetricConfiguration. -func (m *MonitoringMetricConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &m.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := m.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // MonitoringMetricConfigurationList - Collection of metric configurations. @@ -2525,47 +2398,20 @@ type NetworkAdapterPosition struct { // NetworkSettings - The network settings of a device. type NetworkSettings struct { - ARMBaseModel + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; The properties of network settings of a device. Properties *NetworkSettingsProperties `json:"properties,omitempty" azure:"ro"` // READ-ONLY; NetworkSettings on ASE device SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkSettings. -func (n NetworkSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - n.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "systemData", n.SystemData) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSettings. -func (n *NetworkSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &n.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &n.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := n.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // NetworkSettingsProperties - The properties of network settings. @@ -2581,44 +2427,21 @@ func (n NetworkSettingsProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// Node - Represents a single node in a Data box Edge/Gateway device Gateway devices, standalone Edge devices and a single node cluster Edge device will -// all have 1 node Multi-node Edge devices will have more +// Node - Represents a single node in a Data box Edge/Gateway device Gateway devices, standalone Edge devices and a single +// node cluster Edge device will all have 1 node Multi-node Edge devices will have more // than 1 nodes type Node struct { - ARMBaseModel + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; The properties of the node Properties *NodeProperties `json:"properties,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type Node. -func (n Node) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - n.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", n.Properties) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type Node. -func (n *Node) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &n.Properties) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := n.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // NodeInfo - Kubernetes node info @@ -2683,8 +2506,9 @@ type NodeProperties struct { NodeStatus *NodeStatus `json:"nodeStatus,omitempty" azure:"ro"` } -// NodesListByDataBoxEdgeDeviceOptions contains the optional parameters for the Nodes.ListByDataBoxEdgeDevice method. -type NodesListByDataBoxEdgeDeviceOptions struct { +// NodesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the NodesClient.ListByDataBoxEdgeDevice +// method. +type NodesClientListByDataBoxEdgeDeviceOptions struct { // placeholder for future optional parameters } @@ -2727,6 +2551,11 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } +// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + // OperationsList - The list of operations used for the discovery of available provider operations. type OperationsList struct { // REQUIRED; The value. @@ -2744,59 +2573,27 @@ func (o OperationsList) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// OperationsListOptions contains the optional parameters for the Operations.List method. -type OperationsListOptions struct { - // placeholder for future optional parameters -} - -// OperationsStatusGetOptions contains the optional parameters for the OperationsStatus.Get method. -type OperationsStatusGetOptions struct { +// OperationsStatusClientGetOptions contains the optional parameters for the OperationsStatusClient.Get method. +type OperationsStatusClientGetOptions struct { // placeholder for future optional parameters } // Order - The order details. type Order struct { - ARMBaseModel // The order properties. Properties *OrderProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Order configured on ASE resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type Order. -func (o Order) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - o.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "systemData", o.SystemData) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type Order. -func (o *Order) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &o.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &o.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := o.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // OrderList - List of order entities. @@ -2836,7 +2633,8 @@ type OrderProperties struct { // READ-ONLY; List of status changes in the order. OrderHistory []*OrderStatus `json:"orderHistory,omitempty" azure:"ro"` - // READ-ONLY; Tracking information for the package returned from the customer whether it has an original or a replacement device. + // READ-ONLY; Tracking information for the package returned from the customer whether it has an original or a replacement + // device. ReturnTrackingInfo []*TrackingInfo `json:"returnTrackingInfo,omitempty" azure:"ro"` // READ-ONLY; Serial number of the device. @@ -2918,43 +2716,73 @@ func (o *OrderStatus) UnmarshalJSON(data []byte) error { return nil } -// OrdersBeginCreateOrUpdateOptions contains the optional parameters for the Orders.BeginCreateOrUpdate method. -type OrdersBeginCreateOrUpdateOptions struct { +// OrdersClientBeginCreateOrUpdateOptions contains the optional parameters for the OrdersClient.BeginCreateOrUpdate method. +type OrdersClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// OrdersBeginDeleteOptions contains the optional parameters for the Orders.BeginDelete method. -type OrdersBeginDeleteOptions struct { +// OrdersClientBeginDeleteOptions contains the optional parameters for the OrdersClient.BeginDelete method. +type OrdersClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// OrdersGetOptions contains the optional parameters for the Orders.Get method. -type OrdersGetOptions struct { +// OrdersClientGetOptions contains the optional parameters for the OrdersClient.Get method. +type OrdersClientGetOptions struct { // placeholder for future optional parameters } -// OrdersListByDataBoxEdgeDeviceOptions contains the optional parameters for the Orders.ListByDataBoxEdgeDevice method. -type OrdersListByDataBoxEdgeDeviceOptions struct { +// OrdersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the OrdersClient.ListByDataBoxEdgeDevice +// method. +type OrdersClientListByDataBoxEdgeDeviceOptions struct { // placeholder for future optional parameters } -// OrdersListDCAccessCodeOptions contains the optional parameters for the Orders.ListDCAccessCode method. -type OrdersListDCAccessCodeOptions struct { +// OrdersClientListDCAccessCodeOptions contains the optional parameters for the OrdersClient.ListDCAccessCode method. +type OrdersClientListDCAccessCodeOptions struct { // placeholder for future optional parameters } // PeriodicTimerEventTrigger - Trigger details. type PeriodicTimerEventTrigger struct { - Trigger + // REQUIRED; Trigger Kind. + Kind *TriggerEventType `json:"kind,omitempty"` + // REQUIRED; Periodic timer trigger properties. Properties *PeriodicTimerProperties `json:"properties,omitempty"` + + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Trigger in DataBoxEdge Resource + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// GetTrigger implements the TriggerClassification interface for type PeriodicTimerEventTrigger. +func (p *PeriodicTimerEventTrigger) GetTrigger() *Trigger { + return &Trigger{ + SystemData: p.SystemData, + Kind: p.Kind, + ID: p.ID, + Name: p.Name, + Type: p.Type, + } } // MarshalJSON implements the json.Marshaller interface for type PeriodicTimerEventTrigger. func (p PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - p.Trigger.marshalInternal(objectMap, TriggerEventTypePeriodicTimerEvent) + populate(objectMap, "id", p.ID) + objectMap["kind"] = TriggerEventTypePeriodicTimerEvent + populate(objectMap, "name", p.Name) populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) return json.Marshal(objectMap) } @@ -2967,17 +2795,29 @@ func (p *PeriodicTimerEventTrigger) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "id": + err = unpopulate(val, &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &p.Name) + delete(rawMsg, key) case "properties": err = unpopulate(val, &p.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, &p.Type) + delete(rawMsg, key) } if err != nil { return err } } - if err := p.Trigger.unmarshalInternal(rawMsg); err != nil { - return err - } return nil } @@ -2989,8 +2829,8 @@ type PeriodicTimerProperties struct { // REQUIRED; Periodic timer details. SourceInfo *PeriodicTimerSourceInfo `json:"sourceInfo,omitempty"` - // A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger is intended for certain specific - // IoT modules in the device, the tag can be the + // A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger + // is intended for certain specific IoT modules in the device, the tag can be the // name or the image URL of the module. CustomContextTag *string `json:"customContextTag,omitempty"` } @@ -3000,8 +2840,8 @@ type PeriodicTimerSourceInfo struct { // REQUIRED; Periodic frequency at which timer event needs to be raised. Supports daily, hourly, minutes, and seconds. Schedule *string `json:"schedule,omitempty"` - // REQUIRED; The time of the day that results in a valid trigger. Schedule is computed with reference to the time specified upto seconds. If timezone is - // not specified the time will considered to be in device + // REQUIRED; The time of the day that results in a valid trigger. Schedule is computed with reference to the time specified + // upto seconds. If timezone is not specified the time will considered to be in device // timezone. The value will always be returned as UTC time. StartTime *time.Time `json:"startTime,omitempty"` @@ -3061,18 +2901,20 @@ type RawCertificateData struct { // RefreshDetails - Fields for tracking refresh job on the share or container. type RefreshDetails struct { - // Indicates the relative path of the error xml for the last refresh job on this particular share or container, if any. This could be a failed job or a - // successful job. + // Indicates the relative path of the error xml for the last refresh job on this particular share or container, if any. This + // could be a failed job or a successful job. ErrorManifestFile *string `json:"errorManifestFile,omitempty"` - // If a refresh job is currently in progress on this share or container, this field indicates the ARM resource ID of that job. The field is empty if no - // job is in progress. + // If a refresh job is currently in progress on this share or container, this field indicates the ARM resource ID of that + // job. The field is empty if no job is in progress. InProgressRefreshJobID *string `json:"inProgressRefreshJobId,omitempty"` - // Indicates the completed time for the last refresh job on this particular share or container, if any.This could be a failed job or a successful job. + // Indicates the completed time for the last refresh job on this particular share or container, if any.This could be a failed + // job or a successful job. LastCompletedRefreshJobTimeInUTC *time.Time `json:"lastCompletedRefreshJobTimeInUTC,omitempty"` - // Indicates the id of the last refresh job on this particular share or container,if any. This could be a failed job or a successful job. + // Indicates the id of the last refresh job on this particular share or container,if any. This could be a failed job or a + // successful job. LastJob *string `json:"lastJob,omitempty"` } @@ -3214,23 +3056,6 @@ func (r *ResourceMoveDetails) UnmarshalJSON(data []byte) error { return nil } -// ResourceTypeSKU - Resource type Sku object -type ResourceTypeSKU struct { - // READ-ONLY; The resource type. - ResourceType *string `json:"resourceType,omitempty" azure:"ro"` - - // READ-ONLY; The skus. - SKUs []*SKUInformation `json:"skus,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceTypeSKU. -func (r ResourceTypeSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resourceType", r.ResourceType) - populate(objectMap, "skus", r.SKUs) - return json.Marshal(objectMap) -} - // RoleClassification provides polymorphic access to related types. // Call the interface's GetRole() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -3242,54 +3067,25 @@ type RoleClassification interface { // Role - Compute role. type Role struct { - ARMBaseModel // REQUIRED; Role type. Kind *RoleTypes `json:"kind,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Role configured on ASE resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // GetRole implements the RoleClassification interface for type Role. func (r *Role) GetRole() *Role { return r } -// UnmarshalJSON implements the json.Unmarshaller interface for type Role. -func (r *Role) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - return r.unmarshalInternal(rawMsg) -} - -func (r Role) marshalInternal(objectMap map[string]interface{}, discValue RoleTypes) { - r.ARMBaseModel.marshalInternal(objectMap) - r.Kind = &discValue - objectMap["kind"] = r.Kind - populate(objectMap, "systemData", r.SystemData) -} - -func (r *Role) unmarshalInternal(rawMsg map[string]json.RawMessage) error { - for key, val := range rawMsg { - var err error - switch key { - case "kind": - err = unpopulate(val, &r.Kind) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &r.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := r.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil -} - // RoleList - Collection of all the roles on the Data Box Edge device. type RoleList struct { // READ-ONLY; Link to the next set of results. @@ -3336,112 +3132,137 @@ type RoleSinkInfo struct { RoleID *string `json:"roleId,omitempty"` } -// RolesBeginCreateOrUpdateOptions contains the optional parameters for the Roles.BeginCreateOrUpdate method. -type RolesBeginCreateOrUpdateOptions struct { +// RolesClientBeginCreateOrUpdateOptions contains the optional parameters for the RolesClient.BeginCreateOrUpdate method. +type RolesClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// RolesBeginDeleteOptions contains the optional parameters for the Roles.BeginDelete method. -type RolesBeginDeleteOptions struct { +// RolesClientBeginDeleteOptions contains the optional parameters for the RolesClient.BeginDelete method. +type RolesClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// RolesGetOptions contains the optional parameters for the Roles.Get method. -type RolesGetOptions struct { +// RolesClientGetOptions contains the optional parameters for the RolesClient.Get method. +type RolesClientGetOptions struct { // placeholder for future optional parameters } -// RolesListByDataBoxEdgeDeviceOptions contains the optional parameters for the Roles.ListByDataBoxEdgeDevice method. -type RolesListByDataBoxEdgeDeviceOptions struct { +// RolesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the RolesClient.ListByDataBoxEdgeDevice +// method. +type RolesClientListByDataBoxEdgeDeviceOptions struct { // placeholder for future optional parameters } -// SKU - The SKU type. +// SKU - The Sku information. type SKU struct { - // SKU name. - Name *SKUName `json:"name,omitempty"` - - // The SKU tier. This is based on the SKU name. - Tier *SKUTier `json:"tier,omitempty"` -} - -// SKUCapability - The metadata to describe the capability. -type SKUCapability struct { - // READ-ONLY; An invariant to describe the feature. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; An invariant if the feature is measured by quantity. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// SKUCost - The metadata for retrieving price info. -type SKUCost struct { - // READ-ONLY; The extended unit. - ExtendedUnit *string `json:"extendedUnit,omitempty" azure:"ro"` + // READ-ONLY; The API versions in which Sku is available. + APIVersions []*string `json:"apiVersions,omitempty" azure:"ro"` - // READ-ONLY; Used for querying price from commerce. - MeterID *string `json:"meterId,omitempty" azure:"ro"` + // READ-ONLY; Links to the next set of results + Availability *SKUAvailability `json:"availability,omitempty" azure:"ro"` - // READ-ONLY; The cost quantity. - Quantity *int64 `json:"quantity,omitempty" azure:"ro"` -} + // READ-ONLY; The capability info of the SKU. + Capabilities []*SKUCapability `json:"capabilities,omitempty" azure:"ro"` -// SKUInformation - Sku information -type SKUInformation struct { // READ-ONLY; The pricing info of the Sku. Costs []*SKUCost `json:"costs,omitempty" azure:"ro"` // READ-ONLY; The Sku family. Family *string `json:"family,omitempty" azure:"ro"` - // READ-ONLY; The sku kind. + // READ-ONLY; The Sku kind. Kind *string `json:"kind,omitempty" azure:"ro"` - // READ-ONLY; The locations where Sku is available with zones and sites info + // READ-ONLY; Availability of the Sku for the location/zone/site. LocationInfo []*SKULocationInfo `json:"locationInfo,omitempty" azure:"ro"` - // READ-ONLY; The locations where Sku is available. + // READ-ONLY; Availability of the Sku for the region. Locations []*string `json:"locations,omitempty" azure:"ro"` - // READ-ONLY; The sku name. - Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; The Sku name. + Name *SKUName `json:"name,omitempty" azure:"ro"` - // READ-ONLY; The required features for the sku to be available. - RequiredFeatures []*string `json:"requiredFeatures,omitempty" azure:"ro"` + // READ-ONLY; The type of the resource. + ResourceType *string `json:"resourceType,omitempty" azure:"ro"` + + // READ-ONLY; List of Shipment Types supported by this SKU + ShipmentTypes []*ShipmentType `json:"shipmentTypes,omitempty" azure:"ro"` + + // READ-ONLY; Sku can be signed up by customer or not. + SignupOption *SKUSignupOption `json:"signupOption,omitempty" azure:"ro"` - // READ-ONLY; The required quotaIds for the sku to be available. - RequiredQuotaIDs []*string `json:"requiredQuotaIds,omitempty" azure:"ro"` + // READ-ONLY; The Sku kind. + Size *string `json:"size,omitempty" azure:"ro"` + + // READ-ONLY; The Sku tier. + Tier *SKUTier `json:"tier,omitempty" azure:"ro"` - // READ-ONLY; The sku tier. - Tier *string `json:"tier,omitempty" azure:"ro"` + // READ-ONLY; Availability of the Sku as preview/stable. + Version *SKUVersion `json:"version,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SKUInformation. -func (s SKUInformation) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + populate(objectMap, "apiVersions", s.APIVersions) + populate(objectMap, "availability", s.Availability) + populate(objectMap, "capabilities", s.Capabilities) populate(objectMap, "costs", s.Costs) populate(objectMap, "family", s.Family) populate(objectMap, "kind", s.Kind) populate(objectMap, "locationInfo", s.LocationInfo) populate(objectMap, "locations", s.Locations) populate(objectMap, "name", s.Name) - populate(objectMap, "requiredFeatures", s.RequiredFeatures) - populate(objectMap, "requiredQuotaIds", s.RequiredQuotaIDs) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "shipmentTypes", s.ShipmentTypes) + populate(objectMap, "signupOption", s.SignupOption) + populate(objectMap, "size", s.Size) populate(objectMap, "tier", s.Tier) + populate(objectMap, "version", s.Version) return json.Marshal(objectMap) } -// SKUInformationList - List of SKU Information objects -type SKUInformationList struct { +// SKUCapability - The metadata to describe the capability. +type SKUCapability struct { + // READ-ONLY; An invariant to describe the feature. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; An invariant if the feature is measured by quantity. + Value *string `json:"value,omitempty" azure:"ro"` +} + +// SKUCost - The metadata for retrieving price info. +type SKUCost struct { + // READ-ONLY; The extended unit. + ExtendedUnit *string `json:"extendedUnit,omitempty" azure:"ro"` + + // READ-ONLY; Used for querying price from commerce. + MeterID *string `json:"meterId,omitempty" azure:"ro"` + + // READ-ONLY; The cost quantity. + Quantity *int64 `json:"quantity,omitempty" azure:"ro"` +} + +// SKUInfo - The SKU type. +type SKUInfo struct { + // SKU name. + Name *SKUName `json:"name,omitempty"` + + // The SKU tier. This is based on the SKU name. + Tier *SKUTier `json:"tier,omitempty"` +} + +// SKUList - List of SKU Information objects. +type SKUList struct { // READ-ONLY; Links to the next set of results NextLink *string `json:"nextLink,omitempty" azure:"ro"` - // READ-ONLY; List of ResourceTypeSku objects - Value []*ResourceTypeSKU `json:"value,omitempty" azure:"ro"` + // READ-ONLY; List of ResourceType Sku + Value []*SKU `json:"value,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SKUInformationList. -func (s SKUInformationList) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SKUList. +func (s SKUList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) @@ -3480,46 +3301,23 @@ type Secret struct { // SecuritySettings - The security settings of a device. type SecuritySettings struct { - ARMBaseModel // REQUIRED; Properties of the security settings. Properties *SecuritySettingsProperties `json:"properties,omitempty"` -} -// MarshalJSON implements the json.Marshaller interface for type SecuritySettings. -func (s SecuritySettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - s.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` -// UnmarshalJSON implements the json.Unmarshaller interface for type SecuritySettings. -func (s *SecuritySettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &s.Properties) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := s.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // SecuritySettingsProperties - The properties of security settings. type SecuritySettingsProperties struct { - // REQUIRED; Device administrator password as an encrypted string (encrypted using RSA PKCS #1) is used to sign into the local web UI of the device. The - // Actual password should have at least 8 characters that are a + // REQUIRED; Device administrator password as an encrypted string (encrypted using RSA PKCS #1) is used to sign into the local + // web UI of the device. The Actual password should have at least 8 characters that are a // combination of uppercase, lowercase, numeric, and special characters. DeviceAdminPassword *AsymmetricEncryptedSecret `json:"deviceAdminPassword,omitempty"` } @@ -3539,47 +3337,20 @@ func (s ServiceSpecification) MarshalJSON() ([]byte, error) { // Share - Represents a share on the Data Box Edge/Gateway device. type Share struct { - ARMBaseModel // REQUIRED; The share properties. Properties *ShareProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Share on ASE device SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type Share. -func (s Share) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - s.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type Share. -func (s *Share) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &s.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := s.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // ShareAccessRight - Specifies the mapping between this particular user and the type of access he has on shares on this device. @@ -3657,119 +3428,66 @@ func (s ShareProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// SharesBeginCreateOrUpdateOptions contains the optional parameters for the Shares.BeginCreateOrUpdate method. -type SharesBeginCreateOrUpdateOptions struct { +// SharesClientBeginCreateOrUpdateOptions contains the optional parameters for the SharesClient.BeginCreateOrUpdate method. +type SharesClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// SharesBeginDeleteOptions contains the optional parameters for the Shares.BeginDelete method. -type SharesBeginDeleteOptions struct { +// SharesClientBeginDeleteOptions contains the optional parameters for the SharesClient.BeginDelete method. +type SharesClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// SharesBeginRefreshOptions contains the optional parameters for the Shares.BeginRefresh method. -type SharesBeginRefreshOptions struct { +// SharesClientBeginRefreshOptions contains the optional parameters for the SharesClient.BeginRefresh method. +type SharesClientBeginRefreshOptions struct { // placeholder for future optional parameters } -// SharesGetOptions contains the optional parameters for the Shares.Get method. -type SharesGetOptions struct { +// SharesClientGetOptions contains the optional parameters for the SharesClient.Get method. +type SharesClientGetOptions struct { // placeholder for future optional parameters } -// SharesListByDataBoxEdgeDeviceOptions contains the optional parameters for the Shares.ListByDataBoxEdgeDevice method. -type SharesListByDataBoxEdgeDeviceOptions struct { +// SharesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the SharesClient.ListByDataBoxEdgeDevice +// method. +type SharesClientListByDataBoxEdgeDeviceOptions struct { // placeholder for future optional parameters } // StorageAccount - Represents a Storage Account on the Data Box Edge/Gateway device. type StorageAccount struct { - ARMBaseModel // REQUIRED; The Storage Account properties. Properties *StorageAccountProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; StorageAccount object on ASE device SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} -// MarshalJSON implements the json.Marshaller interface for type StorageAccount. -func (s StorageAccount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - s.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccount. -func (s *StorageAccount) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &s.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := s.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // StorageAccountCredential - The storage account credential. type StorageAccountCredential struct { - ARMBaseModel // REQUIRED; The storage account credential properties. Properties *StorageAccountCredentialProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; StorageAccountCredential object SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} -// MarshalJSON implements the json.Marshaller interface for type StorageAccountCredential. -func (s StorageAccountCredential) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - s.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccountCredential. -func (s *StorageAccountCredential) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &s.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := s.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // StorageAccountCredentialList - The collection of storage account credentials. @@ -3816,23 +3534,27 @@ type StorageAccountCredentialProperties struct { UserName *string `json:"userName,omitempty"` } -// StorageAccountCredentialsBeginCreateOrUpdateOptions contains the optional parameters for the StorageAccountCredentials.BeginCreateOrUpdate method. -type StorageAccountCredentialsBeginCreateOrUpdateOptions struct { +// StorageAccountCredentialsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageAccountCredentialsClient.BeginCreateOrUpdate +// method. +type StorageAccountCredentialsClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// StorageAccountCredentialsBeginDeleteOptions contains the optional parameters for the StorageAccountCredentials.BeginDelete method. -type StorageAccountCredentialsBeginDeleteOptions struct { +// StorageAccountCredentialsClientBeginDeleteOptions contains the optional parameters for the StorageAccountCredentialsClient.BeginDelete +// method. +type StorageAccountCredentialsClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// StorageAccountCredentialsGetOptions contains the optional parameters for the StorageAccountCredentials.Get method. -type StorageAccountCredentialsGetOptions struct { +// StorageAccountCredentialsClientGetOptions contains the optional parameters for the StorageAccountCredentialsClient.Get +// method. +type StorageAccountCredentialsClientGetOptions struct { // placeholder for future optional parameters } -// StorageAccountCredentialsListByDataBoxEdgeDeviceOptions contains the optional parameters for the StorageAccountCredentials.ListByDataBoxEdgeDevice method. -type StorageAccountCredentialsListByDataBoxEdgeDeviceOptions struct { +// StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the StorageAccountCredentialsClient.ListByDataBoxEdgeDevice +// method. +type StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions struct { // placeholder for future optional parameters } @@ -3874,23 +3596,25 @@ type StorageAccountProperties struct { ContainerCount *int32 `json:"containerCount,omitempty" azure:"ro"` } -// StorageAccountsBeginCreateOrUpdateOptions contains the optional parameters for the StorageAccounts.BeginCreateOrUpdate method. -type StorageAccountsBeginCreateOrUpdateOptions struct { +// StorageAccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageAccountsClient.BeginCreateOrUpdate +// method. +type StorageAccountsClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// StorageAccountsBeginDeleteOptions contains the optional parameters for the StorageAccounts.BeginDelete method. -type StorageAccountsBeginDeleteOptions struct { +// StorageAccountsClientBeginDeleteOptions contains the optional parameters for the StorageAccountsClient.BeginDelete method. +type StorageAccountsClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// StorageAccountsGetOptions contains the optional parameters for the StorageAccounts.Get method. -type StorageAccountsGetOptions struct { +// StorageAccountsClientGetOptions contains the optional parameters for the StorageAccountsClient.Get method. +type StorageAccountsClientGetOptions struct { // placeholder for future optional parameters } -// StorageAccountsListByDataBoxEdgeDeviceOptions contains the optional parameters for the StorageAccounts.ListByDataBoxEdgeDevice method. -type StorageAccountsListByDataBoxEdgeDeviceOptions struct { +// StorageAccountsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the StorageAccountsClient.ListByDataBoxEdgeDevice +// method. +type StorageAccountsClientListByDataBoxEdgeDeviceOptions struct { // placeholder for future optional parameters } @@ -3920,8 +3644,8 @@ type SubscriptionRegisteredFeatures struct { // SupportPackageRequestProperties - The share properties. type SupportPackageRequestProperties struct { - // Type of files, which need to be included in the logs This will contain the type of logs (Default/DefaultWithDumps/None/All/DefaultWithArchived) or a - // comma separated list of log types that are required + // Type of files, which need to be included in the logs This will contain the type of logs (Default/DefaultWithDumps/None/All/DefaultWithArchived) + // or a comma separated list of log types that are required Include *string `json:"include,omitempty"` // MaximumTimeStamp until where logs need to be collected @@ -3966,8 +3690,9 @@ func (s *SupportPackageRequestProperties) UnmarshalJSON(data []byte) error { return nil } -// SupportPackagesBeginTriggerSupportPackageOptions contains the optional parameters for the SupportPackages.BeginTriggerSupportPackage method. -type SupportPackagesBeginTriggerSupportPackageOptions struct { +// SupportPackagesClientBeginTriggerSupportPackageOptions contains the optional parameters for the SupportPackagesClient.BeginTriggerSupportPackage +// method. +type SupportPackagesClientBeginTriggerSupportPackageOptions struct { // placeholder for future optional parameters } @@ -4071,54 +3796,25 @@ type TriggerClassification interface { // Trigger details. type Trigger struct { - ARMBaseModel // REQUIRED; Trigger Kind. Kind *TriggerEventType `json:"kind,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; Trigger in DataBoxEdge Resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // GetTrigger implements the TriggerClassification interface for type Trigger. func (t *Trigger) GetTrigger() *Trigger { return t } -// UnmarshalJSON implements the json.Unmarshaller interface for type Trigger. -func (t *Trigger) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - return t.unmarshalInternal(rawMsg) -} - -func (t Trigger) marshalInternal(objectMap map[string]interface{}, discValue TriggerEventType) { - t.ARMBaseModel.marshalInternal(objectMap) - t.Kind = &discValue - objectMap["kind"] = t.Kind - populate(objectMap, "systemData", t.SystemData) -} - -func (t *Trigger) unmarshalInternal(rawMsg map[string]json.RawMessage) error { - for key, val := range rawMsg { - var err error - switch key { - case "kind": - err = unpopulate(val, &t.Kind) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &t.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := t.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil -} - // TriggerList - Collection of all trigger on the data box edge device. type TriggerList struct { // READ-ONLY; Link to the next set of results. @@ -4161,60 +3857,38 @@ func (t *TriggerList) UnmarshalJSON(data []byte) error { // TriggerSupportPackageRequest - The request object for trigger support package. type TriggerSupportPackageRequest struct { - ARMBaseModel // REQUIRED; The TriggerSupportPackageRequest properties. Properties *SupportPackageRequestProperties `json:"properties,omitempty"` -} -// MarshalJSON implements the json.Marshaller interface for type TriggerSupportPackageRequest. -func (t TriggerSupportPackageRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - t.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", t.Properties) - return json.Marshal(objectMap) -} + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` -// UnmarshalJSON implements the json.Unmarshaller interface for type TriggerSupportPackageRequest. -func (t *TriggerSupportPackageRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &t.Properties) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := t.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } -// TriggersBeginCreateOrUpdateOptions contains the optional parameters for the Triggers.BeginCreateOrUpdate method. -type TriggersBeginCreateOrUpdateOptions struct { +// TriggersClientBeginCreateOrUpdateOptions contains the optional parameters for the TriggersClient.BeginCreateOrUpdate method. +type TriggersClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// TriggersBeginDeleteOptions contains the optional parameters for the Triggers.BeginDelete method. -type TriggersBeginDeleteOptions struct { +// TriggersClientBeginDeleteOptions contains the optional parameters for the TriggersClient.BeginDelete method. +type TriggersClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// TriggersGetOptions contains the optional parameters for the Triggers.Get method. -type TriggersGetOptions struct { +// TriggersClientGetOptions contains the optional parameters for the TriggersClient.Get method. +type TriggersClientGetOptions struct { // placeholder for future optional parameters } -// TriggersListByDataBoxEdgeDeviceOptions contains the optional parameters for the Triggers.ListByDataBoxEdgeDevice method. -type TriggersListByDataBoxEdgeDeviceOptions struct { - // Specify $filter='CustomContextTag eq ' to filter on custom context tag property +// TriggersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the TriggersClient.ListByDataBoxEdgeDevice +// method. +type TriggersClientListByDataBoxEdgeDeviceOptions struct { + // Specify $filter='CustomContextTag eq ' to filter on custom context tag property Filter *string } @@ -4283,47 +3957,20 @@ type UpdateInstallProgress struct { // UpdateSummary - Details about ongoing updates and availability of updates on the device. type UpdateSummary struct { - ARMBaseModel // The device update information summary. Properties *UpdateSummaryProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; UpdateSummary Result SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateSummary. -func (u UpdateSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - u.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", u.Properties) - populate(objectMap, "systemData", u.SystemData) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSummary. -func (u *UpdateSummary) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &u.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &u.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := u.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // UpdateSummaryProperties - The device update information summary. @@ -4562,47 +4209,20 @@ type UploadCertificateResponse struct { // User - Represents a user who has access to one or more shares on the Data Box Edge/Gateway device. type User struct { - ARMBaseModel // REQUIRED; The storage account credential properties. Properties *UserProperties `json:"properties,omitempty"` + // READ-ONLY; The path ID that uniquely identifies the object. + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The object name. + Name *string `json:"name,omitempty" azure:"ro"` + // READ-ONLY; User in DataBoxEdge Resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` -} - -// MarshalJSON implements the json.Marshaller interface for type User. -func (u User) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - u.ARMBaseModel.marshalInternal(objectMap) - populate(objectMap, "properties", u.Properties) - populate(objectMap, "systemData", u.SystemData) - return json.Marshal(objectMap) -} -// UnmarshalJSON implements the json.Unmarshaller interface for type User. -func (u *User) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, &u.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, &u.SystemData) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - if err := u.ARMBaseModel.unmarshalInternal(rawMsg); err != nil { - return err - } - return nil + // READ-ONLY; The hierarchical type of the object. + Type *string `json:"type,omitempty" azure:"ro"` } // UserAccessRight - The mapping between a particular user and the access type on the SMB share. @@ -4652,24 +4272,25 @@ func (u UserProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// UsersBeginCreateOrUpdateOptions contains the optional parameters for the Users.BeginCreateOrUpdate method. -type UsersBeginCreateOrUpdateOptions struct { +// UsersClientBeginCreateOrUpdateOptions contains the optional parameters for the UsersClient.BeginCreateOrUpdate method. +type UsersClientBeginCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// UsersBeginDeleteOptions contains the optional parameters for the Users.BeginDelete method. -type UsersBeginDeleteOptions struct { +// UsersClientBeginDeleteOptions contains the optional parameters for the UsersClient.BeginDelete method. +type UsersClientBeginDeleteOptions struct { // placeholder for future optional parameters } -// UsersGetOptions contains the optional parameters for the Users.Get method. -type UsersGetOptions struct { +// UsersClientGetOptions contains the optional parameters for the UsersClient.Get method. +type UsersClientGetOptions struct { // placeholder for future optional parameters } -// UsersListByDataBoxEdgeDeviceOptions contains the optional parameters for the Users.ListByDataBoxEdgeDevice method. -type UsersListByDataBoxEdgeDeviceOptions struct { - // Specify $filter='Type eq ' to filter on user type property +// UsersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the UsersClient.ListByDataBoxEdgeDevice +// method. +type UsersClientListByDataBoxEdgeDeviceOptions struct { + // Specify $filter='Type eq ' to filter on user type property Filter *string } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_monitoringconfig_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_monitoringconfig_client.go index 9125713e270e..665afe44c6f9 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_monitoringconfig_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_monitoringconfig_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,60 @@ import ( // MonitoringConfigClient contains the methods for the MonitoringConfig group. // Don't use this type directly, use NewMonitoringConfigClient() instead. type MonitoringConfigClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewMonitoringConfigClient creates a new instance of MonitoringConfigClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewMonitoringConfigClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *MonitoringConfigClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &MonitoringConfigClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &MonitoringConfigClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } // BeginCreateOrUpdate - Creates a new metric configuration or updates an existing one for a role. -// If the operation fails it returns the *CloudError error type. -func (client *MonitoringConfigClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, roleName string, resourceGroupName string, monitoringMetricConfiguration MonitoringMetricConfiguration, options *MonitoringConfigBeginCreateOrUpdateOptions) (MonitoringConfigCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// roleName - The role name. +// resourceGroupName - The resource group name. +// monitoringMetricConfiguration - The metric configuration. +// options - MonitoringConfigClientBeginCreateOrUpdateOptions contains the optional parameters for the MonitoringConfigClient.BeginCreateOrUpdate +// method. +func (client *MonitoringConfigClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, roleName string, resourceGroupName string, monitoringMetricConfiguration MonitoringMetricConfiguration, options *MonitoringConfigClientBeginCreateOrUpdateOptions) (MonitoringConfigClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, options) if err != nil { - return MonitoringConfigCreateOrUpdatePollerResponse{}, err + return MonitoringConfigClientCreateOrUpdatePollerResponse{}, err } - result := MonitoringConfigCreateOrUpdatePollerResponse{ + result := MonitoringConfigClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("MonitoringConfigClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("MonitoringConfigClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return MonitoringConfigCreateOrUpdatePollerResponse{}, err + return MonitoringConfigClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &MonitoringConfigCreateOrUpdatePoller{ + result.Poller = &MonitoringConfigClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates a new metric configuration or updates an existing one for a role. -// If the operation fails it returns the *CloudError error type. -func (client *MonitoringConfigClient) createOrUpdate(ctx context.Context, deviceName string, roleName string, resourceGroupName string, monitoringMetricConfiguration MonitoringMetricConfiguration, options *MonitoringConfigBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *MonitoringConfigClient) createOrUpdate(ctx context.Context, deviceName string, roleName string, resourceGroupName string, monitoringMetricConfiguration MonitoringMetricConfiguration, options *MonitoringConfigClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, options) if err != nil { return nil, err @@ -74,13 +87,13 @@ func (client *MonitoringConfigClient) createOrUpdate(ctx context.Context, device return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *MonitoringConfigClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, monitoringMetricConfiguration MonitoringMetricConfiguration, options *MonitoringConfigBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *MonitoringConfigClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, monitoringMetricConfiguration MonitoringMetricConfiguration, options *MonitoringConfigClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -98,7 +111,7 @@ func (client *MonitoringConfigClient) createOrUpdateCreateRequest(ctx context.Co return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -109,42 +122,34 @@ func (client *MonitoringConfigClient) createOrUpdateCreateRequest(ctx context.Co return req, runtime.MarshalAsJSON(req, monitoringMetricConfiguration) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *MonitoringConfigClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - deletes a new metric configuration for a role. -// If the operation fails it returns the *CloudError error type. -func (client *MonitoringConfigClient) BeginDelete(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigBeginDeleteOptions) (MonitoringConfigDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// roleName - The role name. +// resourceGroupName - The resource group name. +// options - MonitoringConfigClientBeginDeleteOptions contains the optional parameters for the MonitoringConfigClient.BeginDelete +// method. +func (client *MonitoringConfigClient) BeginDelete(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientBeginDeleteOptions) (MonitoringConfigClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, roleName, resourceGroupName, options) if err != nil { - return MonitoringConfigDeletePollerResponse{}, err + return MonitoringConfigClientDeletePollerResponse{}, err } - result := MonitoringConfigDeletePollerResponse{ + result := MonitoringConfigClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("MonitoringConfigClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("MonitoringConfigClient.Delete", "", resp, client.pl) if err != nil { - return MonitoringConfigDeletePollerResponse{}, err + return MonitoringConfigClientDeletePollerResponse{}, err } - result.Poller = &MonitoringConfigDeletePoller{ + result.Poller = &MonitoringConfigClientDeletePoller{ pt: pt, } return result, nil } // Delete - deletes a new metric configuration for a role. -// If the operation fails it returns the *CloudError error type. -func (client *MonitoringConfigClient) deleteOperation(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *MonitoringConfigClient) deleteOperation(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, roleName, resourceGroupName, options) if err != nil { return nil, err @@ -154,13 +159,13 @@ func (client *MonitoringConfigClient) deleteOperation(ctx context.Context, devic return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *MonitoringConfigClient) deleteCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigBeginDeleteOptions) (*policy.Request, error) { +func (client *MonitoringConfigClient) deleteCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -178,7 +183,7 @@ func (client *MonitoringConfigClient) deleteCreateRequest(ctx context.Context, d return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -189,38 +194,29 @@ func (client *MonitoringConfigClient) deleteCreateRequest(ctx context.Context, d return req, nil } -// deleteHandleError handles the Delete error response. -func (client *MonitoringConfigClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets a metric configuration of a role. -// If the operation fails it returns the *CloudError error type. -func (client *MonitoringConfigClient) Get(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigGetOptions) (MonitoringConfigGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// roleName - The role name. +// resourceGroupName - The resource group name. +// options - MonitoringConfigClientGetOptions contains the optional parameters for the MonitoringConfigClient.Get method. +func (client *MonitoringConfigClient) Get(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientGetOptions) (MonitoringConfigClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, roleName, resourceGroupName, options) if err != nil { - return MonitoringConfigGetResponse{}, err + return MonitoringConfigClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return MonitoringConfigGetResponse{}, err + return MonitoringConfigClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return MonitoringConfigGetResponse{}, client.getHandleError(resp) + return MonitoringConfigClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *MonitoringConfigClient) getCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigGetOptions) (*policy.Request, error) { +func (client *MonitoringConfigClient) getCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -238,7 +234,7 @@ func (client *MonitoringConfigClient) getCreateRequest(ctx context.Context, devi return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -250,43 +246,34 @@ func (client *MonitoringConfigClient) getCreateRequest(ctx context.Context, devi } // getHandleResponse handles the Get response. -func (client *MonitoringConfigClient) getHandleResponse(resp *http.Response) (MonitoringConfigGetResponse, error) { - result := MonitoringConfigGetResponse{RawResponse: resp} +func (client *MonitoringConfigClient) getHandleResponse(resp *http.Response) (MonitoringConfigClientGetResponse, error) { + result := MonitoringConfigClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.MonitoringMetricConfiguration); err != nil { - return MonitoringConfigGetResponse{}, runtime.NewResponseError(err, resp) + return MonitoringConfigClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *MonitoringConfigClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // List - Lists metric configurations in a role. -// If the operation fails it returns the *CloudError error type. -func (client *MonitoringConfigClient) List(deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigListOptions) *MonitoringConfigListPager { - return &MonitoringConfigListPager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// roleName - The role name. +// resourceGroupName - The resource group name. +// options - MonitoringConfigClientListOptions contains the optional parameters for the MonitoringConfigClient.List method. +func (client *MonitoringConfigClient) List(deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientListOptions) *MonitoringConfigClientListPager { + return &MonitoringConfigClientListPager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listCreateRequest(ctx, deviceName, roleName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp MonitoringConfigListResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp MonitoringConfigClientListResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.MonitoringMetricConfigurationList.NextLink) }, } } // listCreateRequest creates the List request. -func (client *MonitoringConfigClient) listCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigListOptions) (*policy.Request, error) { +func (client *MonitoringConfigClient) listCreateRequest(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -304,7 +291,7 @@ func (client *MonitoringConfigClient) listCreateRequest(ctx context.Context, dev return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -316,23 +303,10 @@ func (client *MonitoringConfigClient) listCreateRequest(ctx context.Context, dev } // listHandleResponse handles the List response. -func (client *MonitoringConfigClient) listHandleResponse(resp *http.Response) (MonitoringConfigListResponse, error) { - result := MonitoringConfigListResponse{RawResponse: resp} +func (client *MonitoringConfigClient) listHandleResponse(resp *http.Response) (MonitoringConfigClientListResponse, error) { + result := MonitoringConfigClientListResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.MonitoringMetricConfigurationList); err != nil { - return MonitoringConfigListResponse{}, runtime.NewResponseError(err, resp) + return MonitoringConfigClientListResponse{}, err } return result, nil } - -// listHandleError handles the List error response. -func (client *MonitoringConfigClient) listHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_nodes_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_nodes_client.go index 07a7b60c0cc1..d971e2d826a6 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_nodes_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_nodes_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,39 +24,51 @@ import ( // NodesClient contains the methods for the Nodes group. // Don't use this type directly, use NewNodesClient() instead. type NodesClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewNodesClient creates a new instance of NodesClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewNodesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *NodesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &NodesClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &NodesClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // ListByDataBoxEdgeDevice - Gets all the nodes currently configured under this Data Box Edge device -// If the operation fails it returns the *CloudError error type. -func (client *NodesClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *NodesListByDataBoxEdgeDeviceOptions) *NodesListByDataBoxEdgeDevicePager { - return &NodesListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - NodesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the NodesClient.ListByDataBoxEdgeDevice +// method. +func (client *NodesClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *NodesClientListByDataBoxEdgeDeviceOptions) *NodesClientListByDataBoxEdgeDevicePager { + return &NodesClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp NodesListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp NodesClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.NodeList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *NodesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *NodesListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *NodesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *NodesClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -71,7 +82,7 @@ func (client *NodesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -83,23 +94,10 @@ func (client *NodesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *NodesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (NodesListByDataBoxEdgeDeviceResponse, error) { - result := NodesListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *NodesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (NodesClientListByDataBoxEdgeDeviceResponse, error) { + result := NodesClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.NodeList); err != nil { - return NodesListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return NodesClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } - -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *NodesClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operations_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operations_client.go index 5a5877852668..8222e61fee26 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operations_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operations_client.go @@ -10,7 +10,6 @@ package armdataboxedge import ( "context" - "fmt" "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" @@ -22,40 +21,47 @@ import ( // OperationsClient contains the methods for the Operations group. // Don't use this type directly, use NewOperationsClient() instead. type OperationsClient struct { - ep string - pl runtime.Pipeline + host string + pl runtime.Pipeline } // NewOperationsClient creates a new instance of OperationsClient with the specified values. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *OperationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &OperationsClient{ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &OperationsClient{ + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // List - List all the supported operations. -// If the operation fails it returns the *CloudError error type. -func (client *OperationsClient) List(options *OperationsListOptions) *OperationsListPager { - return &OperationsListPager{ +// If the operation fails it returns an *azcore.ResponseError type. +// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +func (client *OperationsClient) List(options *OperationsClientListOptions) *OperationsClientListPager { + return &OperationsClientListPager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listCreateRequest(ctx, options) }, - advancer: func(ctx context.Context, resp OperationsListResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp OperationsClientListResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.OperationsList.NextLink) }, } } // listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsListOptions) (*policy.Request, error) { +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { urlPath := "/providers/Microsoft.DataBoxEdge/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -67,23 +73,10 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * } // listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsListResponse, error) { - result := OperationsListResponse{RawResponse: resp} +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.OperationsList); err != nil { - return OperationsListResponse{}, runtime.NewResponseError(err, resp) + return OperationsClientListResponse{}, err } return result, nil } - -// listHandleError handles the List error response. -func (client *OperationsClient) listHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operationsstatus_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operationsstatus_client.go index 1a7a5e6db60c..3693ad13523d 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operationsstatus_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operationsstatus_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,42 +24,54 @@ import ( // OperationsStatusClient contains the methods for the OperationsStatus group. // Don't use this type directly, use NewOperationsStatusClient() instead. type OperationsStatusClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewOperationsStatusClient creates a new instance of OperationsStatusClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewOperationsStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *OperationsStatusClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &OperationsStatusClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &OperationsStatusClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // Get - Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *OperationsStatusClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *OperationsStatusGetOptions) (OperationsStatusGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The job name. +// resourceGroupName - The resource group name. +// options - OperationsStatusClientGetOptions contains the optional parameters for the OperationsStatusClient.Get method. +func (client *OperationsStatusClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *OperationsStatusClientGetOptions) (OperationsStatusClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return OperationsStatusGetResponse{}, err + return OperationsStatusClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return OperationsStatusGetResponse{}, err + return OperationsStatusClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsStatusGetResponse{}, client.getHandleError(resp) + return OperationsStatusClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *OperationsStatusClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *OperationsStatusGetOptions) (*policy.Request, error) { +func (client *OperationsStatusClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *OperationsStatusClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -78,7 +89,7 @@ func (client *OperationsStatusClient) getCreateRequest(ctx context.Context, devi return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -90,23 +101,10 @@ func (client *OperationsStatusClient) getCreateRequest(ctx context.Context, devi } // getHandleResponse handles the Get response. -func (client *OperationsStatusClient) getHandleResponse(resp *http.Response) (OperationsStatusGetResponse, error) { - result := OperationsStatusGetResponse{RawResponse: resp} +func (client *OperationsStatusClient) getHandleResponse(resp *http.Response) (OperationsStatusClientGetResponse, error) { + result := OperationsStatusClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.Job); err != nil { - return OperationsStatusGetResponse{}, runtime.NewResponseError(err, resp) + return OperationsStatusClientGetResponse{}, err } return result, nil } - -// getHandleError handles the Get error response. -func (client *OperationsStatusClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_orders_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_orders_client.go index 2473fbe8d9f3..62cf62565ed2 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_orders_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_orders_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,59 @@ import ( // OrdersClient contains the methods for the Orders group. // Don't use this type directly, use NewOrdersClient() instead. type OrdersClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewOrdersClient creates a new instance of OrdersClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewOrdersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *OrdersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &OrdersClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &OrdersClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // BeginCreateOrUpdate - Creates or updates an order. -// If the operation fails it returns the *CloudError error type. -func (client *OrdersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, resourceGroupName string, order Order, options *OrdersBeginCreateOrUpdateOptions) (OrdersCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The order details of a device. +// resourceGroupName - The resource group name. +// order - The order to be created or updated. +// options - OrdersClientBeginCreateOrUpdateOptions contains the optional parameters for the OrdersClient.BeginCreateOrUpdate +// method. +func (client *OrdersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, resourceGroupName string, order Order, options *OrdersClientBeginCreateOrUpdateOptions) (OrdersClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, resourceGroupName, order, options) if err != nil { - return OrdersCreateOrUpdatePollerResponse{}, err + return OrdersClientCreateOrUpdatePollerResponse{}, err } - result := OrdersCreateOrUpdatePollerResponse{ + result := OrdersClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("OrdersClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("OrdersClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return OrdersCreateOrUpdatePollerResponse{}, err + return OrdersClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &OrdersCreateOrUpdatePoller{ + result.Poller = &OrdersClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates or updates an order. -// If the operation fails it returns the *CloudError error type. -func (client *OrdersClient) createOrUpdate(ctx context.Context, deviceName string, resourceGroupName string, order Order, options *OrdersBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *OrdersClient) createOrUpdate(ctx context.Context, deviceName string, resourceGroupName string, order Order, options *OrdersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, resourceGroupName, order, options) if err != nil { return nil, err @@ -74,13 +86,13 @@ func (client *OrdersClient) createOrUpdate(ctx context.Context, deviceName strin return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *OrdersClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, order Order, options *OrdersBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *OrdersClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, order Order, options *OrdersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -94,7 +106,7 @@ func (client *OrdersClient) createOrUpdateCreateRequest(ctx context.Context, dev return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -105,42 +117,32 @@ func (client *OrdersClient) createOrUpdateCreateRequest(ctx context.Context, dev return req, runtime.MarshalAsJSON(req, order) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *OrdersClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the order related to the device. -// If the operation fails it returns the *CloudError error type. -func (client *OrdersClient) BeginDelete(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersBeginDeleteOptions) (OrdersDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - OrdersClientBeginDeleteOptions contains the optional parameters for the OrdersClient.BeginDelete method. +func (client *OrdersClient) BeginDelete(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientBeginDeleteOptions) (OrdersClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, resourceGroupName, options) if err != nil { - return OrdersDeletePollerResponse{}, err + return OrdersClientDeletePollerResponse{}, err } - result := OrdersDeletePollerResponse{ + result := OrdersClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("OrdersClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("OrdersClient.Delete", "", resp, client.pl) if err != nil { - return OrdersDeletePollerResponse{}, err + return OrdersClientDeletePollerResponse{}, err } - result.Poller = &OrdersDeletePoller{ + result.Poller = &OrdersClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the order related to the device. -// If the operation fails it returns the *CloudError error type. -func (client *OrdersClient) deleteOperation(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *OrdersClient) deleteOperation(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err @@ -150,13 +152,13 @@ func (client *OrdersClient) deleteOperation(ctx context.Context, deviceName stri return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *OrdersClient) deleteCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersBeginDeleteOptions) (*policy.Request, error) { +func (client *OrdersClient) deleteCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -170,7 +172,7 @@ func (client *OrdersClient) deleteCreateRequest(ctx context.Context, deviceName return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -181,38 +183,28 @@ func (client *OrdersClient) deleteCreateRequest(ctx context.Context, deviceName return req, nil } -// deleteHandleError handles the Delete error response. -func (client *OrdersClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets a specific order by name. -// If the operation fails it returns the *CloudError error type. -func (client *OrdersClient) Get(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersGetOptions) (OrdersGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - OrdersClientGetOptions contains the optional parameters for the OrdersClient.Get method. +func (client *OrdersClient) Get(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientGetOptions) (OrdersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return OrdersGetResponse{}, err + return OrdersClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return OrdersGetResponse{}, err + return OrdersClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return OrdersGetResponse{}, client.getHandleError(resp) + return OrdersClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *OrdersClient) getCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersGetOptions) (*policy.Request, error) { +func (client *OrdersClient) getCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -226,7 +218,7 @@ func (client *OrdersClient) getCreateRequest(ctx context.Context, deviceName str return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -238,43 +230,34 @@ func (client *OrdersClient) getCreateRequest(ctx context.Context, deviceName str } // getHandleResponse handles the Get response. -func (client *OrdersClient) getHandleResponse(resp *http.Response) (OrdersGetResponse, error) { - result := OrdersGetResponse{RawResponse: resp} +func (client *OrdersClient) getHandleResponse(resp *http.Response) (OrdersClientGetResponse, error) { + result := OrdersClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.Order); err != nil { - return OrdersGetResponse{}, runtime.NewResponseError(err, resp) + return OrdersClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *OrdersClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Lists all the orders related to a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *OrdersClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *OrdersListByDataBoxEdgeDeviceOptions) *OrdersListByDataBoxEdgeDevicePager { - return &OrdersListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - OrdersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the OrdersClient.ListByDataBoxEdgeDevice +// method. +func (client *OrdersClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *OrdersClientListByDataBoxEdgeDeviceOptions) *OrdersClientListByDataBoxEdgeDevicePager { + return &OrdersClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp OrdersListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp OrdersClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.OrderList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *OrdersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *OrdersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -288,7 +271,7 @@ func (client *OrdersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -300,46 +283,36 @@ func (client *OrdersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *OrdersClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (OrdersListByDataBoxEdgeDeviceResponse, error) { - result := OrdersListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *OrdersClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (OrdersClientListByDataBoxEdgeDeviceResponse, error) { + result := OrdersClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.OrderList); err != nil { - return OrdersListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return OrdersClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *OrdersClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListDCAccessCode - Gets the DCAccess Code -// If the operation fails it returns the *CloudError error type. -func (client *OrdersClient) ListDCAccessCode(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersListDCAccessCodeOptions) (OrdersListDCAccessCodeResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name +// resourceGroupName - The resource group name. +// options - OrdersClientListDCAccessCodeOptions contains the optional parameters for the OrdersClient.ListDCAccessCode method. +func (client *OrdersClient) ListDCAccessCode(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientListDCAccessCodeOptions) (OrdersClientListDCAccessCodeResponse, error) { req, err := client.listDCAccessCodeCreateRequest(ctx, deviceName, resourceGroupName, options) if err != nil { - return OrdersListDCAccessCodeResponse{}, err + return OrdersClientListDCAccessCodeResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return OrdersListDCAccessCodeResponse{}, err + return OrdersClientListDCAccessCodeResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return OrdersListDCAccessCodeResponse{}, client.listDCAccessCodeHandleError(resp) + return OrdersClientListDCAccessCodeResponse{}, runtime.NewResponseError(resp) } return client.listDCAccessCodeHandleResponse(resp) } // listDCAccessCodeCreateRequest creates the ListDCAccessCode request. -func (client *OrdersClient) listDCAccessCodeCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersListDCAccessCodeOptions) (*policy.Request, error) { +func (client *OrdersClient) listDCAccessCodeCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientListDCAccessCodeOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default/listDCAccessCode" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -353,7 +326,7 @@ func (client *OrdersClient) listDCAccessCodeCreateRequest(ctx context.Context, d return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -365,23 +338,10 @@ func (client *OrdersClient) listDCAccessCodeCreateRequest(ctx context.Context, d } // listDCAccessCodeHandleResponse handles the ListDCAccessCode response. -func (client *OrdersClient) listDCAccessCodeHandleResponse(resp *http.Response) (OrdersListDCAccessCodeResponse, error) { - result := OrdersListDCAccessCodeResponse{RawResponse: resp} +func (client *OrdersClient) listDCAccessCodeHandleResponse(resp *http.Response) (OrdersClientListDCAccessCodeResponse, error) { + result := OrdersClientListDCAccessCodeResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.DCAccessCode); err != nil { - return OrdersListDCAccessCodeResponse{}, runtime.NewResponseError(err, resp) + return OrdersClientListDCAccessCodeResponse{}, err } return result, nil } - -// listDCAccessCodeHandleError handles the ListDCAccessCode error response. -func (client *OrdersClient) listDCAccessCodeHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_pagers.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_pagers.go index 25afd3199583..f643bc42e8b5 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_pagers.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_pagers.go @@ -16,23 +16,23 @@ import ( "reflect" ) -// AddonsListByRolePager provides operations for iterating over paged responses. -type AddonsListByRolePager struct { +// AddonsClientListByRolePager provides operations for iterating over paged responses. +type AddonsClientListByRolePager struct { client *AddonsClient - current AddonsListByRoleResponse + current AddonsClientListByRoleResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AddonsListByRoleResponse) (*policy.Request, error) + advancer func(context.Context, AddonsClientListByRoleResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *AddonsListByRolePager) Err() error { +func (p *AddonsClientListByRolePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *AddonsListByRolePager) NextPage(ctx context.Context) bool { +func (p *AddonsClientListByRolePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -53,7 +53,7 @@ func (p *AddonsListByRolePager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByRoleHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByRoleHandleResponse(resp) @@ -65,28 +65,28 @@ func (p *AddonsListByRolePager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current AddonsListByRoleResponse page. -func (p *AddonsListByRolePager) PageResponse() AddonsListByRoleResponse { +// PageResponse returns the current AddonsClientListByRoleResponse page. +func (p *AddonsClientListByRolePager) PageResponse() AddonsClientListByRoleResponse { return p.current } -// AlertsListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type AlertsListByDataBoxEdgeDevicePager struct { +// AlertsClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type AlertsClientListByDataBoxEdgeDevicePager struct { client *AlertsClient - current AlertsListByDataBoxEdgeDeviceResponse + current AlertsClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AlertsListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, AlertsClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *AlertsListByDataBoxEdgeDevicePager) Err() error { +func (p *AlertsClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *AlertsListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *AlertsClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -107,7 +107,7 @@ func (p *AlertsListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -119,32 +119,32 @@ func (p *AlertsListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool return true } -// PageResponse returns the current AlertsListByDataBoxEdgeDeviceResponse page. -func (p *AlertsListByDataBoxEdgeDevicePager) PageResponse() AlertsListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current AlertsClientListByDataBoxEdgeDeviceResponse page. +func (p *AlertsClientListByDataBoxEdgeDevicePager) PageResponse() AlertsClientListByDataBoxEdgeDeviceResponse { return p.current } -// AvailableSKUsListPager provides operations for iterating over paged responses. -type AvailableSKUsListPager struct { +// AvailableSKUsClientListPager provides operations for iterating over paged responses. +type AvailableSKUsClientListPager struct { client *AvailableSKUsClient - current AvailableSKUsListResponse + current AvailableSKUsClientListResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AvailableSKUsListResponse) (*policy.Request, error) + advancer func(context.Context, AvailableSKUsClientListResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *AvailableSKUsListPager) Err() error { +func (p *AvailableSKUsClientListPager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *AvailableSKUsListPager) NextPage(ctx context.Context) bool { +func (p *AvailableSKUsClientListPager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { - if p.current.DataBoxEdgeSKUList.NextLink == nil || len(*p.current.DataBoxEdgeSKUList.NextLink) == 0 { + if p.current.SKUList.NextLink == nil || len(*p.current.SKUList.NextLink) == 0 { return false } req, err = p.advancer(ctx, p.current) @@ -161,7 +161,7 @@ func (p *AvailableSKUsListPager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listHandleResponse(resp) @@ -173,28 +173,28 @@ func (p *AvailableSKUsListPager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current AvailableSKUsListResponse page. -func (p *AvailableSKUsListPager) PageResponse() AvailableSKUsListResponse { +// PageResponse returns the current AvailableSKUsClientListResponse page. +func (p *AvailableSKUsClientListPager) PageResponse() AvailableSKUsClientListResponse { return p.current } -// BandwidthSchedulesListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type BandwidthSchedulesListByDataBoxEdgeDevicePager struct { +// BandwidthSchedulesClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type BandwidthSchedulesClientListByDataBoxEdgeDevicePager struct { client *BandwidthSchedulesClient - current BandwidthSchedulesListByDataBoxEdgeDeviceResponse + current BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, BandwidthSchedulesListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *BandwidthSchedulesListByDataBoxEdgeDevicePager) Err() error { +func (p *BandwidthSchedulesClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *BandwidthSchedulesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *BandwidthSchedulesClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -215,7 +215,7 @@ func (p *BandwidthSchedulesListByDataBoxEdgeDevicePager) NextPage(ctx context.Co return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -227,28 +227,28 @@ func (p *BandwidthSchedulesListByDataBoxEdgeDevicePager) NextPage(ctx context.Co return true } -// PageResponse returns the current BandwidthSchedulesListByDataBoxEdgeDeviceResponse page. -func (p *BandwidthSchedulesListByDataBoxEdgeDevicePager) PageResponse() BandwidthSchedulesListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse page. +func (p *BandwidthSchedulesClientListByDataBoxEdgeDevicePager) PageResponse() BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse { return p.current } -// ContainersListByStorageAccountPager provides operations for iterating over paged responses. -type ContainersListByStorageAccountPager struct { +// ContainersClientListByStorageAccountPager provides operations for iterating over paged responses. +type ContainersClientListByStorageAccountPager struct { client *ContainersClient - current ContainersListByStorageAccountResponse + current ContainersClientListByStorageAccountResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ContainersListByStorageAccountResponse) (*policy.Request, error) + advancer func(context.Context, ContainersClientListByStorageAccountResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *ContainersListByStorageAccountPager) Err() error { +func (p *ContainersClientListByStorageAccountPager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *ContainersListByStorageAccountPager) NextPage(ctx context.Context) bool { +func (p *ContainersClientListByStorageAccountPager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -269,7 +269,7 @@ func (p *ContainersListByStorageAccountPager) NextPage(ctx context.Context) bool return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByStorageAccountHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByStorageAccountHandleResponse(resp) @@ -281,32 +281,32 @@ func (p *ContainersListByStorageAccountPager) NextPage(ctx context.Context) bool return true } -// PageResponse returns the current ContainersListByStorageAccountResponse page. -func (p *ContainersListByStorageAccountPager) PageResponse() ContainersListByStorageAccountResponse { +// PageResponse returns the current ContainersClientListByStorageAccountResponse page. +func (p *ContainersClientListByStorageAccountPager) PageResponse() ContainersClientListByStorageAccountResponse { return p.current } -// DevicesListByResourceGroupPager provides operations for iterating over paged responses. -type DevicesListByResourceGroupPager struct { +// DevicesClientListByResourceGroupPager provides operations for iterating over paged responses. +type DevicesClientListByResourceGroupPager struct { client *DevicesClient - current DevicesListByResourceGroupResponse + current DevicesClientListByResourceGroupResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, DevicesListByResourceGroupResponse) (*policy.Request, error) + advancer func(context.Context, DevicesClientListByResourceGroupResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *DevicesListByResourceGroupPager) Err() error { +func (p *DevicesClientListByResourceGroupPager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *DevicesListByResourceGroupPager) NextPage(ctx context.Context) bool { +func (p *DevicesClientListByResourceGroupPager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { - if p.current.DataBoxEdgeDeviceList.NextLink == nil || len(*p.current.DataBoxEdgeDeviceList.NextLink) == 0 { + if p.current.DeviceList.NextLink == nil || len(*p.current.DeviceList.NextLink) == 0 { return false } req, err = p.advancer(ctx, p.current) @@ -323,7 +323,7 @@ func (p *DevicesListByResourceGroupPager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByResourceGroupHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByResourceGroupHandleResponse(resp) @@ -335,32 +335,32 @@ func (p *DevicesListByResourceGroupPager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current DevicesListByResourceGroupResponse page. -func (p *DevicesListByResourceGroupPager) PageResponse() DevicesListByResourceGroupResponse { +// PageResponse returns the current DevicesClientListByResourceGroupResponse page. +func (p *DevicesClientListByResourceGroupPager) PageResponse() DevicesClientListByResourceGroupResponse { return p.current } -// DevicesListBySubscriptionPager provides operations for iterating over paged responses. -type DevicesListBySubscriptionPager struct { +// DevicesClientListBySubscriptionPager provides operations for iterating over paged responses. +type DevicesClientListBySubscriptionPager struct { client *DevicesClient - current DevicesListBySubscriptionResponse + current DevicesClientListBySubscriptionResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, DevicesListBySubscriptionResponse) (*policy.Request, error) + advancer func(context.Context, DevicesClientListBySubscriptionResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *DevicesListBySubscriptionPager) Err() error { +func (p *DevicesClientListBySubscriptionPager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *DevicesListBySubscriptionPager) NextPage(ctx context.Context) bool { +func (p *DevicesClientListBySubscriptionPager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { - if p.current.DataBoxEdgeDeviceList.NextLink == nil || len(*p.current.DataBoxEdgeDeviceList.NextLink) == 0 { + if p.current.DeviceList.NextLink == nil || len(*p.current.DeviceList.NextLink) == 0 { return false } req, err = p.advancer(ctx, p.current) @@ -377,7 +377,7 @@ func (p *DevicesListBySubscriptionPager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listBySubscriptionHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listBySubscriptionHandleResponse(resp) @@ -389,28 +389,28 @@ func (p *DevicesListBySubscriptionPager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current DevicesListBySubscriptionResponse page. -func (p *DevicesListBySubscriptionPager) PageResponse() DevicesListBySubscriptionResponse { +// PageResponse returns the current DevicesClientListBySubscriptionResponse page. +func (p *DevicesClientListBySubscriptionPager) PageResponse() DevicesClientListBySubscriptionResponse { return p.current } -// MonitoringConfigListPager provides operations for iterating over paged responses. -type MonitoringConfigListPager struct { +// MonitoringConfigClientListPager provides operations for iterating over paged responses. +type MonitoringConfigClientListPager struct { client *MonitoringConfigClient - current MonitoringConfigListResponse + current MonitoringConfigClientListResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, MonitoringConfigListResponse) (*policy.Request, error) + advancer func(context.Context, MonitoringConfigClientListResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *MonitoringConfigListPager) Err() error { +func (p *MonitoringConfigClientListPager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *MonitoringConfigListPager) NextPage(ctx context.Context) bool { +func (p *MonitoringConfigClientListPager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -431,7 +431,7 @@ func (p *MonitoringConfigListPager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listHandleResponse(resp) @@ -443,28 +443,28 @@ func (p *MonitoringConfigListPager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current MonitoringConfigListResponse page. -func (p *MonitoringConfigListPager) PageResponse() MonitoringConfigListResponse { +// PageResponse returns the current MonitoringConfigClientListResponse page. +func (p *MonitoringConfigClientListPager) PageResponse() MonitoringConfigClientListResponse { return p.current } -// NodesListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type NodesListByDataBoxEdgeDevicePager struct { +// NodesClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type NodesClientListByDataBoxEdgeDevicePager struct { client *NodesClient - current NodesListByDataBoxEdgeDeviceResponse + current NodesClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, NodesListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, NodesClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *NodesListByDataBoxEdgeDevicePager) Err() error { +func (p *NodesClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *NodesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *NodesClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -485,7 +485,7 @@ func (p *NodesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -497,28 +497,28 @@ func (p *NodesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current NodesListByDataBoxEdgeDeviceResponse page. -func (p *NodesListByDataBoxEdgeDevicePager) PageResponse() NodesListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current NodesClientListByDataBoxEdgeDeviceResponse page. +func (p *NodesClientListByDataBoxEdgeDevicePager) PageResponse() NodesClientListByDataBoxEdgeDeviceResponse { return p.current } -// OperationsListPager provides operations for iterating over paged responses. -type OperationsListPager struct { +// OperationsClientListPager provides operations for iterating over paged responses. +type OperationsClientListPager struct { client *OperationsClient - current OperationsListResponse + current OperationsClientListResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, OperationsListResponse) (*policy.Request, error) + advancer func(context.Context, OperationsClientListResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *OperationsListPager) Err() error { +func (p *OperationsClientListPager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *OperationsListPager) NextPage(ctx context.Context) bool { +func (p *OperationsClientListPager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -539,7 +539,7 @@ func (p *OperationsListPager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listHandleResponse(resp) @@ -551,28 +551,28 @@ func (p *OperationsListPager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current OperationsListResponse page. -func (p *OperationsListPager) PageResponse() OperationsListResponse { +// PageResponse returns the current OperationsClientListResponse page. +func (p *OperationsClientListPager) PageResponse() OperationsClientListResponse { return p.current } -// OrdersListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type OrdersListByDataBoxEdgeDevicePager struct { +// OrdersClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type OrdersClientListByDataBoxEdgeDevicePager struct { client *OrdersClient - current OrdersListByDataBoxEdgeDeviceResponse + current OrdersClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, OrdersListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, OrdersClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *OrdersListByDataBoxEdgeDevicePager) Err() error { +func (p *OrdersClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *OrdersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *OrdersClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -593,7 +593,7 @@ func (p *OrdersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -605,28 +605,28 @@ func (p *OrdersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool return true } -// PageResponse returns the current OrdersListByDataBoxEdgeDeviceResponse page. -func (p *OrdersListByDataBoxEdgeDevicePager) PageResponse() OrdersListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current OrdersClientListByDataBoxEdgeDeviceResponse page. +func (p *OrdersClientListByDataBoxEdgeDevicePager) PageResponse() OrdersClientListByDataBoxEdgeDeviceResponse { return p.current } -// RolesListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type RolesListByDataBoxEdgeDevicePager struct { +// RolesClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type RolesClientListByDataBoxEdgeDevicePager struct { client *RolesClient - current RolesListByDataBoxEdgeDeviceResponse + current RolesClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, RolesListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, RolesClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *RolesListByDataBoxEdgeDevicePager) Err() error { +func (p *RolesClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *RolesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *RolesClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -647,7 +647,7 @@ func (p *RolesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -659,28 +659,28 @@ func (p *RolesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current RolesListByDataBoxEdgeDeviceResponse page. -func (p *RolesListByDataBoxEdgeDevicePager) PageResponse() RolesListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current RolesClientListByDataBoxEdgeDeviceResponse page. +func (p *RolesClientListByDataBoxEdgeDevicePager) PageResponse() RolesClientListByDataBoxEdgeDeviceResponse { return p.current } -// SharesListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type SharesListByDataBoxEdgeDevicePager struct { +// SharesClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type SharesClientListByDataBoxEdgeDevicePager struct { client *SharesClient - current SharesListByDataBoxEdgeDeviceResponse + current SharesClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, SharesListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, SharesClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *SharesListByDataBoxEdgeDevicePager) Err() error { +func (p *SharesClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *SharesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *SharesClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -701,7 +701,7 @@ func (p *SharesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -713,28 +713,28 @@ func (p *SharesListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool return true } -// PageResponse returns the current SharesListByDataBoxEdgeDeviceResponse page. -func (p *SharesListByDataBoxEdgeDevicePager) PageResponse() SharesListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current SharesClientListByDataBoxEdgeDeviceResponse page. +func (p *SharesClientListByDataBoxEdgeDevicePager) PageResponse() SharesClientListByDataBoxEdgeDeviceResponse { return p.current } -// StorageAccountCredentialsListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type StorageAccountCredentialsListByDataBoxEdgeDevicePager struct { +// StorageAccountCredentialsClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type StorageAccountCredentialsClientListByDataBoxEdgeDevicePager struct { client *StorageAccountCredentialsClient - current StorageAccountCredentialsListByDataBoxEdgeDeviceResponse + current StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, StorageAccountCredentialsListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *StorageAccountCredentialsListByDataBoxEdgeDevicePager) Err() error { +func (p *StorageAccountCredentialsClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *StorageAccountCredentialsListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *StorageAccountCredentialsClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -755,7 +755,7 @@ func (p *StorageAccountCredentialsListByDataBoxEdgeDevicePager) NextPage(ctx con return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -767,28 +767,28 @@ func (p *StorageAccountCredentialsListByDataBoxEdgeDevicePager) NextPage(ctx con return true } -// PageResponse returns the current StorageAccountCredentialsListByDataBoxEdgeDeviceResponse page. -func (p *StorageAccountCredentialsListByDataBoxEdgeDevicePager) PageResponse() StorageAccountCredentialsListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse page. +func (p *StorageAccountCredentialsClientListByDataBoxEdgeDevicePager) PageResponse() StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse { return p.current } -// StorageAccountsListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type StorageAccountsListByDataBoxEdgeDevicePager struct { +// StorageAccountsClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type StorageAccountsClientListByDataBoxEdgeDevicePager struct { client *StorageAccountsClient - current StorageAccountsListByDataBoxEdgeDeviceResponse + current StorageAccountsClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, StorageAccountsListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, StorageAccountsClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *StorageAccountsListByDataBoxEdgeDevicePager) Err() error { +func (p *StorageAccountsClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *StorageAccountsListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *StorageAccountsClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -809,7 +809,7 @@ func (p *StorageAccountsListByDataBoxEdgeDevicePager) NextPage(ctx context.Conte return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -821,28 +821,28 @@ func (p *StorageAccountsListByDataBoxEdgeDevicePager) NextPage(ctx context.Conte return true } -// PageResponse returns the current StorageAccountsListByDataBoxEdgeDeviceResponse page. -func (p *StorageAccountsListByDataBoxEdgeDevicePager) PageResponse() StorageAccountsListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current StorageAccountsClientListByDataBoxEdgeDeviceResponse page. +func (p *StorageAccountsClientListByDataBoxEdgeDevicePager) PageResponse() StorageAccountsClientListByDataBoxEdgeDeviceResponse { return p.current } -// TriggersListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type TriggersListByDataBoxEdgeDevicePager struct { +// TriggersClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type TriggersClientListByDataBoxEdgeDevicePager struct { client *TriggersClient - current TriggersListByDataBoxEdgeDeviceResponse + current TriggersClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, TriggersListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, TriggersClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *TriggersListByDataBoxEdgeDevicePager) Err() error { +func (p *TriggersClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *TriggersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *TriggersClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -863,7 +863,7 @@ func (p *TriggersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) boo return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -875,28 +875,28 @@ func (p *TriggersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) boo return true } -// PageResponse returns the current TriggersListByDataBoxEdgeDeviceResponse page. -func (p *TriggersListByDataBoxEdgeDevicePager) PageResponse() TriggersListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current TriggersClientListByDataBoxEdgeDeviceResponse page. +func (p *TriggersClientListByDataBoxEdgeDevicePager) PageResponse() TriggersClientListByDataBoxEdgeDeviceResponse { return p.current } -// UsersListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. -type UsersListByDataBoxEdgeDevicePager struct { +// UsersClientListByDataBoxEdgeDevicePager provides operations for iterating over paged responses. +type UsersClientListByDataBoxEdgeDevicePager struct { client *UsersClient - current UsersListByDataBoxEdgeDeviceResponse + current UsersClientListByDataBoxEdgeDeviceResponse err error requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, UsersListByDataBoxEdgeDeviceResponse) (*policy.Request, error) + advancer func(context.Context, UsersClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) } // Err returns the last error encountered while paging. -func (p *UsersListByDataBoxEdgeDevicePager) Err() error { +func (p *UsersClientListByDataBoxEdgeDevicePager) Err() error { return p.err } // NextPage returns true if the pager advanced to the next page. // Returns false if there are no more pages or an error occurred. -func (p *UsersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { +func (p *UsersClientListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { var req *policy.Request var err error if !reflect.ValueOf(p.current).IsZero() { @@ -917,7 +917,7 @@ func (p *UsersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { return false } if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = p.client.listByDataBoxEdgeDeviceHandleError(resp) + p.err = runtime.NewResponseError(resp) return false } result, err := p.client.listByDataBoxEdgeDeviceHandleResponse(resp) @@ -929,7 +929,7 @@ func (p *UsersListByDataBoxEdgeDevicePager) NextPage(ctx context.Context) bool { return true } -// PageResponse returns the current UsersListByDataBoxEdgeDeviceResponse page. -func (p *UsersListByDataBoxEdgeDevicePager) PageResponse() UsersListByDataBoxEdgeDeviceResponse { +// PageResponse returns the current UsersClientListByDataBoxEdgeDeviceResponse page. +func (p *UsersClientListByDataBoxEdgeDevicePager) PageResponse() UsersClientListByDataBoxEdgeDeviceResponse { return p.current } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_pollers.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_pollers.go index d29e454bab7e..ada2d2af5cbc 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_pollers.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_pollers.go @@ -14,13 +14,13 @@ import ( "net/http" ) -// AddonsCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type AddonsCreateOrUpdatePoller struct { +// AddonsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type AddonsClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *AddonsCreateOrUpdatePoller) Done() bool { +func (p *AddonsClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -34,18 +34,18 @@ func (p *AddonsCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *AddonsCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *AddonsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final AddonsCreateOrUpdateResponse will be returned. -func (p *AddonsCreateOrUpdatePoller) FinalResponse(ctx context.Context) (AddonsCreateOrUpdateResponse, error) { - respType := AddonsCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.AddonClassification) +// If the final GET succeeded then the final AddonsClientCreateOrUpdateResponse will be returned. +func (p *AddonsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (AddonsClientCreateOrUpdateResponse, error) { + respType := AddonsClientCreateOrUpdateResponse{} + resp, err := p.pt.FinalResponse(ctx, &respType.AddonsClientCreateOrUpdateResult) if err != nil { - return AddonsCreateOrUpdateResponse{}, err + return AddonsClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -53,17 +53,17 @@ func (p *AddonsCreateOrUpdatePoller) FinalResponse(ctx context.Context) (AddonsC // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *AddonsCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *AddonsClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// AddonsDeletePoller provides polling facilities until the operation reaches a terminal state. -type AddonsDeletePoller struct { +// AddonsClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type AddonsClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *AddonsDeletePoller) Done() bool { +func (p *AddonsClientDeletePoller) Done() bool { return p.pt.Done() } @@ -77,18 +77,18 @@ func (p *AddonsDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *AddonsDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *AddonsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final AddonsDeleteResponse will be returned. -func (p *AddonsDeletePoller) FinalResponse(ctx context.Context) (AddonsDeleteResponse, error) { - respType := AddonsDeleteResponse{} +// If the final GET succeeded then the final AddonsClientDeleteResponse will be returned. +func (p *AddonsClientDeletePoller) FinalResponse(ctx context.Context) (AddonsClientDeleteResponse, error) { + respType := AddonsClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return AddonsDeleteResponse{}, err + return AddonsClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -96,17 +96,17 @@ func (p *AddonsDeletePoller) FinalResponse(ctx context.Context) (AddonsDeleteRes // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *AddonsDeletePoller) ResumeToken() (string, error) { +func (p *AddonsClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// BandwidthSchedulesCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type BandwidthSchedulesCreateOrUpdatePoller struct { +// BandwidthSchedulesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type BandwidthSchedulesClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *BandwidthSchedulesCreateOrUpdatePoller) Done() bool { +func (p *BandwidthSchedulesClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -120,18 +120,18 @@ func (p *BandwidthSchedulesCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *BandwidthSchedulesCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *BandwidthSchedulesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final BandwidthSchedulesCreateOrUpdateResponse will be returned. -func (p *BandwidthSchedulesCreateOrUpdatePoller) FinalResponse(ctx context.Context) (BandwidthSchedulesCreateOrUpdateResponse, error) { - respType := BandwidthSchedulesCreateOrUpdateResponse{} +// If the final GET succeeded then the final BandwidthSchedulesClientCreateOrUpdateResponse will be returned. +func (p *BandwidthSchedulesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (BandwidthSchedulesClientCreateOrUpdateResponse, error) { + respType := BandwidthSchedulesClientCreateOrUpdateResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.BandwidthSchedule) if err != nil { - return BandwidthSchedulesCreateOrUpdateResponse{}, err + return BandwidthSchedulesClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -139,17 +139,17 @@ func (p *BandwidthSchedulesCreateOrUpdatePoller) FinalResponse(ctx context.Conte // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *BandwidthSchedulesCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *BandwidthSchedulesClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// BandwidthSchedulesDeletePoller provides polling facilities until the operation reaches a terminal state. -type BandwidthSchedulesDeletePoller struct { +// BandwidthSchedulesClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type BandwidthSchedulesClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *BandwidthSchedulesDeletePoller) Done() bool { +func (p *BandwidthSchedulesClientDeletePoller) Done() bool { return p.pt.Done() } @@ -163,18 +163,18 @@ func (p *BandwidthSchedulesDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *BandwidthSchedulesDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *BandwidthSchedulesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final BandwidthSchedulesDeleteResponse will be returned. -func (p *BandwidthSchedulesDeletePoller) FinalResponse(ctx context.Context) (BandwidthSchedulesDeleteResponse, error) { - respType := BandwidthSchedulesDeleteResponse{} +// If the final GET succeeded then the final BandwidthSchedulesClientDeleteResponse will be returned. +func (p *BandwidthSchedulesClientDeletePoller) FinalResponse(ctx context.Context) (BandwidthSchedulesClientDeleteResponse, error) { + respType := BandwidthSchedulesClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return BandwidthSchedulesDeleteResponse{}, err + return BandwidthSchedulesClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -182,17 +182,17 @@ func (p *BandwidthSchedulesDeletePoller) FinalResponse(ctx context.Context) (Ban // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *BandwidthSchedulesDeletePoller) ResumeToken() (string, error) { +func (p *BandwidthSchedulesClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// ContainersCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ContainersCreateOrUpdatePoller struct { +// ContainersClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type ContainersClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *ContainersCreateOrUpdatePoller) Done() bool { +func (p *ContainersClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -206,18 +206,18 @@ func (p *ContainersCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *ContainersCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *ContainersClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ContainersCreateOrUpdateResponse will be returned. -func (p *ContainersCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ContainersCreateOrUpdateResponse, error) { - respType := ContainersCreateOrUpdateResponse{} +// If the final GET succeeded then the final ContainersClientCreateOrUpdateResponse will be returned. +func (p *ContainersClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ContainersClientCreateOrUpdateResponse, error) { + respType := ContainersClientCreateOrUpdateResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.Container) if err != nil { - return ContainersCreateOrUpdateResponse{}, err + return ContainersClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -225,17 +225,17 @@ func (p *ContainersCreateOrUpdatePoller) FinalResponse(ctx context.Context) (Con // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ContainersCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *ContainersClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// ContainersDeletePoller provides polling facilities until the operation reaches a terminal state. -type ContainersDeletePoller struct { +// ContainersClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type ContainersClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *ContainersDeletePoller) Done() bool { +func (p *ContainersClientDeletePoller) Done() bool { return p.pt.Done() } @@ -249,18 +249,18 @@ func (p *ContainersDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *ContainersDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *ContainersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ContainersDeleteResponse will be returned. -func (p *ContainersDeletePoller) FinalResponse(ctx context.Context) (ContainersDeleteResponse, error) { - respType := ContainersDeleteResponse{} +// If the final GET succeeded then the final ContainersClientDeleteResponse will be returned. +func (p *ContainersClientDeletePoller) FinalResponse(ctx context.Context) (ContainersClientDeleteResponse, error) { + respType := ContainersClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return ContainersDeleteResponse{}, err + return ContainersClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -268,17 +268,17 @@ func (p *ContainersDeletePoller) FinalResponse(ctx context.Context) (ContainersD // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ContainersDeletePoller) ResumeToken() (string, error) { +func (p *ContainersClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// ContainersRefreshPoller provides polling facilities until the operation reaches a terminal state. -type ContainersRefreshPoller struct { +// ContainersClientRefreshPoller provides polling facilities until the operation reaches a terminal state. +type ContainersClientRefreshPoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *ContainersRefreshPoller) Done() bool { +func (p *ContainersClientRefreshPoller) Done() bool { return p.pt.Done() } @@ -292,18 +292,18 @@ func (p *ContainersRefreshPoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *ContainersRefreshPoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *ContainersClientRefreshPoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ContainersRefreshResponse will be returned. -func (p *ContainersRefreshPoller) FinalResponse(ctx context.Context) (ContainersRefreshResponse, error) { - respType := ContainersRefreshResponse{} +// If the final GET succeeded then the final ContainersClientRefreshResponse will be returned. +func (p *ContainersClientRefreshPoller) FinalResponse(ctx context.Context) (ContainersClientRefreshResponse, error) { + respType := ContainersClientRefreshResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return ContainersRefreshResponse{}, err + return ContainersClientRefreshResponse{}, err } respType.RawResponse = resp return respType, nil @@ -311,17 +311,17 @@ func (p *ContainersRefreshPoller) FinalResponse(ctx context.Context) (Containers // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ContainersRefreshPoller) ResumeToken() (string, error) { +func (p *ContainersClientRefreshPoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// DevicesCreateOrUpdateSecuritySettingsPoller provides polling facilities until the operation reaches a terminal state. -type DevicesCreateOrUpdateSecuritySettingsPoller struct { +// DevicesClientCreateOrUpdateSecuritySettingsPoller provides polling facilities until the operation reaches a terminal state. +type DevicesClientCreateOrUpdateSecuritySettingsPoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *DevicesCreateOrUpdateSecuritySettingsPoller) Done() bool { +func (p *DevicesClientCreateOrUpdateSecuritySettingsPoller) Done() bool { return p.pt.Done() } @@ -335,18 +335,18 @@ func (p *DevicesCreateOrUpdateSecuritySettingsPoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *DevicesCreateOrUpdateSecuritySettingsPoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *DevicesClientCreateOrUpdateSecuritySettingsPoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DevicesCreateOrUpdateSecuritySettingsResponse will be returned. -func (p *DevicesCreateOrUpdateSecuritySettingsPoller) FinalResponse(ctx context.Context) (DevicesCreateOrUpdateSecuritySettingsResponse, error) { - respType := DevicesCreateOrUpdateSecuritySettingsResponse{} +// If the final GET succeeded then the final DevicesClientCreateOrUpdateSecuritySettingsResponse will be returned. +func (p *DevicesClientCreateOrUpdateSecuritySettingsPoller) FinalResponse(ctx context.Context) (DevicesClientCreateOrUpdateSecuritySettingsResponse, error) { + respType := DevicesClientCreateOrUpdateSecuritySettingsResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return DevicesCreateOrUpdateSecuritySettingsResponse{}, err + return DevicesClientCreateOrUpdateSecuritySettingsResponse{}, err } respType.RawResponse = resp return respType, nil @@ -354,17 +354,17 @@ func (p *DevicesCreateOrUpdateSecuritySettingsPoller) FinalResponse(ctx context. // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DevicesCreateOrUpdateSecuritySettingsPoller) ResumeToken() (string, error) { +func (p *DevicesClientCreateOrUpdateSecuritySettingsPoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// DevicesDeletePoller provides polling facilities until the operation reaches a terminal state. -type DevicesDeletePoller struct { +// DevicesClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type DevicesClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *DevicesDeletePoller) Done() bool { +func (p *DevicesClientDeletePoller) Done() bool { return p.pt.Done() } @@ -378,18 +378,18 @@ func (p *DevicesDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *DevicesDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *DevicesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DevicesDeleteResponse will be returned. -func (p *DevicesDeletePoller) FinalResponse(ctx context.Context) (DevicesDeleteResponse, error) { - respType := DevicesDeleteResponse{} +// If the final GET succeeded then the final DevicesClientDeleteResponse will be returned. +func (p *DevicesClientDeletePoller) FinalResponse(ctx context.Context) (DevicesClientDeleteResponse, error) { + respType := DevicesClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return DevicesDeleteResponse{}, err + return DevicesClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -397,17 +397,17 @@ func (p *DevicesDeletePoller) FinalResponse(ctx context.Context) (DevicesDeleteR // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DevicesDeletePoller) ResumeToken() (string, error) { +func (p *DevicesClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// DevicesDownloadUpdatesPoller provides polling facilities until the operation reaches a terminal state. -type DevicesDownloadUpdatesPoller struct { +// DevicesClientDownloadUpdatesPoller provides polling facilities until the operation reaches a terminal state. +type DevicesClientDownloadUpdatesPoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *DevicesDownloadUpdatesPoller) Done() bool { +func (p *DevicesClientDownloadUpdatesPoller) Done() bool { return p.pt.Done() } @@ -421,18 +421,18 @@ func (p *DevicesDownloadUpdatesPoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *DevicesDownloadUpdatesPoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *DevicesClientDownloadUpdatesPoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DevicesDownloadUpdatesResponse will be returned. -func (p *DevicesDownloadUpdatesPoller) FinalResponse(ctx context.Context) (DevicesDownloadUpdatesResponse, error) { - respType := DevicesDownloadUpdatesResponse{} +// If the final GET succeeded then the final DevicesClientDownloadUpdatesResponse will be returned. +func (p *DevicesClientDownloadUpdatesPoller) FinalResponse(ctx context.Context) (DevicesClientDownloadUpdatesResponse, error) { + respType := DevicesClientDownloadUpdatesResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return DevicesDownloadUpdatesResponse{}, err + return DevicesClientDownloadUpdatesResponse{}, err } respType.RawResponse = resp return respType, nil @@ -440,17 +440,17 @@ func (p *DevicesDownloadUpdatesPoller) FinalResponse(ctx context.Context) (Devic // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DevicesDownloadUpdatesPoller) ResumeToken() (string, error) { +func (p *DevicesClientDownloadUpdatesPoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// DevicesInstallUpdatesPoller provides polling facilities until the operation reaches a terminal state. -type DevicesInstallUpdatesPoller struct { +// DevicesClientInstallUpdatesPoller provides polling facilities until the operation reaches a terminal state. +type DevicesClientInstallUpdatesPoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *DevicesInstallUpdatesPoller) Done() bool { +func (p *DevicesClientInstallUpdatesPoller) Done() bool { return p.pt.Done() } @@ -464,18 +464,18 @@ func (p *DevicesInstallUpdatesPoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *DevicesInstallUpdatesPoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *DevicesClientInstallUpdatesPoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DevicesInstallUpdatesResponse will be returned. -func (p *DevicesInstallUpdatesPoller) FinalResponse(ctx context.Context) (DevicesInstallUpdatesResponse, error) { - respType := DevicesInstallUpdatesResponse{} +// If the final GET succeeded then the final DevicesClientInstallUpdatesResponse will be returned. +func (p *DevicesClientInstallUpdatesPoller) FinalResponse(ctx context.Context) (DevicesClientInstallUpdatesResponse, error) { + respType := DevicesClientInstallUpdatesResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return DevicesInstallUpdatesResponse{}, err + return DevicesClientInstallUpdatesResponse{}, err } respType.RawResponse = resp return respType, nil @@ -483,17 +483,17 @@ func (p *DevicesInstallUpdatesPoller) FinalResponse(ctx context.Context) (Device // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DevicesInstallUpdatesPoller) ResumeToken() (string, error) { +func (p *DevicesClientInstallUpdatesPoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// DevicesScanForUpdatesPoller provides polling facilities until the operation reaches a terminal state. -type DevicesScanForUpdatesPoller struct { +// DevicesClientScanForUpdatesPoller provides polling facilities until the operation reaches a terminal state. +type DevicesClientScanForUpdatesPoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *DevicesScanForUpdatesPoller) Done() bool { +func (p *DevicesClientScanForUpdatesPoller) Done() bool { return p.pt.Done() } @@ -507,18 +507,18 @@ func (p *DevicesScanForUpdatesPoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *DevicesScanForUpdatesPoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *DevicesClientScanForUpdatesPoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DevicesScanForUpdatesResponse will be returned. -func (p *DevicesScanForUpdatesPoller) FinalResponse(ctx context.Context) (DevicesScanForUpdatesResponse, error) { - respType := DevicesScanForUpdatesResponse{} +// If the final GET succeeded then the final DevicesClientScanForUpdatesResponse will be returned. +func (p *DevicesClientScanForUpdatesPoller) FinalResponse(ctx context.Context) (DevicesClientScanForUpdatesResponse, error) { + respType := DevicesClientScanForUpdatesResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return DevicesScanForUpdatesResponse{}, err + return DevicesClientScanForUpdatesResponse{}, err } respType.RawResponse = resp return respType, nil @@ -526,17 +526,17 @@ func (p *DevicesScanForUpdatesPoller) FinalResponse(ctx context.Context) (Device // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DevicesScanForUpdatesPoller) ResumeToken() (string, error) { +func (p *DevicesClientScanForUpdatesPoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller provides polling facilities until the operation reaches a terminal state. -type DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller struct { +// DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller provides polling facilities until the operation reaches a terminal state. +type DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller) Done() bool { +func (p *DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller) Done() bool { return p.pt.Done() } @@ -550,18 +550,18 @@ func (p *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller) // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse will be returned. -func (p *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller) FinalResponse(ctx context.Context) (DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse, error) { - respType := DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse{} +// If the final GET succeeded then the final DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse will be returned. +func (p *DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller) FinalResponse(ctx context.Context) (DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse, error) { + respType := DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.DiagnosticProactiveLogCollectionSettings) if err != nil { - return DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse{}, err + return DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse{}, err } respType.RawResponse = resp return respType, nil @@ -569,17 +569,17 @@ func (p *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller) // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller) ResumeToken() (string, error) { +func (p *DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller provides polling facilities until the operation reaches a terminal state. -type DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller struct { +// DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller provides polling facilities until the operation reaches a terminal state. +type DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller) Done() bool { +func (p *DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller) Done() bool { return p.pt.Done() } @@ -593,18 +593,18 @@ func (p *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller) Done() b // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse will be returned. -func (p *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller) FinalResponse(ctx context.Context) (DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse, error) { - respType := DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse{} +// If the final GET succeeded then the final DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse will be returned. +func (p *DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller) FinalResponse(ctx context.Context) (DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse, error) { + respType := DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.DiagnosticRemoteSupportSettings) if err != nil { - return DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse{}, err + return DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse{}, err } respType.RawResponse = resp return respType, nil @@ -612,17 +612,17 @@ func (p *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller) FinalRes // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller) ResumeToken() (string, error) { +func (p *DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// MonitoringConfigCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type MonitoringConfigCreateOrUpdatePoller struct { +// MonitoringConfigClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type MonitoringConfigClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *MonitoringConfigCreateOrUpdatePoller) Done() bool { +func (p *MonitoringConfigClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -636,18 +636,18 @@ func (p *MonitoringConfigCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *MonitoringConfigCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *MonitoringConfigClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final MonitoringConfigCreateOrUpdateResponse will be returned. -func (p *MonitoringConfigCreateOrUpdatePoller) FinalResponse(ctx context.Context) (MonitoringConfigCreateOrUpdateResponse, error) { - respType := MonitoringConfigCreateOrUpdateResponse{} +// If the final GET succeeded then the final MonitoringConfigClientCreateOrUpdateResponse will be returned. +func (p *MonitoringConfigClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (MonitoringConfigClientCreateOrUpdateResponse, error) { + respType := MonitoringConfigClientCreateOrUpdateResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.MonitoringMetricConfiguration) if err != nil { - return MonitoringConfigCreateOrUpdateResponse{}, err + return MonitoringConfigClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -655,17 +655,17 @@ func (p *MonitoringConfigCreateOrUpdatePoller) FinalResponse(ctx context.Context // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *MonitoringConfigCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *MonitoringConfigClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// MonitoringConfigDeletePoller provides polling facilities until the operation reaches a terminal state. -type MonitoringConfigDeletePoller struct { +// MonitoringConfigClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type MonitoringConfigClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *MonitoringConfigDeletePoller) Done() bool { +func (p *MonitoringConfigClientDeletePoller) Done() bool { return p.pt.Done() } @@ -679,18 +679,18 @@ func (p *MonitoringConfigDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *MonitoringConfigDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *MonitoringConfigClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final MonitoringConfigDeleteResponse will be returned. -func (p *MonitoringConfigDeletePoller) FinalResponse(ctx context.Context) (MonitoringConfigDeleteResponse, error) { - respType := MonitoringConfigDeleteResponse{} +// If the final GET succeeded then the final MonitoringConfigClientDeleteResponse will be returned. +func (p *MonitoringConfigClientDeletePoller) FinalResponse(ctx context.Context) (MonitoringConfigClientDeleteResponse, error) { + respType := MonitoringConfigClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return MonitoringConfigDeleteResponse{}, err + return MonitoringConfigClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -698,17 +698,17 @@ func (p *MonitoringConfigDeletePoller) FinalResponse(ctx context.Context) (Monit // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *MonitoringConfigDeletePoller) ResumeToken() (string, error) { +func (p *MonitoringConfigClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// OrdersCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type OrdersCreateOrUpdatePoller struct { +// OrdersClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type OrdersClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *OrdersCreateOrUpdatePoller) Done() bool { +func (p *OrdersClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -722,18 +722,18 @@ func (p *OrdersCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *OrdersCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *OrdersClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final OrdersCreateOrUpdateResponse will be returned. -func (p *OrdersCreateOrUpdatePoller) FinalResponse(ctx context.Context) (OrdersCreateOrUpdateResponse, error) { - respType := OrdersCreateOrUpdateResponse{} +// If the final GET succeeded then the final OrdersClientCreateOrUpdateResponse will be returned. +func (p *OrdersClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (OrdersClientCreateOrUpdateResponse, error) { + respType := OrdersClientCreateOrUpdateResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.Order) if err != nil { - return OrdersCreateOrUpdateResponse{}, err + return OrdersClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -741,17 +741,17 @@ func (p *OrdersCreateOrUpdatePoller) FinalResponse(ctx context.Context) (OrdersC // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *OrdersCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *OrdersClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// OrdersDeletePoller provides polling facilities until the operation reaches a terminal state. -type OrdersDeletePoller struct { +// OrdersClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type OrdersClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *OrdersDeletePoller) Done() bool { +func (p *OrdersClientDeletePoller) Done() bool { return p.pt.Done() } @@ -765,18 +765,18 @@ func (p *OrdersDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *OrdersDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *OrdersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final OrdersDeleteResponse will be returned. -func (p *OrdersDeletePoller) FinalResponse(ctx context.Context) (OrdersDeleteResponse, error) { - respType := OrdersDeleteResponse{} +// If the final GET succeeded then the final OrdersClientDeleteResponse will be returned. +func (p *OrdersClientDeletePoller) FinalResponse(ctx context.Context) (OrdersClientDeleteResponse, error) { + respType := OrdersClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return OrdersDeleteResponse{}, err + return OrdersClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -784,17 +784,17 @@ func (p *OrdersDeletePoller) FinalResponse(ctx context.Context) (OrdersDeleteRes // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *OrdersDeletePoller) ResumeToken() (string, error) { +func (p *OrdersClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// RolesCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type RolesCreateOrUpdatePoller struct { +// RolesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type RolesClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *RolesCreateOrUpdatePoller) Done() bool { +func (p *RolesClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -808,18 +808,18 @@ func (p *RolesCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *RolesCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *RolesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RolesCreateOrUpdateResponse will be returned. -func (p *RolesCreateOrUpdatePoller) FinalResponse(ctx context.Context) (RolesCreateOrUpdateResponse, error) { - respType := RolesCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.RoleClassification) +// If the final GET succeeded then the final RolesClientCreateOrUpdateResponse will be returned. +func (p *RolesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (RolesClientCreateOrUpdateResponse, error) { + respType := RolesClientCreateOrUpdateResponse{} + resp, err := p.pt.FinalResponse(ctx, &respType.RolesClientCreateOrUpdateResult) if err != nil { - return RolesCreateOrUpdateResponse{}, err + return RolesClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -827,17 +827,17 @@ func (p *RolesCreateOrUpdatePoller) FinalResponse(ctx context.Context) (RolesCre // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RolesCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *RolesClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// RolesDeletePoller provides polling facilities until the operation reaches a terminal state. -type RolesDeletePoller struct { +// RolesClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type RolesClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *RolesDeletePoller) Done() bool { +func (p *RolesClientDeletePoller) Done() bool { return p.pt.Done() } @@ -851,18 +851,18 @@ func (p *RolesDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *RolesDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *RolesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RolesDeleteResponse will be returned. -func (p *RolesDeletePoller) FinalResponse(ctx context.Context) (RolesDeleteResponse, error) { - respType := RolesDeleteResponse{} +// If the final GET succeeded then the final RolesClientDeleteResponse will be returned. +func (p *RolesClientDeletePoller) FinalResponse(ctx context.Context) (RolesClientDeleteResponse, error) { + respType := RolesClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return RolesDeleteResponse{}, err + return RolesClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -870,17 +870,17 @@ func (p *RolesDeletePoller) FinalResponse(ctx context.Context) (RolesDeleteRespo // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RolesDeletePoller) ResumeToken() (string, error) { +func (p *RolesClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// SharesCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type SharesCreateOrUpdatePoller struct { +// SharesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type SharesClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *SharesCreateOrUpdatePoller) Done() bool { +func (p *SharesClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -894,18 +894,18 @@ func (p *SharesCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *SharesCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *SharesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SharesCreateOrUpdateResponse will be returned. -func (p *SharesCreateOrUpdatePoller) FinalResponse(ctx context.Context) (SharesCreateOrUpdateResponse, error) { - respType := SharesCreateOrUpdateResponse{} +// If the final GET succeeded then the final SharesClientCreateOrUpdateResponse will be returned. +func (p *SharesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (SharesClientCreateOrUpdateResponse, error) { + respType := SharesClientCreateOrUpdateResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.Share) if err != nil { - return SharesCreateOrUpdateResponse{}, err + return SharesClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -913,17 +913,17 @@ func (p *SharesCreateOrUpdatePoller) FinalResponse(ctx context.Context) (SharesC // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SharesCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *SharesClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// SharesDeletePoller provides polling facilities until the operation reaches a terminal state. -type SharesDeletePoller struct { +// SharesClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type SharesClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *SharesDeletePoller) Done() bool { +func (p *SharesClientDeletePoller) Done() bool { return p.pt.Done() } @@ -937,18 +937,18 @@ func (p *SharesDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *SharesDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *SharesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SharesDeleteResponse will be returned. -func (p *SharesDeletePoller) FinalResponse(ctx context.Context) (SharesDeleteResponse, error) { - respType := SharesDeleteResponse{} +// If the final GET succeeded then the final SharesClientDeleteResponse will be returned. +func (p *SharesClientDeletePoller) FinalResponse(ctx context.Context) (SharesClientDeleteResponse, error) { + respType := SharesClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return SharesDeleteResponse{}, err + return SharesClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -956,17 +956,17 @@ func (p *SharesDeletePoller) FinalResponse(ctx context.Context) (SharesDeleteRes // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SharesDeletePoller) ResumeToken() (string, error) { +func (p *SharesClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// SharesRefreshPoller provides polling facilities until the operation reaches a terminal state. -type SharesRefreshPoller struct { +// SharesClientRefreshPoller provides polling facilities until the operation reaches a terminal state. +type SharesClientRefreshPoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *SharesRefreshPoller) Done() bool { +func (p *SharesClientRefreshPoller) Done() bool { return p.pt.Done() } @@ -980,18 +980,18 @@ func (p *SharesRefreshPoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *SharesRefreshPoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *SharesClientRefreshPoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SharesRefreshResponse will be returned. -func (p *SharesRefreshPoller) FinalResponse(ctx context.Context) (SharesRefreshResponse, error) { - respType := SharesRefreshResponse{} +// If the final GET succeeded then the final SharesClientRefreshResponse will be returned. +func (p *SharesClientRefreshPoller) FinalResponse(ctx context.Context) (SharesClientRefreshResponse, error) { + respType := SharesClientRefreshResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return SharesRefreshResponse{}, err + return SharesClientRefreshResponse{}, err } respType.RawResponse = resp return respType, nil @@ -999,17 +999,17 @@ func (p *SharesRefreshPoller) FinalResponse(ctx context.Context) (SharesRefreshR // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SharesRefreshPoller) ResumeToken() (string, error) { +func (p *SharesClientRefreshPoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// StorageAccountCredentialsCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type StorageAccountCredentialsCreateOrUpdatePoller struct { +// StorageAccountCredentialsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type StorageAccountCredentialsClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *StorageAccountCredentialsCreateOrUpdatePoller) Done() bool { +func (p *StorageAccountCredentialsClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -1023,18 +1023,18 @@ func (p *StorageAccountCredentialsCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *StorageAccountCredentialsCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *StorageAccountCredentialsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final StorageAccountCredentialsCreateOrUpdateResponse will be returned. -func (p *StorageAccountCredentialsCreateOrUpdatePoller) FinalResponse(ctx context.Context) (StorageAccountCredentialsCreateOrUpdateResponse, error) { - respType := StorageAccountCredentialsCreateOrUpdateResponse{} +// If the final GET succeeded then the final StorageAccountCredentialsClientCreateOrUpdateResponse will be returned. +func (p *StorageAccountCredentialsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (StorageAccountCredentialsClientCreateOrUpdateResponse, error) { + respType := StorageAccountCredentialsClientCreateOrUpdateResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.StorageAccountCredential) if err != nil { - return StorageAccountCredentialsCreateOrUpdateResponse{}, err + return StorageAccountCredentialsClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1042,17 +1042,17 @@ func (p *StorageAccountCredentialsCreateOrUpdatePoller) FinalResponse(ctx contex // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *StorageAccountCredentialsCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *StorageAccountCredentialsClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// StorageAccountCredentialsDeletePoller provides polling facilities until the operation reaches a terminal state. -type StorageAccountCredentialsDeletePoller struct { +// StorageAccountCredentialsClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type StorageAccountCredentialsClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *StorageAccountCredentialsDeletePoller) Done() bool { +func (p *StorageAccountCredentialsClientDeletePoller) Done() bool { return p.pt.Done() } @@ -1066,18 +1066,18 @@ func (p *StorageAccountCredentialsDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *StorageAccountCredentialsDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *StorageAccountCredentialsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final StorageAccountCredentialsDeleteResponse will be returned. -func (p *StorageAccountCredentialsDeletePoller) FinalResponse(ctx context.Context) (StorageAccountCredentialsDeleteResponse, error) { - respType := StorageAccountCredentialsDeleteResponse{} +// If the final GET succeeded then the final StorageAccountCredentialsClientDeleteResponse will be returned. +func (p *StorageAccountCredentialsClientDeletePoller) FinalResponse(ctx context.Context) (StorageAccountCredentialsClientDeleteResponse, error) { + respType := StorageAccountCredentialsClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return StorageAccountCredentialsDeleteResponse{}, err + return StorageAccountCredentialsClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1085,17 +1085,17 @@ func (p *StorageAccountCredentialsDeletePoller) FinalResponse(ctx context.Contex // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *StorageAccountCredentialsDeletePoller) ResumeToken() (string, error) { +func (p *StorageAccountCredentialsClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// StorageAccountsCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type StorageAccountsCreateOrUpdatePoller struct { +// StorageAccountsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type StorageAccountsClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *StorageAccountsCreateOrUpdatePoller) Done() bool { +func (p *StorageAccountsClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -1109,18 +1109,18 @@ func (p *StorageAccountsCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *StorageAccountsCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *StorageAccountsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final StorageAccountsCreateOrUpdateResponse will be returned. -func (p *StorageAccountsCreateOrUpdatePoller) FinalResponse(ctx context.Context) (StorageAccountsCreateOrUpdateResponse, error) { - respType := StorageAccountsCreateOrUpdateResponse{} +// If the final GET succeeded then the final StorageAccountsClientCreateOrUpdateResponse will be returned. +func (p *StorageAccountsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (StorageAccountsClientCreateOrUpdateResponse, error) { + respType := StorageAccountsClientCreateOrUpdateResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.StorageAccount) if err != nil { - return StorageAccountsCreateOrUpdateResponse{}, err + return StorageAccountsClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1128,17 +1128,17 @@ func (p *StorageAccountsCreateOrUpdatePoller) FinalResponse(ctx context.Context) // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *StorageAccountsCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *StorageAccountsClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// StorageAccountsDeletePoller provides polling facilities until the operation reaches a terminal state. -type StorageAccountsDeletePoller struct { +// StorageAccountsClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type StorageAccountsClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *StorageAccountsDeletePoller) Done() bool { +func (p *StorageAccountsClientDeletePoller) Done() bool { return p.pt.Done() } @@ -1152,18 +1152,18 @@ func (p *StorageAccountsDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *StorageAccountsDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *StorageAccountsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final StorageAccountsDeleteResponse will be returned. -func (p *StorageAccountsDeletePoller) FinalResponse(ctx context.Context) (StorageAccountsDeleteResponse, error) { - respType := StorageAccountsDeleteResponse{} +// If the final GET succeeded then the final StorageAccountsClientDeleteResponse will be returned. +func (p *StorageAccountsClientDeletePoller) FinalResponse(ctx context.Context) (StorageAccountsClientDeleteResponse, error) { + respType := StorageAccountsClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return StorageAccountsDeleteResponse{}, err + return StorageAccountsClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1171,17 +1171,17 @@ func (p *StorageAccountsDeletePoller) FinalResponse(ctx context.Context) (Storag // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *StorageAccountsDeletePoller) ResumeToken() (string, error) { +func (p *StorageAccountsClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// SupportPackagesTriggerSupportPackagePoller provides polling facilities until the operation reaches a terminal state. -type SupportPackagesTriggerSupportPackagePoller struct { +// SupportPackagesClientTriggerSupportPackagePoller provides polling facilities until the operation reaches a terminal state. +type SupportPackagesClientTriggerSupportPackagePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *SupportPackagesTriggerSupportPackagePoller) Done() bool { +func (p *SupportPackagesClientTriggerSupportPackagePoller) Done() bool { return p.pt.Done() } @@ -1195,18 +1195,18 @@ func (p *SupportPackagesTriggerSupportPackagePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *SupportPackagesTriggerSupportPackagePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *SupportPackagesClientTriggerSupportPackagePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SupportPackagesTriggerSupportPackageResponse will be returned. -func (p *SupportPackagesTriggerSupportPackagePoller) FinalResponse(ctx context.Context) (SupportPackagesTriggerSupportPackageResponse, error) { - respType := SupportPackagesTriggerSupportPackageResponse{} +// If the final GET succeeded then the final SupportPackagesClientTriggerSupportPackageResponse will be returned. +func (p *SupportPackagesClientTriggerSupportPackagePoller) FinalResponse(ctx context.Context) (SupportPackagesClientTriggerSupportPackageResponse, error) { + respType := SupportPackagesClientTriggerSupportPackageResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return SupportPackagesTriggerSupportPackageResponse{}, err + return SupportPackagesClientTriggerSupportPackageResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1214,17 +1214,17 @@ func (p *SupportPackagesTriggerSupportPackagePoller) FinalResponse(ctx context.C // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SupportPackagesTriggerSupportPackagePoller) ResumeToken() (string, error) { +func (p *SupportPackagesClientTriggerSupportPackagePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// TriggersCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type TriggersCreateOrUpdatePoller struct { +// TriggersClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type TriggersClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *TriggersCreateOrUpdatePoller) Done() bool { +func (p *TriggersClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -1238,18 +1238,18 @@ func (p *TriggersCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *TriggersCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *TriggersClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final TriggersCreateOrUpdateResponse will be returned. -func (p *TriggersCreateOrUpdatePoller) FinalResponse(ctx context.Context) (TriggersCreateOrUpdateResponse, error) { - respType := TriggersCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.TriggerClassification) +// If the final GET succeeded then the final TriggersClientCreateOrUpdateResponse will be returned. +func (p *TriggersClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (TriggersClientCreateOrUpdateResponse, error) { + respType := TriggersClientCreateOrUpdateResponse{} + resp, err := p.pt.FinalResponse(ctx, &respType.TriggersClientCreateOrUpdateResult) if err != nil { - return TriggersCreateOrUpdateResponse{}, err + return TriggersClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1257,17 +1257,17 @@ func (p *TriggersCreateOrUpdatePoller) FinalResponse(ctx context.Context) (Trigg // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *TriggersCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *TriggersClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// TriggersDeletePoller provides polling facilities until the operation reaches a terminal state. -type TriggersDeletePoller struct { +// TriggersClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type TriggersClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *TriggersDeletePoller) Done() bool { +func (p *TriggersClientDeletePoller) Done() bool { return p.pt.Done() } @@ -1281,18 +1281,18 @@ func (p *TriggersDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *TriggersDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *TriggersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final TriggersDeleteResponse will be returned. -func (p *TriggersDeletePoller) FinalResponse(ctx context.Context) (TriggersDeleteResponse, error) { - respType := TriggersDeleteResponse{} +// If the final GET succeeded then the final TriggersClientDeleteResponse will be returned. +func (p *TriggersClientDeletePoller) FinalResponse(ctx context.Context) (TriggersClientDeleteResponse, error) { + respType := TriggersClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return TriggersDeleteResponse{}, err + return TriggersClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1300,17 +1300,17 @@ func (p *TriggersDeletePoller) FinalResponse(ctx context.Context) (TriggersDelet // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *TriggersDeletePoller) ResumeToken() (string, error) { +func (p *TriggersClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// UsersCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type UsersCreateOrUpdatePoller struct { +// UsersClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. +type UsersClientCreateOrUpdatePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *UsersCreateOrUpdatePoller) Done() bool { +func (p *UsersClientCreateOrUpdatePoller) Done() bool { return p.pt.Done() } @@ -1324,18 +1324,18 @@ func (p *UsersCreateOrUpdatePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *UsersCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *UsersClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final UsersCreateOrUpdateResponse will be returned. -func (p *UsersCreateOrUpdatePoller) FinalResponse(ctx context.Context) (UsersCreateOrUpdateResponse, error) { - respType := UsersCreateOrUpdateResponse{} +// If the final GET succeeded then the final UsersClientCreateOrUpdateResponse will be returned. +func (p *UsersClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (UsersClientCreateOrUpdateResponse, error) { + respType := UsersClientCreateOrUpdateResponse{} resp, err := p.pt.FinalResponse(ctx, &respType.User) if err != nil { - return UsersCreateOrUpdateResponse{}, err + return UsersClientCreateOrUpdateResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1343,17 +1343,17 @@ func (p *UsersCreateOrUpdatePoller) FinalResponse(ctx context.Context) (UsersCre // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *UsersCreateOrUpdatePoller) ResumeToken() (string, error) { +func (p *UsersClientCreateOrUpdatePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } -// UsersDeletePoller provides polling facilities until the operation reaches a terminal state. -type UsersDeletePoller struct { +// UsersClientDeletePoller provides polling facilities until the operation reaches a terminal state. +type UsersClientDeletePoller struct { pt *azcore.Poller } // Done returns true if the LRO has reached a terminal state. -func (p *UsersDeletePoller) Done() bool { +func (p *UsersClientDeletePoller) Done() bool { return p.pt.Done() } @@ -1367,18 +1367,18 @@ func (p *UsersDeletePoller) Done() bool { // If Poll fails, the poller's state is unmodified and the error is returned. // Calling Poll on an LRO that has reached a terminal state will return the final // HTTP response or error. -func (p *UsersDeletePoller) Poll(ctx context.Context) (*http.Response, error) { +func (p *UsersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { return p.pt.Poll(ctx) } // FinalResponse performs a final GET to the service and returns the final response // for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final UsersDeleteResponse will be returned. -func (p *UsersDeletePoller) FinalResponse(ctx context.Context) (UsersDeleteResponse, error) { - respType := UsersDeleteResponse{} +// If the final GET succeeded then the final UsersClientDeleteResponse will be returned. +func (p *UsersClientDeletePoller) FinalResponse(ctx context.Context) (UsersClientDeleteResponse, error) { + respType := UsersClientDeleteResponse{} resp, err := p.pt.FinalResponse(ctx, nil) if err != nil { - return UsersDeleteResponse{}, err + return UsersClientDeleteResponse{}, err } respType.RawResponse = resp return respType, nil @@ -1386,6 +1386,6 @@ func (p *UsersDeletePoller) FinalResponse(ctx context.Context) (UsersDeleteRespo // ResumeToken returns a value representing the poller that can be used to resume // the LRO at a later time. ResumeTokens are unique per service operation. -func (p *UsersDeletePoller) ResumeToken() (string, error) { +func (p *UsersClientDeletePoller) ResumeToken() (string, error) { return p.pt.ResumeToken() } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_polymorphic_helpers.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_polymorphic_helpers.go index 59654907b6e0..d086a05091fd 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_polymorphic_helpers.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_polymorphic_helpers.go @@ -49,25 +49,6 @@ func unmarshalAddonClassificationArray(rawMsg json.RawMessage) ([]AddonClassific return fArray, nil } -func unmarshalAddonClassificationMap(rawMsg json.RawMessage) (map[string]AddonClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages map[string]json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fMap := make(map[string]AddonClassification, len(rawMessages)) - for key, rawMessage := range rawMessages { - f, err := unmarshalAddonClassification(rawMessage) - if err != nil { - return nil, err - } - fMap[key] = f - } - return fMap, nil -} - func unmarshalRoleClassification(rawMsg json.RawMessage) (RoleClassification, error) { if rawMsg == nil { return nil, nil @@ -111,25 +92,6 @@ func unmarshalRoleClassificationArray(rawMsg json.RawMessage) ([]RoleClassificat return fArray, nil } -func unmarshalRoleClassificationMap(rawMsg json.RawMessage) (map[string]RoleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages map[string]json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fMap := make(map[string]RoleClassification, len(rawMessages)) - for key, rawMessage := range rawMessages { - f, err := unmarshalRoleClassification(rawMessage) - if err != nil { - return nil, err - } - fMap[key] = f - } - return fMap, nil -} - func unmarshalTriggerClassification(rawMsg json.RawMessage) (TriggerClassification, error) { if rawMsg == nil { return nil, nil @@ -168,22 +130,3 @@ func unmarshalTriggerClassificationArray(rawMsg json.RawMessage) ([]TriggerClass } return fArray, nil } - -func unmarshalTriggerClassificationMap(rawMsg json.RawMessage) (map[string]TriggerClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages map[string]json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fMap := make(map[string]TriggerClassification, len(rawMessages)) - for key, rawMessage := range rawMessages { - f, err := unmarshalTriggerClassification(rawMessage) - if err != nil { - return nil, err - } - fMap[key] = f - } - return fMap, nil -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_response_types.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_response_types.go index 5841e7c0bfe9..68d3efa6d252 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_response_types.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_response_types.go @@ -15,10 +15,10 @@ import ( "time" ) -// AddonsCreateOrUpdatePollerResponse contains the response from method Addons.CreateOrUpdate. -type AddonsCreateOrUpdatePollerResponse struct { +// AddonsClientCreateOrUpdatePollerResponse contains the response from method AddonsClient.CreateOrUpdate. +type AddonsClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *AddonsCreateOrUpdatePoller + Poller *AddonsClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -27,9 +27,9 @@ type AddonsCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l AddonsCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (AddonsCreateOrUpdateResponse, error) { - respType := AddonsCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.AddonClassification) +func (l AddonsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (AddonsClientCreateOrUpdateResponse, error) { + respType := AddonsClientCreateOrUpdateResponse{} + resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.AddonsClientCreateOrUpdateResult) if err != nil { return respType, err } @@ -37,13 +37,13 @@ func (l AddonsCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, f return respType, nil } -// Resume rehydrates a AddonsCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *AddonsCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *AddonsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("AddonsClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a AddonsClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *AddonsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *AddonsClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("AddonsClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &AddonsCreateOrUpdatePoller{ + poller := &AddonsClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -55,20 +55,20 @@ func (l *AddonsCreateOrUpdatePollerResponse) Resume(ctx context.Context, client return nil } -// AddonsCreateOrUpdateResponse contains the response from method Addons.CreateOrUpdate. -type AddonsCreateOrUpdateResponse struct { - AddonsCreateOrUpdateResult +// AddonsClientCreateOrUpdateResponse contains the response from method AddonsClient.CreateOrUpdate. +type AddonsClientCreateOrUpdateResponse struct { + AddonsClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// AddonsCreateOrUpdateResult contains the result from method Addons.CreateOrUpdate. -type AddonsCreateOrUpdateResult struct { +// AddonsClientCreateOrUpdateResult contains the result from method AddonsClient.CreateOrUpdate. +type AddonsClientCreateOrUpdateResult struct { AddonClassification } -// UnmarshalJSON implements the json.Unmarshaller interface for type AddonsCreateOrUpdateResult. -func (a *AddonsCreateOrUpdateResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AddonsClientCreateOrUpdateResult. +func (a *AddonsClientCreateOrUpdateResult) UnmarshalJSON(data []byte) error { res, err := unmarshalAddonClassification(data) if err != nil { return err @@ -77,10 +77,10 @@ func (a *AddonsCreateOrUpdateResult) UnmarshalJSON(data []byte) error { return nil } -// AddonsDeletePollerResponse contains the response from method Addons.Delete. -type AddonsDeletePollerResponse struct { +// AddonsClientDeletePollerResponse contains the response from method AddonsClient.Delete. +type AddonsClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *AddonsDeletePoller + Poller *AddonsClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -89,8 +89,8 @@ type AddonsDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l AddonsDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (AddonsDeleteResponse, error) { - respType := AddonsDeleteResponse{} +func (l AddonsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (AddonsClientDeleteResponse, error) { + respType := AddonsClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -99,13 +99,13 @@ func (l AddonsDeletePollerResponse) PollUntilDone(ctx context.Context, freq time return respType, nil } -// Resume rehydrates a AddonsDeletePollerResponse from the provided client and resume token. -func (l *AddonsDeletePollerResponse) Resume(ctx context.Context, client *AddonsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("AddonsClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a AddonsClientDeletePollerResponse from the provided client and resume token. +func (l *AddonsClientDeletePollerResponse) Resume(ctx context.Context, client *AddonsClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("AddonsClient.Delete", token, client.pl) if err != nil { return err } - poller := &AddonsDeletePoller{ + poller := &AddonsClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -117,26 +117,26 @@ func (l *AddonsDeletePollerResponse) Resume(ctx context.Context, client *AddonsC return nil } -// AddonsDeleteResponse contains the response from method Addons.Delete. -type AddonsDeleteResponse struct { +// AddonsClientDeleteResponse contains the response from method AddonsClient.Delete. +type AddonsClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// AddonsGetResponse contains the response from method Addons.Get. -type AddonsGetResponse struct { - AddonsGetResult +// AddonsClientGetResponse contains the response from method AddonsClient.Get. +type AddonsClientGetResponse struct { + AddonsClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// AddonsGetResult contains the result from method Addons.Get. -type AddonsGetResult struct { +// AddonsClientGetResult contains the result from method AddonsClient.Get. +type AddonsClientGetResult struct { AddonClassification } -// UnmarshalJSON implements the json.Unmarshaller interface for type AddonsGetResult. -func (a *AddonsGetResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type AddonsClientGetResult. +func (a *AddonsClientGetResult) UnmarshalJSON(data []byte) error { res, err := unmarshalAddonClassification(data) if err != nil { return err @@ -145,58 +145,58 @@ func (a *AddonsGetResult) UnmarshalJSON(data []byte) error { return nil } -// AddonsListByRoleResponse contains the response from method Addons.ListByRole. -type AddonsListByRoleResponse struct { - AddonsListByRoleResult +// AddonsClientListByRoleResponse contains the response from method AddonsClient.ListByRole. +type AddonsClientListByRoleResponse struct { + AddonsClientListByRoleResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// AddonsListByRoleResult contains the result from method Addons.ListByRole. -type AddonsListByRoleResult struct { +// AddonsClientListByRoleResult contains the result from method AddonsClient.ListByRole. +type AddonsClientListByRoleResult struct { AddonList } -// AlertsGetResponse contains the response from method Alerts.Get. -type AlertsGetResponse struct { - AlertsGetResult +// AlertsClientGetResponse contains the response from method AlertsClient.Get. +type AlertsClientGetResponse struct { + AlertsClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// AlertsGetResult contains the result from method Alerts.Get. -type AlertsGetResult struct { +// AlertsClientGetResult contains the result from method AlertsClient.Get. +type AlertsClientGetResult struct { Alert } -// AlertsListByDataBoxEdgeDeviceResponse contains the response from method Alerts.ListByDataBoxEdgeDevice. -type AlertsListByDataBoxEdgeDeviceResponse struct { - AlertsListByDataBoxEdgeDeviceResult +// AlertsClientListByDataBoxEdgeDeviceResponse contains the response from method AlertsClient.ListByDataBoxEdgeDevice. +type AlertsClientListByDataBoxEdgeDeviceResponse struct { + AlertsClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// AlertsListByDataBoxEdgeDeviceResult contains the result from method Alerts.ListByDataBoxEdgeDevice. -type AlertsListByDataBoxEdgeDeviceResult struct { +// AlertsClientListByDataBoxEdgeDeviceResult contains the result from method AlertsClient.ListByDataBoxEdgeDevice. +type AlertsClientListByDataBoxEdgeDeviceResult struct { AlertList } -// AvailableSKUsListResponse contains the response from method AvailableSKUs.List. -type AvailableSKUsListResponse struct { - AvailableSKUsListResult +// AvailableSKUsClientListResponse contains the response from method AvailableSKUsClient.List. +type AvailableSKUsClientListResponse struct { + AvailableSKUsClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// AvailableSKUsListResult contains the result from method AvailableSKUs.List. -type AvailableSKUsListResult struct { - DataBoxEdgeSKUList +// AvailableSKUsClientListResult contains the result from method AvailableSKUsClient.List. +type AvailableSKUsClientListResult struct { + SKUList } -// BandwidthSchedulesCreateOrUpdatePollerResponse contains the response from method BandwidthSchedules.CreateOrUpdate. -type BandwidthSchedulesCreateOrUpdatePollerResponse struct { +// BandwidthSchedulesClientCreateOrUpdatePollerResponse contains the response from method BandwidthSchedulesClient.CreateOrUpdate. +type BandwidthSchedulesClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *BandwidthSchedulesCreateOrUpdatePoller + Poller *BandwidthSchedulesClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -205,8 +205,8 @@ type BandwidthSchedulesCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l BandwidthSchedulesCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (BandwidthSchedulesCreateOrUpdateResponse, error) { - respType := BandwidthSchedulesCreateOrUpdateResponse{} +func (l BandwidthSchedulesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (BandwidthSchedulesClientCreateOrUpdateResponse, error) { + respType := BandwidthSchedulesClientCreateOrUpdateResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.BandwidthSchedule) if err != nil { return respType, err @@ -215,13 +215,13 @@ func (l BandwidthSchedulesCreateOrUpdatePollerResponse) PollUntilDone(ctx contex return respType, nil } -// Resume rehydrates a BandwidthSchedulesCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *BandwidthSchedulesCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *BandwidthSchedulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("BandwidthSchedulesClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a BandwidthSchedulesClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *BandwidthSchedulesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *BandwidthSchedulesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("BandwidthSchedulesClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &BandwidthSchedulesCreateOrUpdatePoller{ + poller := &BandwidthSchedulesClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -233,22 +233,22 @@ func (l *BandwidthSchedulesCreateOrUpdatePollerResponse) Resume(ctx context.Cont return nil } -// BandwidthSchedulesCreateOrUpdateResponse contains the response from method BandwidthSchedules.CreateOrUpdate. -type BandwidthSchedulesCreateOrUpdateResponse struct { - BandwidthSchedulesCreateOrUpdateResult +// BandwidthSchedulesClientCreateOrUpdateResponse contains the response from method BandwidthSchedulesClient.CreateOrUpdate. +type BandwidthSchedulesClientCreateOrUpdateResponse struct { + BandwidthSchedulesClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// BandwidthSchedulesCreateOrUpdateResult contains the result from method BandwidthSchedules.CreateOrUpdate. -type BandwidthSchedulesCreateOrUpdateResult struct { +// BandwidthSchedulesClientCreateOrUpdateResult contains the result from method BandwidthSchedulesClient.CreateOrUpdate. +type BandwidthSchedulesClientCreateOrUpdateResult struct { BandwidthSchedule } -// BandwidthSchedulesDeletePollerResponse contains the response from method BandwidthSchedules.Delete. -type BandwidthSchedulesDeletePollerResponse struct { +// BandwidthSchedulesClientDeletePollerResponse contains the response from method BandwidthSchedulesClient.Delete. +type BandwidthSchedulesClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *BandwidthSchedulesDeletePoller + Poller *BandwidthSchedulesClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -257,8 +257,8 @@ type BandwidthSchedulesDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l BandwidthSchedulesDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (BandwidthSchedulesDeleteResponse, error) { - respType := BandwidthSchedulesDeleteResponse{} +func (l BandwidthSchedulesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (BandwidthSchedulesClientDeleteResponse, error) { + respType := BandwidthSchedulesClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -267,13 +267,13 @@ func (l BandwidthSchedulesDeletePollerResponse) PollUntilDone(ctx context.Contex return respType, nil } -// Resume rehydrates a BandwidthSchedulesDeletePollerResponse from the provided client and resume token. -func (l *BandwidthSchedulesDeletePollerResponse) Resume(ctx context.Context, client *BandwidthSchedulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("BandwidthSchedulesClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a BandwidthSchedulesClientDeletePollerResponse from the provided client and resume token. +func (l *BandwidthSchedulesClientDeletePollerResponse) Resume(ctx context.Context, client *BandwidthSchedulesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("BandwidthSchedulesClient.Delete", token, client.pl) if err != nil { return err } - poller := &BandwidthSchedulesDeletePoller{ + poller := &BandwidthSchedulesClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -285,40 +285,40 @@ func (l *BandwidthSchedulesDeletePollerResponse) Resume(ctx context.Context, cli return nil } -// BandwidthSchedulesDeleteResponse contains the response from method BandwidthSchedules.Delete. -type BandwidthSchedulesDeleteResponse struct { +// BandwidthSchedulesClientDeleteResponse contains the response from method BandwidthSchedulesClient.Delete. +type BandwidthSchedulesClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// BandwidthSchedulesGetResponse contains the response from method BandwidthSchedules.Get. -type BandwidthSchedulesGetResponse struct { - BandwidthSchedulesGetResult +// BandwidthSchedulesClientGetResponse contains the response from method BandwidthSchedulesClient.Get. +type BandwidthSchedulesClientGetResponse struct { + BandwidthSchedulesClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// BandwidthSchedulesGetResult contains the result from method BandwidthSchedules.Get. -type BandwidthSchedulesGetResult struct { +// BandwidthSchedulesClientGetResult contains the result from method BandwidthSchedulesClient.Get. +type BandwidthSchedulesClientGetResult struct { BandwidthSchedule } -// BandwidthSchedulesListByDataBoxEdgeDeviceResponse contains the response from method BandwidthSchedules.ListByDataBoxEdgeDevice. -type BandwidthSchedulesListByDataBoxEdgeDeviceResponse struct { - BandwidthSchedulesListByDataBoxEdgeDeviceResult +// BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse contains the response from method BandwidthSchedulesClient.ListByDataBoxEdgeDevice. +type BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse struct { + BandwidthSchedulesClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// BandwidthSchedulesListByDataBoxEdgeDeviceResult contains the result from method BandwidthSchedules.ListByDataBoxEdgeDevice. -type BandwidthSchedulesListByDataBoxEdgeDeviceResult struct { +// BandwidthSchedulesClientListByDataBoxEdgeDeviceResult contains the result from method BandwidthSchedulesClient.ListByDataBoxEdgeDevice. +type BandwidthSchedulesClientListByDataBoxEdgeDeviceResult struct { BandwidthSchedulesList } -// ContainersCreateOrUpdatePollerResponse contains the response from method Containers.CreateOrUpdate. -type ContainersCreateOrUpdatePollerResponse struct { +// ContainersClientCreateOrUpdatePollerResponse contains the response from method ContainersClient.CreateOrUpdate. +type ContainersClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *ContainersCreateOrUpdatePoller + Poller *ContainersClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -327,8 +327,8 @@ type ContainersCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ContainersCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ContainersCreateOrUpdateResponse, error) { - respType := ContainersCreateOrUpdateResponse{} +func (l ContainersClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ContainersClientCreateOrUpdateResponse, error) { + respType := ContainersClientCreateOrUpdateResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Container) if err != nil { return respType, err @@ -337,13 +337,13 @@ func (l ContainersCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Contex return respType, nil } -// Resume rehydrates a ContainersCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ContainersCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ContainersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ContainersClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a ContainersClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *ContainersClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ContainersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("ContainersClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &ContainersCreateOrUpdatePoller{ + poller := &ContainersClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -355,22 +355,22 @@ func (l *ContainersCreateOrUpdatePollerResponse) Resume(ctx context.Context, cli return nil } -// ContainersCreateOrUpdateResponse contains the response from method Containers.CreateOrUpdate. -type ContainersCreateOrUpdateResponse struct { - ContainersCreateOrUpdateResult +// ContainersClientCreateOrUpdateResponse contains the response from method ContainersClient.CreateOrUpdate. +type ContainersClientCreateOrUpdateResponse struct { + ContainersClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// ContainersCreateOrUpdateResult contains the result from method Containers.CreateOrUpdate. -type ContainersCreateOrUpdateResult struct { +// ContainersClientCreateOrUpdateResult contains the result from method ContainersClient.CreateOrUpdate. +type ContainersClientCreateOrUpdateResult struct { Container } -// ContainersDeletePollerResponse contains the response from method Containers.Delete. -type ContainersDeletePollerResponse struct { +// ContainersClientDeletePollerResponse contains the response from method ContainersClient.Delete. +type ContainersClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *ContainersDeletePoller + Poller *ContainersClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -379,8 +379,8 @@ type ContainersDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ContainersDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ContainersDeleteResponse, error) { - respType := ContainersDeleteResponse{} +func (l ContainersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ContainersClientDeleteResponse, error) { + respType := ContainersClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -389,13 +389,13 @@ func (l ContainersDeletePollerResponse) PollUntilDone(ctx context.Context, freq return respType, nil } -// Resume rehydrates a ContainersDeletePollerResponse from the provided client and resume token. -func (l *ContainersDeletePollerResponse) Resume(ctx context.Context, client *ContainersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ContainersClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a ContainersClientDeletePollerResponse from the provided client and resume token. +func (l *ContainersClientDeletePollerResponse) Resume(ctx context.Context, client *ContainersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("ContainersClient.Delete", token, client.pl) if err != nil { return err } - poller := &ContainersDeletePoller{ + poller := &ContainersClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -407,40 +407,40 @@ func (l *ContainersDeletePollerResponse) Resume(ctx context.Context, client *Con return nil } -// ContainersDeleteResponse contains the response from method Containers.Delete. -type ContainersDeleteResponse struct { +// ContainersClientDeleteResponse contains the response from method ContainersClient.Delete. +type ContainersClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// ContainersGetResponse contains the response from method Containers.Get. -type ContainersGetResponse struct { - ContainersGetResult +// ContainersClientGetResponse contains the response from method ContainersClient.Get. +type ContainersClientGetResponse struct { + ContainersClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// ContainersGetResult contains the result from method Containers.Get. -type ContainersGetResult struct { +// ContainersClientGetResult contains the result from method ContainersClient.Get. +type ContainersClientGetResult struct { Container } -// ContainersListByStorageAccountResponse contains the response from method Containers.ListByStorageAccount. -type ContainersListByStorageAccountResponse struct { - ContainersListByStorageAccountResult +// ContainersClientListByStorageAccountResponse contains the response from method ContainersClient.ListByStorageAccount. +type ContainersClientListByStorageAccountResponse struct { + ContainersClientListByStorageAccountResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// ContainersListByStorageAccountResult contains the result from method Containers.ListByStorageAccount. -type ContainersListByStorageAccountResult struct { +// ContainersClientListByStorageAccountResult contains the result from method ContainersClient.ListByStorageAccount. +type ContainersClientListByStorageAccountResult struct { ContainerList } -// ContainersRefreshPollerResponse contains the response from method Containers.Refresh. -type ContainersRefreshPollerResponse struct { +// ContainersClientRefreshPollerResponse contains the response from method ContainersClient.Refresh. +type ContainersClientRefreshPollerResponse struct { // Poller contains an initialized poller. - Poller *ContainersRefreshPoller + Poller *ContainersClientRefreshPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -449,8 +449,8 @@ type ContainersRefreshPollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ContainersRefreshPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ContainersRefreshResponse, error) { - respType := ContainersRefreshResponse{} +func (l ContainersClientRefreshPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ContainersClientRefreshResponse, error) { + respType := ContainersClientRefreshResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -459,13 +459,13 @@ func (l ContainersRefreshPollerResponse) PollUntilDone(ctx context.Context, freq return respType, nil } -// Resume rehydrates a ContainersRefreshPollerResponse from the provided client and resume token. -func (l *ContainersRefreshPollerResponse) Resume(ctx context.Context, client *ContainersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ContainersClient.Refresh", token, client.pl, client.refreshHandleError) +// Resume rehydrates a ContainersClientRefreshPollerResponse from the provided client and resume token. +func (l *ContainersClientRefreshPollerResponse) Resume(ctx context.Context, client *ContainersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("ContainersClient.Refresh", token, client.pl) if err != nil { return err } - poller := &ContainersRefreshPoller{ + poller := &ContainersClientRefreshPoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -477,28 +477,28 @@ func (l *ContainersRefreshPollerResponse) Resume(ctx context.Context, client *Co return nil } -// ContainersRefreshResponse contains the response from method Containers.Refresh. -type ContainersRefreshResponse struct { +// ContainersClientRefreshResponse contains the response from method ContainersClient.Refresh. +type ContainersClientRefreshResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesCreateOrUpdateResponse contains the response from method Devices.CreateOrUpdate. -type DevicesCreateOrUpdateResponse struct { - DevicesCreateOrUpdateResult +// DevicesClientCreateOrUpdateResponse contains the response from method DevicesClient.CreateOrUpdate. +type DevicesClientCreateOrUpdateResponse struct { + DevicesClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesCreateOrUpdateResult contains the result from method Devices.CreateOrUpdate. -type DevicesCreateOrUpdateResult struct { - DataBoxEdgeDevice +// DevicesClientCreateOrUpdateResult contains the result from method DevicesClient.CreateOrUpdate. +type DevicesClientCreateOrUpdateResult struct { + Device } -// DevicesCreateOrUpdateSecuritySettingsPollerResponse contains the response from method Devices.CreateOrUpdateSecuritySettings. -type DevicesCreateOrUpdateSecuritySettingsPollerResponse struct { +// DevicesClientCreateOrUpdateSecuritySettingsPollerResponse contains the response from method DevicesClient.CreateOrUpdateSecuritySettings. +type DevicesClientCreateOrUpdateSecuritySettingsPollerResponse struct { // Poller contains an initialized poller. - Poller *DevicesCreateOrUpdateSecuritySettingsPoller + Poller *DevicesClientCreateOrUpdateSecuritySettingsPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -507,8 +507,8 @@ type DevicesCreateOrUpdateSecuritySettingsPollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DevicesCreateOrUpdateSecuritySettingsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesCreateOrUpdateSecuritySettingsResponse, error) { - respType := DevicesCreateOrUpdateSecuritySettingsResponse{} +func (l DevicesClientCreateOrUpdateSecuritySettingsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesClientCreateOrUpdateSecuritySettingsResponse, error) { + respType := DevicesClientCreateOrUpdateSecuritySettingsResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -517,13 +517,13 @@ func (l DevicesCreateOrUpdateSecuritySettingsPollerResponse) PollUntilDone(ctx c return respType, nil } -// Resume rehydrates a DevicesCreateOrUpdateSecuritySettingsPollerResponse from the provided client and resume token. -func (l *DevicesCreateOrUpdateSecuritySettingsPollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.CreateOrUpdateSecuritySettings", token, client.pl, client.createOrUpdateSecuritySettingsHandleError) +// Resume rehydrates a DevicesClientCreateOrUpdateSecuritySettingsPollerResponse from the provided client and resume token. +func (l *DevicesClientCreateOrUpdateSecuritySettingsPollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.CreateOrUpdateSecuritySettings", token, client.pl) if err != nil { return err } - poller := &DevicesCreateOrUpdateSecuritySettingsPoller{ + poller := &DevicesClientCreateOrUpdateSecuritySettingsPoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -535,16 +535,16 @@ func (l *DevicesCreateOrUpdateSecuritySettingsPollerResponse) Resume(ctx context return nil } -// DevicesCreateOrUpdateSecuritySettingsResponse contains the response from method Devices.CreateOrUpdateSecuritySettings. -type DevicesCreateOrUpdateSecuritySettingsResponse struct { +// DevicesClientCreateOrUpdateSecuritySettingsResponse contains the response from method DevicesClient.CreateOrUpdateSecuritySettings. +type DevicesClientCreateOrUpdateSecuritySettingsResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesDeletePollerResponse contains the response from method Devices.Delete. -type DevicesDeletePollerResponse struct { +// DevicesClientDeletePollerResponse contains the response from method DevicesClient.Delete. +type DevicesClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *DevicesDeletePoller + Poller *DevicesClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -553,8 +553,8 @@ type DevicesDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DevicesDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesDeleteResponse, error) { - respType := DevicesDeleteResponse{} +func (l DevicesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesClientDeleteResponse, error) { + respType := DevicesClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -563,13 +563,13 @@ func (l DevicesDeletePollerResponse) PollUntilDone(ctx context.Context, freq tim return respType, nil } -// Resume rehydrates a DevicesDeletePollerResponse from the provided client and resume token. -func (l *DevicesDeletePollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a DevicesClientDeletePollerResponse from the provided client and resume token. +func (l *DevicesClientDeletePollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.Delete", token, client.pl) if err != nil { return err } - poller := &DevicesDeletePoller{ + poller := &DevicesClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -581,16 +581,16 @@ func (l *DevicesDeletePollerResponse) Resume(ctx context.Context, client *Device return nil } -// DevicesDeleteResponse contains the response from method Devices.Delete. -type DevicesDeleteResponse struct { +// DevicesClientDeleteResponse contains the response from method DevicesClient.Delete. +type DevicesClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesDownloadUpdatesPollerResponse contains the response from method Devices.DownloadUpdates. -type DevicesDownloadUpdatesPollerResponse struct { +// DevicesClientDownloadUpdatesPollerResponse contains the response from method DevicesClient.DownloadUpdates. +type DevicesClientDownloadUpdatesPollerResponse struct { // Poller contains an initialized poller. - Poller *DevicesDownloadUpdatesPoller + Poller *DevicesClientDownloadUpdatesPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -599,8 +599,8 @@ type DevicesDownloadUpdatesPollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DevicesDownloadUpdatesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesDownloadUpdatesResponse, error) { - respType := DevicesDownloadUpdatesResponse{} +func (l DevicesClientDownloadUpdatesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesClientDownloadUpdatesResponse, error) { + respType := DevicesClientDownloadUpdatesResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -609,13 +609,13 @@ func (l DevicesDownloadUpdatesPollerResponse) PollUntilDone(ctx context.Context, return respType, nil } -// Resume rehydrates a DevicesDownloadUpdatesPollerResponse from the provided client and resume token. -func (l *DevicesDownloadUpdatesPollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.DownloadUpdates", token, client.pl, client.downloadUpdatesHandleError) +// Resume rehydrates a DevicesClientDownloadUpdatesPollerResponse from the provided client and resume token. +func (l *DevicesClientDownloadUpdatesPollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.DownloadUpdates", token, client.pl) if err != nil { return err } - poller := &DevicesDownloadUpdatesPoller{ + poller := &DevicesClientDownloadUpdatesPoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -627,76 +627,76 @@ func (l *DevicesDownloadUpdatesPollerResponse) Resume(ctx context.Context, clien return nil } -// DevicesDownloadUpdatesResponse contains the response from method Devices.DownloadUpdates. -type DevicesDownloadUpdatesResponse struct { +// DevicesClientDownloadUpdatesResponse contains the response from method DevicesClient.DownloadUpdates. +type DevicesClientDownloadUpdatesResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesGenerateCertificateResponse contains the response from method Devices.GenerateCertificate. -type DevicesGenerateCertificateResponse struct { - DevicesGenerateCertificateResult +// DevicesClientGenerateCertificateResponse contains the response from method DevicesClient.GenerateCertificate. +type DevicesClientGenerateCertificateResponse struct { + DevicesClientGenerateCertificateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesGenerateCertificateResult contains the result from method Devices.GenerateCertificate. -type DevicesGenerateCertificateResult struct { +// DevicesClientGenerateCertificateResult contains the result from method DevicesClient.GenerateCertificate. +type DevicesClientGenerateCertificateResult struct { GenerateCertResponse } -// DevicesGetExtendedInformationResponse contains the response from method Devices.GetExtendedInformation. -type DevicesGetExtendedInformationResponse struct { - DevicesGetExtendedInformationResult +// DevicesClientGetExtendedInformationResponse contains the response from method DevicesClient.GetExtendedInformation. +type DevicesClientGetExtendedInformationResponse struct { + DevicesClientGetExtendedInformationResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesGetExtendedInformationResult contains the result from method Devices.GetExtendedInformation. -type DevicesGetExtendedInformationResult struct { - DataBoxEdgeDeviceExtendedInfo +// DevicesClientGetExtendedInformationResult contains the result from method DevicesClient.GetExtendedInformation. +type DevicesClientGetExtendedInformationResult struct { + DeviceExtendedInfo } -// DevicesGetNetworkSettingsResponse contains the response from method Devices.GetNetworkSettings. -type DevicesGetNetworkSettingsResponse struct { - DevicesGetNetworkSettingsResult +// DevicesClientGetNetworkSettingsResponse contains the response from method DevicesClient.GetNetworkSettings. +type DevicesClientGetNetworkSettingsResponse struct { + DevicesClientGetNetworkSettingsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesGetNetworkSettingsResult contains the result from method Devices.GetNetworkSettings. -type DevicesGetNetworkSettingsResult struct { +// DevicesClientGetNetworkSettingsResult contains the result from method DevicesClient.GetNetworkSettings. +type DevicesClientGetNetworkSettingsResult struct { NetworkSettings } -// DevicesGetResponse contains the response from method Devices.Get. -type DevicesGetResponse struct { - DevicesGetResult +// DevicesClientGetResponse contains the response from method DevicesClient.Get. +type DevicesClientGetResponse struct { + DevicesClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesGetResult contains the result from method Devices.Get. -type DevicesGetResult struct { - DataBoxEdgeDevice +// DevicesClientGetResult contains the result from method DevicesClient.Get. +type DevicesClientGetResult struct { + Device } -// DevicesGetUpdateSummaryResponse contains the response from method Devices.GetUpdateSummary. -type DevicesGetUpdateSummaryResponse struct { - DevicesGetUpdateSummaryResult +// DevicesClientGetUpdateSummaryResponse contains the response from method DevicesClient.GetUpdateSummary. +type DevicesClientGetUpdateSummaryResponse struct { + DevicesClientGetUpdateSummaryResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesGetUpdateSummaryResult contains the result from method Devices.GetUpdateSummary. -type DevicesGetUpdateSummaryResult struct { +// DevicesClientGetUpdateSummaryResult contains the result from method DevicesClient.GetUpdateSummary. +type DevicesClientGetUpdateSummaryResult struct { UpdateSummary } -// DevicesInstallUpdatesPollerResponse contains the response from method Devices.InstallUpdates. -type DevicesInstallUpdatesPollerResponse struct { +// DevicesClientInstallUpdatesPollerResponse contains the response from method DevicesClient.InstallUpdates. +type DevicesClientInstallUpdatesPollerResponse struct { // Poller contains an initialized poller. - Poller *DevicesInstallUpdatesPoller + Poller *DevicesClientInstallUpdatesPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -705,8 +705,8 @@ type DevicesInstallUpdatesPollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DevicesInstallUpdatesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesInstallUpdatesResponse, error) { - respType := DevicesInstallUpdatesResponse{} +func (l DevicesClientInstallUpdatesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesClientInstallUpdatesResponse, error) { + respType := DevicesClientInstallUpdatesResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -715,13 +715,13 @@ func (l DevicesInstallUpdatesPollerResponse) PollUntilDone(ctx context.Context, return respType, nil } -// Resume rehydrates a DevicesInstallUpdatesPollerResponse from the provided client and resume token. -func (l *DevicesInstallUpdatesPollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.InstallUpdates", token, client.pl, client.installUpdatesHandleError) +// Resume rehydrates a DevicesClientInstallUpdatesPollerResponse from the provided client and resume token. +func (l *DevicesClientInstallUpdatesPollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.InstallUpdates", token, client.pl) if err != nil { return err } - poller := &DevicesInstallUpdatesPoller{ + poller := &DevicesClientInstallUpdatesPoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -733,40 +733,40 @@ func (l *DevicesInstallUpdatesPollerResponse) Resume(ctx context.Context, client return nil } -// DevicesInstallUpdatesResponse contains the response from method Devices.InstallUpdates. -type DevicesInstallUpdatesResponse struct { +// DevicesClientInstallUpdatesResponse contains the response from method DevicesClient.InstallUpdates. +type DevicesClientInstallUpdatesResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesListByResourceGroupResponse contains the response from method Devices.ListByResourceGroup. -type DevicesListByResourceGroupResponse struct { - DevicesListByResourceGroupResult +// DevicesClientListByResourceGroupResponse contains the response from method DevicesClient.ListByResourceGroup. +type DevicesClientListByResourceGroupResponse struct { + DevicesClientListByResourceGroupResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesListByResourceGroupResult contains the result from method Devices.ListByResourceGroup. -type DevicesListByResourceGroupResult struct { - DataBoxEdgeDeviceList +// DevicesClientListByResourceGroupResult contains the result from method DevicesClient.ListByResourceGroup. +type DevicesClientListByResourceGroupResult struct { + DeviceList } -// DevicesListBySubscriptionResponse contains the response from method Devices.ListBySubscription. -type DevicesListBySubscriptionResponse struct { - DevicesListBySubscriptionResult +// DevicesClientListBySubscriptionResponse contains the response from method DevicesClient.ListBySubscription. +type DevicesClientListBySubscriptionResponse struct { + DevicesClientListBySubscriptionResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesListBySubscriptionResult contains the result from method Devices.ListBySubscription. -type DevicesListBySubscriptionResult struct { - DataBoxEdgeDeviceList +// DevicesClientListBySubscriptionResult contains the result from method DevicesClient.ListBySubscription. +type DevicesClientListBySubscriptionResult struct { + DeviceList } -// DevicesScanForUpdatesPollerResponse contains the response from method Devices.ScanForUpdates. -type DevicesScanForUpdatesPollerResponse struct { +// DevicesClientScanForUpdatesPollerResponse contains the response from method DevicesClient.ScanForUpdates. +type DevicesClientScanForUpdatesPollerResponse struct { // Poller contains an initialized poller. - Poller *DevicesScanForUpdatesPoller + Poller *DevicesClientScanForUpdatesPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -775,8 +775,8 @@ type DevicesScanForUpdatesPollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DevicesScanForUpdatesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesScanForUpdatesResponse, error) { - respType := DevicesScanForUpdatesResponse{} +func (l DevicesClientScanForUpdatesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DevicesClientScanForUpdatesResponse, error) { + respType := DevicesClientScanForUpdatesResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -785,13 +785,13 @@ func (l DevicesScanForUpdatesPollerResponse) PollUntilDone(ctx context.Context, return respType, nil } -// Resume rehydrates a DevicesScanForUpdatesPollerResponse from the provided client and resume token. -func (l *DevicesScanForUpdatesPollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.ScanForUpdates", token, client.pl, client.scanForUpdatesHandleError) +// Resume rehydrates a DevicesClientScanForUpdatesPollerResponse from the provided client and resume token. +func (l *DevicesClientScanForUpdatesPollerResponse) Resume(ctx context.Context, client *DevicesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("DevicesClient.ScanForUpdates", token, client.pl) if err != nil { return err } - poller := &DevicesScanForUpdatesPoller{ + poller := &DevicesClientScanForUpdatesPoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -803,76 +803,77 @@ func (l *DevicesScanForUpdatesPollerResponse) Resume(ctx context.Context, client return nil } -// DevicesScanForUpdatesResponse contains the response from method Devices.ScanForUpdates. -type DevicesScanForUpdatesResponse struct { +// DevicesClientScanForUpdatesResponse contains the response from method DevicesClient.ScanForUpdates. +type DevicesClientScanForUpdatesResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesUpdateExtendedInformationResponse contains the response from method Devices.UpdateExtendedInformation. -type DevicesUpdateExtendedInformationResponse struct { - DevicesUpdateExtendedInformationResult +// DevicesClientUpdateExtendedInformationResponse contains the response from method DevicesClient.UpdateExtendedInformation. +type DevicesClientUpdateExtendedInformationResponse struct { + DevicesClientUpdateExtendedInformationResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesUpdateExtendedInformationResult contains the result from method Devices.UpdateExtendedInformation. -type DevicesUpdateExtendedInformationResult struct { - DataBoxEdgeDeviceExtendedInfo +// DevicesClientUpdateExtendedInformationResult contains the result from method DevicesClient.UpdateExtendedInformation. +type DevicesClientUpdateExtendedInformationResult struct { + DeviceExtendedInfo } -// DevicesUpdateResponse contains the response from method Devices.Update. -type DevicesUpdateResponse struct { - DevicesUpdateResult +// DevicesClientUpdateResponse contains the response from method DevicesClient.Update. +type DevicesClientUpdateResponse struct { + DevicesClientUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesUpdateResult contains the result from method Devices.Update. -type DevicesUpdateResult struct { - DataBoxEdgeDevice +// DevicesClientUpdateResult contains the result from method DevicesClient.Update. +type DevicesClientUpdateResult struct { + Device } -// DevicesUploadCertificateResponse contains the response from method Devices.UploadCertificate. -type DevicesUploadCertificateResponse struct { - DevicesUploadCertificateResult +// DevicesClientUploadCertificateResponse contains the response from method DevicesClient.UploadCertificate. +type DevicesClientUploadCertificateResponse struct { + DevicesClientUploadCertificateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DevicesUploadCertificateResult contains the result from method Devices.UploadCertificate. -type DevicesUploadCertificateResult struct { +// DevicesClientUploadCertificateResult contains the result from method DevicesClient.UploadCertificate. +type DevicesClientUploadCertificateResult struct { UploadCertificateResponse } -// DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse contains the response from method DiagnosticSettings.GetDiagnosticProactiveLogCollectionSettings. -type DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse struct { - DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResult +// DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse contains the response from method DiagnosticSettingsClient.GetDiagnosticProactiveLogCollectionSettings. +type DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResponse struct { + DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResult contains the result from method DiagnosticSettings.GetDiagnosticProactiveLogCollectionSettings. -type DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResult struct { +// DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResult contains the result from method DiagnosticSettingsClient.GetDiagnosticProactiveLogCollectionSettings. +type DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsResult struct { DiagnosticProactiveLogCollectionSettings } -// DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse contains the response from method DiagnosticSettings.GetDiagnosticRemoteSupportSettings. -type DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse struct { - DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResult +// DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse contains the response from method DiagnosticSettingsClient.GetDiagnosticRemoteSupportSettings. +type DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResponse struct { + DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResult contains the result from method DiagnosticSettings.GetDiagnosticRemoteSupportSettings. -type DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResult struct { +// DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResult contains the result from method DiagnosticSettingsClient.GetDiagnosticRemoteSupportSettings. +type DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsResult struct { DiagnosticRemoteSupportSettings } -// DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse contains the response from method DiagnosticSettings.UpdateDiagnosticProactiveLogCollectionSettings. -type DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse struct { +// DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse contains the response from method +// DiagnosticSettingsClient.UpdateDiagnosticProactiveLogCollectionSettings. +type DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse struct { // Poller contains an initialized poller. - Poller *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller + Poller *DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -881,8 +882,8 @@ type DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerRespo // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse, error) { - respType := DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse{} +func (l DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse, error) { + respType := DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.DiagnosticProactiveLogCollectionSettings) if err != nil { return respType, err @@ -891,13 +892,14 @@ func (l DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerRe return respType, nil } -// Resume rehydrates a DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse from the provided client and resume token. -func (l *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse) Resume(ctx context.Context, client *DiagnosticSettingsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DiagnosticSettingsClient.UpdateDiagnosticProactiveLogCollectionSettings", token, client.pl, client.updateDiagnosticProactiveLogCollectionSettingsHandleError) +// Resume rehydrates a DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse from the provided +// client and resume token. +func (l *DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPollerResponse) Resume(ctx context.Context, client *DiagnosticSettingsClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("DiagnosticSettingsClient.UpdateDiagnosticProactiveLogCollectionSettings", token, client.pl) if err != nil { return err } - poller := &DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPoller{ + poller := &DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsPoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -909,22 +911,22 @@ func (l *DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsPollerR return nil } -// DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse contains the response from method DiagnosticSettings.UpdateDiagnosticProactiveLogCollectionSettings. -type DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse struct { - DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResult +// DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse contains the response from method DiagnosticSettingsClient.UpdateDiagnosticProactiveLogCollectionSettings. +type DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse struct { + DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResult contains the result from method DiagnosticSettings.UpdateDiagnosticProactiveLogCollectionSettings. -type DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResult struct { +// DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResult contains the result from method DiagnosticSettingsClient.UpdateDiagnosticProactiveLogCollectionSettings. +type DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResult struct { DiagnosticProactiveLogCollectionSettings } -// DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse contains the response from method DiagnosticSettings.UpdateDiagnosticRemoteSupportSettings. -type DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse struct { +// DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse contains the response from method DiagnosticSettingsClient.UpdateDiagnosticRemoteSupportSettings. +type DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse struct { // Poller contains an initialized poller. - Poller *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller + Poller *DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -933,8 +935,8 @@ type DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse struc // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse, error) { - respType := DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse{} +func (l DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse, error) { + respType := DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.DiagnosticRemoteSupportSettings) if err != nil { return respType, err @@ -943,13 +945,14 @@ func (l DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse) P return respType, nil } -// Resume rehydrates a DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse from the provided client and resume token. -func (l *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse) Resume(ctx context.Context, client *DiagnosticSettingsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DiagnosticSettingsClient.UpdateDiagnosticRemoteSupportSettings", token, client.pl, client.updateDiagnosticRemoteSupportSettingsHandleError) +// Resume rehydrates a DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse from the provided client +// and resume token. +func (l *DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPollerResponse) Resume(ctx context.Context, client *DiagnosticSettingsClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("DiagnosticSettingsClient.UpdateDiagnosticRemoteSupportSettings", token, client.pl) if err != nil { return err } - poller := &DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPoller{ + poller := &DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsPoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -961,34 +964,34 @@ func (l *DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsPollerResponse) return nil } -// DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse contains the response from method DiagnosticSettings.UpdateDiagnosticRemoteSupportSettings. -type DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse struct { - DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResult +// DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse contains the response from method DiagnosticSettingsClient.UpdateDiagnosticRemoteSupportSettings. +type DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse struct { + DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResult contains the result from method DiagnosticSettings.UpdateDiagnosticRemoteSupportSettings. -type DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResult struct { +// DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResult contains the result from method DiagnosticSettingsClient.UpdateDiagnosticRemoteSupportSettings. +type DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResult struct { DiagnosticRemoteSupportSettings } -// JobsGetResponse contains the response from method Jobs.Get. -type JobsGetResponse struct { - JobsGetResult +// JobsClientGetResponse contains the response from method JobsClient.Get. +type JobsClientGetResponse struct { + JobsClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// JobsGetResult contains the result from method Jobs.Get. -type JobsGetResult struct { +// JobsClientGetResult contains the result from method JobsClient.Get. +type JobsClientGetResult struct { Job } -// MonitoringConfigCreateOrUpdatePollerResponse contains the response from method MonitoringConfig.CreateOrUpdate. -type MonitoringConfigCreateOrUpdatePollerResponse struct { +// MonitoringConfigClientCreateOrUpdatePollerResponse contains the response from method MonitoringConfigClient.CreateOrUpdate. +type MonitoringConfigClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *MonitoringConfigCreateOrUpdatePoller + Poller *MonitoringConfigClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -997,8 +1000,8 @@ type MonitoringConfigCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l MonitoringConfigCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (MonitoringConfigCreateOrUpdateResponse, error) { - respType := MonitoringConfigCreateOrUpdateResponse{} +func (l MonitoringConfigClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (MonitoringConfigClientCreateOrUpdateResponse, error) { + respType := MonitoringConfigClientCreateOrUpdateResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.MonitoringMetricConfiguration) if err != nil { return respType, err @@ -1007,13 +1010,13 @@ func (l MonitoringConfigCreateOrUpdatePollerResponse) PollUntilDone(ctx context. return respType, nil } -// Resume rehydrates a MonitoringConfigCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *MonitoringConfigCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *MonitoringConfigClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("MonitoringConfigClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a MonitoringConfigClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *MonitoringConfigClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *MonitoringConfigClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("MonitoringConfigClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &MonitoringConfigCreateOrUpdatePoller{ + poller := &MonitoringConfigClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1025,22 +1028,22 @@ func (l *MonitoringConfigCreateOrUpdatePollerResponse) Resume(ctx context.Contex return nil } -// MonitoringConfigCreateOrUpdateResponse contains the response from method MonitoringConfig.CreateOrUpdate. -type MonitoringConfigCreateOrUpdateResponse struct { - MonitoringConfigCreateOrUpdateResult +// MonitoringConfigClientCreateOrUpdateResponse contains the response from method MonitoringConfigClient.CreateOrUpdate. +type MonitoringConfigClientCreateOrUpdateResponse struct { + MonitoringConfigClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// MonitoringConfigCreateOrUpdateResult contains the result from method MonitoringConfig.CreateOrUpdate. -type MonitoringConfigCreateOrUpdateResult struct { +// MonitoringConfigClientCreateOrUpdateResult contains the result from method MonitoringConfigClient.CreateOrUpdate. +type MonitoringConfigClientCreateOrUpdateResult struct { MonitoringMetricConfiguration } -// MonitoringConfigDeletePollerResponse contains the response from method MonitoringConfig.Delete. -type MonitoringConfigDeletePollerResponse struct { +// MonitoringConfigClientDeletePollerResponse contains the response from method MonitoringConfigClient.Delete. +type MonitoringConfigClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *MonitoringConfigDeletePoller + Poller *MonitoringConfigClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1049,8 +1052,8 @@ type MonitoringConfigDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l MonitoringConfigDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (MonitoringConfigDeleteResponse, error) { - respType := MonitoringConfigDeleteResponse{} +func (l MonitoringConfigClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (MonitoringConfigClientDeleteResponse, error) { + respType := MonitoringConfigClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1059,13 +1062,13 @@ func (l MonitoringConfigDeletePollerResponse) PollUntilDone(ctx context.Context, return respType, nil } -// Resume rehydrates a MonitoringConfigDeletePollerResponse from the provided client and resume token. -func (l *MonitoringConfigDeletePollerResponse) Resume(ctx context.Context, client *MonitoringConfigClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("MonitoringConfigClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a MonitoringConfigClientDeletePollerResponse from the provided client and resume token. +func (l *MonitoringConfigClientDeletePollerResponse) Resume(ctx context.Context, client *MonitoringConfigClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("MonitoringConfigClient.Delete", token, client.pl) if err != nil { return err } - poller := &MonitoringConfigDeletePoller{ + poller := &MonitoringConfigClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1077,76 +1080,76 @@ func (l *MonitoringConfigDeletePollerResponse) Resume(ctx context.Context, clien return nil } -// MonitoringConfigDeleteResponse contains the response from method MonitoringConfig.Delete. -type MonitoringConfigDeleteResponse struct { +// MonitoringConfigClientDeleteResponse contains the response from method MonitoringConfigClient.Delete. +type MonitoringConfigClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// MonitoringConfigGetResponse contains the response from method MonitoringConfig.Get. -type MonitoringConfigGetResponse struct { - MonitoringConfigGetResult +// MonitoringConfigClientGetResponse contains the response from method MonitoringConfigClient.Get. +type MonitoringConfigClientGetResponse struct { + MonitoringConfigClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// MonitoringConfigGetResult contains the result from method MonitoringConfig.Get. -type MonitoringConfigGetResult struct { +// MonitoringConfigClientGetResult contains the result from method MonitoringConfigClient.Get. +type MonitoringConfigClientGetResult struct { MonitoringMetricConfiguration } -// MonitoringConfigListResponse contains the response from method MonitoringConfig.List. -type MonitoringConfigListResponse struct { - MonitoringConfigListResult +// MonitoringConfigClientListResponse contains the response from method MonitoringConfigClient.List. +type MonitoringConfigClientListResponse struct { + MonitoringConfigClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// MonitoringConfigListResult contains the result from method MonitoringConfig.List. -type MonitoringConfigListResult struct { +// MonitoringConfigClientListResult contains the result from method MonitoringConfigClient.List. +type MonitoringConfigClientListResult struct { MonitoringMetricConfigurationList } -// NodesListByDataBoxEdgeDeviceResponse contains the response from method Nodes.ListByDataBoxEdgeDevice. -type NodesListByDataBoxEdgeDeviceResponse struct { - NodesListByDataBoxEdgeDeviceResult +// NodesClientListByDataBoxEdgeDeviceResponse contains the response from method NodesClient.ListByDataBoxEdgeDevice. +type NodesClientListByDataBoxEdgeDeviceResponse struct { + NodesClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// NodesListByDataBoxEdgeDeviceResult contains the result from method Nodes.ListByDataBoxEdgeDevice. -type NodesListByDataBoxEdgeDeviceResult struct { +// NodesClientListByDataBoxEdgeDeviceResult contains the result from method NodesClient.ListByDataBoxEdgeDevice. +type NodesClientListByDataBoxEdgeDeviceResult struct { NodeList } -// OperationsListResponse contains the response from method Operations.List. -type OperationsListResponse struct { - OperationsListResult +// OperationsClientListResponse contains the response from method OperationsClient.List. +type OperationsClientListResponse struct { + OperationsClientListResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// OperationsListResult contains the result from method Operations.List. -type OperationsListResult struct { +// OperationsClientListResult contains the result from method OperationsClient.List. +type OperationsClientListResult struct { OperationsList } -// OperationsStatusGetResponse contains the response from method OperationsStatus.Get. -type OperationsStatusGetResponse struct { - OperationsStatusGetResult +// OperationsStatusClientGetResponse contains the response from method OperationsStatusClient.Get. +type OperationsStatusClientGetResponse struct { + OperationsStatusClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// OperationsStatusGetResult contains the result from method OperationsStatus.Get. -type OperationsStatusGetResult struct { +// OperationsStatusClientGetResult contains the result from method OperationsStatusClient.Get. +type OperationsStatusClientGetResult struct { Job } -// OrdersCreateOrUpdatePollerResponse contains the response from method Orders.CreateOrUpdate. -type OrdersCreateOrUpdatePollerResponse struct { +// OrdersClientCreateOrUpdatePollerResponse contains the response from method OrdersClient.CreateOrUpdate. +type OrdersClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *OrdersCreateOrUpdatePoller + Poller *OrdersClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1155,8 +1158,8 @@ type OrdersCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l OrdersCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (OrdersCreateOrUpdateResponse, error) { - respType := OrdersCreateOrUpdateResponse{} +func (l OrdersClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (OrdersClientCreateOrUpdateResponse, error) { + respType := OrdersClientCreateOrUpdateResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Order) if err != nil { return respType, err @@ -1165,13 +1168,13 @@ func (l OrdersCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, f return respType, nil } -// Resume rehydrates a OrdersCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *OrdersCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *OrdersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("OrdersClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a OrdersClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *OrdersClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *OrdersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("OrdersClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &OrdersCreateOrUpdatePoller{ + poller := &OrdersClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1183,22 +1186,22 @@ func (l *OrdersCreateOrUpdatePollerResponse) Resume(ctx context.Context, client return nil } -// OrdersCreateOrUpdateResponse contains the response from method Orders.CreateOrUpdate. -type OrdersCreateOrUpdateResponse struct { - OrdersCreateOrUpdateResult +// OrdersClientCreateOrUpdateResponse contains the response from method OrdersClient.CreateOrUpdate. +type OrdersClientCreateOrUpdateResponse struct { + OrdersClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// OrdersCreateOrUpdateResult contains the result from method Orders.CreateOrUpdate. -type OrdersCreateOrUpdateResult struct { +// OrdersClientCreateOrUpdateResult contains the result from method OrdersClient.CreateOrUpdate. +type OrdersClientCreateOrUpdateResult struct { Order } -// OrdersDeletePollerResponse contains the response from method Orders.Delete. -type OrdersDeletePollerResponse struct { +// OrdersClientDeletePollerResponse contains the response from method OrdersClient.Delete. +type OrdersClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *OrdersDeletePoller + Poller *OrdersClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1207,8 +1210,8 @@ type OrdersDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l OrdersDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (OrdersDeleteResponse, error) { - respType := OrdersDeleteResponse{} +func (l OrdersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (OrdersClientDeleteResponse, error) { + respType := OrdersClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1217,13 +1220,13 @@ func (l OrdersDeletePollerResponse) PollUntilDone(ctx context.Context, freq time return respType, nil } -// Resume rehydrates a OrdersDeletePollerResponse from the provided client and resume token. -func (l *OrdersDeletePollerResponse) Resume(ctx context.Context, client *OrdersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("OrdersClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a OrdersClientDeletePollerResponse from the provided client and resume token. +func (l *OrdersClientDeletePollerResponse) Resume(ctx context.Context, client *OrdersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("OrdersClient.Delete", token, client.pl) if err != nil { return err } - poller := &OrdersDeletePoller{ + poller := &OrdersClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1235,52 +1238,52 @@ func (l *OrdersDeletePollerResponse) Resume(ctx context.Context, client *OrdersC return nil } -// OrdersDeleteResponse contains the response from method Orders.Delete. -type OrdersDeleteResponse struct { +// OrdersClientDeleteResponse contains the response from method OrdersClient.Delete. +type OrdersClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// OrdersGetResponse contains the response from method Orders.Get. -type OrdersGetResponse struct { - OrdersGetResult +// OrdersClientGetResponse contains the response from method OrdersClient.Get. +type OrdersClientGetResponse struct { + OrdersClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// OrdersGetResult contains the result from method Orders.Get. -type OrdersGetResult struct { +// OrdersClientGetResult contains the result from method OrdersClient.Get. +type OrdersClientGetResult struct { Order } -// OrdersListByDataBoxEdgeDeviceResponse contains the response from method Orders.ListByDataBoxEdgeDevice. -type OrdersListByDataBoxEdgeDeviceResponse struct { - OrdersListByDataBoxEdgeDeviceResult +// OrdersClientListByDataBoxEdgeDeviceResponse contains the response from method OrdersClient.ListByDataBoxEdgeDevice. +type OrdersClientListByDataBoxEdgeDeviceResponse struct { + OrdersClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// OrdersListByDataBoxEdgeDeviceResult contains the result from method Orders.ListByDataBoxEdgeDevice. -type OrdersListByDataBoxEdgeDeviceResult struct { +// OrdersClientListByDataBoxEdgeDeviceResult contains the result from method OrdersClient.ListByDataBoxEdgeDevice. +type OrdersClientListByDataBoxEdgeDeviceResult struct { OrderList } -// OrdersListDCAccessCodeResponse contains the response from method Orders.ListDCAccessCode. -type OrdersListDCAccessCodeResponse struct { - OrdersListDCAccessCodeResult +// OrdersClientListDCAccessCodeResponse contains the response from method OrdersClient.ListDCAccessCode. +type OrdersClientListDCAccessCodeResponse struct { + OrdersClientListDCAccessCodeResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// OrdersListDCAccessCodeResult contains the result from method Orders.ListDCAccessCode. -type OrdersListDCAccessCodeResult struct { +// OrdersClientListDCAccessCodeResult contains the result from method OrdersClient.ListDCAccessCode. +type OrdersClientListDCAccessCodeResult struct { DCAccessCode } -// RolesCreateOrUpdatePollerResponse contains the response from method Roles.CreateOrUpdate. -type RolesCreateOrUpdatePollerResponse struct { +// RolesClientCreateOrUpdatePollerResponse contains the response from method RolesClient.CreateOrUpdate. +type RolesClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *RolesCreateOrUpdatePoller + Poller *RolesClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1289,9 +1292,9 @@ type RolesCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RolesCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RolesCreateOrUpdateResponse, error) { - respType := RolesCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.RoleClassification) +func (l RolesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RolesClientCreateOrUpdateResponse, error) { + respType := RolesClientCreateOrUpdateResponse{} + resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.RolesClientCreateOrUpdateResult) if err != nil { return respType, err } @@ -1299,13 +1302,13 @@ func (l RolesCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, fr return respType, nil } -// Resume rehydrates a RolesCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *RolesCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *RolesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RolesClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a RolesClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *RolesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *RolesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("RolesClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &RolesCreateOrUpdatePoller{ + poller := &RolesClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1317,20 +1320,20 @@ func (l *RolesCreateOrUpdatePollerResponse) Resume(ctx context.Context, client * return nil } -// RolesCreateOrUpdateResponse contains the response from method Roles.CreateOrUpdate. -type RolesCreateOrUpdateResponse struct { - RolesCreateOrUpdateResult +// RolesClientCreateOrUpdateResponse contains the response from method RolesClient.CreateOrUpdate. +type RolesClientCreateOrUpdateResponse struct { + RolesClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// RolesCreateOrUpdateResult contains the result from method Roles.CreateOrUpdate. -type RolesCreateOrUpdateResult struct { +// RolesClientCreateOrUpdateResult contains the result from method RolesClient.CreateOrUpdate. +type RolesClientCreateOrUpdateResult struct { RoleClassification } -// UnmarshalJSON implements the json.Unmarshaller interface for type RolesCreateOrUpdateResult. -func (r *RolesCreateOrUpdateResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RolesClientCreateOrUpdateResult. +func (r *RolesClientCreateOrUpdateResult) UnmarshalJSON(data []byte) error { res, err := unmarshalRoleClassification(data) if err != nil { return err @@ -1339,10 +1342,10 @@ func (r *RolesCreateOrUpdateResult) UnmarshalJSON(data []byte) error { return nil } -// RolesDeletePollerResponse contains the response from method Roles.Delete. -type RolesDeletePollerResponse struct { +// RolesClientDeletePollerResponse contains the response from method RolesClient.Delete. +type RolesClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *RolesDeletePoller + Poller *RolesClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1351,8 +1354,8 @@ type RolesDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RolesDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RolesDeleteResponse, error) { - respType := RolesDeleteResponse{} +func (l RolesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RolesClientDeleteResponse, error) { + respType := RolesClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1361,13 +1364,13 @@ func (l RolesDeletePollerResponse) PollUntilDone(ctx context.Context, freq time. return respType, nil } -// Resume rehydrates a RolesDeletePollerResponse from the provided client and resume token. -func (l *RolesDeletePollerResponse) Resume(ctx context.Context, client *RolesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RolesClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a RolesClientDeletePollerResponse from the provided client and resume token. +func (l *RolesClientDeletePollerResponse) Resume(ctx context.Context, client *RolesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("RolesClient.Delete", token, client.pl) if err != nil { return err } - poller := &RolesDeletePoller{ + poller := &RolesClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1379,26 +1382,26 @@ func (l *RolesDeletePollerResponse) Resume(ctx context.Context, client *RolesCli return nil } -// RolesDeleteResponse contains the response from method Roles.Delete. -type RolesDeleteResponse struct { +// RolesClientDeleteResponse contains the response from method RolesClient.Delete. +type RolesClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// RolesGetResponse contains the response from method Roles.Get. -type RolesGetResponse struct { - RolesGetResult +// RolesClientGetResponse contains the response from method RolesClient.Get. +type RolesClientGetResponse struct { + RolesClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// RolesGetResult contains the result from method Roles.Get. -type RolesGetResult struct { +// RolesClientGetResult contains the result from method RolesClient.Get. +type RolesClientGetResult struct { RoleClassification } -// UnmarshalJSON implements the json.Unmarshaller interface for type RolesGetResult. -func (r *RolesGetResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type RolesClientGetResult. +func (r *RolesClientGetResult) UnmarshalJSON(data []byte) error { res, err := unmarshalRoleClassification(data) if err != nil { return err @@ -1407,22 +1410,22 @@ func (r *RolesGetResult) UnmarshalJSON(data []byte) error { return nil } -// RolesListByDataBoxEdgeDeviceResponse contains the response from method Roles.ListByDataBoxEdgeDevice. -type RolesListByDataBoxEdgeDeviceResponse struct { - RolesListByDataBoxEdgeDeviceResult +// RolesClientListByDataBoxEdgeDeviceResponse contains the response from method RolesClient.ListByDataBoxEdgeDevice. +type RolesClientListByDataBoxEdgeDeviceResponse struct { + RolesClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// RolesListByDataBoxEdgeDeviceResult contains the result from method Roles.ListByDataBoxEdgeDevice. -type RolesListByDataBoxEdgeDeviceResult struct { +// RolesClientListByDataBoxEdgeDeviceResult contains the result from method RolesClient.ListByDataBoxEdgeDevice. +type RolesClientListByDataBoxEdgeDeviceResult struct { RoleList } -// SharesCreateOrUpdatePollerResponse contains the response from method Shares.CreateOrUpdate. -type SharesCreateOrUpdatePollerResponse struct { +// SharesClientCreateOrUpdatePollerResponse contains the response from method SharesClient.CreateOrUpdate. +type SharesClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *SharesCreateOrUpdatePoller + Poller *SharesClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1431,8 +1434,8 @@ type SharesCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SharesCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SharesCreateOrUpdateResponse, error) { - respType := SharesCreateOrUpdateResponse{} +func (l SharesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SharesClientCreateOrUpdateResponse, error) { + respType := SharesClientCreateOrUpdateResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Share) if err != nil { return respType, err @@ -1441,13 +1444,13 @@ func (l SharesCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, f return respType, nil } -// Resume rehydrates a SharesCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *SharesCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *SharesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SharesClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a SharesClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *SharesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *SharesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("SharesClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &SharesCreateOrUpdatePoller{ + poller := &SharesClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1459,22 +1462,22 @@ func (l *SharesCreateOrUpdatePollerResponse) Resume(ctx context.Context, client return nil } -// SharesCreateOrUpdateResponse contains the response from method Shares.CreateOrUpdate. -type SharesCreateOrUpdateResponse struct { - SharesCreateOrUpdateResult +// SharesClientCreateOrUpdateResponse contains the response from method SharesClient.CreateOrUpdate. +type SharesClientCreateOrUpdateResponse struct { + SharesClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// SharesCreateOrUpdateResult contains the result from method Shares.CreateOrUpdate. -type SharesCreateOrUpdateResult struct { +// SharesClientCreateOrUpdateResult contains the result from method SharesClient.CreateOrUpdate. +type SharesClientCreateOrUpdateResult struct { Share } -// SharesDeletePollerResponse contains the response from method Shares.Delete. -type SharesDeletePollerResponse struct { +// SharesClientDeletePollerResponse contains the response from method SharesClient.Delete. +type SharesClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *SharesDeletePoller + Poller *SharesClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1483,8 +1486,8 @@ type SharesDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SharesDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SharesDeleteResponse, error) { - respType := SharesDeleteResponse{} +func (l SharesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SharesClientDeleteResponse, error) { + respType := SharesClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1493,13 +1496,13 @@ func (l SharesDeletePollerResponse) PollUntilDone(ctx context.Context, freq time return respType, nil } -// Resume rehydrates a SharesDeletePollerResponse from the provided client and resume token. -func (l *SharesDeletePollerResponse) Resume(ctx context.Context, client *SharesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SharesClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a SharesClientDeletePollerResponse from the provided client and resume token. +func (l *SharesClientDeletePollerResponse) Resume(ctx context.Context, client *SharesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("SharesClient.Delete", token, client.pl) if err != nil { return err } - poller := &SharesDeletePoller{ + poller := &SharesClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1511,40 +1514,40 @@ func (l *SharesDeletePollerResponse) Resume(ctx context.Context, client *SharesC return nil } -// SharesDeleteResponse contains the response from method Shares.Delete. -type SharesDeleteResponse struct { +// SharesClientDeleteResponse contains the response from method SharesClient.Delete. +type SharesClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// SharesGetResponse contains the response from method Shares.Get. -type SharesGetResponse struct { - SharesGetResult +// SharesClientGetResponse contains the response from method SharesClient.Get. +type SharesClientGetResponse struct { + SharesClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// SharesGetResult contains the result from method Shares.Get. -type SharesGetResult struct { +// SharesClientGetResult contains the result from method SharesClient.Get. +type SharesClientGetResult struct { Share } -// SharesListByDataBoxEdgeDeviceResponse contains the response from method Shares.ListByDataBoxEdgeDevice. -type SharesListByDataBoxEdgeDeviceResponse struct { - SharesListByDataBoxEdgeDeviceResult +// SharesClientListByDataBoxEdgeDeviceResponse contains the response from method SharesClient.ListByDataBoxEdgeDevice. +type SharesClientListByDataBoxEdgeDeviceResponse struct { + SharesClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// SharesListByDataBoxEdgeDeviceResult contains the result from method Shares.ListByDataBoxEdgeDevice. -type SharesListByDataBoxEdgeDeviceResult struct { +// SharesClientListByDataBoxEdgeDeviceResult contains the result from method SharesClient.ListByDataBoxEdgeDevice. +type SharesClientListByDataBoxEdgeDeviceResult struct { ShareList } -// SharesRefreshPollerResponse contains the response from method Shares.Refresh. -type SharesRefreshPollerResponse struct { +// SharesClientRefreshPollerResponse contains the response from method SharesClient.Refresh. +type SharesClientRefreshPollerResponse struct { // Poller contains an initialized poller. - Poller *SharesRefreshPoller + Poller *SharesClientRefreshPoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1553,8 +1556,8 @@ type SharesRefreshPollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SharesRefreshPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SharesRefreshResponse, error) { - respType := SharesRefreshResponse{} +func (l SharesClientRefreshPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SharesClientRefreshResponse, error) { + respType := SharesClientRefreshResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1563,13 +1566,13 @@ func (l SharesRefreshPollerResponse) PollUntilDone(ctx context.Context, freq tim return respType, nil } -// Resume rehydrates a SharesRefreshPollerResponse from the provided client and resume token. -func (l *SharesRefreshPollerResponse) Resume(ctx context.Context, client *SharesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SharesClient.Refresh", token, client.pl, client.refreshHandleError) +// Resume rehydrates a SharesClientRefreshPollerResponse from the provided client and resume token. +func (l *SharesClientRefreshPollerResponse) Resume(ctx context.Context, client *SharesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("SharesClient.Refresh", token, client.pl) if err != nil { return err } - poller := &SharesRefreshPoller{ + poller := &SharesClientRefreshPoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1581,16 +1584,16 @@ func (l *SharesRefreshPollerResponse) Resume(ctx context.Context, client *Shares return nil } -// SharesRefreshResponse contains the response from method Shares.Refresh. -type SharesRefreshResponse struct { +// SharesClientRefreshResponse contains the response from method SharesClient.Refresh. +type SharesClientRefreshResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountCredentialsCreateOrUpdatePollerResponse contains the response from method StorageAccountCredentials.CreateOrUpdate. -type StorageAccountCredentialsCreateOrUpdatePollerResponse struct { +// StorageAccountCredentialsClientCreateOrUpdatePollerResponse contains the response from method StorageAccountCredentialsClient.CreateOrUpdate. +type StorageAccountCredentialsClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *StorageAccountCredentialsCreateOrUpdatePoller + Poller *StorageAccountCredentialsClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1599,8 +1602,8 @@ type StorageAccountCredentialsCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l StorageAccountCredentialsCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountCredentialsCreateOrUpdateResponse, error) { - respType := StorageAccountCredentialsCreateOrUpdateResponse{} +func (l StorageAccountCredentialsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountCredentialsClientCreateOrUpdateResponse, error) { + respType := StorageAccountCredentialsClientCreateOrUpdateResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.StorageAccountCredential) if err != nil { return respType, err @@ -1609,13 +1612,13 @@ func (l StorageAccountCredentialsCreateOrUpdatePollerResponse) PollUntilDone(ctx return respType, nil } -// Resume rehydrates a StorageAccountCredentialsCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *StorageAccountCredentialsCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *StorageAccountCredentialsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("StorageAccountCredentialsClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a StorageAccountCredentialsClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *StorageAccountCredentialsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *StorageAccountCredentialsClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("StorageAccountCredentialsClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &StorageAccountCredentialsCreateOrUpdatePoller{ + poller := &StorageAccountCredentialsClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1627,22 +1630,22 @@ func (l *StorageAccountCredentialsCreateOrUpdatePollerResponse) Resume(ctx conte return nil } -// StorageAccountCredentialsCreateOrUpdateResponse contains the response from method StorageAccountCredentials.CreateOrUpdate. -type StorageAccountCredentialsCreateOrUpdateResponse struct { - StorageAccountCredentialsCreateOrUpdateResult +// StorageAccountCredentialsClientCreateOrUpdateResponse contains the response from method StorageAccountCredentialsClient.CreateOrUpdate. +type StorageAccountCredentialsClientCreateOrUpdateResponse struct { + StorageAccountCredentialsClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountCredentialsCreateOrUpdateResult contains the result from method StorageAccountCredentials.CreateOrUpdate. -type StorageAccountCredentialsCreateOrUpdateResult struct { +// StorageAccountCredentialsClientCreateOrUpdateResult contains the result from method StorageAccountCredentialsClient.CreateOrUpdate. +type StorageAccountCredentialsClientCreateOrUpdateResult struct { StorageAccountCredential } -// StorageAccountCredentialsDeletePollerResponse contains the response from method StorageAccountCredentials.Delete. -type StorageAccountCredentialsDeletePollerResponse struct { +// StorageAccountCredentialsClientDeletePollerResponse contains the response from method StorageAccountCredentialsClient.Delete. +type StorageAccountCredentialsClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *StorageAccountCredentialsDeletePoller + Poller *StorageAccountCredentialsClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1651,8 +1654,8 @@ type StorageAccountCredentialsDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l StorageAccountCredentialsDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountCredentialsDeleteResponse, error) { - respType := StorageAccountCredentialsDeleteResponse{} +func (l StorageAccountCredentialsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountCredentialsClientDeleteResponse, error) { + respType := StorageAccountCredentialsClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1661,13 +1664,13 @@ func (l StorageAccountCredentialsDeletePollerResponse) PollUntilDone(ctx context return respType, nil } -// Resume rehydrates a StorageAccountCredentialsDeletePollerResponse from the provided client and resume token. -func (l *StorageAccountCredentialsDeletePollerResponse) Resume(ctx context.Context, client *StorageAccountCredentialsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("StorageAccountCredentialsClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a StorageAccountCredentialsClientDeletePollerResponse from the provided client and resume token. +func (l *StorageAccountCredentialsClientDeletePollerResponse) Resume(ctx context.Context, client *StorageAccountCredentialsClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("StorageAccountCredentialsClient.Delete", token, client.pl) if err != nil { return err } - poller := &StorageAccountCredentialsDeletePoller{ + poller := &StorageAccountCredentialsClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1679,40 +1682,40 @@ func (l *StorageAccountCredentialsDeletePollerResponse) Resume(ctx context.Conte return nil } -// StorageAccountCredentialsDeleteResponse contains the response from method StorageAccountCredentials.Delete. -type StorageAccountCredentialsDeleteResponse struct { +// StorageAccountCredentialsClientDeleteResponse contains the response from method StorageAccountCredentialsClient.Delete. +type StorageAccountCredentialsClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountCredentialsGetResponse contains the response from method StorageAccountCredentials.Get. -type StorageAccountCredentialsGetResponse struct { - StorageAccountCredentialsGetResult +// StorageAccountCredentialsClientGetResponse contains the response from method StorageAccountCredentialsClient.Get. +type StorageAccountCredentialsClientGetResponse struct { + StorageAccountCredentialsClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountCredentialsGetResult contains the result from method StorageAccountCredentials.Get. -type StorageAccountCredentialsGetResult struct { +// StorageAccountCredentialsClientGetResult contains the result from method StorageAccountCredentialsClient.Get. +type StorageAccountCredentialsClientGetResult struct { StorageAccountCredential } -// StorageAccountCredentialsListByDataBoxEdgeDeviceResponse contains the response from method StorageAccountCredentials.ListByDataBoxEdgeDevice. -type StorageAccountCredentialsListByDataBoxEdgeDeviceResponse struct { - StorageAccountCredentialsListByDataBoxEdgeDeviceResult +// StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse contains the response from method StorageAccountCredentialsClient.ListByDataBoxEdgeDevice. +type StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse struct { + StorageAccountCredentialsClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountCredentialsListByDataBoxEdgeDeviceResult contains the result from method StorageAccountCredentials.ListByDataBoxEdgeDevice. -type StorageAccountCredentialsListByDataBoxEdgeDeviceResult struct { +// StorageAccountCredentialsClientListByDataBoxEdgeDeviceResult contains the result from method StorageAccountCredentialsClient.ListByDataBoxEdgeDevice. +type StorageAccountCredentialsClientListByDataBoxEdgeDeviceResult struct { StorageAccountCredentialList } -// StorageAccountsCreateOrUpdatePollerResponse contains the response from method StorageAccounts.CreateOrUpdate. -type StorageAccountsCreateOrUpdatePollerResponse struct { +// StorageAccountsClientCreateOrUpdatePollerResponse contains the response from method StorageAccountsClient.CreateOrUpdate. +type StorageAccountsClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *StorageAccountsCreateOrUpdatePoller + Poller *StorageAccountsClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1721,8 +1724,8 @@ type StorageAccountsCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l StorageAccountsCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountsCreateOrUpdateResponse, error) { - respType := StorageAccountsCreateOrUpdateResponse{} +func (l StorageAccountsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountsClientCreateOrUpdateResponse, error) { + respType := StorageAccountsClientCreateOrUpdateResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.StorageAccount) if err != nil { return respType, err @@ -1731,13 +1734,13 @@ func (l StorageAccountsCreateOrUpdatePollerResponse) PollUntilDone(ctx context.C return respType, nil } -// Resume rehydrates a StorageAccountsCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *StorageAccountsCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *StorageAccountsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("StorageAccountsClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a StorageAccountsClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *StorageAccountsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *StorageAccountsClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("StorageAccountsClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &StorageAccountsCreateOrUpdatePoller{ + poller := &StorageAccountsClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1749,22 +1752,22 @@ func (l *StorageAccountsCreateOrUpdatePollerResponse) Resume(ctx context.Context return nil } -// StorageAccountsCreateOrUpdateResponse contains the response from method StorageAccounts.CreateOrUpdate. -type StorageAccountsCreateOrUpdateResponse struct { - StorageAccountsCreateOrUpdateResult +// StorageAccountsClientCreateOrUpdateResponse contains the response from method StorageAccountsClient.CreateOrUpdate. +type StorageAccountsClientCreateOrUpdateResponse struct { + StorageAccountsClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountsCreateOrUpdateResult contains the result from method StorageAccounts.CreateOrUpdate. -type StorageAccountsCreateOrUpdateResult struct { +// StorageAccountsClientCreateOrUpdateResult contains the result from method StorageAccountsClient.CreateOrUpdate. +type StorageAccountsClientCreateOrUpdateResult struct { StorageAccount } -// StorageAccountsDeletePollerResponse contains the response from method StorageAccounts.Delete. -type StorageAccountsDeletePollerResponse struct { +// StorageAccountsClientDeletePollerResponse contains the response from method StorageAccountsClient.Delete. +type StorageAccountsClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *StorageAccountsDeletePoller + Poller *StorageAccountsClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1773,8 +1776,8 @@ type StorageAccountsDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l StorageAccountsDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountsDeleteResponse, error) { - respType := StorageAccountsDeleteResponse{} +func (l StorageAccountsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountsClientDeleteResponse, error) { + respType := StorageAccountsClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1783,13 +1786,13 @@ func (l StorageAccountsDeletePollerResponse) PollUntilDone(ctx context.Context, return respType, nil } -// Resume rehydrates a StorageAccountsDeletePollerResponse from the provided client and resume token. -func (l *StorageAccountsDeletePollerResponse) Resume(ctx context.Context, client *StorageAccountsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("StorageAccountsClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a StorageAccountsClientDeletePollerResponse from the provided client and resume token. +func (l *StorageAccountsClientDeletePollerResponse) Resume(ctx context.Context, client *StorageAccountsClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("StorageAccountsClient.Delete", token, client.pl) if err != nil { return err } - poller := &StorageAccountsDeletePoller{ + poller := &StorageAccountsClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1801,40 +1804,40 @@ func (l *StorageAccountsDeletePollerResponse) Resume(ctx context.Context, client return nil } -// StorageAccountsDeleteResponse contains the response from method StorageAccounts.Delete. -type StorageAccountsDeleteResponse struct { +// StorageAccountsClientDeleteResponse contains the response from method StorageAccountsClient.Delete. +type StorageAccountsClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountsGetResponse contains the response from method StorageAccounts.Get. -type StorageAccountsGetResponse struct { - StorageAccountsGetResult +// StorageAccountsClientGetResponse contains the response from method StorageAccountsClient.Get. +type StorageAccountsClientGetResponse struct { + StorageAccountsClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountsGetResult contains the result from method StorageAccounts.Get. -type StorageAccountsGetResult struct { +// StorageAccountsClientGetResult contains the result from method StorageAccountsClient.Get. +type StorageAccountsClientGetResult struct { StorageAccount } -// StorageAccountsListByDataBoxEdgeDeviceResponse contains the response from method StorageAccounts.ListByDataBoxEdgeDevice. -type StorageAccountsListByDataBoxEdgeDeviceResponse struct { - StorageAccountsListByDataBoxEdgeDeviceResult +// StorageAccountsClientListByDataBoxEdgeDeviceResponse contains the response from method StorageAccountsClient.ListByDataBoxEdgeDevice. +type StorageAccountsClientListByDataBoxEdgeDeviceResponse struct { + StorageAccountsClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// StorageAccountsListByDataBoxEdgeDeviceResult contains the result from method StorageAccounts.ListByDataBoxEdgeDevice. -type StorageAccountsListByDataBoxEdgeDeviceResult struct { +// StorageAccountsClientListByDataBoxEdgeDeviceResult contains the result from method StorageAccountsClient.ListByDataBoxEdgeDevice. +type StorageAccountsClientListByDataBoxEdgeDeviceResult struct { StorageAccountList } -// SupportPackagesTriggerSupportPackagePollerResponse contains the response from method SupportPackages.TriggerSupportPackage. -type SupportPackagesTriggerSupportPackagePollerResponse struct { +// SupportPackagesClientTriggerSupportPackagePollerResponse contains the response from method SupportPackagesClient.TriggerSupportPackage. +type SupportPackagesClientTriggerSupportPackagePollerResponse struct { // Poller contains an initialized poller. - Poller *SupportPackagesTriggerSupportPackagePoller + Poller *SupportPackagesClientTriggerSupportPackagePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1843,8 +1846,8 @@ type SupportPackagesTriggerSupportPackagePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SupportPackagesTriggerSupportPackagePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SupportPackagesTriggerSupportPackageResponse, error) { - respType := SupportPackagesTriggerSupportPackageResponse{} +func (l SupportPackagesClientTriggerSupportPackagePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SupportPackagesClientTriggerSupportPackageResponse, error) { + respType := SupportPackagesClientTriggerSupportPackageResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1853,13 +1856,13 @@ func (l SupportPackagesTriggerSupportPackagePollerResponse) PollUntilDone(ctx co return respType, nil } -// Resume rehydrates a SupportPackagesTriggerSupportPackagePollerResponse from the provided client and resume token. -func (l *SupportPackagesTriggerSupportPackagePollerResponse) Resume(ctx context.Context, client *SupportPackagesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SupportPackagesClient.TriggerSupportPackage", token, client.pl, client.triggerSupportPackageHandleError) +// Resume rehydrates a SupportPackagesClientTriggerSupportPackagePollerResponse from the provided client and resume token. +func (l *SupportPackagesClientTriggerSupportPackagePollerResponse) Resume(ctx context.Context, client *SupportPackagesClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("SupportPackagesClient.TriggerSupportPackage", token, client.pl) if err != nil { return err } - poller := &SupportPackagesTriggerSupportPackagePoller{ + poller := &SupportPackagesClientTriggerSupportPackagePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1871,16 +1874,16 @@ func (l *SupportPackagesTriggerSupportPackagePollerResponse) Resume(ctx context. return nil } -// SupportPackagesTriggerSupportPackageResponse contains the response from method SupportPackages.TriggerSupportPackage. -type SupportPackagesTriggerSupportPackageResponse struct { +// SupportPackagesClientTriggerSupportPackageResponse contains the response from method SupportPackagesClient.TriggerSupportPackage. +type SupportPackagesClientTriggerSupportPackageResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// TriggersCreateOrUpdatePollerResponse contains the response from method Triggers.CreateOrUpdate. -type TriggersCreateOrUpdatePollerResponse struct { +// TriggersClientCreateOrUpdatePollerResponse contains the response from method TriggersClient.CreateOrUpdate. +type TriggersClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *TriggersCreateOrUpdatePoller + Poller *TriggersClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1889,9 +1892,9 @@ type TriggersCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l TriggersCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (TriggersCreateOrUpdateResponse, error) { - respType := TriggersCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.TriggerClassification) +func (l TriggersClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (TriggersClientCreateOrUpdateResponse, error) { + respType := TriggersClientCreateOrUpdateResponse{} + resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.TriggersClientCreateOrUpdateResult) if err != nil { return respType, err } @@ -1899,13 +1902,13 @@ func (l TriggersCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, return respType, nil } -// Resume rehydrates a TriggersCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *TriggersCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *TriggersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("TriggersClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a TriggersClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *TriggersClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *TriggersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("TriggersClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &TriggersCreateOrUpdatePoller{ + poller := &TriggersClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1917,20 +1920,20 @@ func (l *TriggersCreateOrUpdatePollerResponse) Resume(ctx context.Context, clien return nil } -// TriggersCreateOrUpdateResponse contains the response from method Triggers.CreateOrUpdate. -type TriggersCreateOrUpdateResponse struct { - TriggersCreateOrUpdateResult +// TriggersClientCreateOrUpdateResponse contains the response from method TriggersClient.CreateOrUpdate. +type TriggersClientCreateOrUpdateResponse struct { + TriggersClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// TriggersCreateOrUpdateResult contains the result from method Triggers.CreateOrUpdate. -type TriggersCreateOrUpdateResult struct { +// TriggersClientCreateOrUpdateResult contains the result from method TriggersClient.CreateOrUpdate. +type TriggersClientCreateOrUpdateResult struct { TriggerClassification } -// UnmarshalJSON implements the json.Unmarshaller interface for type TriggersCreateOrUpdateResult. -func (t *TriggersCreateOrUpdateResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggersClientCreateOrUpdateResult. +func (t *TriggersClientCreateOrUpdateResult) UnmarshalJSON(data []byte) error { res, err := unmarshalTriggerClassification(data) if err != nil { return err @@ -1939,10 +1942,10 @@ func (t *TriggersCreateOrUpdateResult) UnmarshalJSON(data []byte) error { return nil } -// TriggersDeletePollerResponse contains the response from method Triggers.Delete. -type TriggersDeletePollerResponse struct { +// TriggersClientDeletePollerResponse contains the response from method TriggersClient.Delete. +type TriggersClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *TriggersDeletePoller + Poller *TriggersClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -1951,8 +1954,8 @@ type TriggersDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l TriggersDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (TriggersDeleteResponse, error) { - respType := TriggersDeleteResponse{} +func (l TriggersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (TriggersClientDeleteResponse, error) { + respType := TriggersClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -1961,13 +1964,13 @@ func (l TriggersDeletePollerResponse) PollUntilDone(ctx context.Context, freq ti return respType, nil } -// Resume rehydrates a TriggersDeletePollerResponse from the provided client and resume token. -func (l *TriggersDeletePollerResponse) Resume(ctx context.Context, client *TriggersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("TriggersClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a TriggersClientDeletePollerResponse from the provided client and resume token. +func (l *TriggersClientDeletePollerResponse) Resume(ctx context.Context, client *TriggersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("TriggersClient.Delete", token, client.pl) if err != nil { return err } - poller := &TriggersDeletePoller{ + poller := &TriggersClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -1979,26 +1982,26 @@ func (l *TriggersDeletePollerResponse) Resume(ctx context.Context, client *Trigg return nil } -// TriggersDeleteResponse contains the response from method Triggers.Delete. -type TriggersDeleteResponse struct { +// TriggersClientDeleteResponse contains the response from method TriggersClient.Delete. +type TriggersClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// TriggersGetResponse contains the response from method Triggers.Get. -type TriggersGetResponse struct { - TriggersGetResult +// TriggersClientGetResponse contains the response from method TriggersClient.Get. +type TriggersClientGetResponse struct { + TriggersClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// TriggersGetResult contains the result from method Triggers.Get. -type TriggersGetResult struct { +// TriggersClientGetResult contains the result from method TriggersClient.Get. +type TriggersClientGetResult struct { TriggerClassification } -// UnmarshalJSON implements the json.Unmarshaller interface for type TriggersGetResult. -func (t *TriggersGetResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggersClientGetResult. +func (t *TriggersClientGetResult) UnmarshalJSON(data []byte) error { res, err := unmarshalTriggerClassification(data) if err != nil { return err @@ -2007,22 +2010,22 @@ func (t *TriggersGetResult) UnmarshalJSON(data []byte) error { return nil } -// TriggersListByDataBoxEdgeDeviceResponse contains the response from method Triggers.ListByDataBoxEdgeDevice. -type TriggersListByDataBoxEdgeDeviceResponse struct { - TriggersListByDataBoxEdgeDeviceResult +// TriggersClientListByDataBoxEdgeDeviceResponse contains the response from method TriggersClient.ListByDataBoxEdgeDevice. +type TriggersClientListByDataBoxEdgeDeviceResponse struct { + TriggersClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// TriggersListByDataBoxEdgeDeviceResult contains the result from method Triggers.ListByDataBoxEdgeDevice. -type TriggersListByDataBoxEdgeDeviceResult struct { +// TriggersClientListByDataBoxEdgeDeviceResult contains the result from method TriggersClient.ListByDataBoxEdgeDevice. +type TriggersClientListByDataBoxEdgeDeviceResult struct { TriggerList } -// UsersCreateOrUpdatePollerResponse contains the response from method Users.CreateOrUpdate. -type UsersCreateOrUpdatePollerResponse struct { +// UsersClientCreateOrUpdatePollerResponse contains the response from method UsersClient.CreateOrUpdate. +type UsersClientCreateOrUpdatePollerResponse struct { // Poller contains an initialized poller. - Poller *UsersCreateOrUpdatePoller + Poller *UsersClientCreateOrUpdatePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -2031,8 +2034,8 @@ type UsersCreateOrUpdatePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l UsersCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (UsersCreateOrUpdateResponse, error) { - respType := UsersCreateOrUpdateResponse{} +func (l UsersClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (UsersClientCreateOrUpdateResponse, error) { + respType := UsersClientCreateOrUpdateResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.User) if err != nil { return respType, err @@ -2041,13 +2044,13 @@ func (l UsersCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, fr return respType, nil } -// Resume rehydrates a UsersCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *UsersCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *UsersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("UsersClient.CreateOrUpdate", token, client.pl, client.createOrUpdateHandleError) +// Resume rehydrates a UsersClientCreateOrUpdatePollerResponse from the provided client and resume token. +func (l *UsersClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *UsersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("UsersClient.CreateOrUpdate", token, client.pl) if err != nil { return err } - poller := &UsersCreateOrUpdatePoller{ + poller := &UsersClientCreateOrUpdatePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -2059,22 +2062,22 @@ func (l *UsersCreateOrUpdatePollerResponse) Resume(ctx context.Context, client * return nil } -// UsersCreateOrUpdateResponse contains the response from method Users.CreateOrUpdate. -type UsersCreateOrUpdateResponse struct { - UsersCreateOrUpdateResult +// UsersClientCreateOrUpdateResponse contains the response from method UsersClient.CreateOrUpdate. +type UsersClientCreateOrUpdateResponse struct { + UsersClientCreateOrUpdateResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// UsersCreateOrUpdateResult contains the result from method Users.CreateOrUpdate. -type UsersCreateOrUpdateResult struct { +// UsersClientCreateOrUpdateResult contains the result from method UsersClient.CreateOrUpdate. +type UsersClientCreateOrUpdateResult struct { User } -// UsersDeletePollerResponse contains the response from method Users.Delete. -type UsersDeletePollerResponse struct { +// UsersClientDeletePollerResponse contains the response from method UsersClient.Delete. +type UsersClientDeletePollerResponse struct { // Poller contains an initialized poller. - Poller *UsersDeletePoller + Poller *UsersClientDeletePoller // RawResponse contains the underlying HTTP response. RawResponse *http.Response @@ -2083,8 +2086,8 @@ type UsersDeletePollerResponse struct { // PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. // freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. // A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l UsersDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (UsersDeleteResponse, error) { - respType := UsersDeleteResponse{} +func (l UsersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (UsersClientDeleteResponse, error) { + respType := UsersClientDeleteResponse{} resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) if err != nil { return respType, err @@ -2093,13 +2096,13 @@ func (l UsersDeletePollerResponse) PollUntilDone(ctx context.Context, freq time. return respType, nil } -// Resume rehydrates a UsersDeletePollerResponse from the provided client and resume token. -func (l *UsersDeletePollerResponse) Resume(ctx context.Context, client *UsersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("UsersClient.Delete", token, client.pl, client.deleteHandleError) +// Resume rehydrates a UsersClientDeletePollerResponse from the provided client and resume token. +func (l *UsersClientDeletePollerResponse) Resume(ctx context.Context, client *UsersClient, token string) error { + pt, err := armruntime.NewPollerFromResumeToken("UsersClient.Delete", token, client.pl) if err != nil { return err } - poller := &UsersDeletePoller{ + poller := &UsersClientDeletePoller{ pt: pt, } resp, err := poller.Poll(ctx) @@ -2111,32 +2114,32 @@ func (l *UsersDeletePollerResponse) Resume(ctx context.Context, client *UsersCli return nil } -// UsersDeleteResponse contains the response from method Users.Delete. -type UsersDeleteResponse struct { +// UsersClientDeleteResponse contains the response from method UsersClient.Delete. +type UsersClientDeleteResponse struct { // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// UsersGetResponse contains the response from method Users.Get. -type UsersGetResponse struct { - UsersGetResult +// UsersClientGetResponse contains the response from method UsersClient.Get. +type UsersClientGetResponse struct { + UsersClientGetResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// UsersGetResult contains the result from method Users.Get. -type UsersGetResult struct { +// UsersClientGetResult contains the result from method UsersClient.Get. +type UsersClientGetResult struct { User } -// UsersListByDataBoxEdgeDeviceResponse contains the response from method Users.ListByDataBoxEdgeDevice. -type UsersListByDataBoxEdgeDeviceResponse struct { - UsersListByDataBoxEdgeDeviceResult +// UsersClientListByDataBoxEdgeDeviceResponse contains the response from method UsersClient.ListByDataBoxEdgeDevice. +type UsersClientListByDataBoxEdgeDeviceResponse struct { + UsersClientListByDataBoxEdgeDeviceResult // RawResponse contains the underlying HTTP response. RawResponse *http.Response } -// UsersListByDataBoxEdgeDeviceResult contains the result from method Users.ListByDataBoxEdgeDevice. -type UsersListByDataBoxEdgeDeviceResult struct { +// UsersClientListByDataBoxEdgeDeviceResult contains the result from method UsersClient.ListByDataBoxEdgeDevice. +type UsersClientListByDataBoxEdgeDeviceResult struct { UserList } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_roles_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_roles_client.go index 1660f1c15334..b8346d16246c 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_roles_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_roles_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,60 @@ import ( // RolesClient contains the methods for the Roles group. // Don't use this type directly, use NewRolesClient() instead. type RolesClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewRolesClient creates a new instance of RolesClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewRolesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *RolesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &RolesClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &RolesClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } // BeginCreateOrUpdate - Create or update a role. -// If the operation fails it returns the *CloudError error type. -func (client *RolesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, role RoleClassification, options *RolesBeginCreateOrUpdateOptions) (RolesCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The role name. +// resourceGroupName - The resource group name. +// role - The role properties. +// options - RolesClientBeginCreateOrUpdateOptions contains the optional parameters for the RolesClient.BeginCreateOrUpdate +// method. +func (client *RolesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, role RoleClassification, options *RolesClientBeginCreateOrUpdateOptions) (RolesClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, role, options) if err != nil { - return RolesCreateOrUpdatePollerResponse{}, err + return RolesClientCreateOrUpdatePollerResponse{}, err } - result := RolesCreateOrUpdatePollerResponse{ + result := RolesClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("RolesClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("RolesClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return RolesCreateOrUpdatePollerResponse{}, err + return RolesClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &RolesCreateOrUpdatePoller{ + result.Poller = &RolesClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Create or update a role. -// If the operation fails it returns the *CloudError error type. -func (client *RolesClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, role RoleClassification, options *RolesBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *RolesClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, role RoleClassification, options *RolesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, name, resourceGroupName, role, options) if err != nil { return nil, err @@ -74,13 +87,13 @@ func (client *RolesClient) createOrUpdate(ctx context.Context, deviceName string return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *RolesClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, role RoleClassification, options *RolesBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *RolesClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, role RoleClassification, options *RolesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -98,7 +111,7 @@ func (client *RolesClient) createOrUpdateCreateRequest(ctx context.Context, devi return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -109,42 +122,33 @@ func (client *RolesClient) createOrUpdateCreateRequest(ctx context.Context, devi return req, runtime.MarshalAsJSON(req, role) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *RolesClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the role on the device. -// If the operation fails it returns the *CloudError error type. -func (client *RolesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesBeginDeleteOptions) (RolesDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The role name. +// resourceGroupName - The resource group name. +// options - RolesClientBeginDeleteOptions contains the optional parameters for the RolesClient.BeginDelete method. +func (client *RolesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesClientBeginDeleteOptions) (RolesClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return RolesDeletePollerResponse{}, err + return RolesClientDeletePollerResponse{}, err } - result := RolesDeletePollerResponse{ + result := RolesClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("RolesClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("RolesClient.Delete", "", resp, client.pl) if err != nil { - return RolesDeletePollerResponse{}, err + return RolesClientDeletePollerResponse{}, err } - result.Poller = &RolesDeletePoller{ + result.Poller = &RolesClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the role on the device. -// If the operation fails it returns the *CloudError error type. -func (client *RolesClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *RolesClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err @@ -154,13 +158,13 @@ func (client *RolesClient) deleteOperation(ctx context.Context, deviceName strin return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *RolesClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesBeginDeleteOptions) (*policy.Request, error) { +func (client *RolesClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -178,7 +182,7 @@ func (client *RolesClient) deleteCreateRequest(ctx context.Context, deviceName s return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -189,38 +193,29 @@ func (client *RolesClient) deleteCreateRequest(ctx context.Context, deviceName s return req, nil } -// deleteHandleError handles the Delete error response. -func (client *RolesClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets a specific role by name. -// If the operation fails it returns the *CloudError error type. -func (client *RolesClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesGetOptions) (RolesGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The role name. +// resourceGroupName - The resource group name. +// options - RolesClientGetOptions contains the optional parameters for the RolesClient.Get method. +func (client *RolesClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesClientGetOptions) (RolesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return RolesGetResponse{}, err + return RolesClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return RolesGetResponse{}, err + return RolesClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return RolesGetResponse{}, client.getHandleError(resp) + return RolesClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *RolesClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesGetOptions) (*policy.Request, error) { +func (client *RolesClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -238,7 +233,7 @@ func (client *RolesClient) getCreateRequest(ctx context.Context, deviceName stri return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -250,43 +245,34 @@ func (client *RolesClient) getCreateRequest(ctx context.Context, deviceName stri } // getHandleResponse handles the Get response. -func (client *RolesClient) getHandleResponse(resp *http.Response) (RolesGetResponse, error) { - result := RolesGetResponse{RawResponse: resp} +func (client *RolesClient) getHandleResponse(resp *http.Response) (RolesClientGetResponse, error) { + result := RolesClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return RolesGetResponse{}, runtime.NewResponseError(err, resp) + return RolesClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *RolesClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Lists all the roles configured in a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *RolesClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *RolesListByDataBoxEdgeDeviceOptions) *RolesListByDataBoxEdgeDevicePager { - return &RolesListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - RolesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the RolesClient.ListByDataBoxEdgeDevice +// method. +func (client *RolesClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *RolesClientListByDataBoxEdgeDeviceOptions) *RolesClientListByDataBoxEdgeDevicePager { + return &RolesClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp RolesListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp RolesClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.RoleList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *RolesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *RolesListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *RolesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *RolesClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -300,7 +286,7 @@ func (client *RolesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -312,23 +298,10 @@ func (client *RolesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *RolesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (RolesListByDataBoxEdgeDeviceResponse, error) { - result := RolesListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *RolesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (RolesClientListByDataBoxEdgeDeviceResponse, error) { + result := RolesClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.RoleList); err != nil { - return RolesListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return RolesClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } - -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *RolesClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_shares_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_shares_client.go index 45ef78620ff5..3b9dcb4d3a17 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_shares_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_shares_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,60 @@ import ( // SharesClient contains the methods for the Shares group. // Don't use this type directly, use NewSharesClient() instead. type SharesClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewSharesClient creates a new instance of SharesClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewSharesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SharesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &SharesClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &SharesClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // BeginCreateOrUpdate - Creates a new share or updates an existing share on the device. -// If the operation fails it returns the *CloudError error type. -func (client *SharesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, share Share, options *SharesBeginCreateOrUpdateOptions) (SharesCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The share name. +// resourceGroupName - The resource group name. +// share - The share properties. +// options - SharesClientBeginCreateOrUpdateOptions contains the optional parameters for the SharesClient.BeginCreateOrUpdate +// method. +func (client *SharesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, share Share, options *SharesClientBeginCreateOrUpdateOptions) (SharesClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, share, options) if err != nil { - return SharesCreateOrUpdatePollerResponse{}, err + return SharesClientCreateOrUpdatePollerResponse{}, err } - result := SharesCreateOrUpdatePollerResponse{ + result := SharesClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("SharesClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("SharesClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return SharesCreateOrUpdatePollerResponse{}, err + return SharesClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &SharesCreateOrUpdatePoller{ + result.Poller = &SharesClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates a new share or updates an existing share on the device. -// If the operation fails it returns the *CloudError error type. -func (client *SharesClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, share Share, options *SharesBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *SharesClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, share Share, options *SharesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, name, resourceGroupName, share, options) if err != nil { return nil, err @@ -74,13 +87,13 @@ func (client *SharesClient) createOrUpdate(ctx context.Context, deviceName strin return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *SharesClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, share Share, options *SharesBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *SharesClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, share Share, options *SharesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -98,7 +111,7 @@ func (client *SharesClient) createOrUpdateCreateRequest(ctx context.Context, dev return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -109,42 +122,33 @@ func (client *SharesClient) createOrUpdateCreateRequest(ctx context.Context, dev return req, runtime.MarshalAsJSON(req, share) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *SharesClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the share on the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *SharesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesBeginDeleteOptions) (SharesDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The share name. +// resourceGroupName - The resource group name. +// options - SharesClientBeginDeleteOptions contains the optional parameters for the SharesClient.BeginDelete method. +func (client *SharesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientBeginDeleteOptions) (SharesClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return SharesDeletePollerResponse{}, err + return SharesClientDeletePollerResponse{}, err } - result := SharesDeletePollerResponse{ + result := SharesClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("SharesClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("SharesClient.Delete", "", resp, client.pl) if err != nil { - return SharesDeletePollerResponse{}, err + return SharesClientDeletePollerResponse{}, err } - result.Poller = &SharesDeletePoller{ + result.Poller = &SharesClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the share on the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *SharesClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *SharesClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err @@ -154,13 +158,13 @@ func (client *SharesClient) deleteOperation(ctx context.Context, deviceName stri return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *SharesClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesBeginDeleteOptions) (*policy.Request, error) { +func (client *SharesClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -178,7 +182,7 @@ func (client *SharesClient) deleteCreateRequest(ctx context.Context, deviceName return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -189,38 +193,29 @@ func (client *SharesClient) deleteCreateRequest(ctx context.Context, deviceName return req, nil } -// deleteHandleError handles the Delete error response. -func (client *SharesClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets a share by name. -// If the operation fails it returns the *CloudError error type. -func (client *SharesClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesGetOptions) (SharesGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The share name. +// resourceGroupName - The resource group name. +// options - SharesClientGetOptions contains the optional parameters for the SharesClient.Get method. +func (client *SharesClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientGetOptions) (SharesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return SharesGetResponse{}, err + return SharesClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return SharesGetResponse{}, err + return SharesClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return SharesGetResponse{}, client.getHandleError(resp) + return SharesClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *SharesClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesGetOptions) (*policy.Request, error) { +func (client *SharesClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -238,7 +233,7 @@ func (client *SharesClient) getCreateRequest(ctx context.Context, deviceName str return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -250,43 +245,34 @@ func (client *SharesClient) getCreateRequest(ctx context.Context, deviceName str } // getHandleResponse handles the Get response. -func (client *SharesClient) getHandleResponse(resp *http.Response) (SharesGetResponse, error) { - result := SharesGetResponse{RawResponse: resp} +func (client *SharesClient) getHandleResponse(resp *http.Response) (SharesClientGetResponse, error) { + result := SharesClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.Share); err != nil { - return SharesGetResponse{}, runtime.NewResponseError(err, resp) + return SharesClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *SharesClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Lists all the shares in a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *SharesClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *SharesListByDataBoxEdgeDeviceOptions) *SharesListByDataBoxEdgeDevicePager { - return &SharesListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - SharesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the SharesClient.ListByDataBoxEdgeDevice +// method. +func (client *SharesClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *SharesClientListByDataBoxEdgeDeviceOptions) *SharesClientListByDataBoxEdgeDevicePager { + return &SharesClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp SharesListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp SharesClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.ShareList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *SharesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *SharesListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *SharesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *SharesClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -300,7 +286,7 @@ func (client *SharesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -312,50 +298,41 @@ func (client *SharesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *SharesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (SharesListByDataBoxEdgeDeviceResponse, error) { - result := SharesListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *SharesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (SharesClientListByDataBoxEdgeDeviceResponse, error) { + result := SharesClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.ShareList); err != nil { - return SharesListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return SharesClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *SharesClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginRefresh - Refreshes the share metadata with the data from the cloud. -// If the operation fails it returns the *CloudError error type. -func (client *SharesClient) BeginRefresh(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesBeginRefreshOptions) (SharesRefreshPollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The share name. +// resourceGroupName - The resource group name. +// options - SharesClientBeginRefreshOptions contains the optional parameters for the SharesClient.BeginRefresh method. +func (client *SharesClient) BeginRefresh(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientBeginRefreshOptions) (SharesClientRefreshPollerResponse, error) { resp, err := client.refresh(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return SharesRefreshPollerResponse{}, err + return SharesClientRefreshPollerResponse{}, err } - result := SharesRefreshPollerResponse{ + result := SharesClientRefreshPollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("SharesClient.Refresh", "", resp, client.pl, client.refreshHandleError) + pt, err := armruntime.NewPoller("SharesClient.Refresh", "", resp, client.pl) if err != nil { - return SharesRefreshPollerResponse{}, err + return SharesClientRefreshPollerResponse{}, err } - result.Poller = &SharesRefreshPoller{ + result.Poller = &SharesClientRefreshPoller{ pt: pt, } return result, nil } // Refresh - Refreshes the share metadata with the data from the cloud. -// If the operation fails it returns the *CloudError error type. -func (client *SharesClient) refresh(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesBeginRefreshOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *SharesClient) refresh(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientBeginRefreshOptions) (*http.Response, error) { req, err := client.refreshCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err @@ -365,13 +342,13 @@ func (client *SharesClient) refresh(ctx context.Context, deviceName string, name return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.refreshHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // refreshCreateRequest creates the Refresh request. -func (client *SharesClient) refreshCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesBeginRefreshOptions) (*policy.Request, error) { +func (client *SharesClient) refreshCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientBeginRefreshOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -389,7 +366,7 @@ func (client *SharesClient) refreshCreateRequest(ctx context.Context, deviceName return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -399,16 +376,3 @@ func (client *SharesClient) refreshCreateRequest(ctx context.Context, deviceName req.Raw().Header.Set("Accept", "application/json") return req, nil } - -// refreshHandleError handles the Refresh error response. -func (client *SharesClient) refreshHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccountcredentials_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccountcredentials_client.go index 70083c11a0f2..12bb93c30a3b 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccountcredentials_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccountcredentials_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,60 @@ import ( // StorageAccountCredentialsClient contains the methods for the StorageAccountCredentials group. // Don't use this type directly, use NewStorageAccountCredentialsClient() instead. type StorageAccountCredentialsClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewStorageAccountCredentialsClient creates a new instance of StorageAccountCredentialsClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewStorageAccountCredentialsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *StorageAccountCredentialsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &StorageAccountCredentialsClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &StorageAccountCredentialsClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } // BeginCreateOrUpdate - Creates or updates the storage account credential. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountCredentialsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, storageAccountCredential StorageAccountCredential, options *StorageAccountCredentialsBeginCreateOrUpdateOptions) (StorageAccountCredentialsCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The storage account credential name. +// resourceGroupName - The resource group name. +// storageAccountCredential - The storage account credential. +// options - StorageAccountCredentialsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageAccountCredentialsClient.BeginCreateOrUpdate +// method. +func (client *StorageAccountCredentialsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, storageAccountCredential StorageAccountCredential, options *StorageAccountCredentialsClientBeginCreateOrUpdateOptions) (StorageAccountCredentialsClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, storageAccountCredential, options) if err != nil { - return StorageAccountCredentialsCreateOrUpdatePollerResponse{}, err + return StorageAccountCredentialsClientCreateOrUpdatePollerResponse{}, err } - result := StorageAccountCredentialsCreateOrUpdatePollerResponse{ + result := StorageAccountCredentialsClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("StorageAccountCredentialsClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("StorageAccountCredentialsClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return StorageAccountCredentialsCreateOrUpdatePollerResponse{}, err + return StorageAccountCredentialsClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &StorageAccountCredentialsCreateOrUpdatePoller{ + result.Poller = &StorageAccountCredentialsClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates or updates the storage account credential. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountCredentialsClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, storageAccountCredential StorageAccountCredential, options *StorageAccountCredentialsBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *StorageAccountCredentialsClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, storageAccountCredential StorageAccountCredential, options *StorageAccountCredentialsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, name, resourceGroupName, storageAccountCredential, options) if err != nil { return nil, err @@ -74,13 +87,13 @@ func (client *StorageAccountCredentialsClient) createOrUpdate(ctx context.Contex return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *StorageAccountCredentialsClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, storageAccountCredential StorageAccountCredential, options *StorageAccountCredentialsBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *StorageAccountCredentialsClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, storageAccountCredential StorageAccountCredential, options *StorageAccountCredentialsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -98,7 +111,7 @@ func (client *StorageAccountCredentialsClient) createOrUpdateCreateRequest(ctx c return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -109,42 +122,34 @@ func (client *StorageAccountCredentialsClient) createOrUpdateCreateRequest(ctx c return req, runtime.MarshalAsJSON(req, storageAccountCredential) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *StorageAccountCredentialsClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the storage account credential. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountCredentialsClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsBeginDeleteOptions) (StorageAccountCredentialsDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The storage account credential name. +// resourceGroupName - The resource group name. +// options - StorageAccountCredentialsClientBeginDeleteOptions contains the optional parameters for the StorageAccountCredentialsClient.BeginDelete +// method. +func (client *StorageAccountCredentialsClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsClientBeginDeleteOptions) (StorageAccountCredentialsClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return StorageAccountCredentialsDeletePollerResponse{}, err + return StorageAccountCredentialsClientDeletePollerResponse{}, err } - result := StorageAccountCredentialsDeletePollerResponse{ + result := StorageAccountCredentialsClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("StorageAccountCredentialsClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("StorageAccountCredentialsClient.Delete", "", resp, client.pl) if err != nil { - return StorageAccountCredentialsDeletePollerResponse{}, err + return StorageAccountCredentialsClientDeletePollerResponse{}, err } - result.Poller = &StorageAccountCredentialsDeletePoller{ + result.Poller = &StorageAccountCredentialsClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the storage account credential. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountCredentialsClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *StorageAccountCredentialsClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err @@ -154,13 +159,13 @@ func (client *StorageAccountCredentialsClient) deleteOperation(ctx context.Conte return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *StorageAccountCredentialsClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsBeginDeleteOptions) (*policy.Request, error) { +func (client *StorageAccountCredentialsClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -178,7 +183,7 @@ func (client *StorageAccountCredentialsClient) deleteCreateRequest(ctx context.C return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -189,38 +194,30 @@ func (client *StorageAccountCredentialsClient) deleteCreateRequest(ctx context.C return req, nil } -// deleteHandleError handles the Delete error response. -func (client *StorageAccountCredentialsClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets the properties of the specified storage account credential. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountCredentialsClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsGetOptions) (StorageAccountCredentialsGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The storage account credential name. +// resourceGroupName - The resource group name. +// options - StorageAccountCredentialsClientGetOptions contains the optional parameters for the StorageAccountCredentialsClient.Get +// method. +func (client *StorageAccountCredentialsClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsClientGetOptions) (StorageAccountCredentialsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return StorageAccountCredentialsGetResponse{}, err + return StorageAccountCredentialsClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return StorageAccountCredentialsGetResponse{}, err + return StorageAccountCredentialsClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageAccountCredentialsGetResponse{}, client.getHandleError(resp) + return StorageAccountCredentialsClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *StorageAccountCredentialsClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsGetOptions) (*policy.Request, error) { +func (client *StorageAccountCredentialsClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -238,7 +235,7 @@ func (client *StorageAccountCredentialsClient) getCreateRequest(ctx context.Cont return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -250,43 +247,34 @@ func (client *StorageAccountCredentialsClient) getCreateRequest(ctx context.Cont } // getHandleResponse handles the Get response. -func (client *StorageAccountCredentialsClient) getHandleResponse(resp *http.Response) (StorageAccountCredentialsGetResponse, error) { - result := StorageAccountCredentialsGetResponse{RawResponse: resp} +func (client *StorageAccountCredentialsClient) getHandleResponse(resp *http.Response) (StorageAccountCredentialsClientGetResponse, error) { + result := StorageAccountCredentialsClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.StorageAccountCredential); err != nil { - return StorageAccountCredentialsGetResponse{}, runtime.NewResponseError(err, resp) + return StorageAccountCredentialsClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *StorageAccountCredentialsClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountCredentialsClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *StorageAccountCredentialsListByDataBoxEdgeDeviceOptions) *StorageAccountCredentialsListByDataBoxEdgeDevicePager { - return &StorageAccountCredentialsListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the StorageAccountCredentialsClient.ListByDataBoxEdgeDevice +// method. +func (client *StorageAccountCredentialsClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions) *StorageAccountCredentialsClientListByDataBoxEdgeDevicePager { + return &StorageAccountCredentialsClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp StorageAccountCredentialsListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.StorageAccountCredentialList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *StorageAccountCredentialsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *StorageAccountCredentialsListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *StorageAccountCredentialsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -300,7 +288,7 @@ func (client *StorageAccountCredentialsClient) listByDataBoxEdgeDeviceCreateRequ return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -312,23 +300,10 @@ func (client *StorageAccountCredentialsClient) listByDataBoxEdgeDeviceCreateRequ } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *StorageAccountCredentialsClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (StorageAccountCredentialsListByDataBoxEdgeDeviceResponse, error) { - result := StorageAccountCredentialsListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *StorageAccountCredentialsClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse, error) { + result := StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.StorageAccountCredentialList); err != nil { - return StorageAccountCredentialsListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } - -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *StorageAccountCredentialsClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccounts_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccounts_client.go index 8f3d35a950c1..29a82059b8b6 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccounts_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccounts_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,60 @@ import ( // StorageAccountsClient contains the methods for the StorageAccounts group. // Don't use this type directly, use NewStorageAccountsClient() instead. type StorageAccountsClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewStorageAccountsClient creates a new instance of StorageAccountsClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewStorageAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *StorageAccountsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &StorageAccountsClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &StorageAccountsClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } // BeginCreateOrUpdate - Creates a new StorageAccount or updates an existing StorageAccount on the device. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, storageAccount StorageAccount, options *StorageAccountsBeginCreateOrUpdateOptions) (StorageAccountsCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// storageAccountName - The StorageAccount name. +// resourceGroupName - The resource group name. +// storageAccount - The StorageAccount properties. +// options - StorageAccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageAccountsClient.BeginCreateOrUpdate +// method. +func (client *StorageAccountsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, storageAccount StorageAccount, options *StorageAccountsClientBeginCreateOrUpdateOptions) (StorageAccountsClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, storageAccountName, resourceGroupName, storageAccount, options) if err != nil { - return StorageAccountsCreateOrUpdatePollerResponse{}, err + return StorageAccountsClientCreateOrUpdatePollerResponse{}, err } - result := StorageAccountsCreateOrUpdatePollerResponse{ + result := StorageAccountsClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("StorageAccountsClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("StorageAccountsClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return StorageAccountsCreateOrUpdatePollerResponse{}, err + return StorageAccountsClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &StorageAccountsCreateOrUpdatePoller{ + result.Poller = &StorageAccountsClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates a new StorageAccount or updates an existing StorageAccount on the device. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountsClient) createOrUpdate(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, storageAccount StorageAccount, options *StorageAccountsBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *StorageAccountsClient) createOrUpdate(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, storageAccount StorageAccount, options *StorageAccountsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, storageAccountName, resourceGroupName, storageAccount, options) if err != nil { return nil, err @@ -74,13 +87,13 @@ func (client *StorageAccountsClient) createOrUpdate(ctx context.Context, deviceN return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *StorageAccountsClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, storageAccount StorageAccount, options *StorageAccountsBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *StorageAccountsClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, storageAccount StorageAccount, options *StorageAccountsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -98,7 +111,7 @@ func (client *StorageAccountsClient) createOrUpdateCreateRequest(ctx context.Con return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -109,42 +122,34 @@ func (client *StorageAccountsClient) createOrUpdateCreateRequest(ctx context.Con return req, runtime.MarshalAsJSON(req, storageAccount) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *StorageAccountsClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountsClient) BeginDelete(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsBeginDeleteOptions) (StorageAccountsDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// storageAccountName - The StorageAccount name. +// resourceGroupName - The resource group name. +// options - StorageAccountsClientBeginDeleteOptions contains the optional parameters for the StorageAccountsClient.BeginDelete +// method. +func (client *StorageAccountsClient) BeginDelete(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsClientBeginDeleteOptions) (StorageAccountsClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, storageAccountName, resourceGroupName, options) if err != nil { - return StorageAccountsDeletePollerResponse{}, err + return StorageAccountsClientDeletePollerResponse{}, err } - result := StorageAccountsDeletePollerResponse{ + result := StorageAccountsClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("StorageAccountsClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("StorageAccountsClient.Delete", "", resp, client.pl) if err != nil { - return StorageAccountsDeletePollerResponse{}, err + return StorageAccountsClientDeletePollerResponse{}, err } - result.Poller = &StorageAccountsDeletePoller{ + result.Poller = &StorageAccountsClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountsClient) deleteOperation(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *StorageAccountsClient) deleteOperation(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, storageAccountName, resourceGroupName, options) if err != nil { return nil, err @@ -154,13 +159,13 @@ func (client *StorageAccountsClient) deleteOperation(ctx context.Context, device return nil, err } if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *StorageAccountsClient) deleteCreateRequest(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsBeginDeleteOptions) (*policy.Request, error) { +func (client *StorageAccountsClient) deleteCreateRequest(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -178,7 +183,7 @@ func (client *StorageAccountsClient) deleteCreateRequest(ctx context.Context, de return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -189,38 +194,29 @@ func (client *StorageAccountsClient) deleteCreateRequest(ctx context.Context, de return req, nil } -// deleteHandleError handles the Delete error response. -func (client *StorageAccountsClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets a StorageAccount by name. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountsClient) Get(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsGetOptions) (StorageAccountsGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// storageAccountName - The storage account name. +// resourceGroupName - The resource group name. +// options - StorageAccountsClientGetOptions contains the optional parameters for the StorageAccountsClient.Get method. +func (client *StorageAccountsClient) Get(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsClientGetOptions) (StorageAccountsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, storageAccountName, resourceGroupName, options) if err != nil { - return StorageAccountsGetResponse{}, err + return StorageAccountsClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return StorageAccountsGetResponse{}, err + return StorageAccountsClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageAccountsGetResponse{}, client.getHandleError(resp) + return StorageAccountsClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *StorageAccountsClient) getCreateRequest(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsGetOptions) (*policy.Request, error) { +func (client *StorageAccountsClient) getCreateRequest(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -238,7 +234,7 @@ func (client *StorageAccountsClient) getCreateRequest(ctx context.Context, devic return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -250,43 +246,34 @@ func (client *StorageAccountsClient) getCreateRequest(ctx context.Context, devic } // getHandleResponse handles the Get response. -func (client *StorageAccountsClient) getHandleResponse(resp *http.Response) (StorageAccountsGetResponse, error) { - result := StorageAccountsGetResponse{RawResponse: resp} +func (client *StorageAccountsClient) getHandleResponse(resp *http.Response) (StorageAccountsClientGetResponse, error) { + result := StorageAccountsClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.StorageAccount); err != nil { - return StorageAccountsGetResponse{}, runtime.NewResponseError(err, resp) + return StorageAccountsClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *StorageAccountsClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *StorageAccountsClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *StorageAccountsListByDataBoxEdgeDeviceOptions) *StorageAccountsListByDataBoxEdgeDevicePager { - return &StorageAccountsListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - StorageAccountsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the StorageAccountsClient.ListByDataBoxEdgeDevice +// method. +func (client *StorageAccountsClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *StorageAccountsClientListByDataBoxEdgeDeviceOptions) *StorageAccountsClientListByDataBoxEdgeDevicePager { + return &StorageAccountsClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp StorageAccountsListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp StorageAccountsClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.StorageAccountList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *StorageAccountsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *StorageAccountsListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *StorageAccountsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *StorageAccountsClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -300,7 +287,7 @@ func (client *StorageAccountsClient) listByDataBoxEdgeDeviceCreateRequest(ctx co return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -312,23 +299,10 @@ func (client *StorageAccountsClient) listByDataBoxEdgeDeviceCreateRequest(ctx co } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *StorageAccountsClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (StorageAccountsListByDataBoxEdgeDeviceResponse, error) { - result := StorageAccountsListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *StorageAccountsClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (StorageAccountsClientListByDataBoxEdgeDeviceResponse, error) { + result := StorageAccountsClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.StorageAccountList); err != nil { - return StorageAccountsListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return StorageAccountsClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } - -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *StorageAccountsClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_supportpackages_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_supportpackages_client.go index edbfd5467a86..c94d1795f2f4 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_supportpackages_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_supportpackages_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,59 @@ import ( // SupportPackagesClient contains the methods for the SupportPackages group. // Don't use this type directly, use NewSupportPackagesClient() instead. type SupportPackagesClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewSupportPackagesClient creates a new instance of SupportPackagesClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewSupportPackagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SupportPackagesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - return &SupportPackagesClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + client := &SupportPackagesClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), + } + return client } // BeginTriggerSupportPackage - Triggers support package on the device -// If the operation fails it returns the *CloudError error type. -func (client *SupportPackagesClient) BeginTriggerSupportPackage(ctx context.Context, deviceName string, resourceGroupName string, triggerSupportPackageRequest TriggerSupportPackageRequest, options *SupportPackagesBeginTriggerSupportPackageOptions) (SupportPackagesTriggerSupportPackagePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// triggerSupportPackageRequest - The trigger support package request object +// options - SupportPackagesClientBeginTriggerSupportPackageOptions contains the optional parameters for the SupportPackagesClient.BeginTriggerSupportPackage +// method. +func (client *SupportPackagesClient) BeginTriggerSupportPackage(ctx context.Context, deviceName string, resourceGroupName string, triggerSupportPackageRequest TriggerSupportPackageRequest, options *SupportPackagesClientBeginTriggerSupportPackageOptions) (SupportPackagesClientTriggerSupportPackagePollerResponse, error) { resp, err := client.triggerSupportPackage(ctx, deviceName, resourceGroupName, triggerSupportPackageRequest, options) if err != nil { - return SupportPackagesTriggerSupportPackagePollerResponse{}, err + return SupportPackagesClientTriggerSupportPackagePollerResponse{}, err } - result := SupportPackagesTriggerSupportPackagePollerResponse{ + result := SupportPackagesClientTriggerSupportPackagePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("SupportPackagesClient.TriggerSupportPackage", "", resp, client.pl, client.triggerSupportPackageHandleError) + pt, err := armruntime.NewPoller("SupportPackagesClient.TriggerSupportPackage", "", resp, client.pl) if err != nil { - return SupportPackagesTriggerSupportPackagePollerResponse{}, err + return SupportPackagesClientTriggerSupportPackagePollerResponse{}, err } - result.Poller = &SupportPackagesTriggerSupportPackagePoller{ + result.Poller = &SupportPackagesClientTriggerSupportPackagePoller{ pt: pt, } return result, nil } // TriggerSupportPackage - Triggers support package on the device -// If the operation fails it returns the *CloudError error type. -func (client *SupportPackagesClient) triggerSupportPackage(ctx context.Context, deviceName string, resourceGroupName string, triggerSupportPackageRequest TriggerSupportPackageRequest, options *SupportPackagesBeginTriggerSupportPackageOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *SupportPackagesClient) triggerSupportPackage(ctx context.Context, deviceName string, resourceGroupName string, triggerSupportPackageRequest TriggerSupportPackageRequest, options *SupportPackagesClientBeginTriggerSupportPackageOptions) (*http.Response, error) { req, err := client.triggerSupportPackageCreateRequest(ctx, deviceName, resourceGroupName, triggerSupportPackageRequest, options) if err != nil { return nil, err @@ -74,13 +86,13 @@ func (client *SupportPackagesClient) triggerSupportPackage(ctx context.Context, return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.triggerSupportPackageHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // triggerSupportPackageCreateRequest creates the TriggerSupportPackage request. -func (client *SupportPackagesClient) triggerSupportPackageCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, triggerSupportPackageRequest TriggerSupportPackageRequest, options *SupportPackagesBeginTriggerSupportPackageOptions) (*policy.Request, error) { +func (client *SupportPackagesClient) triggerSupportPackageCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, triggerSupportPackageRequest TriggerSupportPackageRequest, options *SupportPackagesClientBeginTriggerSupportPackageOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggerSupportPackage" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -94,7 +106,7 @@ func (client *SupportPackagesClient) triggerSupportPackageCreateRequest(ctx cont return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -104,16 +116,3 @@ func (client *SupportPackagesClient) triggerSupportPackageCreateRequest(ctx cont req.Raw().Header.Set("Accept", "application/json") return req, runtime.MarshalAsJSON(req, triggerSupportPackageRequest) } - -// triggerSupportPackageHandleError handles the TriggerSupportPackage error response. -func (client *SupportPackagesClient) triggerSupportPackageHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_triggers_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_triggers_client.go index a70b11de10cf..52502239fd53 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_triggers_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_triggers_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,60 @@ import ( // TriggersClient contains the methods for the Triggers group. // Don't use this type directly, use NewTriggersClient() instead. type TriggersClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewTriggersClient creates a new instance of TriggersClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewTriggersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TriggersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &TriggersClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &TriggersClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } // BeginCreateOrUpdate - Creates or updates a trigger. -// If the operation fails it returns the *CloudError error type. -func (client *TriggersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, trigger TriggerClassification, options *TriggersBeginCreateOrUpdateOptions) (TriggersCreateOrUpdatePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - Creates or updates a trigger +// name - The trigger name. +// resourceGroupName - The resource group name. +// trigger - The trigger. +// options - TriggersClientBeginCreateOrUpdateOptions contains the optional parameters for the TriggersClient.BeginCreateOrUpdate +// method. +func (client *TriggersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, trigger TriggerClassification, options *TriggersClientBeginCreateOrUpdateOptions) (TriggersClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, trigger, options) if err != nil { - return TriggersCreateOrUpdatePollerResponse{}, err + return TriggersClientCreateOrUpdatePollerResponse{}, err } - result := TriggersCreateOrUpdatePollerResponse{ + result := TriggersClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("TriggersClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("TriggersClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return TriggersCreateOrUpdatePollerResponse{}, err + return TriggersClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &TriggersCreateOrUpdatePoller{ + result.Poller = &TriggersClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates or updates a trigger. -// If the operation fails it returns the *CloudError error type. -func (client *TriggersClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, trigger TriggerClassification, options *TriggersBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *TriggersClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, trigger TriggerClassification, options *TriggersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, name, resourceGroupName, trigger, options) if err != nil { return nil, err @@ -74,13 +87,13 @@ func (client *TriggersClient) createOrUpdate(ctx context.Context, deviceName str return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *TriggersClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, trigger TriggerClassification, options *TriggersBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *TriggersClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, trigger TriggerClassification, options *TriggersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -98,7 +111,7 @@ func (client *TriggersClient) createOrUpdateCreateRequest(ctx context.Context, d return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -109,42 +122,33 @@ func (client *TriggersClient) createOrUpdateCreateRequest(ctx context.Context, d return req, runtime.MarshalAsJSON(req, trigger) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *TriggersClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the trigger on the gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *TriggersClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersBeginDeleteOptions) (TriggersDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The trigger name. +// resourceGroupName - The resource group name. +// options - TriggersClientBeginDeleteOptions contains the optional parameters for the TriggersClient.BeginDelete method. +func (client *TriggersClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersClientBeginDeleteOptions) (TriggersClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return TriggersDeletePollerResponse{}, err + return TriggersClientDeletePollerResponse{}, err } - result := TriggersDeletePollerResponse{ + result := TriggersClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("TriggersClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("TriggersClient.Delete", "", resp, client.pl) if err != nil { - return TriggersDeletePollerResponse{}, err + return TriggersClientDeletePollerResponse{}, err } - result.Poller = &TriggersDeletePoller{ + result.Poller = &TriggersClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the trigger on the gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *TriggersClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *TriggersClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err @@ -154,13 +158,13 @@ func (client *TriggersClient) deleteOperation(ctx context.Context, deviceName st return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *TriggersClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersBeginDeleteOptions) (*policy.Request, error) { +func (client *TriggersClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -178,7 +182,7 @@ func (client *TriggersClient) deleteCreateRequest(ctx context.Context, deviceNam return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -189,38 +193,29 @@ func (client *TriggersClient) deleteCreateRequest(ctx context.Context, deviceNam return req, nil } -// deleteHandleError handles the Delete error response. -func (client *TriggersClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Get a specific trigger by name. -// If the operation fails it returns the *CloudError error type. -func (client *TriggersClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersGetOptions) (TriggersGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The trigger name. +// resourceGroupName - The resource group name. +// options - TriggersClientGetOptions contains the optional parameters for the TriggersClient.Get method. +func (client *TriggersClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersClientGetOptions) (TriggersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return TriggersGetResponse{}, err + return TriggersClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return TriggersGetResponse{}, err + return TriggersClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return TriggersGetResponse{}, client.getHandleError(resp) + return TriggersClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *TriggersClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersGetOptions) (*policy.Request, error) { +func (client *TriggersClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -238,7 +233,7 @@ func (client *TriggersClient) getCreateRequest(ctx context.Context, deviceName s return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -250,43 +245,34 @@ func (client *TriggersClient) getCreateRequest(ctx context.Context, deviceName s } // getHandleResponse handles the Get response. -func (client *TriggersClient) getHandleResponse(resp *http.Response) (TriggersGetResponse, error) { - result := TriggersGetResponse{RawResponse: resp} +func (client *TriggersClient) getHandleResponse(resp *http.Response) (TriggersClientGetResponse, error) { + result := TriggersClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return TriggersGetResponse{}, runtime.NewResponseError(err, resp) + return TriggersClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *TriggersClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Lists all the triggers configured in the device. -// If the operation fails it returns the *CloudError error type. -func (client *TriggersClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *TriggersListByDataBoxEdgeDeviceOptions) *TriggersListByDataBoxEdgeDevicePager { - return &TriggersListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - TriggersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the TriggersClient.ListByDataBoxEdgeDevice +// method. +func (client *TriggersClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *TriggersClientListByDataBoxEdgeDeviceOptions) *TriggersClientListByDataBoxEdgeDevicePager { + return &TriggersClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp TriggersListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp TriggersClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.TriggerList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *TriggersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *TriggersListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *TriggersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *TriggersClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -300,7 +286,7 @@ func (client *TriggersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.C return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -315,23 +301,10 @@ func (client *TriggersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.C } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *TriggersClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (TriggersListByDataBoxEdgeDeviceResponse, error) { - result := TriggersListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *TriggersClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (TriggersClientListByDataBoxEdgeDeviceResponse, error) { + result := TriggersClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.TriggerList); err != nil { - return TriggersListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return TriggersClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } - -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *TriggersClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_users_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_users_client.go index 6329b6514520..1687223beb6d 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_users_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_users_client.go @@ -11,7 +11,6 @@ package armdataboxedge import ( "context" "errors" - "fmt" "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" @@ -25,46 +24,61 @@ import ( // UsersClient contains the methods for the Users group. // Don't use this type directly, use NewUsersClient() instead. type UsersClient struct { - ep string - pl runtime.Pipeline + host string subscriptionID string + pl runtime.Pipeline } // NewUsersClient creates a new instance of UsersClient with the specified values. +// subscriptionID - The subscription ID. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. func NewUsersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *UsersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options + if options == nil { + options = &arm.ClientOptions{} + } + ep := options.Endpoint + if len(ep) == 0 { + ep = arm.AzurePublicCloud } - if len(cp.Host) == 0 { - cp.Host = arm.AzurePublicCloud + client := &UsersClient{ + subscriptionID: subscriptionID, + host: string(ep), + pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options), } - return &UsersClient{subscriptionID: subscriptionID, ep: string(cp.Host), pl: armruntime.NewPipeline(module, version, credential, &cp)} + return client } -// BeginCreateOrUpdate - Creates a new user or updates an existing user's information on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *UsersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, userParam User, options *UsersBeginCreateOrUpdateOptions) (UsersCreateOrUpdatePollerResponse, error) { +// BeginCreateOrUpdate - Creates a new user or updates an existing user's information on a Data Box Edge/Data Box Gateway +// device. +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The user name. +// resourceGroupName - The resource group name. +// userParam - The user details. +// options - UsersClientBeginCreateOrUpdateOptions contains the optional parameters for the UsersClient.BeginCreateOrUpdate +// method. +func (client *UsersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, userParam User, options *UsersClientBeginCreateOrUpdateOptions) (UsersClientCreateOrUpdatePollerResponse, error) { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, userParam, options) if err != nil { - return UsersCreateOrUpdatePollerResponse{}, err + return UsersClientCreateOrUpdatePollerResponse{}, err } - result := UsersCreateOrUpdatePollerResponse{ + result := UsersClientCreateOrUpdatePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("UsersClient.CreateOrUpdate", "", resp, client.pl, client.createOrUpdateHandleError) + pt, err := armruntime.NewPoller("UsersClient.CreateOrUpdate", "", resp, client.pl) if err != nil { - return UsersCreateOrUpdatePollerResponse{}, err + return UsersClientCreateOrUpdatePollerResponse{}, err } - result.Poller = &UsersCreateOrUpdatePoller{ + result.Poller = &UsersClientCreateOrUpdatePoller{ pt: pt, } return result, nil } // CreateOrUpdate - Creates a new user or updates an existing user's information on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *UsersClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, userParam User, options *UsersBeginCreateOrUpdateOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *UsersClient) createOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, userParam User, options *UsersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, deviceName, name, resourceGroupName, userParam, options) if err != nil { return nil, err @@ -74,13 +88,13 @@ func (client *UsersClient) createOrUpdate(ctx context.Context, deviceName string return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, client.createOrUpdateHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *UsersClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, userParam User, options *UsersBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *UsersClient) createOrUpdateCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, userParam User, options *UsersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -98,7 +112,7 @@ func (client *UsersClient) createOrUpdateCreateRequest(ctx context.Context, devi return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -109,42 +123,33 @@ func (client *UsersClient) createOrUpdateCreateRequest(ctx context.Context, devi return req, runtime.MarshalAsJSON(req, userParam) } -// createOrUpdateHandleError handles the CreateOrUpdate error response. -func (client *UsersClient) createOrUpdateHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // BeginDelete - Deletes the user on a databox edge/gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *UsersClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersBeginDeleteOptions) (UsersDeletePollerResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The user name. +// resourceGroupName - The resource group name. +// options - UsersClientBeginDeleteOptions contains the optional parameters for the UsersClient.BeginDelete method. +func (client *UsersClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersClientBeginDeleteOptions) (UsersClientDeletePollerResponse, error) { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return UsersDeletePollerResponse{}, err + return UsersClientDeletePollerResponse{}, err } - result := UsersDeletePollerResponse{ + result := UsersClientDeletePollerResponse{ RawResponse: resp, } - pt, err := armruntime.NewPoller("UsersClient.Delete", "", resp, client.pl, client.deleteHandleError) + pt, err := armruntime.NewPoller("UsersClient.Delete", "", resp, client.pl) if err != nil { - return UsersDeletePollerResponse{}, err + return UsersClientDeletePollerResponse{}, err } - result.Poller = &UsersDeletePoller{ + result.Poller = &UsersClientDeletePoller{ pt: pt, } return result, nil } // Delete - Deletes the user on a databox edge/gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *UsersClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersBeginDeleteOptions) (*http.Response, error) { +// If the operation fails it returns an *azcore.ResponseError type. +func (client *UsersClient) deleteOperation(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err @@ -154,13 +159,13 @@ func (client *UsersClient) deleteOperation(ctx context.Context, deviceName strin return nil, err } if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, client.deleteHandleError(resp) + return nil, runtime.NewResponseError(resp) } return resp, nil } // deleteCreateRequest creates the Delete request. -func (client *UsersClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersBeginDeleteOptions) (*policy.Request, error) { +func (client *UsersClient) deleteCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -178,7 +183,7 @@ func (client *UsersClient) deleteCreateRequest(ctx context.Context, deviceName s return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -189,38 +194,29 @@ func (client *UsersClient) deleteCreateRequest(ctx context.Context, deviceName s return req, nil } -// deleteHandleError handles the Delete error response. -func (client *UsersClient) deleteHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // Get - Gets the properties of the specified user. -// If the operation fails it returns the *CloudError error type. -func (client *UsersClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersGetOptions) (UsersGetResponse, error) { +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// name - The user name. +// resourceGroupName - The resource group name. +// options - UsersClientGetOptions contains the optional parameters for the UsersClient.Get method. +func (client *UsersClient) Get(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersClientGetOptions) (UsersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, deviceName, name, resourceGroupName, options) if err != nil { - return UsersGetResponse{}, err + return UsersClientGetResponse{}, err } resp, err := client.pl.Do(req) if err != nil { - return UsersGetResponse{}, err + return UsersClientGetResponse{}, err } if !runtime.HasStatusCode(resp, http.StatusOK) { - return UsersGetResponse{}, client.getHandleError(resp) + return UsersClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) } // getCreateRequest creates the Get request. -func (client *UsersClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersGetOptions) (*policy.Request, error) { +func (client *UsersClient) getCreateRequest(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -238,7 +234,7 @@ func (client *UsersClient) getCreateRequest(ctx context.Context, deviceName stri return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -250,43 +246,34 @@ func (client *UsersClient) getCreateRequest(ctx context.Context, deviceName stri } // getHandleResponse handles the Get response. -func (client *UsersClient) getHandleResponse(resp *http.Response) (UsersGetResponse, error) { - result := UsersGetResponse{RawResponse: resp} +func (client *UsersClient) getHandleResponse(resp *http.Response) (UsersClientGetResponse, error) { + result := UsersClientGetResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.User); err != nil { - return UsersGetResponse{}, runtime.NewResponseError(err, resp) + return UsersClientGetResponse{}, err } return result, nil } -// getHandleError handles the Get error response. -func (client *UsersClient) getHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -} - // ListByDataBoxEdgeDevice - Gets all the users registered on a Data Box Edge/Data Box Gateway device. -// If the operation fails it returns the *CloudError error type. -func (client *UsersClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *UsersListByDataBoxEdgeDeviceOptions) *UsersListByDataBoxEdgeDevicePager { - return &UsersListByDataBoxEdgeDevicePager{ +// If the operation fails it returns an *azcore.ResponseError type. +// deviceName - The device name. +// resourceGroupName - The resource group name. +// options - UsersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the UsersClient.ListByDataBoxEdgeDevice +// method. +func (client *UsersClient) ListByDataBoxEdgeDevice(deviceName string, resourceGroupName string, options *UsersClientListByDataBoxEdgeDeviceOptions) *UsersClientListByDataBoxEdgeDevicePager { + return &UsersClientListByDataBoxEdgeDevicePager{ client: client, requester: func(ctx context.Context) (*policy.Request, error) { return client.listByDataBoxEdgeDeviceCreateRequest(ctx, deviceName, resourceGroupName, options) }, - advancer: func(ctx context.Context, resp UsersListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { + advancer: func(ctx context.Context, resp UsersClientListByDataBoxEdgeDeviceResponse) (*policy.Request, error) { return runtime.NewRequest(ctx, http.MethodGet, *resp.UserList.NextLink) }, } } // listByDataBoxEdgeDeviceCreateRequest creates the ListByDataBoxEdgeDevice request. -func (client *UsersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *UsersListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { +func (client *UsersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Context, deviceName string, resourceGroupName string, options *UsersClientListByDataBoxEdgeDeviceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users" if deviceName == "" { return nil, errors.New("parameter deviceName cannot be empty") @@ -300,7 +287,7 @@ func (client *UsersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont return nil, errors.New("parameter resourceGroupName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.ep, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) if err != nil { return nil, err } @@ -315,23 +302,10 @@ func (client *UsersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont } // listByDataBoxEdgeDeviceHandleResponse handles the ListByDataBoxEdgeDevice response. -func (client *UsersClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (UsersListByDataBoxEdgeDeviceResponse, error) { - result := UsersListByDataBoxEdgeDeviceResponse{RawResponse: resp} +func (client *UsersClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Response) (UsersClientListByDataBoxEdgeDeviceResponse, error) { + result := UsersClientListByDataBoxEdgeDeviceResponse{RawResponse: resp} if err := runtime.UnmarshalAsJSON(resp, &result.UserList); err != nil { - return UsersListByDataBoxEdgeDeviceResponse{}, runtime.NewResponseError(err, resp) + return UsersClientListByDataBoxEdgeDeviceResponse{}, err } return result, nil } - -// listByDataBoxEdgeDeviceHandleError handles the ListByDataBoxEdgeDevice error response. -func (client *UsersClient) listByDataBoxEdgeDeviceHandleError(resp *http.Response) error { - body, err := runtime.Payload(resp) - if err != nil { - return runtime.NewResponseError(err, resp) - } - errType := CloudError{raw: string(body)} - if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil { - return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp) - } - return runtime.NewResponseError(&errType, resp) -}