diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/CHANGELOG.md b/sdk/resourcemanager/databoxedge/armdataboxedge/CHANGELOG.md index c0600d874ad3..0a860563678b 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/CHANGELOG.md +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/CHANGELOG.md @@ -1,5 +1,71 @@ # Release History +## 1.0.0 (2022-05-18) +### Breaking Changes + +- Function `*SharesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[SharesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[SharesClientCreateOrUpdateResponse], error)` +- Function `*DevicesClient.BeginCreateOrUpdateSecuritySettings` return value(s) have been changed from `(*armruntime.Poller[DevicesClientCreateOrUpdateSecuritySettingsResponse], error)` to `(*runtime.Poller[DevicesClientCreateOrUpdateSecuritySettingsResponse], error)` +- Function `*UsersClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[UsersClientDeleteResponse], error)` to `(*runtime.Poller[UsersClientDeleteResponse], error)` +- Function `*ContainersClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ContainersClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ContainersClientCreateOrUpdateResponse], error)` +- Function `*SupportPackagesClient.BeginTriggerSupportPackage` return value(s) have been changed from `(*armruntime.Poller[SupportPackagesClientTriggerSupportPackageResponse], error)` to `(*runtime.Poller[SupportPackagesClientTriggerSupportPackageResponse], error)` +- Function `*TriggersClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[TriggersClientDeleteResponse], error)` to `(*runtime.Poller[TriggersClientDeleteResponse], error)` +- Function `*DeviceCapacityCheckClient.BeginCheckResourceCreationFeasibility` return value(s) have been changed from `(*armruntime.Poller[DeviceCapacityCheckClientCheckResourceCreationFeasibilityResponse], error)` to `(*runtime.Poller[DeviceCapacityCheckClientCheckResourceCreationFeasibilityResponse], error)` +- Function `*DiagnosticSettingsClient.BeginUpdateDiagnosticProactiveLogCollectionSettings` return value(s) have been changed from `(*armruntime.Poller[DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse], error)` to `(*runtime.Poller[DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse], error)` +- Function `*ContainersClient.BeginRefresh` return value(s) have been changed from `(*armruntime.Poller[ContainersClientRefreshResponse], error)` to `(*runtime.Poller[ContainersClientRefreshResponse], error)` +- Function `*RolesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[RolesClientDeleteResponse], error)` to `(*runtime.Poller[RolesClientDeleteResponse], error)` +- Function `*AddonsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[AddonsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[AddonsClientCreateOrUpdateResponse], error)` +- Function `*BandwidthSchedulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[BandwidthSchedulesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[BandwidthSchedulesClientCreateOrUpdateResponse], error)` +- Function `*SharesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[SharesClientDeleteResponse], error)` to `(*runtime.Poller[SharesClientDeleteResponse], error)` +- Function `*StorageAccountCredentialsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[StorageAccountCredentialsClientDeleteResponse], error)` to `(*runtime.Poller[StorageAccountCredentialsClientDeleteResponse], error)` +- Function `*UsersClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[UsersClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[UsersClientCreateOrUpdateResponse], error)` +- Function `*StorageAccountsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[StorageAccountsClientDeleteResponse], error)` to `(*runtime.Poller[StorageAccountsClientDeleteResponse], error)` +- Function `*DevicesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[DevicesClientDeleteResponse], error)` to `(*runtime.Poller[DevicesClientDeleteResponse], error)` +- Function `*OrdersClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[OrdersClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[OrdersClientCreateOrUpdateResponse], error)` +- Function `*DiagnosticSettingsClient.BeginUpdateDiagnosticRemoteSupportSettings` return value(s) have been changed from `(*armruntime.Poller[DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse], error)` to `(*runtime.Poller[DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse], error)` +- Function `*BandwidthSchedulesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[BandwidthSchedulesClientDeleteResponse], error)` to `(*runtime.Poller[BandwidthSchedulesClientDeleteResponse], error)` +- Function `*OrdersClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[OrdersClientDeleteResponse], error)` to `(*runtime.Poller[OrdersClientDeleteResponse], error)` +- Function `*AddonsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[AddonsClientDeleteResponse], error)` to `(*runtime.Poller[AddonsClientDeleteResponse], error)` +- Function `*RolesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[RolesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[RolesClientCreateOrUpdateResponse], error)` +- Function `*DevicesClient.BeginInstallUpdates` return value(s) have been changed from `(*armruntime.Poller[DevicesClientInstallUpdatesResponse], error)` to `(*runtime.Poller[DevicesClientInstallUpdatesResponse], error)` +- Function `*StorageAccountsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[StorageAccountsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[StorageAccountsClientCreateOrUpdateResponse], error)` +- Function `*DevicesClient.BeginScanForUpdates` return value(s) have been changed from `(*armruntime.Poller[DevicesClientScanForUpdatesResponse], error)` to `(*runtime.Poller[DevicesClientScanForUpdatesResponse], error)` +- Function `*MonitoringConfigClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[MonitoringConfigClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[MonitoringConfigClientCreateOrUpdateResponse], error)` +- Function `*StorageAccountCredentialsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[StorageAccountCredentialsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[StorageAccountCredentialsClientCreateOrUpdateResponse], error)` +- Function `*ContainersClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ContainersClientDeleteResponse], error)` to `(*runtime.Poller[ContainersClientDeleteResponse], error)` +- Function `*TriggersClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[TriggersClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[TriggersClientCreateOrUpdateResponse], error)` +- Function `*SharesClient.BeginRefresh` return value(s) have been changed from `(*armruntime.Poller[SharesClientRefreshResponse], error)` to `(*runtime.Poller[SharesClientRefreshResponse], error)` +- Function `*MonitoringConfigClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[MonitoringConfigClientDeleteResponse], error)` to `(*runtime.Poller[MonitoringConfigClientDeleteResponse], error)` +- Function `*DevicesClient.BeginDownloadUpdates` return value(s) have been changed from `(*armruntime.Poller[DevicesClientDownloadUpdatesResponse], error)` to `(*runtime.Poller[DevicesClientDownloadUpdatesResponse], error)` +- Function `AddonList.MarshalJSON` has been removed +- Function `CloudErrorBody.MarshalJSON` has been removed +- Function `JobErrorDetails.MarshalJSON` has been removed +- Function `MetricSpecificationV1.MarshalJSON` has been removed +- Function `Job.MarshalJSON` has been removed +- Function `SKULocationInfo.MarshalJSON` has been removed +- Function `MonitoringMetricConfigurationList.MarshalJSON` has been removed +- Function `*SystemDataAutoGenerated.UnmarshalJSON` has been removed +- Function `ContainerList.MarshalJSON` has been removed +- Function `BandwidthSchedulesList.MarshalJSON` has been removed +- Function `ServiceSpecification.MarshalJSON` has been removed +- Function `DeviceList.MarshalJSON` has been removed +- Function `JobErrorItem.MarshalJSON` has been removed +- Function `UserList.MarshalJSON` has been removed +- Function `SystemDataAutoGenerated.MarshalJSON` has been removed +- Function `StorageAccountList.MarshalJSON` has been removed +- Function `ShareList.MarshalJSON` has been removed +- Function `SKU.MarshalJSON` has been removed +- Function `RoleList.MarshalJSON` has been removed +- Function `TriggerList.MarshalJSON` has been removed +- Function `MoveRequest.MarshalJSON` has been removed +- Function `AlertList.MarshalJSON` has been removed +- Function `OperationsList.MarshalJSON` has been removed +- Function `SKUList.MarshalJSON` has been removed +- Function `StorageAccountCredentialList.MarshalJSON` has been removed +- Function `NodeList.MarshalJSON` has been removed +- Function `OrderList.MarshalJSON` has been removed +- Struct `SystemDataAutoGenerated` has been removed + + ## 0.4.0 (2022-04-15) ### Breaking Changes diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/autorest.md b/sdk/resourcemanager/databoxedge/armdataboxedge/autorest.md index cb052cb694d8..af3974d2462f 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/cc26f1d28c939bbcde00a29aa8958b3eebb10cea/specification/databoxedge/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/cc26f1d28c939bbcde00a29aa8958b3eebb10cea/specification/databoxedge/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databoxedge/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databoxedge/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.4.0 +module-version: 1.0.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/go.mod b/sdk/resourcemanager/databoxedge/armdataboxedge/go.mod index 56a11db3e948..ed8c0c8f0602 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/go.mod +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/go.mod @@ -3,19 +3,19 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdata go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect github.com/golang-jwt/jwt v3.2.1+incompatible // indirect github.com/google/uuid v1.1.1 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 // indirect - golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect - golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect + golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect + golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/go.sum b/sdk/resourcemanager/databoxedge/armdataboxedge/go.sum index 56d1c32628ae..ed5b814680ee 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/go.sum +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/go.sum @@ -1,15 +1,13 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0 h1:D7l5jspkc4kwBYRWoZE4DQnu6LVpLwDsMZjBKS4wZLQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0/go.mod h1:w5pDIZuawUmY3Bj4tVx3Xb8KS96ToB0j315w9rqpAg0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0 h1:NVS/4LOQfkBpk+B1VopIzv1ptmYeEskA8w/3K/w7vjo= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0/go.mod h1:RG0cZndeZM17StwohYclmcXSr4oOJ8b1I5hB8llIc6Y= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1 h1:sLZ/Y+P/5RRtsXWylBjB5lkgixYfm0MQPiwrSX//JSo= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 h1:Yoicul8bnVdQrhDMTHxdEckRGX01XvwXDHUT9zYZ3k0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/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/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= @@ -17,37 +15,19 @@ 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/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= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= -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-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/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= +golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -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/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -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 ee1f9a6d2f70..8f9ac765bde7 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,19 +24,18 @@ func ExampleAddonsClient_NewListByRolePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewAddonsClient("", cred, nil) + client, err := armdataboxedge.NewAddonsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByRolePager("", - "", - "", + pager := client.NewListByRolePager("testedgedevice", + "IoTRole1", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -54,15 +51,15 @@ func ExampleAddonsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewAddonsClient("", cred, nil) + client, err := armdataboxedge.NewAddonsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", - "", + "testedgedevice", + "KubernetesRole", + "arcName", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -78,29 +75,29 @@ func ExampleAddonsClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewAddonsClient("", cred, nil) + client, err := armdataboxedge.NewAddonsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - "", + "testedgedevice", + "KubernetesRole", + "arcName", + "GroupForEdgeAutomation", &armdataboxedge.ArcAddon{ Kind: to.Ptr(armdataboxedge.AddonTypeArcForKubernetes), Properties: &armdataboxedge.ArcAddonProperties{ - ResourceGroupName: to.Ptr(""), - ResourceLocation: to.Ptr(""), - ResourceName: to.Ptr(""), - SubscriptionID: to.Ptr(""), + ResourceGroupName: to.Ptr("GroupForEdgeAutomation"), + ResourceLocation: to.Ptr("EastUS"), + ResourceName: to.Ptr("testedgedevice"), + SubscriptionID: to.Ptr("4385cf00-2d3a-425a-832f-f4285b1c9dce"), }, }, - &armdataboxedge.AddonsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -115,20 +112,20 @@ func ExampleAddonsClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewAddonsClient("", cred, nil) + client, err := armdataboxedge.NewAddonsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - "", - &armdataboxedge.AddonsClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "KubernetesRole", + "arcName", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 ca85df22d9bc..82da13574749 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 @@ -23,18 +23,17 @@ func ExampleAlertsClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewAlertsClient("", cred, nil) + client, err := armdataboxedge.NewAlertsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -50,14 +49,14 @@ func ExampleAlertsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewAlertsClient("", cred, nil) + client, err := armdataboxedge.NewAlertsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "159a00c7-8543-4343-9435-263ac87df3bb", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) 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 380e544dcb29..fca7a9a56a71 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 @@ -23,7 +23,7 @@ func ExampleAvailableSKUsClient_NewListPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewAvailableSKUsClient("", cred, nil) + client, err := armdataboxedge.NewAvailableSKUsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } @@ -32,7 +32,6 @@ func ExampleAvailableSKUsClient_NewListPager() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item 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 52ed130daf0c..95abf3565a5b 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,18 +24,17 @@ func ExampleBandwidthSchedulesClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewBandwidthSchedulesClient("", cred, nil) + client, err := armdataboxedge.NewBandwidthSchedulesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,14 +50,14 @@ func ExampleBandwidthSchedulesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewBandwidthSchedulesClient("", cred, nil) + client, err := armdataboxedge.NewBandwidthSchedulesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "bandwidth-1", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -76,29 +73,29 @@ func ExampleBandwidthSchedulesClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewBandwidthSchedulesClient("", cred, nil) + client, err := armdataboxedge.NewBandwidthSchedulesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "testedgedevice", + "bandwidth-1", + "GroupForEdgeAutomation", armdataboxedge.BandwidthSchedule{ Properties: &armdataboxedge.BandwidthScheduleProperties{ Days: []*armdataboxedge.DayOfWeek{ to.Ptr(armdataboxedge.DayOfWeekSunday), to.Ptr(armdataboxedge.DayOfWeekMonday)}, RateInMbps: to.Ptr[int32](100), - Start: to.Ptr(""), - Stop: to.Ptr(""), + Start: to.Ptr("0:0:0"), + Stop: to.Ptr("13:59:0"), }, }, - &armdataboxedge.BandwidthSchedulesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -113,19 +110,19 @@ func ExampleBandwidthSchedulesClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewBandwidthSchedulesClient("", cred, nil) + client, err := armdataboxedge.NewBandwidthSchedulesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdataboxedge.BandwidthSchedulesClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "bandwidth-1", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 540ea9e7c968..dfc920898273 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,19 +24,18 @@ func ExampleContainersClient_NewListByStorageAccountPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewContainersClient("", cred, nil) + client, err := armdataboxedge.NewContainersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByStorageAccountPager("", - "", - "", + pager := client.NewListByStorageAccountPager("testedgedevice", + "storageaccount1", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -54,15 +51,15 @@ func ExampleContainersClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewContainersClient("", cred, nil) + client, err := armdataboxedge.NewContainersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", - "", + "testedgedevice", + "storageaccount1", + "blobcontainer1", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -78,25 +75,25 @@ func ExampleContainersClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewContainersClient("", cred, nil) + client, err := armdataboxedge.NewContainersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - "", + "testedgedevice", + "storageaccount1", + "blobcontainer1", + "GroupForEdgeAutomation", armdataboxedge.Container{ Properties: &armdataboxedge.ContainerProperties{ DataFormat: to.Ptr(armdataboxedge.AzureContainerDataFormatBlockBlob), }, }, - &armdataboxedge.ContainersClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -111,20 +108,20 @@ func ExampleContainersClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewContainersClient("", cred, nil) + client, err := armdataboxedge.NewContainersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - "", - &armdataboxedge.ContainersClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "storageaccount1", + "blobcontainer1", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -137,20 +134,20 @@ func ExampleContainersClient_BeginRefresh() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewContainersClient("", cred, nil) + client, err := armdataboxedge.NewContainersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginRefresh(ctx, - "", - "", - "", - "", - &armdataboxedge.ContainersClientBeginRefreshOptions{ResumeToken: ""}) + "testedgedevice", + "storageaccount1", + "blobcontainer1", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devicecapacitycheck_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devicecapacitycheck_client_test.go index 308f339deb54..f396d34da198 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devicecapacitycheck_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devicecapacitycheck_client_test.go @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,13 +24,13 @@ func ExampleDeviceCapacityCheckClient_BeginCheckResourceCreationFeasibility() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDeviceCapacityCheckClient("", cred, nil) + client, err := armdataboxedge.NewDeviceCapacityCheckClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCheckResourceCreationFeasibility(ctx, - "", - "", + "GroupForEdgeAutomation", + "testedgedevice", armdataboxedge.DeviceCapacityRequestInfo{ Properties: &armdataboxedge.DeviceCapacityRequestInfoProperties{ VMPlacementQuery: [][]*string{ @@ -40,13 +38,11 @@ func ExampleDeviceCapacityCheckClient_BeginCheckResourceCreationFeasibility() { to.Ptr("Standard_D2_v2")}}, }, }, - &armdataboxedge.DeviceCapacityCheckClientBeginCheckResourceCreationFeasibilityOptions{CapacityName: nil, - ResumeToken: "", - }) + &armdataboxedge.DeviceCapacityCheckClientBeginCheckResourceCreationFeasibilityOptions{CapacityName: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devicecapacityinfo_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devicecapacityinfo_client_test.go index 09ee76cd8475..543c1e080a26 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devicecapacityinfo_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_devicecapacityinfo_client_test.go @@ -23,13 +23,13 @@ func ExampleDeviceCapacityInfoClient_GetDeviceCapacityInfo() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDeviceCapacityInfoClient("", cred, nil) + client, err := armdataboxedge.NewDeviceCapacityInfoClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetDeviceCapacityInfo(ctx, - "", - "", + "GroupForEdgeAutomation", + "testedgedevice", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) 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 b37c29bad984..c2e3cd3b8d0d 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,7 +24,7 @@ func ExampleDevicesClient_NewListBySubscriptionPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } @@ -35,7 +33,6 @@ func ExampleDevicesClient_NewListBySubscriptionPager() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -51,17 +48,16 @@ func ExampleDevicesClient_NewListByResourceGroupPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByResourceGroupPager("", + pager := client.NewListByResourceGroupPager("GroupForEdgeAutomation", &armdataboxedge.DevicesClientListByResourceGroupOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -77,13 +73,13 @@ func ExampleDevicesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -99,15 +95,15 @@ func ExampleDevicesClient_CreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", armdataboxedge.Device{ - Location: to.Ptr(""), + Location: to.Ptr("WUS"), SKU: &armdataboxedge.SKUInfo{ Name: to.Ptr(armdataboxedge.SKUNameEdge), Tier: to.Ptr(armdataboxedge.SKUTierStandard), @@ -129,18 +125,18 @@ func ExampleDevicesClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - &armdataboxedge.DevicesClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -153,18 +149,18 @@ func ExampleDevicesClient_Update() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", armdataboxedge.DevicePatch{ Properties: &armdataboxedge.DevicePropertiesPatch{ EdgeProfile: &armdataboxedge.EdgeProfilePatch{ Subscription: &armdataboxedge.EdgeProfileSubscriptionPatch{ - ID: to.Ptr(""), + ID: to.Ptr("/subscriptions/0d44739e-0563-474f-97e7-24a0cdb23b29/resourceGroups/rapvs-rg/providers/Microsoft.AzureStack/linkedSubscriptions/ca014ddc-5cf2-45f8-b390-e901e4a0ae87"), }, }, }, @@ -184,18 +180,18 @@ func ExampleDevicesClient_BeginDownloadUpdates() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDownloadUpdates(ctx, - "", - "", - &armdataboxedge.DevicesClientBeginDownloadUpdatesOptions{ResumeToken: ""}) + "testedgedevice", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -208,13 +204,13 @@ func ExampleDevicesClient_GenerateCertificate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GenerateCertificate(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -230,13 +226,13 @@ func ExampleDevicesClient_GetExtendedInformation() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetExtendedInformation(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -252,18 +248,18 @@ func ExampleDevicesClient_BeginInstallUpdates() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginInstallUpdates(ctx, - "", - "", - &armdataboxedge.DevicesClientBeginInstallUpdatesOptions{ResumeToken: ""}) + "testedgedevice", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -276,13 +272,13 @@ func ExampleDevicesClient_GetNetworkSettings() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetNetworkSettings(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -298,18 +294,18 @@ func ExampleDevicesClient_BeginScanForUpdates() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginScanForUpdates(ctx, - "", - "", - &armdataboxedge.DevicesClientBeginScanForUpdatesOptions{ResumeToken: ""}) + "testedgedevice", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -322,27 +318,27 @@ func ExampleDevicesClient_BeginCreateOrUpdateSecuritySettings() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdateSecuritySettings(ctx, - "", - "", + "testedgedevice", + "AzureVM", armdataboxedge.SecuritySettings{ Properties: &armdataboxedge.SecuritySettingsProperties{ DeviceAdminPassword: &armdataboxedge.AsymmetricEncryptedSecret{ EncryptionAlgorithm: to.Ptr(armdataboxedge.EncryptionAlgorithmAES256), - EncryptionCertThumbprint: to.Ptr(""), - Value: to.Ptr(""), + EncryptionCertThumbprint: to.Ptr(""), + Value: to.Ptr(""), }, }, }, - &armdataboxedge.DevicesClientBeginCreateOrUpdateSecuritySettingsOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -355,13 +351,13 @@ func ExampleDevicesClient_UpdateExtendedInformation() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.UpdateExtendedInformation(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", armdataboxedge.DeviceExtendedInfoPatch{}, nil) if err != nil { @@ -378,13 +374,13 @@ func ExampleDevicesClient_GetUpdateSummary() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetUpdateSummary(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -400,16 +396,16 @@ func ExampleDevicesClient_UploadCertificate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDevicesClient("", cred, nil) + client, err := armdataboxedge.NewDevicesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.UploadCertificate(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", armdataboxedge.UploadCertificateRequest{ Properties: &armdataboxedge.RawCertificateData{ - Certificate: to.Ptr(""), + Certificate: to.Ptr("MIIC9DCCAdygAwIBAgIQWJae7GNjiI9Mcv/gJyrOPTANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDDAdXaW5kb3dzMB4XDTE4MTEyNzAwMTA0NVoXDTIxMTEyODAwMTA0NVowEjEQMA4GA1UEAwwHV2luZG93czCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKxkRExqxf0qH1avnyORptIbRC2yQwqe3EIbJ2FPKr5jtAppGeX/dGKrFSnX+7/0HFr77aJHafdpEAtOiLyJ4zCAVs0obZCCIq4qJdmjYUTU0UXH/w/YzXfQA0d9Zh9AN+NJBX9xj05NzgsT24fkgsK2v6mWJQXT7YcWAsl5sEYPnx1e+MrupNyVSL/RUJmrS+etJSysHtFeWRhsUhVAs1DD5ExJvBLU3WH0IsojEvpXcjrutB5/MDQNrd/StGI6WovoSSPH7FyT9tgERx+q+Yg3YUGzfaIPCctlrRGehcdtzdNoKd0rsX62yCq0U6POoSfwe22NJu41oAUMd7e6R8cCAwEAAaNGMEQwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0OBBYEFDd0VxnS3LnMIfwc7xW4b4IZWG5GMA4GA1UdDwEB/wQEAwIFIDANBgkqhkiG9w0BAQUFAAOCAQEAPQRby2u9celvtvL/DLEb5Vt3/tPStRQC5MyTD62L5RT/q8E6EMCXVZNkXF5WlWucLJi/18tY+9PNgP9xWLJh7kpSWlWdi9KPtwMqKDlEH8L2TnQdjimt9XuiCrTnoFy/1X2BGLY/rCaUJNSd15QCkz2xeW+Z+YSk2GwAc/A/4YfNpqSIMfNuPrT76o02VdD9WmJUA3fS/HY0sU9qgQRS/3F5/0EPS+HYQ0SvXCK9tggcCd4O050ytNBMJC9qMOJ7yE0iOrFfOJSCfDAuPhn/rHFh79Kn1moF+/CE+nc0/2RPiLC8r54/rt5dYyyxJDfXg0a3VrrX39W69WZGW5OXiw=="), }, }, nil) 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 d8658f4d6b97..0dbb7e2fe5f2 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 @@ -26,13 +26,13 @@ func ExampleDiagnosticSettingsClient_GetDiagnosticProactiveLogCollectionSettings log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDiagnosticSettingsClient("", cred, nil) + client, err := armdataboxedge.NewDiagnosticSettingsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetDiagnosticProactiveLogCollectionSettings(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -48,23 +48,23 @@ func ExampleDiagnosticSettingsClient_BeginUpdateDiagnosticProactiveLogCollection log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDiagnosticSettingsClient("", cred, nil) + client, err := armdataboxedge.NewDiagnosticSettingsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdateDiagnosticProactiveLogCollectionSettings(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", armdataboxedge.DiagnosticProactiveLogCollectionSettings{ Properties: &armdataboxedge.ProactiveLogCollectionSettingsProperties{ UserConsent: to.Ptr(armdataboxedge.ProactiveDiagnosticsConsentEnabled), }, }, - &armdataboxedge.DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -79,13 +79,13 @@ func ExampleDiagnosticSettingsClient_GetDiagnosticRemoteSupportSettings() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDiagnosticSettingsClient("", cred, nil) + client, err := armdataboxedge.NewDiagnosticSettingsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetDiagnosticRemoteSupportSettings(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -101,13 +101,13 @@ func ExampleDiagnosticSettingsClient_BeginUpdateDiagnosticRemoteSupportSettings( log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewDiagnosticSettingsClient("", cred, nil) + client, err := armdataboxedge.NewDiagnosticSettingsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdateDiagnosticRemoteSupportSettings(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", armdataboxedge.DiagnosticRemoteSupportSettings{ Properties: &armdataboxedge.DiagnosticRemoteSupportSettingsProperties{ RemoteSupportSettingsList: []*armdataboxedge.RemoteSupportSettings{ @@ -118,11 +118,11 @@ func ExampleDiagnosticSettingsClient_BeginUpdateDiagnosticRemoteSupportSettings( }}, }, }, - &armdataboxedge.DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 558334e4b280..fb6279601075 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 @@ -23,14 +23,14 @@ func ExampleJobsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewJobsClient("", cred, nil) + client, err := armdataboxedge.NewJobsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "159a00c7-8543-4343-9435-263ac87df3bb", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) 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 5f92be20b4da..b981c1619210 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,19 +24,18 @@ func ExampleMonitoringConfigClient_NewListPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewMonitoringConfigClient("", cred, nil) + client, err := armdataboxedge.NewMonitoringConfigClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("", - "", - "", + pager := client.NewListPager("testedgedevice", + "testrole", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -54,14 +51,14 @@ func ExampleMonitoringConfigClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewMonitoringConfigClient("", cred, nil) + client, err := armdataboxedge.NewMonitoringConfigClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "testrole", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -77,14 +74,14 @@ func ExampleMonitoringConfigClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewMonitoringConfigClient("", cred, nil) + client, err := armdataboxedge.NewMonitoringConfigClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "testedgedevice", + "testrole", + "GroupForEdgeAutomation", armdataboxedge.MonitoringMetricConfiguration{ Properties: &armdataboxedge.MonitoringMetricConfigurationProperties{ MetricConfigurations: []*armdataboxedge.MetricConfiguration{ @@ -93,20 +90,20 @@ func ExampleMonitoringConfigClient_BeginCreateOrUpdate() { { Counters: []*armdataboxedge.MetricCounter{ { - Name: to.Ptr(""), + Name: to.Ptr("test"), }}, }}, - MdmAccount: to.Ptr(""), - MetricNameSpace: to.Ptr(""), - ResourceID: to.Ptr(""), + MdmAccount: to.Ptr("test"), + MetricNameSpace: to.Ptr("test"), + ResourceID: to.Ptr("test"), }}, }, }, - &armdataboxedge.MonitoringConfigClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -121,19 +118,19 @@ func ExampleMonitoringConfigClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewMonitoringConfigClient("", cred, nil) + client, err := armdataboxedge.NewMonitoringConfigClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdataboxedge.MonitoringConfigClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "testrole", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 bc104b6d9f8e..38151512b36c 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 @@ -23,18 +23,17 @@ func ExampleNodesClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewNodesClient("", cred, nil) + client, err := armdataboxedge.NewNodesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item 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 92ee23b29ece..45bd1f89eb81 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 @@ -32,7 +32,6 @@ func ExampleOperationsClient_NewListPager() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item 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 719babf6dbf4..fa5050df5655 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 @@ -23,14 +23,14 @@ func ExampleOperationsStatusClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewOperationsStatusClient("", cred, nil) + client, err := armdataboxedge.NewOperationsStatusClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "159a00c7-8543-4343-9435-263ac87df3bb", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) 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 9519093287e8..fed87562eaed 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,18 +24,17 @@ func ExampleOrdersClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewOrdersClient("", cred, nil) + client, err := armdataboxedge.NewOrdersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,13 +50,13 @@ func ExampleOrdersClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewOrdersClient("", cred, nil) + client, err := armdataboxedge.NewOrdersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -75,38 +72,38 @@ func ExampleOrdersClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewOrdersClient("", cred, nil) + client, err := armdataboxedge.NewOrdersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", armdataboxedge.Order{ Properties: &armdataboxedge.OrderProperties{ ContactInformation: &armdataboxedge.ContactDetails{ - CompanyName: to.Ptr(""), - ContactPerson: to.Ptr(""), + CompanyName: to.Ptr("Microsoft"), + ContactPerson: to.Ptr("John Mcclane"), EmailList: []*string{ to.Ptr("john@microsoft.com")}, - Phone: to.Ptr(""), + Phone: to.Ptr("(800) 426-9400"), }, ShippingAddress: &armdataboxedge.Address{ - AddressLine1: to.Ptr(""), - AddressLine2: to.Ptr(""), - AddressLine3: to.Ptr(""), - City: to.Ptr(""), - Country: to.Ptr(""), - PostalCode: to.Ptr(""), - State: to.Ptr(""), + AddressLine1: to.Ptr("Microsoft Corporation"), + AddressLine2: to.Ptr("One Microsoft Way"), + AddressLine3: to.Ptr("Redmond"), + City: to.Ptr("WA"), + Country: to.Ptr("USA"), + PostalCode: to.Ptr("98052"), + State: to.Ptr("WA"), }, }, }, - &armdataboxedge.OrdersClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -121,18 +118,18 @@ func ExampleOrdersClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewOrdersClient("", cred, nil) + client, err := armdataboxedge.NewOrdersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - &armdataboxedge.OrdersClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -145,13 +142,13 @@ func ExampleOrdersClient_ListDCAccessCode() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewOrdersClient("", cred, nil) + client, err := armdataboxedge.NewOrdersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListDCAccessCode(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) 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 574bd7f04a69..b85af6e78b19 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,18 +24,17 @@ func ExampleRolesClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewRolesClient("", cred, nil) + client, err := armdataboxedge.NewRolesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,14 +50,14 @@ func ExampleRolesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewRolesClient("", cred, nil) + client, err := armdataboxedge.NewRolesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "IoTRole1", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -76,14 +73,14 @@ func ExampleRolesClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewRolesClient("", cred, nil) + client, err := armdataboxedge.NewRolesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "testedgedevice", + "IoTRole1", + "GroupForEdgeAutomation", &armdataboxedge.IoTRole{ Kind: to.Ptr(armdataboxedge.RoleTypesIOT), Properties: &armdataboxedge.IoTRoleProperties{ @@ -93,36 +90,36 @@ func ExampleRolesClient_BeginCreateOrUpdate() { SymmetricKey: &armdataboxedge.SymmetricKey{ ConnectionString: &armdataboxedge.AsymmetricEncryptedSecret{ EncryptionAlgorithm: to.Ptr(armdataboxedge.EncryptionAlgorithmAES256), - EncryptionCertThumbprint: to.Ptr(""), - Value: to.Ptr(""), + EncryptionCertThumbprint: to.Ptr("348586569999244"), + Value: to.Ptr("Encrypted<>"), }, }, }, - DeviceID: to.Ptr(""), - IoTHostHub: to.Ptr(""), + DeviceID: to.Ptr("iotdevice"), + IoTHostHub: to.Ptr("iothub.azure-devices.net"), }, IoTEdgeDeviceDetails: &armdataboxedge.IoTDeviceInfo{ Authentication: &armdataboxedge.Authentication{ SymmetricKey: &armdataboxedge.SymmetricKey{ ConnectionString: &armdataboxedge.AsymmetricEncryptedSecret{ EncryptionAlgorithm: to.Ptr(armdataboxedge.EncryptionAlgorithmAES256), - EncryptionCertThumbprint: to.Ptr(""), - Value: to.Ptr(""), + EncryptionCertThumbprint: to.Ptr("1245475856069999244"), + Value: to.Ptr("Encrypted<>"), }, }, }, - DeviceID: to.Ptr(""), - IoTHostHub: to.Ptr(""), + DeviceID: to.Ptr("iotEdge"), + IoTHostHub: to.Ptr("iothub.azure-devices.net"), }, RoleStatus: to.Ptr(armdataboxedge.RoleStatusEnabled), ShareMappings: []*armdataboxedge.MountPointMap{}, }, }, - &armdataboxedge.RolesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -137,19 +134,19 @@ func ExampleRolesClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewRolesClient("", cred, nil) + client, err := armdataboxedge.NewRolesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdataboxedge.RolesClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "IoTRole1", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 136a6c4bcd8b..36fa825f9c05 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,18 +24,17 @@ func ExampleSharesClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewSharesClient("", cred, nil) + client, err := armdataboxedge.NewSharesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,14 +50,14 @@ func ExampleSharesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewSharesClient("", cred, nil) + client, err := armdataboxedge.NewSharesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "smbshare", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -76,22 +73,22 @@ func ExampleSharesClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewSharesClient("", cred, nil) + client, err := armdataboxedge.NewSharesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "testedgedevice", + "smbshare", + "GroupForEdgeAutomation", armdataboxedge.Share{ Properties: &armdataboxedge.ShareProperties{ - Description: to.Ptr(""), + Description: to.Ptr(""), AccessProtocol: to.Ptr(armdataboxedge.ShareAccessProtocolSMB), AzureContainerInfo: &armdataboxedge.AzureContainerInfo{ - ContainerName: to.Ptr(""), + ContainerName: to.Ptr("testContainerSMB"), DataFormat: to.Ptr(armdataboxedge.AzureContainerDataFormatBlockBlob), - StorageAccountCredentialID: to.Ptr(""), + StorageAccountCredentialID: to.Ptr("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/storageAccountCredentials/sac1"), }, DataPolicy: to.Ptr(armdataboxedge.DataPolicyCloud), MonitoringStatus: to.Ptr(armdataboxedge.MonitoringStatusEnabled), @@ -99,15 +96,15 @@ func ExampleSharesClient_BeginCreateOrUpdate() { UserAccessRights: []*armdataboxedge.UserAccessRight{ { AccessType: to.Ptr(armdataboxedge.ShareAccessTypeChange), - UserID: to.Ptr(""), + UserID: to.Ptr("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/users/user2"), }}, }, }, - &armdataboxedge.SharesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -122,19 +119,19 @@ func ExampleSharesClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewSharesClient("", cred, nil) + client, err := armdataboxedge.NewSharesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdataboxedge.SharesClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "smbshare", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -147,19 +144,19 @@ func ExampleSharesClient_BeginRefresh() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewSharesClient("", cred, nil) + client, err := armdataboxedge.NewSharesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginRefresh(ctx, - "", - "", - "", - &armdataboxedge.SharesClientBeginRefreshOptions{ResumeToken: ""}) + "testedgedevice", + "smbshare", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 a4b309344b4a..6ae17d225e1d 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,18 +24,17 @@ func ExampleStorageAccountCredentialsClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewStorageAccountCredentialsClient("", cred, nil) + client, err := armdataboxedge.NewStorageAccountCredentialsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,14 +50,14 @@ func ExampleStorageAccountCredentialsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewStorageAccountCredentialsClient("", cred, nil) + client, err := armdataboxedge.NewStorageAccountCredentialsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "sac1", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -76,32 +73,32 @@ func ExampleStorageAccountCredentialsClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewStorageAccountCredentialsClient("", cred, nil) + client, err := armdataboxedge.NewStorageAccountCredentialsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "testedgedevice", + "sac1", + "GroupForEdgeAutomation", armdataboxedge.StorageAccountCredential{ Properties: &armdataboxedge.StorageAccountCredentialProperties{ AccountKey: &armdataboxedge.AsymmetricEncryptedSecret{ EncryptionAlgorithm: to.Ptr(armdataboxedge.EncryptionAlgorithmAES256), - EncryptionCertThumbprint: to.Ptr(""), - Value: to.Ptr(""), + EncryptionCertThumbprint: to.Ptr("2A9D8D6BE51574B5461230AEF02F162C5F01AD31"), + Value: to.Ptr("lAeZEYi6rNP1/EyNaVUYmTSZEYyaIaWmwUsGwek0+xiZj54GM9Ue9/UA2ed/ClC03wuSit2XzM/cLRU5eYiFBwks23rGwiQOr3sruEL2a74EjPD050xYjA6M1I2hu/w2yjVHhn5j+DbXS4Xzi+rHHNZK3DgfDO3PkbECjPck+PbpSBjy9+6Mrjcld5DIZhUAeMlMHrFlg+WKRKB14o/og56u5/xX6WKlrMLEQ+y6E18dUwvWs2elTNoVO8PBE8SM/CfooX4AMNvaNdSObNBPdP+F6Lzc556nFNWXrBLRt0vC7s9qTiVRO4x/qCNaK/B4y7IqXMllwQFf4Np9UQ2ECA=="), }, AccountType: to.Ptr(armdataboxedge.AccountTypeBlobStorage), - Alias: to.Ptr(""), + Alias: to.Ptr("sac1"), SSLStatus: to.Ptr(armdataboxedge.SSLStatusDisabled), - UserName: to.Ptr(""), + UserName: to.Ptr("cisbvt"), }, }, - &armdataboxedge.StorageAccountCredentialsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -116,19 +113,19 @@ func ExampleStorageAccountCredentialsClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewStorageAccountCredentialsClient("", cred, nil) + client, err := armdataboxedge.NewStorageAccountCredentialsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdataboxedge.StorageAccountCredentialsClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "sac1", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 6a2c6f4504e6..7a4ffd552d70 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,18 +24,17 @@ func ExampleStorageAccountsClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewStorageAccountsClient("", cred, nil) + client, err := armdataboxedge.NewStorageAccountsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,14 +50,14 @@ func ExampleStorageAccountsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewStorageAccountsClient("", cred, nil) + client, err := armdataboxedge.NewStorageAccountsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "blobstorageaccount1", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -76,27 +73,27 @@ func ExampleStorageAccountsClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewStorageAccountsClient("", cred, nil) + client, err := armdataboxedge.NewStorageAccountsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "testedgedevice", + "blobstorageaccount1", + "GroupForEdgeAutomation", armdataboxedge.StorageAccount{ Properties: &armdataboxedge.StorageAccountProperties{ - Description: to.Ptr(""), + Description: to.Ptr("It's an awesome storage account"), DataPolicy: to.Ptr(armdataboxedge.DataPolicyCloud), - StorageAccountCredentialID: to.Ptr(""), + StorageAccountCredentialID: to.Ptr("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForDataBoxEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/storageAccountCredentials/cisbvt"), StorageAccountStatus: to.Ptr(armdataboxedge.StorageAccountStatusOK), }, }, - &armdataboxedge.StorageAccountsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -111,19 +108,19 @@ func ExampleStorageAccountsClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewStorageAccountsClient("", cred, nil) + client, err := armdataboxedge.NewStorageAccountsClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdataboxedge.StorageAccountsClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "storageaccount1", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_supportpackages_client_test.go b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_supportpackages_client_test.go index 85420da14d87..8bb4992d8d43 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_supportpackages_client_test.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/ze_generated_example_supportpackages_client_test.go @@ -26,25 +26,25 @@ func ExampleSupportPackagesClient_BeginTriggerSupportPackage() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewSupportPackagesClient("", cred, nil) + client, err := armdataboxedge.NewSupportPackagesClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginTriggerSupportPackage(ctx, - "", - "", + "testedgedevice", + "GroupForEdgeAutomation", armdataboxedge.TriggerSupportPackageRequest{ Properties: &armdataboxedge.SupportPackageRequestProperties{ - Include: to.Ptr(""), + Include: to.Ptr("DefaultWithDumps"), MaximumTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-12-18T02:19:51.4270267Z"); return t }()), MinimumTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-12-18T02:18:51.4270267Z"); return t }()), }, }, - &armdataboxedge.SupportPackagesClientBeginTriggerSupportPackageOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 2794bf4d36d0..48718a6909b8 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,18 +24,17 @@ func ExampleTriggersClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewTriggersClient("", cred, nil) + client, err := armdataboxedge.NewTriggersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", &armdataboxedge.TriggersClientListByDataBoxEdgeDeviceOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,14 +50,14 @@ func ExampleTriggersClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewTriggersClient("", cred, nil) + client, err := armdataboxedge.NewTriggersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "trigger1", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -76,31 +73,31 @@ func ExampleTriggersClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewTriggersClient("", cred, nil) + client, err := armdataboxedge.NewTriggersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "testedgedevice", + "trigger1", + "GroupForEdgeAutomation", &armdataboxedge.FileEventTrigger{ Kind: to.Ptr(armdataboxedge.TriggerEventTypeFileEvent), Properties: &armdataboxedge.FileTriggerProperties{ - CustomContextTag: to.Ptr(""), + CustomContextTag: to.Ptr("CustomContextTags-1235346475"), SinkInfo: &armdataboxedge.RoleSinkInfo{ - RoleID: to.Ptr(""), + RoleID: to.Ptr("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/roles/role1"), }, SourceInfo: &armdataboxedge.FileSourceInfo{ - ShareID: to.Ptr(""), + ShareID: to.Ptr("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/shares/share1"), }, }, }, - &armdataboxedge.TriggersClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -115,19 +112,19 @@ func ExampleTriggersClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewTriggersClient("", cred, nil) + client, err := armdataboxedge.NewTriggersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdataboxedge.TriggersClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "trigger1", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } 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 b87ef3e9ceca..d8f1835f4560 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 @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databoxedge/armdataboxedge" @@ -26,18 +24,17 @@ func ExampleUsersClient_NewListByDataBoxEdgeDevicePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewUsersClient("", cred, nil) + client, err := armdataboxedge.NewUsersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByDataBoxEdgeDevicePager("", - "", + pager := client.NewListByDataBoxEdgeDevicePager("testedgedevice", + "GroupForEdgeAutomation", &armdataboxedge.UsersClientListByDataBoxEdgeDeviceOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,14 +50,14 @@ func ExampleUsersClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewUsersClient("", cred, nil) + client, err := armdataboxedge.NewUsersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testedgedevice", + "user1", + "GroupForEdgeAutomation", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -76,29 +73,29 @@ func ExampleUsersClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewUsersClient("", cred, nil) + client, err := armdataboxedge.NewUsersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "testedgedevice", + "user1", + "GroupForEdgeAutomation", armdataboxedge.User{ Properties: &armdataboxedge.UserProperties{ EncryptedPassword: &armdataboxedge.AsymmetricEncryptedSecret{ EncryptionAlgorithm: to.Ptr(armdataboxedge.EncryptionAlgorithmNone), - EncryptionCertThumbprint: to.Ptr(""), + EncryptionCertThumbprint: to.Ptr("blah"), Value: to.Ptr(""), }, UserType: to.Ptr(armdataboxedge.UserTypeShare), }, }, - &armdataboxedge.UsersClientBeginCreateOrUpdateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -113,19 +110,19 @@ func ExampleUsersClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdataboxedge.NewUsersClient("", cred, nil) + client, err := armdataboxedge.NewUsersClient("4385cf00-2d3a-425a-832f-f4285b1c9dce", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdataboxedge.UsersClientBeginDeleteOptions{ResumeToken: ""}) + "testedgedevice", + "user1", + "GroupForEdgeAutomation", + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - _, err = poller.PollUntilDone(ctx, 30*time.Second) + _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_addons_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_addons_client.go index 18e301cf2361..beb01a5dee19 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_addons_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_addons_client.go @@ -38,7 +38,7 @@ func NewAddonsClient(subscriptionID string, credential azcore.TokenCredential, o if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,6 +56,7 @@ func NewAddonsClient(subscriptionID string, credential azcore.TokenCredential, o // BeginCreateOrUpdate - Create or update a addon. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // roleName - The role name. // addonName - The addon name. @@ -63,20 +64,21 @@ func NewAddonsClient(subscriptionID string, credential azcore.TokenCredential, o // 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) (*armruntime.Poller[AddonsClientCreateOrUpdateResponse], error) { +func (client *AddonsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, addon AddonClassification, options *AddonsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AddonsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, roleName, addonName, resourceGroupName, addon, options) if err != nil { return nil, err } - return armruntime.NewPoller[AddonsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[AddonsClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[AddonsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[AddonsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Create or update a addon. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -122,31 +124,33 @@ func (client *AddonsClient) createOrUpdateCreateRequest(ctx context.Context, dev reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, addon) } // BeginDelete - Deletes the addon on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[AddonsClientDeleteResponse], error) { +func (client *AddonsClient) BeginDelete(ctx context.Context, deviceName string, roleName string, addonName string, resourceGroupName string, options *AddonsClientBeginDeleteOptions) (*runtime.Poller[AddonsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, roleName, addonName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[AddonsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[AddonsClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[AddonsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[AddonsClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the addon on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -192,12 +196,13 @@ func (client *AddonsClient) deleteCreateRequest(ctx context.Context, deviceName reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets a specific addon by name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // roleName - The role name. // addonName - The addon name. @@ -248,7 +253,7 @@ func (client *AddonsClient) getCreateRequest(ctx context.Context, deviceName str reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -263,12 +268,13 @@ func (client *AddonsClient) getHandleResponse(resp *http.Response) (AddonsClient // NewListByRolePager - Lists all the addons configured in the role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) NewListByRolePager(deviceName string, roleName string, resourceGroupName string, options *AddonsClientListByRoleOptions) *runtime.Pager[AddonsClientListByRoleResponse] { - return runtime.NewPager(runtime.PageProcessor[AddonsClientListByRoleResponse]{ + return runtime.NewPager(runtime.PagingHandler[AddonsClientListByRoleResponse]{ More: func(page AddonsClientListByRoleResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -321,7 +327,7 @@ func (client *AddonsClient) listByRoleCreateRequest(ctx context.Context, deviceN reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_alerts_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_alerts_client.go index bba14bbb670f..e8b10fe21d90 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_alerts_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_alerts_client.go @@ -38,7 +38,7 @@ func NewAlertsClient(subscriptionID string, credential azcore.TokenCredential, o if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,6 +56,7 @@ func NewAlertsClient(subscriptionID string, credential azcore.TokenCredential, o // Get - Gets an alert by name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The alert name. // resourceGroupName - The resource group name. @@ -101,7 +102,7 @@ func (client *AlertsClient) getCreateRequest(ctx context.Context, deviceName str reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -116,12 +117,13 @@ func (client *AlertsClient) getHandleResponse(resp *http.Response) (AlertsClient // NewListByDataBoxEdgeDevicePager - Gets all the alerts for a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - AlertsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the AlertsClient.ListByDataBoxEdgeDevice // method. func (client *AlertsClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *AlertsClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[AlertsClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[AlertsClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[AlertsClientListByDataBoxEdgeDeviceResponse]{ More: func(page AlertsClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -170,7 +172,7 @@ func (client *AlertsClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_availableskus_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_availableskus_client.go index 8dba6eb4dc44..8aba0db0c34e 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_availableskus_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_availableskus_client.go @@ -38,7 +38,7 @@ func NewAvailableSKUsClient(subscriptionID string, credential azcore.TokenCreden if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,9 +56,10 @@ func NewAvailableSKUsClient(subscriptionID string, credential azcore.TokenCreden // NewListPager - List all the available Skus and information related to them. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // options - AvailableSKUsClientListOptions contains the optional parameters for the AvailableSKUsClient.List method. func (client *AvailableSKUsClient) NewListPager(options *AvailableSKUsClientListOptions) *runtime.Pager[AvailableSKUsClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[AvailableSKUsClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[AvailableSKUsClientListResponse]{ More: func(page AvailableSKUsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -99,7 +100,7 @@ func (client *AvailableSKUsClient) listCreateRequest(ctx context.Context, option reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_bandwidthschedules_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_bandwidthschedules_client.go index 2fe25c84b49b..a9a2c5548ea1 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_bandwidthschedules_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_bandwidthschedules_client.go @@ -38,7 +38,7 @@ func NewBandwidthSchedulesClient(subscriptionID string, credential azcore.TokenC if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,26 +56,28 @@ func NewBandwidthSchedulesClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Creates or updates a bandwidth schedule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[BandwidthSchedulesClientCreateOrUpdateResponse], error) { +func (client *BandwidthSchedulesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, parameters BandwidthSchedule, options *BandwidthSchedulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[BandwidthSchedulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[BandwidthSchedulesClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[BandwidthSchedulesClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[BandwidthSchedulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[BandwidthSchedulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates or updates a bandwidth schedule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -117,31 +119,33 @@ func (client *BandwidthSchedulesClient) createOrUpdateCreateRequest(ctx context. reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) } // BeginDelete - Deletes the specified bandwidth schedule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[BandwidthSchedulesClientDeleteResponse], error) { +func (client *BandwidthSchedulesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *BandwidthSchedulesClientBeginDeleteOptions) (*runtime.Poller[BandwidthSchedulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[BandwidthSchedulesClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[BandwidthSchedulesClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[BandwidthSchedulesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[BandwidthSchedulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the specified bandwidth schedule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -183,12 +187,13 @@ func (client *BandwidthSchedulesClient) deleteCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets the properties of the specified bandwidth schedule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The bandwidth schedule name. // resourceGroupName - The resource group name. @@ -234,7 +239,7 @@ func (client *BandwidthSchedulesClient) getCreateRequest(ctx context.Context, de reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -249,12 +254,13 @@ func (client *BandwidthSchedulesClient) getHandleResponse(resp *http.Response) ( // NewListByDataBoxEdgeDevicePager - Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the BandwidthSchedulesClient.ListByDataBoxEdgeDevice // method. func (client *BandwidthSchedulesClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *BandwidthSchedulesClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse]{ More: func(page BandwidthSchedulesClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -303,7 +309,7 @@ func (client *BandwidthSchedulesClient) listByDataBoxEdgeDeviceCreateRequest(ctx reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_constants.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_constants.go index e57dcdfa3a95..c8a79a180315 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_constants.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_constants.go @@ -10,7 +10,7 @@ package armdataboxedge const ( moduleName = "armdataboxedge" - moduleVersion = "v0.4.0" + moduleVersion = "v1.0.0" ) // AccessLevel - Access level allowed for this remote application type diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_containers_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_containers_client.go index 8d738d54370e..3e4027607221 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_containers_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_containers_client.go @@ -38,7 +38,7 @@ func NewContainersClient(subscriptionID string, credential azcore.TokenCredentia if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,6 +56,7 @@ func NewContainersClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates a new container or updates an existing container on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // storageAccountName - The Storage Account Name // containerName - The container name. @@ -63,20 +64,21 @@ func NewContainersClient(subscriptionID string, credential azcore.TokenCredentia // 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) (*armruntime.Poller[ContainersClientCreateOrUpdateResponse], error) { +func (client *ContainersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, containerParam Container, options *ContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ContainersClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, storageAccountName, containerName, resourceGroupName, containerParam, options) if err != nil { return nil, err } - return armruntime.NewPoller[ContainersClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ContainersClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new container or updates an existing container on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -122,31 +124,33 @@ func (client *ContainersClient) createOrUpdateCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, containerParam) } // BeginDelete - Deletes the container on the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[ContainersClientDeleteResponse], error) { +func (client *ContainersClient) BeginDelete(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientBeginDeleteOptions) (*runtime.Poller[ContainersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, storageAccountName, containerName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ContainersClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[ContainersClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the container on the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -192,12 +196,13 @@ func (client *ContainersClient) deleteCreateRequest(ctx context.Context, deviceN reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets a container by name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // storageAccountName - The Storage Account Name // containerName - The container Name @@ -248,7 +253,7 @@ func (client *ContainersClient) getCreateRequest(ctx context.Context, deviceName reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -263,13 +268,14 @@ func (client *ContainersClient) getHandleResponse(resp *http.Response) (Containe // NewListByStorageAccountPager - Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) NewListByStorageAccountPager(deviceName string, storageAccountName string, resourceGroupName string, options *ContainersClientListByStorageAccountOptions) *runtime.Pager[ContainersClientListByStorageAccountResponse] { - return runtime.NewPager(runtime.PageProcessor[ContainersClientListByStorageAccountResponse]{ + return runtime.NewPager(runtime.PagingHandler[ContainersClientListByStorageAccountResponse]{ More: func(page ContainersClientListByStorageAccountResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -322,7 +328,7 @@ func (client *ContainersClient) listByStorageAccountCreateRequest(ctx context.Co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -337,25 +343,27 @@ func (client *ContainersClient) listByStorageAccountHandleResponse(resp *http.Re // BeginRefresh - Refreshes the container metadata with the data from the cloud. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[ContainersClientRefreshResponse], error) { +func (client *ContainersClient) BeginRefresh(ctx context.Context, deviceName string, storageAccountName string, containerName string, resourceGroupName string, options *ContainersClientBeginRefreshOptions) (*runtime.Poller[ContainersClientRefreshResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.refresh(ctx, deviceName, storageAccountName, containerName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ContainersClientRefreshResponse](resp, client.pl, nil) + return runtime.NewPoller[ContainersClientRefreshResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ContainersClientRefreshResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ContainersClientRefreshResponse](options.ResumeToken, client.pl, nil) } } // Refresh - Refreshes the container metadata with the data from the cloud. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -401,6 +409,6 @@ func (client *ContainersClient) refreshCreateRequest(ctx context.Context, device reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devicecapacitycheck_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devicecapacitycheck_client.go index 1e68f2ba60c5..eb127ba60b5f 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devicecapacitycheck_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devicecapacitycheck_client.go @@ -38,7 +38,7 @@ func NewDeviceCapacityCheckClient(subscriptionID string, credential azcore.Token if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,27 +56,29 @@ func NewDeviceCapacityCheckClient(subscriptionID string, credential azcore.Token // BeginCheckResourceCreationFeasibility - Posts the device capacity request info to check feasibility. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // resourceGroupName - The resource group name. // deviceName - The device name. // deviceCapacityRequestInfo - The device capacity request info. // options - DeviceCapacityCheckClientBeginCheckResourceCreationFeasibilityOptions contains the optional parameters for the // DeviceCapacityCheckClient.BeginCheckResourceCreationFeasibility method. -func (client *DeviceCapacityCheckClient) BeginCheckResourceCreationFeasibility(ctx context.Context, resourceGroupName string, deviceName string, deviceCapacityRequestInfo DeviceCapacityRequestInfo, options *DeviceCapacityCheckClientBeginCheckResourceCreationFeasibilityOptions) (*armruntime.Poller[DeviceCapacityCheckClientCheckResourceCreationFeasibilityResponse], error) { +func (client *DeviceCapacityCheckClient) BeginCheckResourceCreationFeasibility(ctx context.Context, resourceGroupName string, deviceName string, deviceCapacityRequestInfo DeviceCapacityRequestInfo, options *DeviceCapacityCheckClientBeginCheckResourceCreationFeasibilityOptions) (*runtime.Poller[DeviceCapacityCheckClientCheckResourceCreationFeasibilityResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.checkResourceCreationFeasibility(ctx, resourceGroupName, deviceName, deviceCapacityRequestInfo, options) if err != nil { return nil, err } - return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[DeviceCapacityCheckClientCheckResourceCreationFeasibilityResponse]{ - FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeviceCapacityCheckClientCheckResourceCreationFeasibilityResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, }) } else { - return armruntime.NewPollerFromResumeToken[DeviceCapacityCheckClientCheckResourceCreationFeasibilityResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DeviceCapacityCheckClientCheckResourceCreationFeasibilityResponse](options.ResumeToken, client.pl, nil) } } // CheckResourceCreationFeasibility - Posts the device capacity request info to check feasibility. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 func (client *DeviceCapacityCheckClient) checkResourceCreationFeasibility(ctx context.Context, resourceGroupName string, deviceName string, deviceCapacityRequestInfo DeviceCapacityRequestInfo, options *DeviceCapacityCheckClientBeginCheckResourceCreationFeasibilityOptions) (*http.Response, error) { req, err := client.checkResourceCreationFeasibilityCreateRequest(ctx, resourceGroupName, deviceName, deviceCapacityRequestInfo, options) if err != nil { @@ -117,6 +119,6 @@ func (client *DeviceCapacityCheckClient) checkResourceCreationFeasibilityCreateR reqQP.Set("capacityName", *options.CapacityName) } req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, deviceCapacityRequestInfo) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devicecapacityinfo_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devicecapacityinfo_client.go index 0b17b23b61dd..a884f45ff0ed 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devicecapacityinfo_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devicecapacityinfo_client.go @@ -38,7 +38,7 @@ func NewDeviceCapacityInfoClient(subscriptionID string, credential azcore.TokenC if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,6 +56,7 @@ func NewDeviceCapacityInfoClient(subscriptionID string, credential azcore.TokenC // GetDeviceCapacityInfo - Gets the properties of the specified device capacity info. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // resourceGroupName - The resource group name. // deviceName - The device name. // options - DeviceCapacityInfoClientGetDeviceCapacityInfoOptions contains the optional parameters for the DeviceCapacityInfoClient.GetDeviceCapacityInfo @@ -97,7 +98,7 @@ func (client *DeviceCapacityInfoClient) getDeviceCapacityInfoCreateRequest(ctx c reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devices_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devices_client.go index bfd643160c03..8144dd301e56 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devices_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_devices_client.go @@ -38,7 +38,7 @@ func NewDevicesClient(subscriptionID string, credential azcore.TokenCredential, if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,6 +56,7 @@ func NewDevicesClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Creates or updates a Data Box Edge/Data Box Gateway resource. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // dataBoxEdgeDevice - The resource object. @@ -97,7 +98,7 @@ func (client *DevicesClient) createOrUpdateCreateRequest(ctx context.Context, de reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, dataBoxEdgeDevice) } @@ -112,25 +113,27 @@ func (client *DevicesClient) createOrUpdateHandleResponse(resp *http.Response) ( // BeginCreateOrUpdateSecuritySettings - Updates the security settings on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[DevicesClientCreateOrUpdateSecuritySettingsResponse], error) { +func (client *DevicesClient) BeginCreateOrUpdateSecuritySettings(ctx context.Context, deviceName string, resourceGroupName string, securitySettings SecuritySettings, options *DevicesClientBeginCreateOrUpdateSecuritySettingsOptions) (*runtime.Poller[DevicesClientCreateOrUpdateSecuritySettingsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdateSecuritySettings(ctx, deviceName, resourceGroupName, securitySettings, options) if err != nil { return nil, err } - return armruntime.NewPoller[DevicesClientCreateOrUpdateSecuritySettingsResponse](resp, client.pl, nil) + return runtime.NewPoller[DevicesClientCreateOrUpdateSecuritySettingsResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DevicesClientCreateOrUpdateSecuritySettingsResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DevicesClientCreateOrUpdateSecuritySettingsResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdateSecuritySettings - Updates the security settings on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -168,29 +171,31 @@ func (client *DevicesClient) createOrUpdateSecuritySettingsCreateRequest(ctx con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, securitySettings) } // BeginDelete - Deletes the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[DevicesClientDeleteResponse], error) { +func (client *DevicesClient) BeginDelete(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginDeleteOptions) (*runtime.Poller[DevicesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[DevicesClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[DevicesClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DevicesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DevicesClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -228,30 +233,32 @@ func (client *DevicesClient) deleteCreateRequest(ctx context.Context, deviceName reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // BeginDownloadUpdates - Downloads the updates on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[DevicesClientDownloadUpdatesResponse], error) { +func (client *DevicesClient) BeginDownloadUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginDownloadUpdatesOptions) (*runtime.Poller[DevicesClientDownloadUpdatesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.downloadUpdates(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[DevicesClientDownloadUpdatesResponse](resp, client.pl, nil) + return runtime.NewPoller[DevicesClientDownloadUpdatesResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DevicesClientDownloadUpdatesResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DevicesClientDownloadUpdatesResponse](options.ResumeToken, client.pl, nil) } } // DownloadUpdates - Downloads the updates on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -289,12 +296,13 @@ func (client *DevicesClient) downloadUpdatesCreateRequest(ctx context.Context, d reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // GenerateCertificate - Generates certificate for activation key. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - DevicesClientGenerateCertificateOptions contains the optional parameters for the DevicesClient.GenerateCertificate @@ -336,7 +344,7 @@ func (client *DevicesClient) generateCertificateCreateRequest(ctx context.Contex reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -351,6 +359,7 @@ func (client *DevicesClient) generateCertificateHandleResponse(resp *http.Respon // Get - Gets the properties of the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - DevicesClientGetOptions contains the optional parameters for the DevicesClient.Get method. @@ -391,7 +400,7 @@ func (client *DevicesClient) getCreateRequest(ctx context.Context, deviceName st reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -406,6 +415,7 @@ func (client *DevicesClient) getHandleResponse(resp *http.Response) (DevicesClie // GetExtendedInformation - Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - DevicesClientGetExtendedInformationOptions contains the optional parameters for the DevicesClient.GetExtendedInformation @@ -447,7 +457,7 @@ func (client *DevicesClient) getExtendedInformationCreateRequest(ctx context.Con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -462,6 +472,7 @@ func (client *DevicesClient) getExtendedInformationHandleResponse(resp *http.Res // GetNetworkSettings - Gets the network settings of the specified Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - DevicesClientGetNetworkSettingsOptions contains the optional parameters for the DevicesClient.GetNetworkSettings @@ -503,7 +514,7 @@ func (client *DevicesClient) getNetworkSettingsCreateRequest(ctx context.Context reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -519,6 +530,7 @@ func (client *DevicesClient) getNetworkSettingsHandleResponse(resp *http.Respons // 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. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - DevicesClientGetUpdateSummaryOptions contains the optional parameters for the DevicesClient.GetUpdateSummary @@ -560,7 +572,7 @@ func (client *DevicesClient) getUpdateSummaryCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -575,24 +587,26 @@ func (client *DevicesClient) getUpdateSummaryHandleResponse(resp *http.Response) // BeginInstallUpdates - Installs the updates on the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[DevicesClientInstallUpdatesResponse], error) { +func (client *DevicesClient) BeginInstallUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginInstallUpdatesOptions) (*runtime.Poller[DevicesClientInstallUpdatesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.installUpdates(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[DevicesClientInstallUpdatesResponse](resp, client.pl, nil) + return runtime.NewPoller[DevicesClientInstallUpdatesResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DevicesClientInstallUpdatesResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DevicesClientInstallUpdatesResponse](options.ResumeToken, client.pl, nil) } } // InstallUpdates - Installs the updates on the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -630,17 +644,18 @@ func (client *DevicesClient) installUpdatesCreateRequest(ctx context.Context, de reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // NewListByResourceGroupPager - Gets all the Data Box Edge/Data Box Gateway devices in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // resourceGroupName - The resource group name. // options - DevicesClientListByResourceGroupOptions contains the optional parameters for the DevicesClient.ListByResourceGroup // method. func (client *DevicesClient) NewListByResourceGroupPager(resourceGroupName string, options *DevicesClientListByResourceGroupOptions) *runtime.Pager[DevicesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PageProcessor[DevicesClientListByResourceGroupResponse]{ + return runtime.NewPager(runtime.PagingHandler[DevicesClientListByResourceGroupResponse]{ More: func(page DevicesClientListByResourceGroupResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -688,7 +703,7 @@ func (client *DevicesClient) listByResourceGroupCreateRequest(ctx context.Contex reqQP.Set("$expand", *options.Expand) } req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -703,10 +718,11 @@ func (client *DevicesClient) listByResourceGroupHandleResponse(resp *http.Respon // NewListBySubscriptionPager - Gets all the Data Box Edge/Data Box Gateway devices in a subscription. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // options - DevicesClientListBySubscriptionOptions contains the optional parameters for the DevicesClient.ListBySubscription // method. func (client *DevicesClient) NewListBySubscriptionPager(options *DevicesClientListBySubscriptionOptions) *runtime.Pager[DevicesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PageProcessor[DevicesClientListBySubscriptionResponse]{ + return runtime.NewPager(runtime.PagingHandler[DevicesClientListBySubscriptionResponse]{ More: func(page DevicesClientListBySubscriptionResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -750,7 +766,7 @@ func (client *DevicesClient) listBySubscriptionCreateRequest(ctx context.Context reqQP.Set("$expand", *options.Expand) } req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -765,24 +781,26 @@ func (client *DevicesClient) listBySubscriptionHandleResponse(resp *http.Respons // BeginScanForUpdates - Scans for updates on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[DevicesClientScanForUpdatesResponse], error) { +func (client *DevicesClient) BeginScanForUpdates(ctx context.Context, deviceName string, resourceGroupName string, options *DevicesClientBeginScanForUpdatesOptions) (*runtime.Poller[DevicesClientScanForUpdatesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.scanForUpdates(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[DevicesClientScanForUpdatesResponse](resp, client.pl, nil) + return runtime.NewPoller[DevicesClientScanForUpdatesResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DevicesClientScanForUpdatesResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DevicesClientScanForUpdatesResponse](options.ResumeToken, client.pl, nil) } } // ScanForUpdates - Scans for updates on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -820,12 +838,13 @@ func (client *DevicesClient) scanForUpdatesCreateRequest(ctx context.Context, de reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Update - Modifies a Data Box Edge/Data Box Gateway resource. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // parameters - The resource parameters. @@ -867,7 +886,7 @@ func (client *DevicesClient) updateCreateRequest(ctx context.Context, deviceName reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) } @@ -882,6 +901,7 @@ func (client *DevicesClient) updateHandleResponse(resp *http.Response) (DevicesC // UpdateExtendedInformation - Gets additional information for the specified Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // parameters - The patch object. @@ -924,7 +944,7 @@ func (client *DevicesClient) updateExtendedInformationCreateRequest(ctx context. reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) } @@ -939,6 +959,7 @@ func (client *DevicesClient) updateExtendedInformationHandleResponse(resp *http. // UploadCertificate - Uploads registration certificate for the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // parameters - The upload certificate request. @@ -981,7 +1002,7 @@ func (client *DevicesClient) uploadCertificateCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_diagnosticsettings_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_diagnosticsettings_client.go index 842deee7fe6c..3548126bb21e 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_diagnosticsettings_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_diagnosticsettings_client.go @@ -38,7 +38,7 @@ func NewDiagnosticSettingsClient(subscriptionID string, credential azcore.TokenC if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -57,6 +57,7 @@ func NewDiagnosticSettingsClient(subscriptionID string, credential azcore.TokenC // 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. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - DiagnosticSettingsClientGetDiagnosticProactiveLogCollectionSettingsOptions contains the optional parameters for @@ -98,7 +99,7 @@ func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSetti reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -114,6 +115,7 @@ func (client *DiagnosticSettingsClient) getDiagnosticProactiveLogCollectionSetti // 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. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - DiagnosticSettingsClientGetDiagnosticRemoteSupportSettingsOptions contains the optional parameters for the DiagnosticSettingsClient.GetDiagnosticRemoteSupportSettings @@ -155,7 +157,7 @@ func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsCreate reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -171,26 +173,28 @@ func (client *DiagnosticSettingsClient) getDiagnosticRemoteSupportSettingsHandle // 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. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse], error) { +func (client *DiagnosticSettingsClient) BeginUpdateDiagnosticProactiveLogCollectionSettings(ctx context.Context, deviceName string, resourceGroupName string, proactiveLogCollectionSettings DiagnosticProactiveLogCollectionSettings, options *DiagnosticSettingsClientBeginUpdateDiagnosticProactiveLogCollectionSettingsOptions) (*runtime.Poller[DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateDiagnosticProactiveLogCollectionSettings(ctx, deviceName, resourceGroupName, proactiveLogCollectionSettings, options) if err != nil { return nil, err } - return armruntime.NewPoller[DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse](resp, client.pl, nil) + return runtime.NewPoller[DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DiagnosticSettingsClientUpdateDiagnosticProactiveLogCollectionSettingsResponse](options.ResumeToken, client.pl, nil) } } // 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. +// Generated from API version 2022-03-01 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 { @@ -228,33 +232,35 @@ func (client *DiagnosticSettingsClient) updateDiagnosticProactiveLogCollectionSe reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, proactiveLogCollectionSettings) } // 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. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse], error) { +func (client *DiagnosticSettingsClient) BeginUpdateDiagnosticRemoteSupportSettings(ctx context.Context, deviceName string, resourceGroupName string, diagnosticRemoteSupportSettings DiagnosticRemoteSupportSettings, options *DiagnosticSettingsClientBeginUpdateDiagnosticRemoteSupportSettingsOptions) (*runtime.Poller[DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateDiagnosticRemoteSupportSettings(ctx, deviceName, resourceGroupName, diagnosticRemoteSupportSettings, options) if err != nil { return nil, err } - return armruntime.NewPoller[DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse](resp, client.pl, nil) + return runtime.NewPoller[DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DiagnosticSettingsClientUpdateDiagnosticRemoteSupportSettingsResponse](options.ResumeToken, client.pl, nil) } } // 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. +// Generated from API version 2022-03-01 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 { @@ -292,6 +298,6 @@ func (client *DiagnosticSettingsClient) updateDiagnosticRemoteSupportSettingsCre reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, diagnosticRemoteSupportSettings) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_jobs_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_jobs_client.go index 50ed2295af3e..12fb2c51f458 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_jobs_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_jobs_client.go @@ -38,7 +38,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,6 +56,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // Get - Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The job name. // resourceGroupName - The resource group name. @@ -101,7 +102,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, deviceName strin reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models.go index 18125f047272..7a14977ce5d8 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models.go @@ -49,6 +49,9 @@ type Addon struct { Type *string `json:"type,omitempty" azure:"ro"` } +// GetAddon implements the AddonClassification interface for type Addon. +func (a *Addon) GetAddon() *Addon { return a } + // 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. @@ -199,6 +202,17 @@ type ArcAddon struct { 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, + } +} + // ArcAddonProperties - Arc addon properties. type ArcAddonProperties struct { // REQUIRED; Arc resource group name @@ -362,6 +376,17 @@ type CloudEdgeManagementRole struct { 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, + } +} + // CloudEdgeManagementRoleProperties - CloudEdgeManagement Role properties. type CloudEdgeManagementRoleProperties struct { // REQUIRED; Role status. @@ -1088,6 +1113,17 @@ type FileEventTrigger struct { Type *string `json:"type,omitempty" azure:"ro"` } +// GetTrigger implements the TriggerClassification interface for type FileEventTrigger. +func (f *FileEventTrigger) GetTrigger() *Trigger { + return &Trigger{ + Kind: f.Kind, + SystemData: f.SystemData, + ID: f.ID, + Name: f.Name, + Type: f.Type, + } +} + // FileSourceInfo - File source details. type FileSourceInfo struct { // REQUIRED; File share ID. @@ -1198,6 +1234,17 @@ type IoTAddon struct { 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, + } +} + // IoTAddonProperties - IoT addon properties. type IoTAddonProperties struct { // REQUIRED; IoT device metadata to which appliance needs to be connected. @@ -1268,6 +1315,17 @@ type IoTRole struct { 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, + } +} + // IoTRoleProperties - IoT role properties. type IoTRoleProperties struct { // REQUIRED; Host OS supported by the IoT role. @@ -1435,6 +1493,17 @@ type KubernetesRole struct { 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, + } +} + // KubernetesRoleCompute - Kubernetes role compute resource type KubernetesRoleCompute struct { // REQUIRED; VM profile @@ -1540,6 +1609,17 @@ type MECRole struct { 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, + } +} + // MECRoleProperties - MEC role properties. type MECRoleProperties struct { // REQUIRED; Role status. @@ -2090,6 +2170,17 @@ type PeriodicTimerEventTrigger struct { Type *string `json:"type,omitempty" azure:"ro"` } +// GetTrigger implements the TriggerClassification interface for type PeriodicTimerEventTrigger. +func (p *PeriodicTimerEventTrigger) GetTrigger() *Trigger { + return &Trigger{ + Kind: p.Kind, + SystemData: p.SystemData, + ID: p.ID, + Name: p.Name, + Type: p.Type, + } +} + // PeriodicTimerProperties - Periodic timer trigger properties. type PeriodicTimerProperties struct { // REQUIRED; Role Sink information. @@ -2212,6 +2303,9 @@ type Role struct { Type *string `json:"type,omitempty" azure:"ro"` } +// GetRole implements the RoleClassification interface for type Role. +func (r *Role) GetRole() *Role { return r } + // RoleList - Collection of all the roles on the Data Box Edge device. type RoleList struct { // READ-ONLY; Link to the next set of results. @@ -2697,27 +2791,6 @@ type SystemData struct { LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` } -// SystemDataAutoGenerated - Metadata pertaining to creation and last modification of the resource. -type SystemDataAutoGenerated struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - // TrackingInfo - Tracking courier information. type TrackingInfo struct { // Name of the carrier used in the delivery. @@ -2760,6 +2833,9 @@ type Trigger struct { Type *string `json:"type,omitempty" azure:"ro"` } +// GetTrigger implements the TriggerClassification interface for type Trigger. +func (t *Trigger) GetTrigger() *Trigger { return t } + // TriggerList - Collection of all trigger on the data box edge device. type TriggerList struct { // READ-ONLY; Link to the next set of results. diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models_serde.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models_serde.go index 8462ce1cbc7e..95c8dabaea58 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models_serde.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_models_serde.go @@ -10,52 +10,34 @@ package armdataboxedge import ( "encoding/json" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" ) -// GetAddon implements the AddonClassification interface for type Addon. -func (a *Addon) GetAddon() *Addon { return a } - -// MarshalJSON implements the json.Marshaller interface for type AddonList. -func (a AddonList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // UnmarshalJSON implements the json.Unmarshaller interface for type AddonList. func (a *AddonList) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", a, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, &a.NextLink) + err = unpopulate(val, "NextLink", &a.NextLink) delete(rawMsg, key) case "value": a.Value, err = unmarshalAddonClassificationArray(val) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", a, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type AlertList. -func (a AlertList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type AlertProperties. func (a AlertProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -73,51 +55,40 @@ func (a AlertProperties) MarshalJSON() ([]byte, error) { func (a *AlertProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", a, err) } for key, val := range rawMsg { var err error switch key { case "alertType": - err = unpopulate(val, &a.AlertType) + err = unpopulate(val, "AlertType", &a.AlertType) delete(rawMsg, key) case "appearedAtDateTime": - err = unpopulateTimeRFC3339(val, &a.AppearedAtDateTime) + err = unpopulateTimeRFC3339(val, "AppearedAtDateTime", &a.AppearedAtDateTime) delete(rawMsg, key) case "detailedInformation": - err = unpopulate(val, &a.DetailedInformation) + err = unpopulate(val, "DetailedInformation", &a.DetailedInformation) delete(rawMsg, key) case "errorDetails": - err = unpopulate(val, &a.ErrorDetails) + err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) delete(rawMsg, key) case "recommendation": - err = unpopulate(val, &a.Recommendation) + err = unpopulate(val, "Recommendation", &a.Recommendation) delete(rawMsg, key) case "severity": - err = unpopulate(val, &a.Severity) + err = unpopulate(val, "Severity", &a.Severity) delete(rawMsg, key) case "title": - err = unpopulate(val, &a.Title) + err = unpopulate(val, "Title", &a.Title) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", a, err) } } return nil } -// 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{}) @@ -134,32 +105,32 @@ func (a ArcAddon) MarshalJSON() ([]byte, error) { func (a *ArcAddon) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", a, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, &a.ID) + err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) case "kind": - err = unpopulate(val, &a.Kind) + err = unpopulate(val, "Kind", &a.Kind) delete(rawMsg, key) case "name": - err = unpopulate(val, &a.Name) + err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, &a.Properties) + err = unpopulate(val, "Properties", &a.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, &a.SystemData) + err = unpopulate(val, "SystemData", &a.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, &a.Type) + err = unpopulate(val, "Type", &a.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", a, err) } } return nil @@ -175,25 +146,6 @@ func (b BandwidthScheduleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type BandwidthSchedulesList. -func (b BandwidthSchedulesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// 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{}) @@ -210,46 +162,37 @@ func (c CloudEdgeManagementRole) MarshalJSON() ([]byte, error) { func (c *CloudEdgeManagementRole) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, &c.ID) + err = unpopulate(val, "ID", &c.ID) delete(rawMsg, key) case "kind": - err = unpopulate(val, &c.Kind) + err = unpopulate(val, "Kind", &c.Kind) delete(rawMsg, key) case "name": - err = unpopulate(val, &c.Name) + err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, &c.Properties) + err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, &c.SystemData) + err = unpopulate(val, "SystemData", &c.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, &c.Type) + err = unpopulate(val, "Type", &c.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil } -// 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) -} - // MarshalJSON implements the json.Marshaller interface for type ClusterCapacityViewData. func (c ClusterCapacityViewData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -265,29 +208,29 @@ func (c ClusterCapacityViewData) MarshalJSON() ([]byte, error) { func (c *ClusterCapacityViewData) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { case "fqdn": - err = unpopulate(val, &c.Fqdn) + err = unpopulate(val, "Fqdn", &c.Fqdn) delete(rawMsg, key) case "gpuCapacity": - err = unpopulate(val, &c.GpuCapacity) + err = unpopulate(val, "GpuCapacity", &c.GpuCapacity) delete(rawMsg, key) case "lastRefreshedTime": - err = unpopulateTimeRFC3339(val, &c.LastRefreshedTime) + err = unpopulateTimeRFC3339(val, "LastRefreshedTime", &c.LastRefreshedTime) delete(rawMsg, key) case "memoryCapacity": - err = unpopulate(val, &c.MemoryCapacity) + err = unpopulate(val, "MemoryCapacity", &c.MemoryCapacity) delete(rawMsg, key) case "totalProvisionedNonHpnCores": - err = unpopulate(val, &c.TotalProvisionedNonHpnCores) + err = unpopulate(val, "TotalProvisionedNonHpnCores", &c.TotalProvisionedNonHpnCores) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil @@ -303,14 +246,6 @@ func (c ContactDetails) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type ContainerList. -func (c ContainerList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type ContainerProperties. func (c ContainerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -325,26 +260,26 @@ func (c ContainerProperties) MarshalJSON() ([]byte, error) { func (c *ContainerProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", c, err) } for key, val := range rawMsg { var err error switch key { case "containerStatus": - err = unpopulate(val, &c.ContainerStatus) + err = unpopulate(val, "ContainerStatus", &c.ContainerStatus) delete(rawMsg, key) case "createdDateTime": - err = unpopulateTimeRFC3339(val, &c.CreatedDateTime) + err = unpopulateTimeRFC3339(val, "CreatedDateTime", &c.CreatedDateTime) delete(rawMsg, key) case "dataFormat": - err = unpopulate(val, &c.DataFormat) + err = unpopulate(val, "DataFormat", &c.DataFormat) delete(rawMsg, key) case "refreshDetails": - err = unpopulate(val, &c.RefreshDetails) + err = unpopulate(val, "RefreshDetails", &c.RefreshDetails) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", c, err) } } return nil @@ -381,26 +316,26 @@ func (d DeviceCapacityInfoProperties) MarshalJSON() ([]byte, error) { func (d *DeviceCapacityInfoProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", d, err) } for key, val := range rawMsg { var err error switch key { case "clusterComputeCapacityInfo": - err = unpopulate(val, &d.ClusterComputeCapacityInfo) + err = unpopulate(val, "ClusterComputeCapacityInfo", &d.ClusterComputeCapacityInfo) delete(rawMsg, key) case "clusterStorageCapacityInfo": - err = unpopulate(val, &d.ClusterStorageCapacityInfo) + err = unpopulate(val, "ClusterStorageCapacityInfo", &d.ClusterStorageCapacityInfo) delete(rawMsg, key) case "nodeCapacityInfos": - err = unpopulate(val, &d.NodeCapacityInfos) + err = unpopulate(val, "NodeCapacityInfos", &d.NodeCapacityInfos) delete(rawMsg, key) case "timeStamp": - err = unpopulateTimeRFC3339(val, &d.TimeStamp) + err = unpopulateTimeRFC3339(val, "TimeStamp", &d.TimeStamp) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", d, err) } } return nil @@ -435,14 +370,6 @@ func (d DeviceExtendedInfoProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// 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) -} - // MarshalJSON implements the json.Marshaller interface for type DevicePatch. func (d DevicePatch) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -483,17 +410,6 @@ func (d DiagnosticRemoteSupportSettingsProperties) MarshalJSON() ([]byte, error) return json.Marshal(objectMap) } -// GetTrigger implements the TriggerClassification interface for type FileEventTrigger. -func (f *FileEventTrigger) GetTrigger() *Trigger { - return &Trigger{ - Kind: f.Kind, - SystemData: f.SystemData, - 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{}) @@ -510,32 +426,32 @@ func (f FileEventTrigger) MarshalJSON() ([]byte, error) { func (f *FileEventTrigger) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", f, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, &f.ID) + err = unpopulate(val, "ID", &f.ID) delete(rawMsg, key) case "kind": - err = unpopulate(val, &f.Kind) + err = unpopulate(val, "Kind", &f.Kind) delete(rawMsg, key) case "name": - err = unpopulate(val, &f.Name) + err = unpopulate(val, "Name", &f.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, &f.Properties) + err = unpopulate(val, "Properties", &f.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, &f.SystemData) + err = unpopulate(val, "SystemData", &f.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, &f.Type) + err = unpopulate(val, "Type", &f.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", f, err) } } return nil @@ -553,17 +469,6 @@ func (h HostCapacity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// 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{}) @@ -580,48 +485,37 @@ func (i IoTAddon) MarshalJSON() ([]byte, error) { func (i *IoTAddon) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, &i.ID) + err = unpopulate(val, "ID", &i.ID) delete(rawMsg, key) case "kind": - err = unpopulate(val, &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "name": - err = unpopulate(val, &i.Name) + err = unpopulate(val, "Name", &i.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, &i.Properties) + err = unpopulate(val, "Properties", &i.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, &i.SystemData) + err = unpopulate(val, "SystemData", &i.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, &i.Type) + err = unpopulate(val, "Type", &i.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// 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{}) @@ -638,32 +532,32 @@ func (i IoTRole) MarshalJSON() ([]byte, error) { func (i *IoTRole) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, &i.ID) + err = unpopulate(val, "ID", &i.ID) delete(rawMsg, key) case "kind": - err = unpopulate(val, &i.Kind) + err = unpopulate(val, "Kind", &i.Kind) delete(rawMsg, key) case "name": - err = unpopulate(val, &i.Name) + err = unpopulate(val, "Name", &i.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, &i.Properties) + err = unpopulate(val, "Properties", &i.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, &i.SystemData) + err = unpopulate(val, "SystemData", &i.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, &i.Type) + err = unpopulate(val, "Type", &i.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil @@ -683,83 +577,50 @@ func (i IoTRoleProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type Job. -func (j Job) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endTime", j.EndTime) - populate(objectMap, "error", j.Error) - populate(objectMap, "id", j.ID) - populate(objectMap, "name", j.Name) - populate(objectMap, "percentComplete", j.PercentComplete) - populate(objectMap, "properties", j.Properties) - populateTimeRFC3339(objectMap, "startTime", j.StartTime) - populate(objectMap, "status", j.Status) - populate(objectMap, "type", j.Type) - return json.Marshal(objectMap) -} - // UnmarshalJSON implements the json.Unmarshaller interface for type Job. func (j *Job) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", j, err) } for key, val := range rawMsg { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, &j.EndTime) + err = unpopulateTimeRFC3339(val, "EndTime", &j.EndTime) delete(rawMsg, key) case "error": - err = unpopulate(val, &j.Error) + err = unpopulate(val, "Error", &j.Error) delete(rawMsg, key) case "id": - err = unpopulate(val, &j.ID) + err = unpopulate(val, "ID", &j.ID) delete(rawMsg, key) case "name": - err = unpopulate(val, &j.Name) + err = unpopulate(val, "Name", &j.Name) delete(rawMsg, key) case "percentComplete": - err = unpopulate(val, &j.PercentComplete) + err = unpopulate(val, "PercentComplete", &j.PercentComplete) delete(rawMsg, key) case "properties": - err = unpopulate(val, &j.Properties) + err = unpopulate(val, "Properties", &j.Properties) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, &j.StartTime) + err = unpopulateTimeRFC3339(val, "StartTime", &j.StartTime) delete(rawMsg, key) case "status": - err = unpopulate(val, &j.Status) + err = unpopulate(val, "Status", &j.Status) delete(rawMsg, key) case "type": - err = unpopulate(val, &j.Type) + err = unpopulate(val, "Type", &j.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", j, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JobErrorDetails. -func (j JobErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", j.Code) - populate(objectMap, "errorDetails", j.ErrorDetails) - populate(objectMap, "message", j.Message) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type JobErrorItem. -func (j JobErrorItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", j.Code) - populate(objectMap, "message", j.Message) - populate(objectMap, "recommendations", j.Recommendations) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type KubernetesClusterInfo. func (k KubernetesClusterInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -769,17 +630,6 @@ func (k KubernetesClusterInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// 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{}) @@ -796,32 +646,32 @@ func (k KubernetesRole) MarshalJSON() ([]byte, error) { func (k *KubernetesRole) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, &k.ID) + err = unpopulate(val, "ID", &k.ID) delete(rawMsg, key) case "kind": - err = unpopulate(val, &k.Kind) + err = unpopulate(val, "Kind", &k.Kind) delete(rawMsg, key) case "name": - err = unpopulate(val, &k.Name) + err = unpopulate(val, "Name", &k.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, &k.Properties) + err = unpopulate(val, "Properties", &k.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, &k.SystemData) + err = unpopulate(val, "SystemData", &k.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, &k.Type) + err = unpopulate(val, "Type", &k.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil @@ -835,17 +685,6 @@ func (k KubernetesRoleStorage) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// 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{}) @@ -862,32 +701,32 @@ func (m MECRole) MarshalJSON() ([]byte, error) { func (m *MECRole) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, &m.ID) + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) case "kind": - err = unpopulate(val, &m.Kind) + err = unpopulate(val, "Kind", &m.Kind) delete(rawMsg, key) case "name": - err = unpopulate(val, &m.Name) + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, &m.Properties) + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, &m.SystemData) + err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, &m.Type) + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil @@ -920,31 +759,6 @@ func (m MetricCounterSet) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type MetricSpecificationV1. -func (m MetricSpecificationV1) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aggregationType", m.AggregationType) - populate(objectMap, "category", m.Category) - populate(objectMap, "dimensions", m.Dimensions) - populate(objectMap, "displayDescription", m.DisplayDescription) - populate(objectMap, "displayName", m.DisplayName) - populate(objectMap, "fillGapWithZero", m.FillGapWithZero) - populate(objectMap, "name", m.Name) - populate(objectMap, "resourceIdDimensionNameOverride", m.ResourceIDDimensionNameOverride) - populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) - populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) - populate(objectMap, "unit", m.Unit) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MonitoringMetricConfigurationList. -func (m MonitoringMetricConfigurationList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type MonitoringMetricConfigurationProperties. func (m MonitoringMetricConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -952,14 +766,6 @@ func (m MonitoringMetricConfigurationProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type MoveRequest. -func (m MoveRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resources", m.Resources) - populate(objectMap, "targetResourceGroup", m.TargetResourceGroup) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type NetworkAdapter. func (n NetworkAdapter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -997,14 +803,6 @@ func (n NodeInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type NodeList. -func (n NodeList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", n.NextLink) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type NumaNodeData. func (n NumaNodeData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -1018,22 +816,6 @@ func (n NumaNodeData) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type OperationsList. -func (o OperationsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type OrderList. -func (o OrderList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type OrderProperties. func (o OrderProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -1064,45 +846,34 @@ func (o OrderStatus) MarshalJSON() ([]byte, error) { func (o *OrderStatus) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", o, err) } for key, val := range rawMsg { var err error switch key { case "additionalOrderDetails": - err = unpopulate(val, &o.AdditionalOrderDetails) + err = unpopulate(val, "AdditionalOrderDetails", &o.AdditionalOrderDetails) delete(rawMsg, key) case "comments": - err = unpopulate(val, &o.Comments) + err = unpopulate(val, "Comments", &o.Comments) delete(rawMsg, key) case "status": - err = unpopulate(val, &o.Status) + err = unpopulate(val, "Status", &o.Status) delete(rawMsg, key) case "trackingInformation": - err = unpopulate(val, &o.TrackingInformation) + err = unpopulate(val, "TrackingInformation", &o.TrackingInformation) delete(rawMsg, key) case "updateDateTime": - err = unpopulateTimeRFC3339(val, &o.UpdateDateTime) + err = unpopulateTimeRFC3339(val, "UpdateDateTime", &o.UpdateDateTime) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", o, err) } } return nil } -// GetTrigger implements the TriggerClassification interface for type PeriodicTimerEventTrigger. -func (p *PeriodicTimerEventTrigger) GetTrigger() *Trigger { - return &Trigger{ - Kind: p.Kind, - SystemData: p.SystemData, - 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{}) @@ -1119,32 +890,32 @@ func (p PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error) { func (p *PeriodicTimerEventTrigger) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { case "id": - err = unpopulate(val, &p.ID) + err = unpopulate(val, "ID", &p.ID) delete(rawMsg, key) case "kind": - err = unpopulate(val, &p.Kind) + err = unpopulate(val, "Kind", &p.Kind) delete(rawMsg, key) case "name": - err = unpopulate(val, &p.Name) + err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, &p.Properties) + err = unpopulate(val, "Properties", &p.Properties) delete(rawMsg, key) case "systemData": - err = unpopulate(val, &p.SystemData) + err = unpopulate(val, "SystemData", &p.SystemData) delete(rawMsg, key) case "type": - err = unpopulate(val, &p.Type) + err = unpopulate(val, "Type", &p.Type) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil @@ -1163,23 +934,23 @@ func (p PeriodicTimerSourceInfo) MarshalJSON() ([]byte, error) { func (p *PeriodicTimerSourceInfo) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", p, err) } for key, val := range rawMsg { var err error switch key { case "schedule": - err = unpopulate(val, &p.Schedule) + err = unpopulate(val, "Schedule", &p.Schedule) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, &p.StartTime) + err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) delete(rawMsg, key) case "topic": - err = unpopulate(val, &p.Topic) + err = unpopulate(val, "Topic", &p.Topic) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", p, err) } } return nil @@ -1199,26 +970,26 @@ func (r RefreshDetails) MarshalJSON() ([]byte, error) { func (r *RefreshDetails) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { case "errorManifestFile": - err = unpopulate(val, &r.ErrorManifestFile) + err = unpopulate(val, "ErrorManifestFile", &r.ErrorManifestFile) delete(rawMsg, key) case "inProgressRefreshJobId": - err = unpopulate(val, &r.InProgressRefreshJobID) + err = unpopulate(val, "InProgressRefreshJobID", &r.InProgressRefreshJobID) delete(rawMsg, key) case "lastCompletedRefreshJobTimeInUTC": - err = unpopulateTimeRFC3339(val, &r.LastCompletedRefreshJobTimeInUTC) + err = unpopulateTimeRFC3339(val, "LastCompletedRefreshJobTimeInUTC", &r.LastCompletedRefreshJobTimeInUTC) delete(rawMsg, key) case "lastJob": - err = unpopulate(val, &r.LastJob) + err = unpopulate(val, "LastJob", &r.LastJob) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil @@ -1237,23 +1008,23 @@ func (r RemoteSupportSettings) MarshalJSON() ([]byte, error) { func (r *RemoteSupportSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { case "accessLevel": - err = unpopulate(val, &r.AccessLevel) + err = unpopulate(val, "AccessLevel", &r.AccessLevel) delete(rawMsg, key) case "expirationTimeStampInUTC": - err = unpopulateTimeRFC3339(val, &r.ExpirationTimeStampInUTC) + err = unpopulateTimeRFC3339(val, "ExpirationTimeStampInUTC", &r.ExpirationTimeStampInUTC) delete(rawMsg, key) case "remoteApplicationType": - err = unpopulate(val, &r.RemoteApplicationType) + err = unpopulate(val, "RemoteApplicationType", &r.RemoteApplicationType) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil @@ -1271,112 +1042,48 @@ func (r ResourceMoveDetails) MarshalJSON() ([]byte, error) { func (r *ResourceMoveDetails) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { case "operationInProgress": - err = unpopulate(val, &r.OperationInProgress) + err = unpopulate(val, "OperationInProgress", &r.OperationInProgress) delete(rawMsg, key) case "operationInProgressLockTimeoutInUTC": - err = unpopulateTimeRFC3339(val, &r.OperationInProgressLockTimeoutInUTC) + err = unpopulateTimeRFC3339(val, "OperationInProgressLockTimeoutInUTC", &r.OperationInProgressLockTimeoutInUTC) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// GetRole implements the RoleClassification interface for type Role. -func (r *Role) GetRole() *Role { return r } - -// MarshalJSON implements the json.Marshaller interface for type RoleList. -func (r RoleList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - // UnmarshalJSON implements the json.Unmarshaller interface for type RoleList. func (r *RoleList) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, &r.NextLink) + err = unpopulate(val, "NextLink", &r.NextLink) delete(rawMsg, key) case "value": r.Value, err = unmarshalRoleClassificationArray(val) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type SKU. -func (s SKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "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, "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) -} - -// 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) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SKULocationInfo. -func (s SKULocationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "location", s.Location) - populate(objectMap, "sites", s.Sites) - populate(objectMap, "zones", s.Zones) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. -func (s ServiceSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "metricSpecifications", s.MetricSpecifications) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ShareList. -func (s ShareList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type ShareProperties. func (s ShareProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -1393,22 +1100,6 @@ func (s ShareProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type StorageAccountCredentialList. -func (s StorageAccountCredentialList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StorageAccountList. -func (s StorageAccountList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type SubscriptionProperties. func (s SubscriptionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -1433,23 +1124,23 @@ func (s SupportPackageRequestProperties) MarshalJSON() ([]byte, error) { func (s *SupportPackageRequestProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { case "include": - err = unpopulate(val, &s.Include) + err = unpopulate(val, "Include", &s.Include) delete(rawMsg, key) case "maximumTimeStamp": - err = unpopulateTimeRFC3339(val, &s.MaximumTimeStamp) + err = unpopulateTimeRFC3339(val, "MaximumTimeStamp", &s.MaximumTimeStamp) delete(rawMsg, key) case "minimumTimeStamp": - err = unpopulateTimeRFC3339(val, &s.MinimumTimeStamp) + err = unpopulateTimeRFC3339(val, "MinimumTimeStamp", &s.MinimumTimeStamp) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil @@ -1471,113 +1162,55 @@ func (s SystemData) MarshalJSON() ([]byte, error) { func (s *SystemData) 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 "createdAt": - err = unpopulateTimeRFC3339(val, &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemDataAutoGenerated. -func (s SystemDataAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemDataAutoGenerated. -func (s *SystemDataAutoGenerated) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, &s.CreatedAt) + err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, &s.CreatedBy) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "createdByType": - err = unpopulate(val, &s.CreatedByType) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, &s.LastModifiedAt) + err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, &s.LastModifiedBy) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, &s.LastModifiedByType) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// GetTrigger implements the TriggerClassification interface for type Trigger. -func (t *Trigger) GetTrigger() *Trigger { return t } - -// MarshalJSON implements the json.Marshaller interface for type TriggerList. -func (t TriggerList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", t.NextLink) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - // UnmarshalJSON implements the json.Unmarshaller interface for type TriggerList. func (t *TriggerList) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", t, err) } for key, val := range rawMsg { var err error switch key { case "nextLink": - err = unpopulate(val, &t.NextLink) + err = unpopulate(val, "NextLink", &t.NextLink) delete(rawMsg, key) case "value": t.Value, err = unmarshalTriggerClassificationArray(val) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", t, err) } } return nil @@ -1618,102 +1251,94 @@ func (u UpdateSummaryProperties) MarshalJSON() ([]byte, error) { func (u *UpdateSummaryProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", u, err) } for key, val := range rawMsg { var err error switch key { case "deviceLastScannedDateTime": - err = unpopulateTimeRFC3339(val, &u.DeviceLastScannedDateTime) + err = unpopulateTimeRFC3339(val, "DeviceLastScannedDateTime", &u.DeviceLastScannedDateTime) delete(rawMsg, key) case "deviceVersionNumber": - err = unpopulate(val, &u.DeviceVersionNumber) + err = unpopulate(val, "DeviceVersionNumber", &u.DeviceVersionNumber) delete(rawMsg, key) case "friendlyDeviceVersionName": - err = unpopulate(val, &u.FriendlyDeviceVersionName) + err = unpopulate(val, "FriendlyDeviceVersionName", &u.FriendlyDeviceVersionName) delete(rawMsg, key) case "inProgressDownloadJobId": - err = unpopulate(val, &u.InProgressDownloadJobID) + err = unpopulate(val, "InProgressDownloadJobID", &u.InProgressDownloadJobID) delete(rawMsg, key) case "inProgressDownloadJobStartedDateTime": - err = unpopulateTimeRFC3339(val, &u.InProgressDownloadJobStartedDateTime) + err = unpopulateTimeRFC3339(val, "InProgressDownloadJobStartedDateTime", &u.InProgressDownloadJobStartedDateTime) delete(rawMsg, key) case "inProgressInstallJobId": - err = unpopulate(val, &u.InProgressInstallJobID) + err = unpopulate(val, "InProgressInstallJobID", &u.InProgressInstallJobID) delete(rawMsg, key) case "inProgressInstallJobStartedDateTime": - err = unpopulateTimeRFC3339(val, &u.InProgressInstallJobStartedDateTime) + err = unpopulateTimeRFC3339(val, "InProgressInstallJobStartedDateTime", &u.InProgressInstallJobStartedDateTime) delete(rawMsg, key) case "lastCompletedDownloadJobDateTime": - err = unpopulateTimeRFC3339(val, &u.LastCompletedDownloadJobDateTime) + err = unpopulateTimeRFC3339(val, "LastCompletedDownloadJobDateTime", &u.LastCompletedDownloadJobDateTime) delete(rawMsg, key) case "lastCompletedDownloadJobId": - err = unpopulate(val, &u.LastCompletedDownloadJobID) + err = unpopulate(val, "LastCompletedDownloadJobID", &u.LastCompletedDownloadJobID) delete(rawMsg, key) case "lastCompletedInstallJobDateTime": - err = unpopulateTimeRFC3339(val, &u.LastCompletedInstallJobDateTime) + err = unpopulateTimeRFC3339(val, "LastCompletedInstallJobDateTime", &u.LastCompletedInstallJobDateTime) delete(rawMsg, key) case "lastCompletedInstallJobId": - err = unpopulate(val, &u.LastCompletedInstallJobID) + err = unpopulate(val, "LastCompletedInstallJobID", &u.LastCompletedInstallJobID) delete(rawMsg, key) case "lastCompletedScanJobDateTime": - err = unpopulateTimeRFC3339(val, &u.LastCompletedScanJobDateTime) + err = unpopulateTimeRFC3339(val, "LastCompletedScanJobDateTime", &u.LastCompletedScanJobDateTime) delete(rawMsg, key) case "lastDownloadJobStatus": - err = unpopulate(val, &u.LastDownloadJobStatus) + err = unpopulate(val, "LastDownloadJobStatus", &u.LastDownloadJobStatus) delete(rawMsg, key) case "lastInstallJobStatus": - err = unpopulate(val, &u.LastInstallJobStatus) + err = unpopulate(val, "LastInstallJobStatus", &u.LastInstallJobStatus) delete(rawMsg, key) case "lastSuccessfulInstallJobDateTime": - err = unpopulateTimeRFC3339(val, &u.LastSuccessfulInstallJobDateTime) + err = unpopulateTimeRFC3339(val, "LastSuccessfulInstallJobDateTime", &u.LastSuccessfulInstallJobDateTime) delete(rawMsg, key) case "lastSuccessfulScanJobTime": - err = unpopulateTimeRFC3339(val, &u.LastSuccessfulScanJobTime) + err = unpopulateTimeRFC3339(val, "LastSuccessfulScanJobTime", &u.LastSuccessfulScanJobTime) delete(rawMsg, key) case "ongoingUpdateOperation": - err = unpopulate(val, &u.OngoingUpdateOperation) + err = unpopulate(val, "OngoingUpdateOperation", &u.OngoingUpdateOperation) delete(rawMsg, key) case "rebootBehavior": - err = unpopulate(val, &u.RebootBehavior) + err = unpopulate(val, "RebootBehavior", &u.RebootBehavior) delete(rawMsg, key) case "totalNumberOfUpdatesAvailable": - err = unpopulate(val, &u.TotalNumberOfUpdatesAvailable) + err = unpopulate(val, "TotalNumberOfUpdatesAvailable", &u.TotalNumberOfUpdatesAvailable) delete(rawMsg, key) case "totalNumberOfUpdatesPendingDownload": - err = unpopulate(val, &u.TotalNumberOfUpdatesPendingDownload) + err = unpopulate(val, "TotalNumberOfUpdatesPendingDownload", &u.TotalNumberOfUpdatesPendingDownload) delete(rawMsg, key) case "totalNumberOfUpdatesPendingInstall": - err = unpopulate(val, &u.TotalNumberOfUpdatesPendingInstall) + err = unpopulate(val, "TotalNumberOfUpdatesPendingInstall", &u.TotalNumberOfUpdatesPendingInstall) delete(rawMsg, key) case "totalTimeInMinutes": - err = unpopulate(val, &u.TotalTimeInMinutes) + err = unpopulate(val, "TotalTimeInMinutes", &u.TotalTimeInMinutes) delete(rawMsg, key) case "totalUpdateSizeInBytes": - err = unpopulate(val, &u.TotalUpdateSizeInBytes) + err = unpopulate(val, "TotalUpdateSizeInBytes", &u.TotalUpdateSizeInBytes) delete(rawMsg, key) case "updateTitles": - err = unpopulate(val, &u.UpdateTitles) + err = unpopulate(val, "UpdateTitles", &u.UpdateTitles) delete(rawMsg, key) case "updates": - err = unpopulate(val, &u.Updates) + err = unpopulate(val, "Updates", &u.Updates) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", u, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type UserList. -func (u UserList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", u.NextLink) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type UserProperties. func (u UserProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -1743,9 +1368,12 @@ func populate(m map[string]interface{}, k string, v interface{}) { } } -func unpopulate(data json.RawMessage, v interface{}) error { +func unpopulate(data json.RawMessage, fn string, v interface{}) error { if data == nil { return nil } - return json.Unmarshal(data, v) + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_monitoringconfig_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_monitoringconfig_client.go index 9d3c2e09017e..2655272c0af5 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_monitoringconfig_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_monitoringconfig_client.go @@ -38,7 +38,7 @@ func NewMonitoringConfigClient(subscriptionID string, credential azcore.TokenCre if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,26 +56,28 @@ func NewMonitoringConfigClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates a new metric configuration or updates an existing one for a role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[MonitoringConfigClientCreateOrUpdateResponse], error) { +func (client *MonitoringConfigClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, roleName string, resourceGroupName string, monitoringMetricConfiguration MonitoringMetricConfiguration, options *MonitoringConfigClientBeginCreateOrUpdateOptions) (*runtime.Poller[MonitoringConfigClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, roleName, resourceGroupName, monitoringMetricConfiguration, options) if err != nil { return nil, err } - return armruntime.NewPoller[MonitoringConfigClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[MonitoringConfigClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[MonitoringConfigClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[MonitoringConfigClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new metric configuration or updates an existing one for a role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -117,31 +119,33 @@ func (client *MonitoringConfigClient) createOrUpdateCreateRequest(ctx context.Co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, monitoringMetricConfiguration) } // BeginDelete - deletes a new metric configuration for a role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[MonitoringConfigClientDeleteResponse], error) { +func (client *MonitoringConfigClient) BeginDelete(ctx context.Context, deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientBeginDeleteOptions) (*runtime.Poller[MonitoringConfigClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, roleName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[MonitoringConfigClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[MonitoringConfigClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[MonitoringConfigClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[MonitoringConfigClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - deletes a new metric configuration for a role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -183,12 +187,13 @@ func (client *MonitoringConfigClient) deleteCreateRequest(ctx context.Context, d reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets a metric configuration of a role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // roleName - The role name. // resourceGroupName - The resource group name. @@ -234,7 +239,7 @@ func (client *MonitoringConfigClient) getCreateRequest(ctx context.Context, devi reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -249,12 +254,13 @@ func (client *MonitoringConfigClient) getHandleResponse(resp *http.Response) (Mo // NewListPager - Lists metric configurations in a role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) NewListPager(deviceName string, roleName string, resourceGroupName string, options *MonitoringConfigClientListOptions) *runtime.Pager[MonitoringConfigClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[MonitoringConfigClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[MonitoringConfigClientListResponse]{ More: func(page MonitoringConfigClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -307,7 +313,7 @@ func (client *MonitoringConfigClient) listCreateRequest(ctx context.Context, dev reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_nodes_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_nodes_client.go index c9722754206b..a6681fc3e5fb 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_nodes_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_nodes_client.go @@ -38,7 +38,7 @@ func NewNodesClient(subscriptionID string, credential azcore.TokenCredential, op if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,12 +56,13 @@ func NewNodesClient(subscriptionID string, credential azcore.TokenCredential, op // NewListByDataBoxEdgeDevicePager - Gets all the nodes currently configured under this Data Box Edge device // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - NodesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the NodesClient.ListByDataBoxEdgeDevice // method. func (client *NodesClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *NodesClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[NodesClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[NodesClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[NodesClientListByDataBoxEdgeDeviceResponse]{ More: func(page NodesClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -110,7 +111,7 @@ func (client *NodesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operations_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operations_client.go index 60205986fa48..254180459581 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operations_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operations_client.go @@ -33,7 +33,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -50,9 +50,10 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - List all the supported operations. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[OperationsClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -89,7 +90,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operationsstatus_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operationsstatus_client.go index 9a70d6e4f968..abb7c29faca0 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operationsstatus_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_operationsstatus_client.go @@ -38,7 +38,7 @@ func NewOperationsStatusClient(subscriptionID string, credential azcore.TokenCre if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,6 +56,7 @@ func NewOperationsStatusClient(subscriptionID string, credential azcore.TokenCre // Get - Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The job name. // resourceGroupName - The resource group name. @@ -101,7 +102,7 @@ func (client *OperationsStatusClient) getCreateRequest(ctx context.Context, devi reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_orders_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_orders_client.go index b87b6f3fb609..f56af875fe90 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_orders_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_orders_client.go @@ -38,7 +38,7 @@ func NewOrdersClient(subscriptionID string, credential azcore.TokenCredential, o if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,25 +56,27 @@ func NewOrdersClient(subscriptionID string, credential azcore.TokenCredential, o // BeginCreateOrUpdate - Creates or updates an order. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[OrdersClientCreateOrUpdateResponse], error) { +func (client *OrdersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, resourceGroupName string, order Order, options *OrdersClientBeginCreateOrUpdateOptions) (*runtime.Poller[OrdersClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, resourceGroupName, order, options) if err != nil { return nil, err } - return armruntime.NewPoller[OrdersClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[OrdersClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[OrdersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[OrdersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates or updates an order. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -112,29 +114,31 @@ func (client *OrdersClient) createOrUpdateCreateRequest(ctx context.Context, dev reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, order) } // BeginDelete - Deletes the order related to the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[OrdersClientDeleteResponse], error) { +func (client *OrdersClient) BeginDelete(ctx context.Context, deviceName string, resourceGroupName string, options *OrdersClientBeginDeleteOptions) (*runtime.Poller[OrdersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[OrdersClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[OrdersClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[OrdersClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[OrdersClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the order related to the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -172,12 +176,13 @@ func (client *OrdersClient) deleteCreateRequest(ctx context.Context, deviceName reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets a specific order by name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - OrdersClientGetOptions contains the optional parameters for the OrdersClient.Get method. @@ -218,7 +223,7 @@ func (client *OrdersClient) getCreateRequest(ctx context.Context, deviceName str reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -233,12 +238,13 @@ func (client *OrdersClient) getHandleResponse(resp *http.Response) (OrdersClient // NewListByDataBoxEdgeDevicePager - Lists all the orders related to a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - OrdersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the OrdersClient.ListByDataBoxEdgeDevice // method. func (client *OrdersClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *OrdersClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[OrdersClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[OrdersClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[OrdersClientListByDataBoxEdgeDeviceResponse]{ More: func(page OrdersClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -287,7 +293,7 @@ func (client *OrdersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -302,6 +308,7 @@ func (client *OrdersClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Res // ListDCAccessCode - Gets the DCAccess Code // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name // resourceGroupName - The resource group name. // options - OrdersClientListDCAccessCodeOptions contains the optional parameters for the OrdersClient.ListDCAccessCode method. @@ -342,7 +349,7 @@ func (client *OrdersClient) listDCAccessCodeCreateRequest(ctx context.Context, d reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_roles_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_roles_client.go index 8410f75d41cf..ee955e5468aa 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_roles_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_roles_client.go @@ -38,7 +38,7 @@ func NewRolesClient(subscriptionID string, credential azcore.TokenCredential, op if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,26 +56,28 @@ func NewRolesClient(subscriptionID string, credential azcore.TokenCredential, op // BeginCreateOrUpdate - Create or update a role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[RolesClientCreateOrUpdateResponse], error) { +func (client *RolesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, role RoleClassification, options *RolesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RolesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, role, options) if err != nil { return nil, err } - return armruntime.NewPoller[RolesClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[RolesClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[RolesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[RolesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Create or update a role. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -117,30 +119,32 @@ func (client *RolesClient) createOrUpdateCreateRequest(ctx context.Context, devi reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, role) } // BeginDelete - Deletes the role on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[RolesClientDeleteResponse], error) { +func (client *RolesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *RolesClientBeginDeleteOptions) (*runtime.Poller[RolesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[RolesClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[RolesClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[RolesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[RolesClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the role on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -182,12 +186,13 @@ func (client *RolesClient) deleteCreateRequest(ctx context.Context, deviceName s reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets a specific role by name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The role name. // resourceGroupName - The resource group name. @@ -233,7 +238,7 @@ func (client *RolesClient) getCreateRequest(ctx context.Context, deviceName stri reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -248,12 +253,13 @@ func (client *RolesClient) getHandleResponse(resp *http.Response) (RolesClientGe // NewListByDataBoxEdgeDevicePager - Lists all the roles configured in a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - RolesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the RolesClient.ListByDataBoxEdgeDevice // method. func (client *RolesClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *RolesClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[RolesClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[RolesClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[RolesClientListByDataBoxEdgeDeviceResponse]{ More: func(page RolesClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -302,7 +308,7 @@ func (client *RolesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_shares_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_shares_client.go index a36ee5b8a6c7..ee5dfb5f096a 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_shares_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_shares_client.go @@ -38,7 +38,7 @@ func NewSharesClient(subscriptionID string, credential azcore.TokenCredential, o if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,26 +56,28 @@ func NewSharesClient(subscriptionID string, credential azcore.TokenCredential, o // BeginCreateOrUpdate - Creates a new share or updates an existing share on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[SharesClientCreateOrUpdateResponse], error) { +func (client *SharesClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, share Share, options *SharesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SharesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, share, options) if err != nil { return nil, err } - return armruntime.NewPoller[SharesClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[SharesClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[SharesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[SharesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new share or updates an existing share on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -117,30 +119,32 @@ func (client *SharesClient) createOrUpdateCreateRequest(ctx context.Context, dev reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, share) } // BeginDelete - Deletes the share on the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[SharesClientDeleteResponse], error) { +func (client *SharesClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientBeginDeleteOptions) (*runtime.Poller[SharesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[SharesClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[SharesClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[SharesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[SharesClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the share on the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -182,12 +186,13 @@ func (client *SharesClient) deleteCreateRequest(ctx context.Context, deviceName reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets a share by name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The share name. // resourceGroupName - The resource group name. @@ -233,7 +238,7 @@ func (client *SharesClient) getCreateRequest(ctx context.Context, deviceName str reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -248,12 +253,13 @@ func (client *SharesClient) getHandleResponse(resp *http.Response) (SharesClient // NewListByDataBoxEdgeDevicePager - Lists all the shares in a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - SharesClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the SharesClient.ListByDataBoxEdgeDevice // method. func (client *SharesClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *SharesClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[SharesClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[SharesClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[SharesClientListByDataBoxEdgeDeviceResponse]{ More: func(page SharesClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -302,7 +308,7 @@ func (client *SharesClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -317,24 +323,26 @@ func (client *SharesClient) listByDataBoxEdgeDeviceHandleResponse(resp *http.Res // BeginRefresh - Refreshes the share metadata with the data from the cloud. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[SharesClientRefreshResponse], error) { +func (client *SharesClient) BeginRefresh(ctx context.Context, deviceName string, name string, resourceGroupName string, options *SharesClientBeginRefreshOptions) (*runtime.Poller[SharesClientRefreshResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.refresh(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[SharesClientRefreshResponse](resp, client.pl, nil) + return runtime.NewPoller[SharesClientRefreshResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[SharesClientRefreshResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[SharesClientRefreshResponse](options.ResumeToken, client.pl, nil) } } // Refresh - Refreshes the share metadata with the data from the cloud. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -376,6 +384,6 @@ func (client *SharesClient) refreshCreateRequest(ctx context.Context, deviceName reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccountcredentials_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccountcredentials_client.go index 8242ecf01ac6..e4ce475d25a9 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccountcredentials_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccountcredentials_client.go @@ -38,7 +38,7 @@ func NewStorageAccountCredentialsClient(subscriptionID string, credential azcore if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,26 +56,28 @@ func NewStorageAccountCredentialsClient(subscriptionID string, credential azcore // BeginCreateOrUpdate - Creates or updates the storage account credential. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[StorageAccountCredentialsClientCreateOrUpdateResponse], error) { +func (client *StorageAccountCredentialsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, storageAccountCredential StorageAccountCredential, options *StorageAccountCredentialsClientBeginCreateOrUpdateOptions) (*runtime.Poller[StorageAccountCredentialsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, storageAccountCredential, options) if err != nil { return nil, err } - return armruntime.NewPoller[StorageAccountCredentialsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[StorageAccountCredentialsClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[StorageAccountCredentialsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[StorageAccountCredentialsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates or updates the storage account credential. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -117,31 +119,33 @@ func (client *StorageAccountCredentialsClient) createOrUpdateCreateRequest(ctx c reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, storageAccountCredential) } // BeginDelete - Deletes the storage account credential. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[StorageAccountCredentialsClientDeleteResponse], error) { +func (client *StorageAccountCredentialsClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *StorageAccountCredentialsClientBeginDeleteOptions) (*runtime.Poller[StorageAccountCredentialsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[StorageAccountCredentialsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[StorageAccountCredentialsClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[StorageAccountCredentialsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[StorageAccountCredentialsClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the storage account credential. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -183,12 +187,13 @@ func (client *StorageAccountCredentialsClient) deleteCreateRequest(ctx context.C reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets the properties of the specified storage account credential. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The storage account credential name. // resourceGroupName - The resource group name. @@ -235,7 +240,7 @@ func (client *StorageAccountCredentialsClient) getCreateRequest(ctx context.Cont reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -250,12 +255,13 @@ func (client *StorageAccountCredentialsClient) getHandleResponse(resp *http.Resp // NewListByDataBoxEdgeDevicePager - Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the StorageAccountCredentialsClient.ListByDataBoxEdgeDevice // method. func (client *StorageAccountCredentialsClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *StorageAccountCredentialsClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse]{ More: func(page StorageAccountCredentialsClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -304,7 +310,7 @@ func (client *StorageAccountCredentialsClient) listByDataBoxEdgeDeviceCreateRequ reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccounts_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccounts_client.go index d4d6194fbd56..e0cc5be49d15 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccounts_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_storageaccounts_client.go @@ -38,7 +38,7 @@ func NewStorageAccountsClient(subscriptionID string, credential azcore.TokenCred if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,26 +56,28 @@ func NewStorageAccountsClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Creates a new StorageAccount or updates an existing StorageAccount on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[StorageAccountsClientCreateOrUpdateResponse], error) { +func (client *StorageAccountsClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, storageAccount StorageAccount, options *StorageAccountsClientBeginCreateOrUpdateOptions) (*runtime.Poller[StorageAccountsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, storageAccountName, resourceGroupName, storageAccount, options) if err != nil { return nil, err } - return armruntime.NewPoller[StorageAccountsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[StorageAccountsClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[StorageAccountsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[StorageAccountsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new StorageAccount or updates an existing StorageAccount on the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -117,31 +119,33 @@ func (client *StorageAccountsClient) createOrUpdateCreateRequest(ctx context.Con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, storageAccount) } // BeginDelete - Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[StorageAccountsClientDeleteResponse], error) { +func (client *StorageAccountsClient) BeginDelete(ctx context.Context, deviceName string, storageAccountName string, resourceGroupName string, options *StorageAccountsClientBeginDeleteOptions) (*runtime.Poller[StorageAccountsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, storageAccountName, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[StorageAccountsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[StorageAccountsClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[StorageAccountsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[StorageAccountsClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -183,12 +187,13 @@ func (client *StorageAccountsClient) deleteCreateRequest(ctx context.Context, de reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets a StorageAccount by name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // storageAccountName - The storage account name. // resourceGroupName - The resource group name. @@ -234,7 +239,7 @@ func (client *StorageAccountsClient) getCreateRequest(ctx context.Context, devic reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -249,12 +254,13 @@ func (client *StorageAccountsClient) getHandleResponse(resp *http.Response) (Sto // NewListByDataBoxEdgeDevicePager - Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - StorageAccountsClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the StorageAccountsClient.ListByDataBoxEdgeDevice // method. func (client *StorageAccountsClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *StorageAccountsClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[StorageAccountsClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[StorageAccountsClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[StorageAccountsClientListByDataBoxEdgeDeviceResponse]{ More: func(page StorageAccountsClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -303,7 +309,7 @@ func (client *StorageAccountsClient) listByDataBoxEdgeDeviceCreateRequest(ctx co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_supportpackages_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_supportpackages_client.go index 273c7e797a6e..1f4adddbe0e0 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_supportpackages_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_supportpackages_client.go @@ -38,7 +38,7 @@ func NewSupportPackagesClient(subscriptionID string, credential azcore.TokenCred if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,25 +56,27 @@ func NewSupportPackagesClient(subscriptionID string, credential azcore.TokenCred // BeginTriggerSupportPackage - Triggers support package on the device // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[SupportPackagesClientTriggerSupportPackageResponse], error) { +func (client *SupportPackagesClient) BeginTriggerSupportPackage(ctx context.Context, deviceName string, resourceGroupName string, triggerSupportPackageRequest TriggerSupportPackageRequest, options *SupportPackagesClientBeginTriggerSupportPackageOptions) (*runtime.Poller[SupportPackagesClientTriggerSupportPackageResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.triggerSupportPackage(ctx, deviceName, resourceGroupName, triggerSupportPackageRequest, options) if err != nil { return nil, err } - return armruntime.NewPoller[SupportPackagesClientTriggerSupportPackageResponse](resp, client.pl, nil) + return runtime.NewPoller[SupportPackagesClientTriggerSupportPackageResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[SupportPackagesClientTriggerSupportPackageResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[SupportPackagesClientTriggerSupportPackageResponse](options.ResumeToken, client.pl, nil) } } // TriggerSupportPackage - Triggers support package on the device // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -112,6 +114,6 @@ func (client *SupportPackagesClient) triggerSupportPackageCreateRequest(ctx cont reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, triggerSupportPackageRequest) } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_time_rfc3339.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_time_rfc3339.go index 45c181aad452..947ffe6c6dfc 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_time_rfc3339.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_time_rfc3339.go @@ -10,6 +10,7 @@ package armdataboxedge import ( "encoding/json" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" "regexp" @@ -72,13 +73,13 @@ func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { m[k] = (*timeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, t **time.Time) error { +func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } var aux timeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { - return err + return fmt.Errorf("struct field %s: %v", fn, err) } *t = (*time.Time)(&aux) return nil diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_triggers_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_triggers_client.go index aa67b425ab38..05501d2c2575 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_triggers_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_triggers_client.go @@ -38,7 +38,7 @@ func NewTriggersClient(subscriptionID string, credential azcore.TokenCredential, if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,26 +56,28 @@ func NewTriggersClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates or updates a trigger. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[TriggersClientCreateOrUpdateResponse], error) { +func (client *TriggersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, trigger TriggerClassification, options *TriggersClientBeginCreateOrUpdateOptions) (*runtime.Poller[TriggersClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, trigger, options) if err != nil { return nil, err } - return armruntime.NewPoller[TriggersClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[TriggersClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[TriggersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[TriggersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates or updates a trigger. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -117,30 +119,32 @@ func (client *TriggersClient) createOrUpdateCreateRequest(ctx context.Context, d reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, trigger) } // BeginDelete - Deletes the trigger on the gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[TriggersClientDeleteResponse], error) { +func (client *TriggersClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *TriggersClientBeginDeleteOptions) (*runtime.Poller[TriggersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[TriggersClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[TriggersClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[TriggersClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[TriggersClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the trigger on the gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -182,12 +186,13 @@ func (client *TriggersClient) deleteCreateRequest(ctx context.Context, deviceNam reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Get a specific trigger by name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The trigger name. // resourceGroupName - The resource group name. @@ -233,7 +238,7 @@ func (client *TriggersClient) getCreateRequest(ctx context.Context, deviceName s reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -248,12 +253,13 @@ func (client *TriggersClient) getHandleResponse(resp *http.Response) (TriggersCl // NewListByDataBoxEdgeDevicePager - Lists all the triggers configured in the device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - TriggersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the TriggersClient.ListByDataBoxEdgeDevice // method. func (client *TriggersClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *TriggersClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[TriggersClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[TriggersClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[TriggersClientListByDataBoxEdgeDeviceResponse]{ More: func(page TriggersClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -305,7 +311,7 @@ func (client *TriggersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.C reqQP.Set("$filter", *options.Filter) } req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_users_client.go b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_users_client.go index cde900ad0db0..242622af90cb 100644 --- a/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_users_client.go +++ b/sdk/resourcemanager/databoxedge/armdataboxedge/zz_generated_users_client.go @@ -38,7 +38,7 @@ func NewUsersClient(subscriptionID string, credential azcore.TokenCredential, op if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -57,26 +57,28 @@ func NewUsersClient(subscriptionID string, credential azcore.TokenCredential, op // 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. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[UsersClientCreateOrUpdateResponse], error) { +func (client *UsersClient) BeginCreateOrUpdate(ctx context.Context, deviceName string, name string, resourceGroupName string, userParam User, options *UsersClientBeginCreateOrUpdateOptions) (*runtime.Poller[UsersClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, deviceName, name, resourceGroupName, userParam, options) if err != nil { return nil, err } - return armruntime.NewPoller[UsersClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[UsersClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[UsersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[UsersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, 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 an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -118,30 +120,32 @@ func (client *UsersClient) createOrUpdateCreateRequest(ctx context.Context, devi reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, userParam) } // BeginDelete - Deletes the user on a databox edge/gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // 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) (*armruntime.Poller[UsersClientDeleteResponse], error) { +func (client *UsersClient) BeginDelete(ctx context.Context, deviceName string, name string, resourceGroupName string, options *UsersClientBeginDeleteOptions) (*runtime.Poller[UsersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, deviceName, name, resourceGroupName, options) if err != nil { return nil, err } - return armruntime.NewPoller[UsersClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[UsersClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[UsersClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[UsersClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the user on a databox edge/gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 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 { @@ -183,12 +187,13 @@ func (client *UsersClient) deleteCreateRequest(ctx context.Context, deviceName s reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Gets the properties of the specified user. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // name - The user name. // resourceGroupName - The resource group name. @@ -234,7 +239,7 @@ func (client *UsersClient) getCreateRequest(ctx context.Context, deviceName stri reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2022-03-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -249,12 +254,13 @@ func (client *UsersClient) getHandleResponse(resp *http.Response) (UsersClientGe // NewListByDataBoxEdgeDevicePager - Gets all the users registered on a Data Box Edge/Data Box Gateway device. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-03-01 // deviceName - The device name. // resourceGroupName - The resource group name. // options - UsersClientListByDataBoxEdgeDeviceOptions contains the optional parameters for the UsersClient.ListByDataBoxEdgeDevice // method. func (client *UsersClient) NewListByDataBoxEdgeDevicePager(deviceName string, resourceGroupName string, options *UsersClientListByDataBoxEdgeDeviceOptions) *runtime.Pager[UsersClientListByDataBoxEdgeDeviceResponse] { - return runtime.NewPager(runtime.PageProcessor[UsersClientListByDataBoxEdgeDeviceResponse]{ + return runtime.NewPager(runtime.PagingHandler[UsersClientListByDataBoxEdgeDeviceResponse]{ More: func(page UsersClientListByDataBoxEdgeDeviceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -306,7 +312,7 @@ func (client *UsersClient) listByDataBoxEdgeDeviceCreateRequest(ctx context.Cont reqQP.Set("$filter", *options.Filter) } req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil }