diff --git a/sdk/resourcemanager/mariadb/armmariadb/CHANGELOG.md b/sdk/resourcemanager/mariadb/armmariadb/CHANGELOG.md index 68863b4b1b8a..10e50e45b6b8 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/CHANGELOG.md +++ b/sdk/resourcemanager/mariadb/armmariadb/CHANGELOG.md @@ -1,5 +1,48 @@ # Release History +## 1.0.0 (2022-05-17) +### Breaking Changes + +- Function `*FirewallRulesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[FirewallRulesClientDeleteResponse], error)` to `(*runtime.Poller[FirewallRulesClientDeleteResponse], error)` +- Function `*ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error)` +- Function `*ServersClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ServersClientDeleteResponse], error)` to `(*runtime.Poller[ServersClientDeleteResponse], error)` +- Function `*DatabasesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[DatabasesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkRulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error)` +- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` +- Function `*PrivateEndpointConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)` +- Function `*ConfigurationsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ConfigurationsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ConfigurationsClientCreateOrUpdateResponse], error)` +- Function `*ServerParametersClient.BeginListUpdateConfigurations` return value(s) have been changed from `(*armruntime.Poller[ServerParametersClientListUpdateConfigurationsResponse], error)` to `(*runtime.Poller[ServerParametersClientListUpdateConfigurationsResponse], error)` +- Function `*ServersClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[ServersClientUpdateResponse], error)` to `(*runtime.Poller[ServersClientUpdateResponse], error)` +- Function `*ServersClient.BeginRestart` return value(s) have been changed from `(*armruntime.Poller[ServersClientRestartResponse], error)` to `(*runtime.Poller[ServersClientRestartResponse], error)` +- Function `*FirewallRulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)` +- Function `*ServersClient.BeginStop` return value(s) have been changed from `(*armruntime.Poller[ServersClientStopResponse], error)` to `(*runtime.Poller[ServersClientStopResponse], error)` +- Function `*ServersClient.BeginStart` return value(s) have been changed from `(*armruntime.Poller[ServersClientStartResponse], error)` to `(*runtime.Poller[ServersClientStartResponse], error)` +- Function `*PrivateEndpointConnectionsClient.BeginUpdateTags` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientUpdateTagsResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientUpdateTagsResponse], error)` +- Function `*ManagementClient.BeginCreateRecommendedActionSession` return value(s) have been changed from `(*armruntime.Poller[ManagementClientCreateRecommendedActionSessionResponse], error)` to `(*runtime.Poller[ManagementClientCreateRecommendedActionSessionResponse], error)` +- Function `*VirtualNetworkRulesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[VirtualNetworkRulesClientDeleteResponse], error)` to `(*runtime.Poller[VirtualNetworkRulesClientDeleteResponse], error)` +- Function `*DatabasesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[DatabasesClientDeleteResponse], error)` to `(*runtime.Poller[DatabasesClientDeleteResponse], error)` +- Function `*ServersClient.BeginCreate` return value(s) have been changed from `(*armruntime.Poller[ServersClientCreateResponse], error)` to `(*runtime.Poller[ServersClientCreateResponse], error)` +- Function `VirtualNetworkRuleListResult.MarshalJSON` has been removed +- Function `RecommendationActionsResultList.MarshalJSON` has been removed +- Function `OperationListResult.MarshalJSON` has been removed +- Function `ErrorResponse.MarshalJSON` has been removed +- Function `DatabaseListResult.MarshalJSON` has been removed +- Function `RecommendedActionSessionsOperationStatus.MarshalJSON` has been removed +- Function `QueryTextsResultList.MarshalJSON` has been removed +- Function `FirewallRuleListResult.MarshalJSON` has been removed +- Function `PerformanceTierListResult.MarshalJSON` has been removed +- Function `TopQueryStatisticsResultList.MarshalJSON` has been removed +- Function `ServerListResult.MarshalJSON` has been removed +- Function `PerformanceTierProperties.MarshalJSON` has been removed +- Function `LogFileListResult.MarshalJSON` has been removed +- Function `PrivateLinkResourceListResult.MarshalJSON` has been removed +- Function `WaitStatisticsResultList.MarshalJSON` has been removed +- Function `ServerSecurityAlertPolicyListResult.MarshalJSON` has been removed +- Function `PrivateEndpointConnectionListResult.MarshalJSON` has been removed +- Function `Operation.MarshalJSON` has been removed +- Function `AdvisorsResultList.MarshalJSON` has been removed + + ## 0.4.0 (2022-04-18) ### Breaking Changes diff --git a/sdk/resourcemanager/mariadb/armmariadb/autorest.md b/sdk/resourcemanager/mariadb/armmariadb/autorest.md index 4155f12259d9..0ad8e82003eb 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/autorest.md +++ b/sdk/resourcemanager/mariadb/armmariadb/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/f92aaf88f4c9d1ffb9a014eba196d887a9288c3a/specification/mariadb/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/f92aaf88f4c9d1ffb9a014eba196d887a9288c3a/specification/mariadb/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mariadb/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mariadb/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/mariadb/armmariadb/go.mod b/sdk/resourcemanager/mariadb/armmariadb/go.mod index a3f915309574..07a5674b167e 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/go.mod +++ b/sdk/resourcemanager/mariadb/armmariadb/go.mod @@ -3,19 +3,19 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb 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/mariadb/armmariadb/go.sum b/sdk/resourcemanager/mariadb/armmariadb/go.sum index 56d1c32628ae..ed5b814680ee 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/go.sum +++ b/sdk/resourcemanager/mariadb/armmariadb/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/mariadb/armmariadb/ze_generated_example_advisors_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_advisors_client_test.go index 6c30428f322a..3b3d60adec12 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_advisors_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_advisors_client_test.go @@ -23,14 +23,14 @@ func ExampleAdvisorsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewAdvisorsClient("", cred, nil) + client, err := armmariadb.NewAdvisorsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testResourceGroupName", + "testServerName", + "Index", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -46,18 +46,17 @@ func ExampleAdvisorsClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewAdvisorsClient("", cred, nil) + client, err := armmariadb.NewAdvisorsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("testResourceGroupName", + "testServerName", 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/mariadb/armmariadb/ze_generated_example_checknameavailability_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_checknameavailability_client_test.go index 4ff8130f0cb4..57f13270a284 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_checknameavailability_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_checknameavailability_client_test.go @@ -24,14 +24,14 @@ func ExampleCheckNameAvailabilityClient_Execute() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewCheckNameAvailabilityClient("", cred, nil) + client, err := armmariadb.NewCheckNameAvailabilityClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Execute(ctx, armmariadb.NameAvailabilityRequest{ - Name: to.Ptr(""), - Type: to.Ptr(""), + Name: to.Ptr("name1"), + Type: to.Ptr("Microsoft.DBforMariaDB"), }, nil) if err != nil { diff --git a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_configurations_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_configurations_client_test.go index 1b91b75cda34..ca3b45b0b762 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_configurations_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_configurations_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/mariadb/armmariadb" @@ -26,25 +24,25 @@ func ExampleConfigurationsClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewConfigurationsClient("", cred, nil) + client, err := armmariadb.NewConfigurationsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "TestGroup", + "testserver", + "event_scheduler", armmariadb.Configuration{ Properties: &armmariadb.ConfigurationProperties{ - Source: to.Ptr(""), - Value: to.Ptr(""), + Source: to.Ptr("user-override"), + Value: to.Ptr("off"), }, }, - &armmariadb.ConfigurationsClientBeginCreateOrUpdateOptions{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) } @@ -59,14 +57,14 @@ func ExampleConfigurationsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewConfigurationsClient("", cred, nil) + client, err := armmariadb.NewConfigurationsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "TestGroup", + "testserver", + "event_scheduler", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -82,18 +80,17 @@ func ExampleConfigurationsClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewConfigurationsClient("", cred, nil) + client, err := armmariadb.NewConfigurationsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("testrg", + "mariadbtestsvc1", 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/mariadb/armmariadb/ze_generated_example_databases_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_databases_client_test.go index 17de60bdfcc6..9caa4b8169ff 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_databases_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_databases_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/mariadb/armmariadb" @@ -26,25 +24,25 @@ func ExampleDatabasesClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewDatabasesClient("", cred, nil) + client, err := armmariadb.NewDatabasesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "TestGroup", + "testserver", + "db1", armmariadb.Database{ Properties: &armmariadb.DatabaseProperties{ - Charset: to.Ptr(""), - Collation: to.Ptr(""), + Charset: to.Ptr("utf8"), + Collation: to.Ptr("utf8_general_ci"), }, }, - &armmariadb.DatabasesClientBeginCreateOrUpdateOptions{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) } @@ -59,19 +57,19 @@ func ExampleDatabasesClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewDatabasesClient("", cred, nil) + client, err := armmariadb.NewDatabasesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armmariadb.DatabasesClientBeginDeleteOptions{ResumeToken: ""}) + "TestGroup", + "testserver", + "db1", + 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) } @@ -84,14 +82,14 @@ func ExampleDatabasesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewDatabasesClient("", cred, nil) + client, err := armmariadb.NewDatabasesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "TestGroup", + "testserver", + "db1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -107,18 +105,17 @@ func ExampleDatabasesClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewDatabasesClient("", cred, nil) + client, err := armmariadb.NewDatabasesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("TestGroup", + "testserver", 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/mariadb/armmariadb/ze_generated_example_firewallrules_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_firewallrules_client_test.go index e0c879fa8973..d86a286d2d0c 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_firewallrules_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_firewallrules_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/mariadb/armmariadb" @@ -26,25 +24,25 @@ func ExampleFirewallRulesClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewFirewallRulesClient("", cred, nil) + client, err := armmariadb.NewFirewallRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "TestGroup", + "testserver", + "rule1", armmariadb.FirewallRule{ Properties: &armmariadb.FirewallRuleProperties{ - EndIPAddress: to.Ptr(""), - StartIPAddress: to.Ptr(""), + EndIPAddress: to.Ptr("255.255.255.255"), + StartIPAddress: to.Ptr("0.0.0.0"), }, }, - &armmariadb.FirewallRulesClientBeginCreateOrUpdateOptions{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) } @@ -59,19 +57,19 @@ func ExampleFirewallRulesClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewFirewallRulesClient("", cred, nil) + client, err := armmariadb.NewFirewallRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armmariadb.FirewallRulesClientBeginDeleteOptions{ResumeToken: ""}) + "TestGroup", + "testserver", + "rule1", + 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) } @@ -84,14 +82,14 @@ func ExampleFirewallRulesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewFirewallRulesClient("", cred, nil) + client, err := armmariadb.NewFirewallRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "TestGroup", + "testserver", + "rule1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -107,18 +105,17 @@ func ExampleFirewallRulesClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewFirewallRulesClient("", cred, nil) + client, err := armmariadb.NewFirewallRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("TestGroup", + "testserver", 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/mariadb/armmariadb/ze_generated_example_locationbasedperformancetier_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedperformancetier_client_test.go index 72e748de30f2..70c427f0b2a9 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedperformancetier_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedperformancetier_client_test.go @@ -23,17 +23,16 @@ func ExampleLocationBasedPerformanceTierClient_NewListPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewLocationBasedPerformanceTierClient("", cred, nil) + client, err := armmariadb.NewLocationBasedPerformanceTierClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("", + pager := client.NewListPager("WestUS", 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/mariadb/armmariadb/ze_generated_example_locationbasedrecommendedactionsessionsoperationstatus_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedrecommendedactionsessionsoperationstatus_client_test.go index 0bfd21ff6f59..84337ee0255c 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedrecommendedactionsessionsoperationstatus_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedrecommendedactionsessionsoperationstatus_client_test.go @@ -23,13 +23,13 @@ func ExampleLocationBasedRecommendedActionSessionsOperationStatusClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewLocationBasedRecommendedActionSessionsOperationStatusClient("", cred, nil) + client, err := armmariadb.NewLocationBasedRecommendedActionSessionsOperationStatusClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", + "WestUS", + "aaaabbbb-cccc-dddd-0000-111122223333", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) diff --git a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedrecommendedactionsessionsresult_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedrecommendedactionsessionsresult_client_test.go index 123e28cf3e8f..fb699c9205e3 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedrecommendedactionsessionsresult_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_locationbasedrecommendedactionsessionsresult_client_test.go @@ -23,18 +23,17 @@ func ExampleLocationBasedRecommendedActionSessionsResultClient_NewListPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewLocationBasedRecommendedActionSessionsResultClient("", cred, nil) + client, err := armmariadb.NewLocationBasedRecommendedActionSessionsResultClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("", - "", + pager := client.NewListPager("WestUS", + "aaaabbbb-cccc-dddd-0000-111122223333", 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/mariadb/armmariadb/ze_generated_example_logfiles_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_logfiles_client_test.go index ef4844aacfc0..62fb0c0fa271 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_logfiles_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_logfiles_client_test.go @@ -23,18 +23,17 @@ func ExampleLogFilesClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewLogFilesClient("", cred, nil) + client, err := armmariadb.NewLogFilesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("TestGroup", + "testserver", 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/mariadb/armmariadb/ze_generated_example_mariadbmanagementclient_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_mariadbmanagementclient_client_test.go index c233186ecb0e..31ea05a63a6a 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_mariadbmanagementclient_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_mariadbmanagementclient_client_test.go @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb" ) @@ -25,13 +23,13 @@ func ExampleManagementClient_ResetQueryPerformanceInsightData() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewManagementClient("", cred, nil) + client, err := armmariadb.NewManagementClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ResetQueryPerformanceInsightData(ctx, - "", - "", + "testResourceGroupName", + "testServerName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -47,20 +45,20 @@ func ExampleManagementClient_BeginCreateRecommendedActionSession() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewManagementClient("", cred, nil) + client, err := armmariadb.NewManagementClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateRecommendedActionSession(ctx, - "", - "", - "", - "", - &armmariadb.ManagementClientBeginCreateRecommendedActionSessionOptions{ResumeToken: ""}) + "testResourceGroupName", + "testServerName", + "Index", + "someDatabaseName", + 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/mariadb/armmariadb/ze_generated_example_privateendpointconnections_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_privateendpointconnections_client_test.go index 55f422d69177..976772396098 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_privateendpointconnections_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_privateendpointconnections_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/mariadb/armmariadb" @@ -26,14 +24,14 @@ func ExamplePrivateEndpointConnectionsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armmariadb.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "Default", + "test-svr", + "private-endpoint-connection-name", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -49,27 +47,27 @@ func ExamplePrivateEndpointConnectionsClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armmariadb.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "Default", + "test-svr", + "private-endpoint-connection-name", armmariadb.PrivateEndpointConnection{ Properties: &armmariadb.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armmariadb.PrivateLinkServiceConnectionStateProperty{ - Description: to.Ptr(""), - Status: to.Ptr(""), + Description: to.Ptr("Approved by johndoe@contoso.com"), + Status: to.Ptr("Approved"), }, }, }, - &armmariadb.PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions{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) } @@ -84,19 +82,19 @@ func ExamplePrivateEndpointConnectionsClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armmariadb.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armmariadb.PrivateEndpointConnectionsClientBeginDeleteOptions{ResumeToken: ""}) + "Default", + "test-svr", + "private-endpoint-connection-name", + 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) } @@ -109,25 +107,25 @@ func ExamplePrivateEndpointConnectionsClient_BeginUpdateTags() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armmariadb.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdateTags(ctx, - "", - "", - "", + "Default", + "test-svr", + "private-endpoint-connection-name", armmariadb.TagsObject{ Tags: map[string]*string{ "key1": to.Ptr("val1"), "key2": to.Ptr("val2"), }, }, - &armmariadb.PrivateEndpointConnectionsClientBeginUpdateTagsOptions{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) } @@ -142,18 +140,17 @@ func ExamplePrivateEndpointConnectionsClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armmariadb.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("Default", + "test-svr", 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/mariadb/armmariadb/ze_generated_example_privatelinkresources_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_privatelinkresources_client_test.go index 11b6585b13d6..a1a0fc8703c5 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_privatelinkresources_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_privatelinkresources_client_test.go @@ -23,18 +23,17 @@ func ExamplePrivateLinkResourcesClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewPrivateLinkResourcesClient("", cred, nil) + client, err := armmariadb.NewPrivateLinkResourcesClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("Default", + "test-svr", 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 ExamplePrivateLinkResourcesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewPrivateLinkResourcesClient("", cred, nil) + client, err := armmariadb.NewPrivateLinkResourcesClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "Default", + "test-svr", + "plr", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) diff --git a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_querytexts_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_querytexts_client_test.go index 04dd218a0a7e..0dfcd091ccb2 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_querytexts_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_querytexts_client_test.go @@ -23,14 +23,14 @@ func ExampleQueryTextsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewQueryTextsClient("", cred, nil) + client, err := armmariadb.NewQueryTextsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testResourceGroupName", + "testServerName", + "1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -46,12 +46,12 @@ func ExampleQueryTextsClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewQueryTextsClient("", cred, nil) + client, err := armmariadb.NewQueryTextsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("testResourceGroupName", + "testServerName", []string{ "1", "2"}, @@ -60,7 +60,6 @@ func ExampleQueryTextsClient_NewListByServerPager() { 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/mariadb/armmariadb/ze_generated_example_recommendedactions_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_recommendedactions_client_test.go index 53acddfe7bf9..cf8c7412bf23 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_recommendedactions_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_recommendedactions_client_test.go @@ -23,15 +23,15 @@ func ExampleRecommendedActionsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewRecommendedActionsClient("", cred, nil) + client, err := armmariadb.NewRecommendedActionsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", - "", + "testResourceGroupName", + "testServerName", + "Index", + "Index-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -47,19 +47,18 @@ func ExampleRecommendedActionsClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewRecommendedActionsClient("", cred, nil) + client, err := armmariadb.NewRecommendedActionsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", - "", + pager := client.NewListByServerPager("testResourceGroupName", + "testServerName", + "Index", &armmariadb.RecommendedActionsClientListByServerOptions{SessionID: 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/mariadb/armmariadb/ze_generated_example_recoverableservers_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_recoverableservers_client_test.go index 23e08d0fc87d..640a921c1344 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_recoverableservers_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_recoverableservers_client_test.go @@ -23,13 +23,13 @@ func ExampleRecoverableServersClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewRecoverableServersClient("", cred, nil) + client, err := armmariadb.NewRecoverableServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", + "testrg", + "testsvc4", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) diff --git a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_replicas_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_replicas_client_test.go index ef6b56376fef..36d2147c8358 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_replicas_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_replicas_client_test.go @@ -23,18 +23,17 @@ func ExampleReplicasClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewReplicasClient("", cred, nil) + client, err := armmariadb.NewReplicasClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("TestGroup", + "testmaster", 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/mariadb/armmariadb/ze_generated_example_serverbasedperformancetier_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serverbasedperformancetier_client_test.go index 27367a321335..ea0d210a7b3e 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serverbasedperformancetier_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serverbasedperformancetier_client_test.go @@ -23,18 +23,17 @@ func ExampleServerBasedPerformanceTierClient_NewListPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServerBasedPerformanceTierClient("", cred, nil) + client, err := armmariadb.NewServerBasedPerformanceTierClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("", - "", + pager := client.NewListPager("testrg", + "mariadbtestsvc1", 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/mariadb/armmariadb/ze_generated_example_serverparameters_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serverparameters_client_test.go index 93b93bab7516..fd6c9f3b1116 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serverparameters_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serverparameters_client_test.go @@ -12,8 +12,6 @@ import ( "context" "log" - "time" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb" ) @@ -25,19 +23,19 @@ func ExampleServerParametersClient_BeginListUpdateConfigurations() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServerParametersClient("", cred, nil) + client, err := armmariadb.NewServerParametersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginListUpdateConfigurations(ctx, - "", - "", + "testrg", + "mariadbtestsvc1", armmariadb.ConfigurationListResult{}, - &armmariadb.ServerParametersClientBeginListUpdateConfigurationsOptions{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/mariadb/armmariadb/ze_generated_example_servers_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_servers_client_test.go index 19fa23b35687..172bd5c6c9d2 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_servers_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_servers_client_test.go @@ -26,35 +26,35 @@ func ExampleServersClient_BeginCreate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, - "", - "", + "TargetResourceGroup", + "targetserver", armmariadb.ServerForCreate{ - Location: to.Ptr(""), + Location: to.Ptr("brazilsouth"), Properties: &armmariadb.ServerPropertiesForRestore{ CreateMode: to.Ptr(armmariadb.CreateModePointInTimeRestore), RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-14T00:00:37.467Z"); return t }()), - SourceServerID: to.Ptr(""), + SourceServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver"), }, SKU: &armmariadb.SKU{ - Name: to.Ptr(""), + Name: to.Ptr("GP_Gen5_2"), Capacity: to.Ptr[int32](2), - Family: to.Ptr(""), + Family: to.Ptr("Gen5"), Tier: to.Ptr(armmariadb.SKUTierGeneralPurpose), }, Tags: map[string]*string{ "ElasticServer": to.Ptr("1"), }, }, - &armmariadb.ServersClientBeginCreateOptions{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) } @@ -69,24 +69,24 @@ func ExampleServersClient_BeginUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, - "", - "", + "testrg", + "mariadbtestsvc4", armmariadb.ServerUpdateParameters{ Properties: &armmariadb.ServerUpdateParametersProperties{ - AdministratorLoginPassword: to.Ptr(""), + AdministratorLoginPassword: to.Ptr(""), SSLEnforcement: to.Ptr(armmariadb.SSLEnforcementEnumDisabled), }, }, - &armmariadb.ServersClientBeginUpdateOptions{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) } @@ -101,18 +101,18 @@ func ExampleServersClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - &armmariadb.ServersClientBeginDeleteOptions{ResumeToken: ""}) + "TestGroup", + "testserver", + 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) } @@ -125,13 +125,13 @@ func ExampleServersClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", + "testrg", + "mariadbtestsvc4", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -147,17 +147,16 @@ func ExampleServersClient_NewListByResourceGroupPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByResourceGroupPager("", + pager := client.NewListByResourceGroupPager("testrg", 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 @@ -173,7 +172,7 @@ func ExampleServersClient_NewListPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } @@ -182,7 +181,6 @@ func ExampleServersClient_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 @@ -198,18 +196,18 @@ func ExampleServersClient_BeginRestart() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginRestart(ctx, - "", - "", - &armmariadb.ServersClientBeginRestartOptions{ResumeToken: ""}) + "TestGroup", + "testserver", + 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) } @@ -222,18 +220,18 @@ func ExampleServersClient_BeginStart() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginStart(ctx, - "", - "", - &armmariadb.ServersClientBeginStartOptions{ResumeToken: ""}) + "TestGroup", + "testserver", + 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) } @@ -246,18 +244,18 @@ func ExampleServersClient_BeginStop() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServersClient("", cred, nil) + client, err := armmariadb.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginStop(ctx, - "", - "", - &armmariadb.ServersClientBeginStopOptions{ResumeToken: ""}) + "TestGroup", + "testserver", + 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/mariadb/armmariadb/ze_generated_example_serversecurityalertpolicies_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serversecurityalertpolicies_client_test.go index a11e136a72f4..35baa6e13aaa 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serversecurityalertpolicies_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_serversecurityalertpolicies_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/mariadb/armmariadb" @@ -26,13 +24,13 @@ func ExampleServerSecurityAlertPoliciesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServerSecurityAlertPoliciesClient("", cred, nil) + client, err := armmariadb.NewServerSecurityAlertPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", + "securityalert-4799", + "securityalert-6440", armmariadb.SecurityAlertPolicyNameDefault, nil) if err != nil { @@ -49,13 +47,13 @@ func ExampleServerSecurityAlertPoliciesClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServerSecurityAlertPoliciesClient("", cred, nil) + client, err := armmariadb.NewServerSecurityAlertPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", + "securityalert-4799", + "securityalert-6440", armmariadb.SecurityAlertPolicyNameDefault, armmariadb.ServerSecurityAlertPolicy{ Properties: &armmariadb.SecurityAlertPolicyProperties{ @@ -67,15 +65,15 @@ func ExampleServerSecurityAlertPoliciesClient_BeginCreateOrUpdate() { to.Ptr("testSecurityAlert@microsoft.com")}, RetentionDays: to.Ptr[int32](5), State: to.Ptr(armmariadb.ServerSecurityAlertPolicyStateEnabled), - StorageAccountAccessKey: to.Ptr(""), - StorageEndpoint: to.Ptr(""), + StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), + StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, - &armmariadb.ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions{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) } @@ -90,18 +88,17 @@ func ExampleServerSecurityAlertPoliciesClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewServerSecurityAlertPoliciesClient("", cred, nil) + client, err := armmariadb.NewServerSecurityAlertPoliciesClient("00000000-1111-2222-3333-444444444444", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("securityalert-4799", + "securityalert-6440", 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/mariadb/armmariadb/ze_generated_example_topquerystatistics_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_topquerystatistics_client_test.go index 54ef82fead6e..8d88a96d1200 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_topquerystatistics_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_topquerystatistics_client_test.go @@ -26,14 +26,14 @@ func ExampleTopQueryStatisticsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewTopQueryStatisticsClient("", cred, nil) + client, err := armmariadb.NewTopQueryStatisticsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testResourceGroupName", + "testServerName", + "66-636923268000000000-636923277000000000-avg-duration", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -49,20 +49,20 @@ func ExampleTopQueryStatisticsClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewTopQueryStatisticsClient("", cred, nil) + client, err := armmariadb.NewTopQueryStatisticsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("testResourceGroupName", + "testServerName", armmariadb.TopQueryStatisticsInput{ Properties: &armmariadb.TopQueryStatisticsInputProperties{ - AggregationFunction: to.Ptr(""), - AggregationWindow: to.Ptr(""), + AggregationFunction: to.Ptr("avg"), + AggregationWindow: to.Ptr("PT15M"), NumberOfTopQueries: to.Ptr[int32](5), ObservationEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T20:00:00.000Z"); return t }()), ObservationStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-01T20:00:00.000Z"); return t }()), - ObservedMetric: to.Ptr(""), + ObservedMetric: to.Ptr("duration"), }, }, nil) @@ -70,7 +70,6 @@ func ExampleTopQueryStatisticsClient_NewListByServerPager() { 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/mariadb/armmariadb/ze_generated_example_virtualnetworkrules_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_virtualnetworkrules_client_test.go index 85a10e9cf797..385d9f39e28e 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_virtualnetworkrules_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_virtualnetworkrules_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/mariadb/armmariadb" @@ -26,14 +24,14 @@ func ExampleVirtualNetworkRulesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewVirtualNetworkRulesClient("", cred, nil) + client, err := armmariadb.NewVirtualNetworkRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "TestGroup", + "vnet-test-svr", + "vnet-firewall-rule", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -49,25 +47,25 @@ func ExampleVirtualNetworkRulesClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewVirtualNetworkRulesClient("", cred, nil) + client, err := armmariadb.NewVirtualNetworkRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "TestGroup", + "vnet-test-svr", + "vnet-firewall-rule", armmariadb.VirtualNetworkRule{ Properties: &armmariadb.VirtualNetworkRuleProperties{ IgnoreMissingVnetServiceEndpoint: to.Ptr(false), - VirtualNetworkSubnetID: to.Ptr(""), + VirtualNetworkSubnetID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), }, }, - &armmariadb.VirtualNetworkRulesClientBeginCreateOrUpdateOptions{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) } @@ -82,19 +80,19 @@ func ExampleVirtualNetworkRulesClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewVirtualNetworkRulesClient("", cred, nil) + client, err := armmariadb.NewVirtualNetworkRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armmariadb.VirtualNetworkRulesClientBeginDeleteOptions{ResumeToken: ""}) + "TestGroup", + "vnet-test-svr", + "vnet-firewall-rule", + 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) } @@ -107,18 +105,17 @@ func ExampleVirtualNetworkRulesClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewVirtualNetworkRulesClient("", cred, nil) + client, err := armmariadb.NewVirtualNetworkRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("TestGroup", + "vnet-test-svr", 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/mariadb/armmariadb/ze_generated_example_waitstatistics_client_test.go b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_waitstatistics_client_test.go index b0b7f678fc60..c6bfb22192b3 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_waitstatistics_client_test.go +++ b/sdk/resourcemanager/mariadb/armmariadb/ze_generated_example_waitstatistics_client_test.go @@ -26,14 +26,14 @@ func ExampleWaitStatisticsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewWaitStatisticsClient("", cred, nil) + client, err := armmariadb.NewWaitStatisticsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "testResourceGroupName", + "testServerName", + "636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -49,15 +49,15 @@ func ExampleWaitStatisticsClient_NewListByServerPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armmariadb.NewWaitStatisticsClient("", cred, nil) + client, err := armmariadb.NewWaitStatisticsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByServerPager("", - "", + pager := client.NewListByServerPager("testResourceGroupName", + "testServerName", armmariadb.WaitStatisticsInput{ Properties: &armmariadb.WaitStatisticsInputProperties{ - AggregationWindow: to.Ptr(""), + AggregationWindow: to.Ptr("PT15M"), ObservationEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-07T20:00:00.000Z"); return t }()), ObservationStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-01T20:00:00.000Z"); return t }()), }, @@ -67,7 +67,6 @@ func ExampleWaitStatisticsClient_NewListByServerPager() { 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/mariadb/armmariadb/zz_generated_advisors_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_advisors_client.go index 72aa382a5fe8..88068044efc5 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_advisors_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_advisors_client.go @@ -38,7 +38,7 @@ func NewAdvisorsClient(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 NewAdvisorsClient(subscriptionID string, credential azcore.TokenCredential, // Get - Get a recommendation action advisor. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // advisorName - The advisor name for recommendation action. @@ -101,7 +102,7 @@ func (client *AdvisorsClient) getCreateRequest(ctx context.Context, resourceGrou reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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,11 +117,12 @@ func (client *AdvisorsClient) getHandleResponse(resp *http.Response) (AdvisorsCl // NewListByServerPager - List recommendation action advisors. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - AdvisorsClientListByServerOptions contains the optional parameters for the AdvisorsClient.ListByServer method. func (client *AdvisorsClient) NewListByServerPager(resourceGroupName string, serverName string, options *AdvisorsClientListByServerOptions) *runtime.Pager[AdvisorsClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[AdvisorsClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[AdvisorsClientListByServerResponse]{ More: func(page AdvisorsClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -169,7 +171,7 @@ func (client *AdvisorsClient) listByServerCreateRequest(ctx context.Context, res reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_checknameavailability_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_checknameavailability_client.go index 71720e1b34be..4cba47230873 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_checknameavailability_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_checknameavailability_client.go @@ -38,7 +38,7 @@ func NewCheckNameAvailabilityClient(subscriptionID string, credential azcore.Tok 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 NewCheckNameAvailabilityClient(subscriptionID string, credential azcore.Tok // Execute - Check the availability of name for resource // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // nameAvailabilityRequest - The required parameters for checking if resource name is available. // options - CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute // method. @@ -88,7 +89,7 @@ func (client *CheckNameAvailabilityClient) executeCreateRequest(ctx context.Cont reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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, nameAvailabilityRequest) } diff --git a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_configurations_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_configurations_client.go index 6231fad21ac0..71b749cab8b7 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_configurations_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_configurations_client.go @@ -38,7 +38,7 @@ func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCrede 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 NewConfigurationsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Updates a configuration of a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // configurationName - The name of the server configuration. // parameters - The required parameters for updating a server configuration. // options - ConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginCreateOrUpdate // method. -func (client *ConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration, options *ConfigurationsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ConfigurationsClientCreateOrUpdateResponse], error) { +func (client *ConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration, options *ConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, configurationName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[ConfigurationsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ConfigurationsClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Updates a configuration of a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration, options *ConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, configurationName, parameters, options) if err != nil { @@ -117,12 +119,13 @@ func (client *ConfigurationsClient) createOrUpdateCreateRequest(ctx context.Cont reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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) } // Get - Gets information about a configuration of server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // configurationName - The name of the server configuration. @@ -168,7 +171,7 @@ func (client *ConfigurationsClient) getCreateRequest(ctx context.Context, resour reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -183,12 +186,13 @@ func (client *ConfigurationsClient) getHandleResponse(resp *http.Response) (Conf // NewListByServerPager - List all the configurations in a given server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.ListByServer // method. func (client *ConfigurationsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ConfigurationsClientListByServerOptions) *runtime.Pager[ConfigurationsClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[ConfigurationsClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[ConfigurationsClientListByServerResponse]{ More: func(page ConfigurationsClientListByServerResponse) bool { return false }, @@ -231,7 +235,7 @@ func (client *ConfigurationsClient) listByServerCreateRequest(ctx context.Contex reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_constants.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_constants.go index a51ae67908d8..02f7a6f903a4 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_constants.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_constants.go @@ -10,7 +10,7 @@ package armmariadb const ( moduleName = "armmariadb" - moduleVersion = "v0.4.0" + moduleVersion = "v1.0.0" ) // CreateMode - The mode to create a new server. diff --git a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_databases_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_databases_client.go index a0d13af4aa68..2a2c30ef138c 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_databases_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_databases_client.go @@ -38,7 +38,7 @@ func NewDatabasesClient(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 NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Creates a new database or updates an existing database. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // databaseName - The name of the database. // parameters - The required parameters for creating or updating a database. // options - DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate // method. -func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[DatabasesClientCreateOrUpdateResponse], error) { +func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, databaseName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[DatabasesClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[DatabasesClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DatabasesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DatabasesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new database or updates an existing database. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *DatabasesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, databaseName, parameters, options) if err != nil { @@ -117,30 +119,32 @@ func (client *DatabasesClient) createOrUpdateCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 a database. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // databaseName - The name of the database. // options - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method. -func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*armruntime.Poller[DatabasesClientDeleteResponse], error) { +func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*runtime.Poller[DatabasesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, databaseName, options) if err != nil { return nil, err } - return armruntime.NewPoller[DatabasesClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[DatabasesClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[DatabasesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[DatabasesClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes a database. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *DatabasesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, databaseName, options) if err != nil { @@ -182,12 +186,13 @@ func (client *DatabasesClient) deleteCreateRequest(ctx context.Context, resource reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 information about a database. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // databaseName - The name of the database. @@ -233,7 +238,7 @@ func (client *DatabasesClient) getCreateRequest(ctx context.Context, resourceGro reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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,11 +253,12 @@ func (client *DatabasesClient) getHandleResponse(resp *http.Response) (Databases // NewListByServerPager - List all the databases in a given server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.ListByServer method. func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) *runtime.Pager[DatabasesClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[DatabasesClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[DatabasesClientListByServerResponse]{ More: func(page DatabasesClientListByServerResponse) bool { return false }, @@ -295,7 +301,7 @@ func (client *DatabasesClient) listByServerCreateRequest(ctx context.Context, re reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_firewallrules_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_firewallrules_client.go index 649333a78ad2..5c04f3fbb65d 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_firewallrules_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_firewallrules_client.go @@ -38,7 +38,7 @@ func NewFirewallRulesClient(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,26 +56,28 @@ func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates a new firewall rule or updates an existing firewall rule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // firewallRuleName - The name of the server firewall rule. // parameters - The required parameters for creating or updating a firewall rule. // options - FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate // method. -func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[FirewallRulesClientCreateOrUpdateResponse], error) { +func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, firewallRuleName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[FirewallRulesClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[FirewallRulesClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[FirewallRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[FirewallRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new firewall rule or updates an existing firewall rule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *FirewallRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, parameters, options) if err != nil { @@ -117,31 +119,33 @@ func (client *FirewallRulesClient) createOrUpdateCreateRequest(ctx context.Conte reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 a server firewall rule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // firewallRuleName - The name of the server firewall rule. // options - FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete // method. -func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientBeginDeleteOptions) (*armruntime.Poller[FirewallRulesClientDeleteResponse], error) { +func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientBeginDeleteOptions) (*runtime.Poller[FirewallRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, firewallRuleName, options) if err != nil { return nil, err } - return armruntime.NewPoller[FirewallRulesClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[FirewallRulesClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[FirewallRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[FirewallRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes a server firewall rule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *FirewallRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, firewallRuleName, options) if err != nil { @@ -183,12 +187,13 @@ func (client *FirewallRulesClient) deleteCreateRequest(ctx context.Context, reso reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 information about a server firewall rule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // firewallRuleName - The name of the server firewall rule. @@ -234,7 +239,7 @@ func (client *FirewallRulesClient) getCreateRequest(ctx context.Context, resourc reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 *FirewallRulesClient) getHandleResponse(resp *http.Response) (Firew // NewListByServerPager - List all the firewall rules in a given server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.ListByServer // method. func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *FirewallRulesClientListByServerOptions) *runtime.Pager[FirewallRulesClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[FirewallRulesClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[FirewallRulesClientListByServerResponse]{ More: func(page FirewallRulesClientListByServerResponse) bool { return false }, @@ -297,7 +303,7 @@ func (client *FirewallRulesClient) listByServerCreateRequest(ctx context.Context reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_locationbasedperformancetier_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedperformancetier_client.go index 49d01e8ed9ce..561dc8e1e155 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedperformancetier_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedperformancetier_client.go @@ -38,7 +38,7 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string, credential azc 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,11 +56,12 @@ func NewLocationBasedPerformanceTierClient(subscriptionID string, credential azc // NewListPager - List all the performance tiers at specified location in a given subscription. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // locationName - The name of the location. // options - LocationBasedPerformanceTierClientListOptions contains the optional parameters for the LocationBasedPerformanceTierClient.List // method. func (client *LocationBasedPerformanceTierClient) NewListPager(locationName string, options *LocationBasedPerformanceTierClientListOptions) *runtime.Pager[LocationBasedPerformanceTierClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[LocationBasedPerformanceTierClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[LocationBasedPerformanceTierClientListResponse]{ More: func(page LocationBasedPerformanceTierClientListResponse) bool { return false }, @@ -99,7 +100,7 @@ func (client *LocationBasedPerformanceTierClient) listCreateRequest(ctx context. reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_locationbasedrecommendedactionsessionsoperationstatus_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedrecommendedactionsessionsoperationstatus_client.go index df13b2ce89ff..d438f119a2e8 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedrecommendedactionsessionsoperationstatus_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedrecommendedactionsessionsoperationstatus_client.go @@ -38,7 +38,7 @@ func NewLocationBasedRecommendedActionSessionsOperationStatusClient(subscription 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 NewLocationBasedRecommendedActionSessionsOperationStatusClient(subscription // Get - Recommendation action session operation status. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // locationName - The name of the location. // operationID - The operation identifier. // options - LocationBasedRecommendedActionSessionsOperationStatusClientGetOptions contains the optional parameters for the @@ -97,7 +98,7 @@ func (client *LocationBasedRecommendedActionSessionsOperationStatusClient) getCr reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_locationbasedrecommendedactionsessionsresult_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedrecommendedactionsessionsresult_client.go index 8c401bcec99c..f4586e9aa1b7 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedrecommendedactionsessionsresult_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_locationbasedrecommendedactionsessionsresult_client.go @@ -38,7 +38,7 @@ func NewLocationBasedRecommendedActionSessionsResultClient(subscriptionID string 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 NewLocationBasedRecommendedActionSessionsResultClient(subscriptionID string // NewListPager - Recommendation action session operation result. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // locationName - The name of the location. // operationID - The operation identifier. // options - LocationBasedRecommendedActionSessionsResultClientListOptions contains the optional parameters for the LocationBasedRecommendedActionSessionsResultClient.List // method. func (client *LocationBasedRecommendedActionSessionsResultClient) NewListPager(locationName string, operationID string, options *LocationBasedRecommendedActionSessionsResultClientListOptions) *runtime.Pager[LocationBasedRecommendedActionSessionsResultClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[LocationBasedRecommendedActionSessionsResultClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[LocationBasedRecommendedActionSessionsResultClientListResponse]{ More: func(page LocationBasedRecommendedActionSessionsResultClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -110,7 +111,7 @@ func (client *LocationBasedRecommendedActionSessionsResultClient) listCreateRequ reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_logfiles_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_logfiles_client.go index db556f20ba0e..68e25914a9ab 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_logfiles_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_logfiles_client.go @@ -38,7 +38,7 @@ func NewLogFilesClient(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,11 +56,12 @@ func NewLogFilesClient(subscriptionID string, credential azcore.TokenCredential, // NewListByServerPager - List all the log files in a given server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - LogFilesClientListByServerOptions contains the optional parameters for the LogFilesClient.ListByServer method. func (client *LogFilesClient) NewListByServerPager(resourceGroupName string, serverName string, options *LogFilesClientListByServerOptions) *runtime.Pager[LogFilesClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[LogFilesClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[LogFilesClientListByServerResponse]{ More: func(page LogFilesClientListByServerResponse) bool { return false }, @@ -103,7 +104,7 @@ func (client *LogFilesClient) listByServerCreateRequest(ctx context.Context, res reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_management_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_management_client.go index 4ae055757682..3c5e6a930bdc 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_management_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_management_client.go @@ -38,7 +38,7 @@ func NewManagementClient(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,26 +56,28 @@ func NewManagementClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateRecommendedActionSession - Create recommendation action session for the advisor. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // advisorName - The advisor name for recommendation action. // databaseName - The name of the database. // options - ManagementClientBeginCreateRecommendedActionSessionOptions contains the optional parameters for the ManagementClient.BeginCreateRecommendedActionSession // method. -func (client *ManagementClient) BeginCreateRecommendedActionSession(ctx context.Context, resourceGroupName string, serverName string, advisorName string, databaseName string, options *ManagementClientBeginCreateRecommendedActionSessionOptions) (*armruntime.Poller[ManagementClientCreateRecommendedActionSessionResponse], error) { +func (client *ManagementClient) BeginCreateRecommendedActionSession(ctx context.Context, resourceGroupName string, serverName string, advisorName string, databaseName string, options *ManagementClientBeginCreateRecommendedActionSessionOptions) (*runtime.Poller[ManagementClientCreateRecommendedActionSessionResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createRecommendedActionSession(ctx, resourceGroupName, serverName, advisorName, databaseName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ManagementClientCreateRecommendedActionSessionResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagementClientCreateRecommendedActionSessionResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ManagementClientCreateRecommendedActionSessionResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagementClientCreateRecommendedActionSessionResponse](options.ResumeToken, client.pl, nil) } } // CreateRecommendedActionSession - Create recommendation action session for the advisor. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ManagementClient) createRecommendedActionSession(ctx context.Context, resourceGroupName string, serverName string, advisorName string, databaseName string, options *ManagementClientBeginCreateRecommendedActionSessionOptions) (*http.Response, error) { req, err := client.createRecommendedActionSessionCreateRequest(ctx, resourceGroupName, serverName, advisorName, databaseName, options) if err != nil { @@ -123,6 +125,7 @@ func (client *ManagementClient) createRecommendedActionSessionCreateRequest(ctx // ResetQueryPerformanceInsightData - Reset data for Query Performance Insight. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ManagementClientResetQueryPerformanceInsightDataOptions contains the optional parameters for the ManagementClient.ResetQueryPerformanceInsightData @@ -164,7 +167,7 @@ func (client *ManagementClient) resetQueryPerformanceInsightDataCreateRequest(ct reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_models.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_models.go index 33499d6e2871..a3978ef7b1f3 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_models.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_models.go @@ -1031,6 +1031,11 @@ type ServerPropertiesForCreate struct { Version *ServerVersion `json:"version,omitempty"` } +// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForCreate. +func (s *ServerPropertiesForCreate) GetServerPropertiesForCreate() *ServerPropertiesForCreate { + return s +} + // ServerPropertiesForDefaultCreate - The properties used to create a new server. type ServerPropertiesForDefaultCreate struct { // REQUIRED; The administrator's login name of a server. Can only be specified when the server is being created (and is required @@ -1060,6 +1065,18 @@ type ServerPropertiesForDefaultCreate struct { Version *ServerVersion `json:"version,omitempty"` } +// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForDefaultCreate. +func (s *ServerPropertiesForDefaultCreate) GetServerPropertiesForCreate() *ServerPropertiesForCreate { + return &ServerPropertiesForCreate{ + Version: s.Version, + SSLEnforcement: s.SSLEnforcement, + MinimalTLSVersion: s.MinimalTLSVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + StorageProfile: s.StorageProfile, + CreateMode: s.CreateMode, + } +} + // ServerPropertiesForGeoRestore - The properties used to create a new server by restoring to a different region from a geo // replicated backup. type ServerPropertiesForGeoRestore struct { @@ -1086,6 +1103,18 @@ type ServerPropertiesForGeoRestore struct { Version *ServerVersion `json:"version,omitempty"` } +// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForGeoRestore. +func (s *ServerPropertiesForGeoRestore) GetServerPropertiesForCreate() *ServerPropertiesForCreate { + return &ServerPropertiesForCreate{ + Version: s.Version, + SSLEnforcement: s.SSLEnforcement, + MinimalTLSVersion: s.MinimalTLSVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + StorageProfile: s.StorageProfile, + CreateMode: s.CreateMode, + } +} + // ServerPropertiesForReplica - The properties to create a new replica. type ServerPropertiesForReplica struct { // REQUIRED; The mode to create a new server. @@ -1111,6 +1140,18 @@ type ServerPropertiesForReplica struct { Version *ServerVersion `json:"version,omitempty"` } +// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForReplica. +func (s *ServerPropertiesForReplica) GetServerPropertiesForCreate() *ServerPropertiesForCreate { + return &ServerPropertiesForCreate{ + Version: s.Version, + SSLEnforcement: s.SSLEnforcement, + MinimalTLSVersion: s.MinimalTLSVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + StorageProfile: s.StorageProfile, + CreateMode: s.CreateMode, + } +} + // ServerPropertiesForRestore - The properties used to create a new server by restoring from a backup. type ServerPropertiesForRestore struct { // REQUIRED; The mode to create a new server. @@ -1139,6 +1180,18 @@ type ServerPropertiesForRestore struct { Version *ServerVersion `json:"version,omitempty"` } +// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForRestore. +func (s *ServerPropertiesForRestore) GetServerPropertiesForCreate() *ServerPropertiesForCreate { + return &ServerPropertiesForCreate{ + Version: s.Version, + SSLEnforcement: s.SSLEnforcement, + MinimalTLSVersion: s.MinimalTLSVersion, + PublicNetworkAccess: s.PublicNetworkAccess, + StorageProfile: s.StorageProfile, + CreateMode: s.CreateMode, + } +} + // ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate // method. type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { diff --git a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_models_serde.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_models_serde.go index 99172c515f01..127c00c3ec6a 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_models_serde.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_models_serde.go @@ -10,18 +10,11 @@ package armmariadb import ( "encoding/json" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" ) -// MarshalJSON implements the json.Marshaller interface for type AdvisorsResultList. -func (a AdvisorsResultList) 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 ConfigurationListResult. func (c ConfigurationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -29,38 +22,6 @@ func (c ConfigurationListResult) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type DatabaseListResult. -func (d DatabaseListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalInfo", e.AdditionalInfo) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallRuleListResult. -func (f FirewallRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LogFileListResult. -func (l LogFileListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type LogFileProperties. func (l LogFileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -76,88 +37,34 @@ func (l LogFileProperties) MarshalJSON() ([]byte, error) { func (l *LogFileProperties) 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", l, err) } for key, val := range rawMsg { var err error switch key { case "createdTime": - err = unpopulateTimeRFC3339(val, &l.CreatedTime) + err = unpopulateTimeRFC3339(val, "CreatedTime", &l.CreatedTime) delete(rawMsg, key) case "lastModifiedTime": - err = unpopulateTimeRFC3339(val, &l.LastModifiedTime) + err = unpopulateTimeRFC3339(val, "LastModifiedTime", &l.LastModifiedTime) delete(rawMsg, key) case "sizeInKB": - err = unpopulate(val, &l.SizeInKB) + err = unpopulate(val, "SizeInKB", &l.SizeInKB) delete(rawMsg, key) case "type": - err = unpopulate(val, &l.Type) + err = unpopulate(val, "Type", &l.Type) delete(rawMsg, key) case "url": - err = unpopulate(val, &l.URL) + err = unpopulate(val, "URL", &l.URL) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "display", o.Display) - populate(objectMap, "name", o.Name) - populate(objectMap, "origin", o.Origin) - populate(objectMap, "properties", o.Properties) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PerformanceTierListResult. -func (p PerformanceTierListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PerformanceTierProperties. -func (p PerformanceTierProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "maxBackupRetentionDays", p.MaxBackupRetentionDays) - populate(objectMap, "maxLargeStorageMB", p.MaxLargeStorageMB) - populate(objectMap, "maxStorageMB", p.MaxStorageMB) - populate(objectMap, "minBackupRetentionDays", p.MinBackupRetentionDays) - populate(objectMap, "minLargeStorageMB", p.MinLargeStorageMB) - populate(objectMap, "minStorageMB", p.MinStorageMB) - populate(objectMap, "serviceLevelObjectives", p.ServiceLevelObjectives) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. -func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. -func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -186,57 +93,49 @@ func (q QueryStatisticProperties) MarshalJSON() ([]byte, error) { func (q *QueryStatisticProperties) 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", q, err) } for key, val := range rawMsg { var err error switch key { case "aggregationFunction": - err = unpopulate(val, &q.AggregationFunction) + err = unpopulate(val, "AggregationFunction", &q.AggregationFunction) delete(rawMsg, key) case "databaseNames": - err = unpopulate(val, &q.DatabaseNames) + err = unpopulate(val, "DatabaseNames", &q.DatabaseNames) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, &q.EndTime) + err = unpopulateTimeRFC3339(val, "EndTime", &q.EndTime) delete(rawMsg, key) case "metricDisplayName": - err = unpopulate(val, &q.MetricDisplayName) + err = unpopulate(val, "MetricDisplayName", &q.MetricDisplayName) delete(rawMsg, key) case "metricName": - err = unpopulate(val, &q.MetricName) + err = unpopulate(val, "MetricName", &q.MetricName) delete(rawMsg, key) case "metricValue": - err = unpopulate(val, &q.MetricValue) + err = unpopulate(val, "MetricValue", &q.MetricValue) delete(rawMsg, key) case "metricValueUnit": - err = unpopulate(val, &q.MetricValueUnit) + err = unpopulate(val, "MetricValueUnit", &q.MetricValueUnit) delete(rawMsg, key) case "queryExecutionCount": - err = unpopulate(val, &q.QueryExecutionCount) + err = unpopulate(val, "QueryExecutionCount", &q.QueryExecutionCount) delete(rawMsg, key) case "queryId": - err = unpopulate(val, &q.QueryID) + err = unpopulate(val, "QueryID", &q.QueryID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, &q.StartTime) + err = unpopulateTimeRFC3339(val, "StartTime", &q.StartTime) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", q, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type QueryTextsResultList. -func (q QueryTextsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", q.NextLink) - populate(objectMap, "value", q.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type RecommendationActionProperties. func (r RecommendationActionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -255,81 +154,64 @@ func (r RecommendationActionProperties) MarshalJSON() ([]byte, error) { func (r *RecommendationActionProperties) 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 "actionId": - err = unpopulate(val, &r.ActionID) + err = unpopulate(val, "ActionID", &r.ActionID) delete(rawMsg, key) case "advisorName": - err = unpopulate(val, &r.AdvisorName) + err = unpopulate(val, "AdvisorName", &r.AdvisorName) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, &r.CreatedTime) + err = unpopulateTimeRFC3339(val, "CreatedTime", &r.CreatedTime) delete(rawMsg, key) case "details": - err = unpopulate(val, &r.Details) + err = unpopulate(val, "Details", &r.Details) delete(rawMsg, key) case "expirationTime": - err = unpopulateTimeRFC3339(val, &r.ExpirationTime) + err = unpopulateTimeRFC3339(val, "ExpirationTime", &r.ExpirationTime) delete(rawMsg, key) case "reason": - err = unpopulate(val, &r.Reason) + err = unpopulate(val, "Reason", &r.Reason) delete(rawMsg, key) case "recommendationType": - err = unpopulate(val, &r.RecommendationType) + err = unpopulate(val, "RecommendationType", &r.RecommendationType) delete(rawMsg, key) case "sessionId": - err = unpopulate(val, &r.SessionID) + err = unpopulate(val, "SessionID", &r.SessionID) 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 RecommendationActionsResultList. -func (r RecommendationActionsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RecommendedActionSessionsOperationStatus. -func (r RecommendedActionSessionsOperationStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", r.Name) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) - populate(objectMap, "status", r.Status) - return json.Marshal(objectMap) -} - // UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionSessionsOperationStatus. func (r *RecommendedActionSessionsOperationStatus) 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 "name": - err = unpopulate(val, &r.Name) + err = unpopulate(val, "Name", &r.Name) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, &r.StartTime) + err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) delete(rawMsg, key) case "status": - err = unpopulate(val, &r.Status) + err = unpopulate(val, "Status", &r.Status) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", r, err) } } return nil @@ -375,38 +257,31 @@ func (s ServerForCreate) MarshalJSON() ([]byte, error) { func (s *ServerForCreate) 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 "location": - err = unpopulate(val, &s.Location) + err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) case "properties": s.Properties, err = unmarshalServerPropertiesForCreateClassification(val) delete(rawMsg, key) case "sku": - err = unpopulate(val, &s.SKU) + err = unpopulate(val, "SKU", &s.SKU) delete(rawMsg, key) case "tags": - err = unpopulate(val, &s.Tags) + err = unpopulate(val, "Tags", &s.Tags) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ServerListResult. -func (s ServerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type ServerProperties. func (s ServerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -430,75 +305,58 @@ func (s ServerProperties) MarshalJSON() ([]byte, error) { func (s *ServerProperties) 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 "administratorLogin": - err = unpopulate(val, &s.AdministratorLogin) + err = unpopulate(val, "AdministratorLogin", &s.AdministratorLogin) delete(rawMsg, key) case "earliestRestoreDate": - err = unpopulateTimeRFC3339(val, &s.EarliestRestoreDate) + err = unpopulateTimeRFC3339(val, "EarliestRestoreDate", &s.EarliestRestoreDate) delete(rawMsg, key) case "fullyQualifiedDomainName": - err = unpopulate(val, &s.FullyQualifiedDomainName) + err = unpopulate(val, "FullyQualifiedDomainName", &s.FullyQualifiedDomainName) delete(rawMsg, key) case "masterServerId": - err = unpopulate(val, &s.MasterServerID) + err = unpopulate(val, "MasterServerID", &s.MasterServerID) delete(rawMsg, key) case "minimalTlsVersion": - err = unpopulate(val, &s.MinimalTLSVersion) + err = unpopulate(val, "MinimalTLSVersion", &s.MinimalTLSVersion) delete(rawMsg, key) case "privateEndpointConnections": - err = unpopulate(val, &s.PrivateEndpointConnections) + err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) delete(rawMsg, key) case "publicNetworkAccess": - err = unpopulate(val, &s.PublicNetworkAccess) + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) delete(rawMsg, key) case "replicaCapacity": - err = unpopulate(val, &s.ReplicaCapacity) + err = unpopulate(val, "ReplicaCapacity", &s.ReplicaCapacity) delete(rawMsg, key) case "replicationRole": - err = unpopulate(val, &s.ReplicationRole) + err = unpopulate(val, "ReplicationRole", &s.ReplicationRole) delete(rawMsg, key) case "sslEnforcement": - err = unpopulate(val, &s.SSLEnforcement) + err = unpopulate(val, "SSLEnforcement", &s.SSLEnforcement) delete(rawMsg, key) case "storageProfile": - err = unpopulate(val, &s.StorageProfile) + err = unpopulate(val, "StorageProfile", &s.StorageProfile) delete(rawMsg, key) case "userVisibleState": - err = unpopulate(val, &s.UserVisibleState) + err = unpopulate(val, "UserVisibleState", &s.UserVisibleState) delete(rawMsg, key) case "version": - err = unpopulate(val, &s.Version) + err = unpopulate(val, "Version", &s.Version) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForCreate. -func (s *ServerPropertiesForCreate) GetServerPropertiesForCreate() *ServerPropertiesForCreate { - return s -} - -// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForDefaultCreate. -func (s *ServerPropertiesForDefaultCreate) GetServerPropertiesForCreate() *ServerPropertiesForCreate { - return &ServerPropertiesForCreate{ - Version: s.Version, - SSLEnforcement: s.SSLEnforcement, - MinimalTLSVersion: s.MinimalTLSVersion, - PublicNetworkAccess: s.PublicNetworkAccess, - StorageProfile: s.StorageProfile, - CreateMode: s.CreateMode, - } -} - // MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForDefaultCreate. func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -517,55 +375,43 @@ func (s ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { func (s *ServerPropertiesForDefaultCreate) 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 "administratorLogin": - err = unpopulate(val, &s.AdministratorLogin) + err = unpopulate(val, "AdministratorLogin", &s.AdministratorLogin) delete(rawMsg, key) case "administratorLoginPassword": - err = unpopulate(val, &s.AdministratorLoginPassword) + err = unpopulate(val, "AdministratorLoginPassword", &s.AdministratorLoginPassword) delete(rawMsg, key) case "createMode": - err = unpopulate(val, &s.CreateMode) + err = unpopulate(val, "CreateMode", &s.CreateMode) delete(rawMsg, key) case "minimalTlsVersion": - err = unpopulate(val, &s.MinimalTLSVersion) + err = unpopulate(val, "MinimalTLSVersion", &s.MinimalTLSVersion) delete(rawMsg, key) case "publicNetworkAccess": - err = unpopulate(val, &s.PublicNetworkAccess) + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) delete(rawMsg, key) case "sslEnforcement": - err = unpopulate(val, &s.SSLEnforcement) + err = unpopulate(val, "SSLEnforcement", &s.SSLEnforcement) delete(rawMsg, key) case "storageProfile": - err = unpopulate(val, &s.StorageProfile) + err = unpopulate(val, "StorageProfile", &s.StorageProfile) delete(rawMsg, key) case "version": - err = unpopulate(val, &s.Version) + err = unpopulate(val, "Version", &s.Version) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForGeoRestore. -func (s *ServerPropertiesForGeoRestore) GetServerPropertiesForCreate() *ServerPropertiesForCreate { - return &ServerPropertiesForCreate{ - Version: s.Version, - SSLEnforcement: s.SSLEnforcement, - MinimalTLSVersion: s.MinimalTLSVersion, - PublicNetworkAccess: s.PublicNetworkAccess, - StorageProfile: s.StorageProfile, - CreateMode: s.CreateMode, - } -} - // MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForGeoRestore. func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -583,52 +429,40 @@ func (s ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { func (s *ServerPropertiesForGeoRestore) 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 "createMode": - err = unpopulate(val, &s.CreateMode) + err = unpopulate(val, "CreateMode", &s.CreateMode) delete(rawMsg, key) case "minimalTlsVersion": - err = unpopulate(val, &s.MinimalTLSVersion) + err = unpopulate(val, "MinimalTLSVersion", &s.MinimalTLSVersion) delete(rawMsg, key) case "publicNetworkAccess": - err = unpopulate(val, &s.PublicNetworkAccess) + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) delete(rawMsg, key) case "sslEnforcement": - err = unpopulate(val, &s.SSLEnforcement) + err = unpopulate(val, "SSLEnforcement", &s.SSLEnforcement) delete(rawMsg, key) case "sourceServerId": - err = unpopulate(val, &s.SourceServerID) + err = unpopulate(val, "SourceServerID", &s.SourceServerID) delete(rawMsg, key) case "storageProfile": - err = unpopulate(val, &s.StorageProfile) + err = unpopulate(val, "StorageProfile", &s.StorageProfile) delete(rawMsg, key) case "version": - err = unpopulate(val, &s.Version) + err = unpopulate(val, "Version", &s.Version) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForReplica. -func (s *ServerPropertiesForReplica) GetServerPropertiesForCreate() *ServerPropertiesForCreate { - return &ServerPropertiesForCreate{ - Version: s.Version, - SSLEnforcement: s.SSLEnforcement, - MinimalTLSVersion: s.MinimalTLSVersion, - PublicNetworkAccess: s.PublicNetworkAccess, - StorageProfile: s.StorageProfile, - CreateMode: s.CreateMode, - } -} - // MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForReplica. func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -646,52 +480,40 @@ func (s ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { func (s *ServerPropertiesForReplica) 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 "createMode": - err = unpopulate(val, &s.CreateMode) + err = unpopulate(val, "CreateMode", &s.CreateMode) delete(rawMsg, key) case "minimalTlsVersion": - err = unpopulate(val, &s.MinimalTLSVersion) + err = unpopulate(val, "MinimalTLSVersion", &s.MinimalTLSVersion) delete(rawMsg, key) case "publicNetworkAccess": - err = unpopulate(val, &s.PublicNetworkAccess) + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) delete(rawMsg, key) case "sslEnforcement": - err = unpopulate(val, &s.SSLEnforcement) + err = unpopulate(val, "SSLEnforcement", &s.SSLEnforcement) delete(rawMsg, key) case "sourceServerId": - err = unpopulate(val, &s.SourceServerID) + err = unpopulate(val, "SourceServerID", &s.SourceServerID) delete(rawMsg, key) case "storageProfile": - err = unpopulate(val, &s.StorageProfile) + err = unpopulate(val, "StorageProfile", &s.StorageProfile) delete(rawMsg, key) case "version": - err = unpopulate(val, &s.Version) + err = unpopulate(val, "Version", &s.Version) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// GetServerPropertiesForCreate implements the ServerPropertiesForCreateClassification interface for type ServerPropertiesForRestore. -func (s *ServerPropertiesForRestore) GetServerPropertiesForCreate() *ServerPropertiesForCreate { - return &ServerPropertiesForCreate{ - Version: s.Version, - SSLEnforcement: s.SSLEnforcement, - MinimalTLSVersion: s.MinimalTLSVersion, - PublicNetworkAccess: s.PublicNetworkAccess, - StorageProfile: s.StorageProfile, - CreateMode: s.CreateMode, - } -} - // MarshalJSON implements the json.Marshaller interface for type ServerPropertiesForRestore. func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -710,51 +532,43 @@ func (s ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { func (s *ServerPropertiesForRestore) 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 "createMode": - err = unpopulate(val, &s.CreateMode) + err = unpopulate(val, "CreateMode", &s.CreateMode) delete(rawMsg, key) case "minimalTlsVersion": - err = unpopulate(val, &s.MinimalTLSVersion) + err = unpopulate(val, "MinimalTLSVersion", &s.MinimalTLSVersion) delete(rawMsg, key) case "publicNetworkAccess": - err = unpopulate(val, &s.PublicNetworkAccess) + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) delete(rawMsg, key) case "restorePointInTime": - err = unpopulateTimeRFC3339(val, &s.RestorePointInTime) + err = unpopulateTimeRFC3339(val, "RestorePointInTime", &s.RestorePointInTime) delete(rawMsg, key) case "sslEnforcement": - err = unpopulate(val, &s.SSLEnforcement) + err = unpopulate(val, "SSLEnforcement", &s.SSLEnforcement) delete(rawMsg, key) case "sourceServerId": - err = unpopulate(val, &s.SourceServerID) + err = unpopulate(val, "SourceServerID", &s.SourceServerID) delete(rawMsg, key) case "storageProfile": - err = unpopulate(val, &s.StorageProfile) + err = unpopulate(val, "StorageProfile", &s.StorageProfile) delete(rawMsg, key) case "version": - err = unpopulate(val, &s.Version) + err = unpopulate(val, "Version", &s.Version) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicyListResult. -func (s ServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type ServerUpdateParameters. func (s ServerUpdateParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -787,45 +601,37 @@ func (t TopQueryStatisticsInputProperties) MarshalJSON() ([]byte, error) { func (t *TopQueryStatisticsInputProperties) 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 "aggregationFunction": - err = unpopulate(val, &t.AggregationFunction) + err = unpopulate(val, "AggregationFunction", &t.AggregationFunction) delete(rawMsg, key) case "aggregationWindow": - err = unpopulate(val, &t.AggregationWindow) + err = unpopulate(val, "AggregationWindow", &t.AggregationWindow) delete(rawMsg, key) case "numberOfTopQueries": - err = unpopulate(val, &t.NumberOfTopQueries) + err = unpopulate(val, "NumberOfTopQueries", &t.NumberOfTopQueries) delete(rawMsg, key) case "observationEndTime": - err = unpopulateTimeRFC3339(val, &t.ObservationEndTime) + err = unpopulateTimeRFC3339(val, "ObservationEndTime", &t.ObservationEndTime) delete(rawMsg, key) case "observationStartTime": - err = unpopulateTimeRFC3339(val, &t.ObservationStartTime) + err = unpopulateTimeRFC3339(val, "ObservationStartTime", &t.ObservationStartTime) delete(rawMsg, key) case "observedMetric": - err = unpopulate(val, &t.ObservedMetric) + err = unpopulate(val, "ObservedMetric", &t.ObservedMetric) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", t, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type TopQueryStatisticsResultList. -func (t TopQueryStatisticsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", t.NextLink) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type TrackedResource. func (t TrackedResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -837,14 +643,6 @@ func (t TrackedResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleListResult. -func (v VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type WaitStatisticProperties. func (w WaitStatisticProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -864,41 +662,41 @@ func (w WaitStatisticProperties) MarshalJSON() ([]byte, error) { func (w *WaitStatisticProperties) 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", w, err) } for key, val := range rawMsg { var err error switch key { case "count": - err = unpopulate(val, &w.Count) + err = unpopulate(val, "Count", &w.Count) delete(rawMsg, key) case "databaseName": - err = unpopulate(val, &w.DatabaseName) + err = unpopulate(val, "DatabaseName", &w.DatabaseName) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, &w.EndTime) + err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "eventName": - err = unpopulate(val, &w.EventName) + err = unpopulate(val, "EventName", &w.EventName) delete(rawMsg, key) case "eventTypeName": - err = unpopulate(val, &w.EventTypeName) + err = unpopulate(val, "EventTypeName", &w.EventTypeName) delete(rawMsg, key) case "queryId": - err = unpopulate(val, &w.QueryID) + err = unpopulate(val, "QueryID", &w.QueryID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, &w.StartTime) + err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "totalTimeInMs": - err = unpopulate(val, &w.TotalTimeInMs) + err = unpopulate(val, "TotalTimeInMs", &w.TotalTimeInMs) delete(rawMsg, key) case "userId": - err = unpopulate(val, &w.UserID) + err = unpopulate(val, "UserID", &w.UserID) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", w, err) } } return nil @@ -917,36 +715,28 @@ func (w WaitStatisticsInputProperties) MarshalJSON() ([]byte, error) { func (w *WaitStatisticsInputProperties) 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", w, err) } for key, val := range rawMsg { var err error switch key { case "aggregationWindow": - err = unpopulate(val, &w.AggregationWindow) + err = unpopulate(val, "AggregationWindow", &w.AggregationWindow) delete(rawMsg, key) case "observationEndTime": - err = unpopulateTimeRFC3339(val, &w.ObservationEndTime) + err = unpopulateTimeRFC3339(val, "ObservationEndTime", &w.ObservationEndTime) delete(rawMsg, key) case "observationStartTime": - err = unpopulateTimeRFC3339(val, &w.ObservationStartTime) + err = unpopulateTimeRFC3339(val, "ObservationStartTime", &w.ObservationStartTime) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", w, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type WaitStatisticsResultList. -func (w WaitStatisticsResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", w.NextLink) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - func populate(m map[string]interface{}, k string, v interface{}) { if v == nil { return @@ -957,9 +747,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/mariadb/armmariadb/zz_generated_operations_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_operations_client.go index 77f510b8b11e..df6a12ea431d 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_operations_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/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,6 +50,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // List - Lists all of the available REST API operations. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error) { req, err := client.listCreateRequest(ctx, options) @@ -76,7 +77,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_privateendpointconnections_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_privateendpointconnections_client.go index 64d38e4451c9..b5bf911023a2 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_privateendpointconnections_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_privateendpointconnections_client.go @@ -38,7 +38,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor 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,24 +56,26 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate // method. -func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error) { +func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Approve or reject a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters, options) if err != nil { @@ -115,30 +117,32 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete // method. -func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { +func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, privateEndpointConnectionName, options) if err != nil { return nil, err } - return armruntime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes a private endpoint connection with a given name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, privateEndpointConnectionName, options) if err != nil { @@ -180,12 +184,13 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // privateEndpointConnectionName - The name of the private endpoint connection. @@ -232,7 +237,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -247,12 +252,13 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByServerPager - Gets all private endpoint connections on a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByServer // method. func (client *PrivateEndpointConnectionsClient) NewListByServerPager(resourceGroupName string, serverName string, options *PrivateEndpointConnectionsClientListByServerOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[PrivateEndpointConnectionsClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListByServerResponse]{ More: func(page PrivateEndpointConnectionsClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -301,7 +307,7 @@ func (client *PrivateEndpointConnectionsClient) listByServerCreateRequest(ctx co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -316,25 +322,27 @@ func (client *PrivateEndpointConnectionsClient) listByServerHandleResponse(resp // BeginUpdateTags - Updates private endpoint connection with the specified tags. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // parameters - Parameters supplied to the Update private endpoint connection Tags operation. // options - PrivateEndpointConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdateTags // method. -func (client *PrivateEndpointConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters TagsObject, options *PrivateEndpointConnectionsClientBeginUpdateTagsOptions) (*armruntime.Poller[PrivateEndpointConnectionsClientUpdateTagsResponse], error) { +func (client *PrivateEndpointConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters TagsObject, options *PrivateEndpointConnectionsClientBeginUpdateTagsOptions) (*runtime.Poller[PrivateEndpointConnectionsClientUpdateTagsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateTags(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[PrivateEndpointConnectionsClientUpdateTagsResponse](resp, client.pl, nil) + return runtime.NewPoller[PrivateEndpointConnectionsClientUpdateTagsResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) } } // UpdateTags - Updates private endpoint connection with the specified tags. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *PrivateEndpointConnectionsClient) updateTags(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters TagsObject, options *PrivateEndpointConnectionsClientBeginUpdateTagsOptions) (*http.Response, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, serverName, privateEndpointConnectionName, parameters, options) if err != nil { @@ -376,6 +384,6 @@ func (client *PrivateEndpointConnectionsClient) updateTagsCreateRequest(ctx cont reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_privatelinkresources_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_privatelinkresources_client.go index 4845167be551..3ad0c5714446 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_privatelinkresources_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_privatelinkresources_client.go @@ -38,7 +38,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke 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 NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // Get - Gets a private link resource for MariaDB server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // groupName - The name of the private link resource. @@ -102,7 +103,7 @@ func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -117,12 +118,13 @@ func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) // NewListByServerPager - Gets the private link resources for MariaDB server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByServer // method. func (client *PrivateLinkResourcesClient) NewListByServerPager(resourceGroupName string, serverName string, options *PrivateLinkResourcesClientListByServerOptions) *runtime.Pager[PrivateLinkResourcesClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[PrivateLinkResourcesClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListByServerResponse]{ More: func(page PrivateLinkResourcesClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -171,7 +173,7 @@ func (client *PrivateLinkResourcesClient) listByServerCreateRequest(ctx context. reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_querytexts_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_querytexts_client.go index 23213cfc1d19..578140912ee8 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_querytexts_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_querytexts_client.go @@ -38,7 +38,7 @@ func NewQueryTextsClient(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 NewQueryTextsClient(subscriptionID string, credential azcore.TokenCredentia // Get - Retrieve the Query-Store query texts for the queryId. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // queryID - The Query-Store query identifier. @@ -101,7 +102,7 @@ func (client *QueryTextsClient) getCreateRequest(ctx context.Context, resourceGr reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 *QueryTextsClient) getHandleResponse(resp *http.Response) (QueryTex // NewListByServerPager - Retrieve the Query-Store query texts for specified queryIds. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // queryIDs - The query identifiers // options - QueryTextsClientListByServerOptions contains the optional parameters for the QueryTextsClient.ListByServer method. func (client *QueryTextsClient) NewListByServerPager(resourceGroupName string, serverName string, queryIDs []string, options *QueryTextsClientListByServerOptions) *runtime.Pager[QueryTextsClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[QueryTextsClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[QueryTextsClientListByServerResponse]{ More: func(page QueryTextsClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -173,7 +175,7 @@ func (client *QueryTextsClient) listByServerCreateRequest(ctx context.Context, r reqQP.Add("queryIds", qv) } 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/mariadb/armmariadb/zz_generated_recommendedactions_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_recommendedactions_client.go index eccb3e4883e1..3b3e58070ec8 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_recommendedactions_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_recommendedactions_client.go @@ -38,7 +38,7 @@ func NewRecommendedActionsClient(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 NewRecommendedActionsClient(subscriptionID string, credential azcore.TokenC // Get - Retrieve recommended actions from the advisor. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // advisorName - The advisor name for recommendation action. @@ -106,7 +107,7 @@ func (client *RecommendedActionsClient) getCreateRequest(ctx context.Context, re reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -121,13 +122,14 @@ func (client *RecommendedActionsClient) getHandleResponse(resp *http.Response) ( // NewListByServerPager - Retrieve recommended actions from the advisor. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // advisorName - The advisor name for recommendation action. // options - RecommendedActionsClientListByServerOptions contains the optional parameters for the RecommendedActionsClient.ListByServer // method. func (client *RecommendedActionsClient) NewListByServerPager(resourceGroupName string, serverName string, advisorName string, options *RecommendedActionsClientListByServerOptions) *runtime.Pager[RecommendedActionsClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[RecommendedActionsClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[RecommendedActionsClientListByServerResponse]{ More: func(page RecommendedActionsClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -183,7 +185,7 @@ func (client *RecommendedActionsClient) listByServerCreateRequest(ctx context.Co reqQP.Set("sessionId", *options.SessionID) } 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/mariadb/armmariadb/zz_generated_recoverableservers_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_recoverableservers_client.go index 0f414426ca37..8dac42ece82d 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_recoverableservers_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_recoverableservers_client.go @@ -38,7 +38,7 @@ func NewRecoverableServersClient(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 NewRecoverableServersClient(subscriptionID string, credential azcore.TokenC // Get - Gets a recoverable MariaDB Server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - RecoverableServersClientGetOptions contains the optional parameters for the RecoverableServersClient.Get method. @@ -96,7 +97,7 @@ func (client *RecoverableServersClient) getCreateRequest(ctx context.Context, re reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_replicas_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_replicas_client.go index 5a966a20cdcf..5a686c15a8ed 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_replicas_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_replicas_client.go @@ -38,7 +38,7 @@ func NewReplicasClient(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,11 +56,12 @@ func NewReplicasClient(subscriptionID string, credential azcore.TokenCredential, // NewListByServerPager - List all the replicas for a given server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ReplicasClientListByServerOptions contains the optional parameters for the ReplicasClient.ListByServer method. func (client *ReplicasClient) NewListByServerPager(resourceGroupName string, serverName string, options *ReplicasClientListByServerOptions) *runtime.Pager[ReplicasClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[ReplicasClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[ReplicasClientListByServerResponse]{ More: func(page ReplicasClientListByServerResponse) bool { return false }, @@ -103,7 +104,7 @@ func (client *ReplicasClient) listByServerCreateRequest(ctx context.Context, res reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_serverbasedperformancetier_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serverbasedperformancetier_client.go index 8c4b1520346b..fabe5bd085ea 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serverbasedperformancetier_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serverbasedperformancetier_client.go @@ -38,7 +38,7 @@ func NewServerBasedPerformanceTierClient(subscriptionID string, credential azcor 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 NewServerBasedPerformanceTierClient(subscriptionID string, credential azcor // NewListPager - List all the performance tiers for a MariaDB server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ServerBasedPerformanceTierClientListOptions contains the optional parameters for the ServerBasedPerformanceTierClient.List // method. func (client *ServerBasedPerformanceTierClient) NewListPager(resourceGroupName string, serverName string, options *ServerBasedPerformanceTierClientListOptions) *runtime.Pager[ServerBasedPerformanceTierClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[ServerBasedPerformanceTierClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[ServerBasedPerformanceTierClientListResponse]{ More: func(page ServerBasedPerformanceTierClientListResponse) bool { return false }, @@ -104,7 +105,7 @@ func (client *ServerBasedPerformanceTierClient) listCreateRequest(ctx context.Co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_serverparameters_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serverparameters_client.go index 29a14ec018ed..5aba0cfd5fc4 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serverparameters_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serverparameters_client.go @@ -38,7 +38,7 @@ func NewServerParametersClient(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,27 +56,29 @@ func NewServerParametersClient(subscriptionID string, credential azcore.TokenCre // BeginListUpdateConfigurations - Update a list of configurations in a given server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // value - The parameters for updating a list of server configuration. // options - ServerParametersClientBeginListUpdateConfigurationsOptions contains the optional parameters for the ServerParametersClient.BeginListUpdateConfigurations // method. -func (client *ServerParametersClient) BeginListUpdateConfigurations(ctx context.Context, resourceGroupName string, serverName string, value ConfigurationListResult, options *ServerParametersClientBeginListUpdateConfigurationsOptions) (*armruntime.Poller[ServerParametersClientListUpdateConfigurationsResponse], error) { +func (client *ServerParametersClient) BeginListUpdateConfigurations(ctx context.Context, resourceGroupName string, serverName string, value ConfigurationListResult, options *ServerParametersClientBeginListUpdateConfigurationsOptions) (*runtime.Poller[ServerParametersClientListUpdateConfigurationsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listUpdateConfigurations(ctx, resourceGroupName, serverName, value, options) if err != nil { return nil, err } - return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ServerParametersClientListUpdateConfigurationsResponse]{ - FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServerParametersClientListUpdateConfigurationsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, }) } else { - return armruntime.NewPollerFromResumeToken[ServerParametersClientListUpdateConfigurationsResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ServerParametersClientListUpdateConfigurationsResponse](options.ResumeToken, client.pl, nil) } } // ListUpdateConfigurations - Update a list of configurations in a given server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ServerParametersClient) listUpdateConfigurations(ctx context.Context, resourceGroupName string, serverName string, value ConfigurationListResult, options *ServerParametersClientBeginListUpdateConfigurationsOptions) (*http.Response, error) { req, err := client.listUpdateConfigurationsCreateRequest(ctx, resourceGroupName, serverName, value, options) if err != nil { @@ -114,6 +116,6 @@ func (client *ServerParametersClient) listUpdateConfigurationsCreateRequest(ctx reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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, value) } diff --git a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_servers_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_servers_client.go index 1932730ebe11..071a5f8878fc 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_servers_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_servers_client.go @@ -38,7 +38,7 @@ func NewServersClient(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,24 +56,26 @@ func NewServersClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Creates a new server or updates an existing server. The update action will overwrite the existing server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // parameters - The required parameters for creating or updating a server. // options - ServersClientBeginCreateOptions contains the optional parameters for the ServersClient.BeginCreate method. -func (client *ServersClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate, options *ServersClientBeginCreateOptions) (*armruntime.Poller[ServersClientCreateResponse], error) { +func (client *ServersClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate, options *ServersClientBeginCreateOptions) (*runtime.Poller[ServersClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, resourceGroupName, serverName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[ServersClientCreateResponse](resp, client.pl, nil) + return runtime.NewPoller[ServersClientCreateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ServersClientCreateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ServersClientCreateResponse](options.ResumeToken, client.pl, nil) } } // Create - Creates a new server or updates an existing server. The update action will overwrite the existing server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ServersClient) create(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate, options *ServersClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, serverName, parameters, options) if err != nil { @@ -111,29 +113,31 @@ func (client *ServersClient) createCreateRequest(ctx context.Context, resourceGr reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method. -func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*armruntime.Poller[ServersClientDeleteResponse], error) { +func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*runtime.Poller[ServersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ServersClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[ServersClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ServersClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ServersClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ServersClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, options) if err != nil { @@ -171,12 +175,13 @@ func (client *ServersClient) deleteCreateRequest(ctx context.Context, resourceGr reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 information about a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ServersClientGetOptions contains the optional parameters for the ServersClient.Get method. @@ -217,7 +222,7 @@ func (client *ServersClient) getCreateRequest(ctx context.Context, resourceGroup reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -232,9 +237,10 @@ func (client *ServersClient) getHandleResponse(resp *http.Response) (ServersClie // NewListPager - List all the servers in a given subscription. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // options - ServersClientListOptions contains the optional parameters for the ServersClient.List method. func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[ServersClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[ServersClientListResponse]{ More: func(page ServersClientListResponse) bool { return false }, @@ -269,7 +275,7 @@ func (client *ServersClient) listCreateRequest(ctx context.Context, options *Ser reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -284,11 +290,12 @@ func (client *ServersClient) listHandleResponse(resp *http.Response) (ServersCli // NewListByResourceGroupPager - List all the servers in a given resource group. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // options - ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.ListByResourceGroup // method. func (client *ServersClient) NewListByResourceGroupPager(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PageProcessor[ServersClientListByResourceGroupResponse]{ + return runtime.NewPager(runtime.PagingHandler[ServersClientListByResourceGroupResponse]{ More: func(page ServersClientListByResourceGroupResponse) bool { return false }, @@ -327,7 +334,7 @@ func (client *ServersClient) listByResourceGroupCreateRequest(ctx context.Contex reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -342,23 +349,25 @@ func (client *ServersClient) listByResourceGroupHandleResponse(resp *http.Respon // BeginRestart - Restarts a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ServersClientBeginRestartOptions contains the optional parameters for the ServersClient.BeginRestart method. -func (client *ServersClient) BeginRestart(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginRestartOptions) (*armruntime.Poller[ServersClientRestartResponse], error) { +func (client *ServersClient) BeginRestart(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginRestartOptions) (*runtime.Poller[ServersClientRestartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.restart(ctx, resourceGroupName, serverName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ServersClientRestartResponse](resp, client.pl, nil) + return runtime.NewPoller[ServersClientRestartResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ServersClientRestartResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ServersClientRestartResponse](options.ResumeToken, client.pl, nil) } } // Restart - Restarts a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ServersClient) restart(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginRestartOptions) (*http.Response, error) { req, err := client.restartCreateRequest(ctx, resourceGroupName, serverName, options) if err != nil { @@ -396,29 +405,31 @@ func (client *ServersClient) restartCreateRequest(ctx context.Context, resourceG reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // BeginStart - Starts a stopped server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2020-01-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ServersClientBeginStartOptions contains the optional parameters for the ServersClient.BeginStart method. -func (client *ServersClient) BeginStart(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStartOptions) (*armruntime.Poller[ServersClientStartResponse], error) { +func (client *ServersClient) BeginStart(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStartOptions) (*runtime.Poller[ServersClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, resourceGroupName, serverName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ServersClientStartResponse](resp, client.pl, nil) + return runtime.NewPoller[ServersClientStartResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ServersClientStartResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ServersClientStartResponse](options.ResumeToken, client.pl, nil) } } // Start - Starts a stopped server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2020-01-01 func (client *ServersClient) start(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, serverName, options) if err != nil { @@ -456,29 +467,31 @@ func (client *ServersClient) startCreateRequest(ctx context.Context, resourceGro reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2020-01-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // BeginStop - Stops a running server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2020-01-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ServersClientBeginStopOptions contains the optional parameters for the ServersClient.BeginStop method. -func (client *ServersClient) BeginStop(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStopOptions) (*armruntime.Poller[ServersClientStopResponse], error) { +func (client *ServersClient) BeginStop(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStopOptions) (*runtime.Poller[ServersClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, serverName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ServersClientStopResponse](resp, client.pl, nil) + return runtime.NewPoller[ServersClientStopResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ServersClientStopResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ServersClientStopResponse](options.ResumeToken, client.pl, nil) } } // Stop - Stops a running server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2020-01-01 func (client *ServersClient) stop(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, serverName, options) if err != nil { @@ -516,32 +529,34 @@ func (client *ServersClient) stopCreateRequest(ctx context.Context, resourceGrou reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2020-01-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // BeginUpdate - Updates an existing server. The request body can contain one to many of the properties present in the normal // server definition. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // parameters - The required parameters for updating a server. // options - ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method. -func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters, options *ServersClientBeginUpdateOptions) (*armruntime.Poller[ServersClientUpdateResponse], error) { +func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters, options *ServersClientBeginUpdateOptions) (*runtime.Poller[ServersClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, serverName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[ServersClientUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ServersClientUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ServersClientUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ServersClientUpdateResponse](options.ResumeToken, client.pl, nil) } } // Update - Updates an existing server. The request body can contain one to many of the properties present in the normal server // definition. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ServersClient) update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters, options *ServersClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, serverName, parameters, options) if err != nil { @@ -579,6 +594,6 @@ func (client *ServersClient) updateCreateRequest(ctx context.Context, resourceGr reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_serversecurityalertpolicies_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serversecurityalertpolicies_client.go index ad20f341f31c..87d39aae358a 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serversecurityalertpolicies_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_serversecurityalertpolicies_client.go @@ -38,7 +38,7 @@ func NewServerSecurityAlertPoliciesClient(subscriptionID string, credential azco 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 NewServerSecurityAlertPoliciesClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Creates or updates a threat detection policy. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // securityAlertPolicyName - The name of the threat detection policy. // parameters - The server security alert policy. // options - ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate // method. -func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error) { +func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, securityAlertPolicyName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates or updates a threat detection policy. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ServerSecurityAlertPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, securityAlertPolicyName, parameters, options) if err != nil { @@ -117,12 +119,13 @@ func (client *ServerSecurityAlertPoliciesClient) createOrUpdateCreateRequest(ctx reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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) } // Get - Get a server's security alert policy. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // securityAlertPolicyName - The name of the security alert policy. @@ -169,7 +172,7 @@ func (client *ServerSecurityAlertPoliciesClient) getCreateRequest(ctx context.Co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -184,12 +187,13 @@ func (client *ServerSecurityAlertPoliciesClient) getHandleResponse(resp *http.Re // NewListByServerPager - Get the server's threat detection policies. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.ListByServer // method. func (client *ServerSecurityAlertPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerSecurityAlertPoliciesClientListByServerOptions) *runtime.Pager[ServerSecurityAlertPoliciesClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[ServerSecurityAlertPoliciesClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[ServerSecurityAlertPoliciesClientListByServerResponse]{ More: func(page ServerSecurityAlertPoliciesClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -238,7 +242,7 @@ func (client *ServerSecurityAlertPoliciesClient) listByServerCreateRequest(ctx c reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_time_rfc3339.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_time_rfc3339.go index 06188affbe25..ca2404cdb06f 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_time_rfc3339.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_time_rfc3339.go @@ -10,6 +10,7 @@ package armmariadb 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/mariadb/armmariadb/zz_generated_topquerystatistics_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_topquerystatistics_client.go index 2963cefc07f9..d373d79b30d5 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_topquerystatistics_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_topquerystatistics_client.go @@ -38,7 +38,7 @@ func NewTopQueryStatisticsClient(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 NewTopQueryStatisticsClient(subscriptionID string, credential azcore.TokenC // Get - Retrieve the query statistic for specified identifier. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // queryStatisticID - The Query Statistic identifier. @@ -101,7 +102,7 @@ func (client *TopQueryStatisticsClient) getCreateRequest(ctx context.Context, re reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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,13 +117,14 @@ func (client *TopQueryStatisticsClient) getHandleResponse(resp *http.Response) ( // NewListByServerPager - Retrieve the Query-Store top queries for specified metric and aggregation. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // parameters - The required parameters for retrieving top query statistics. // options - TopQueryStatisticsClientListByServerOptions contains the optional parameters for the TopQueryStatisticsClient.ListByServer // method. func (client *TopQueryStatisticsClient) NewListByServerPager(resourceGroupName string, serverName string, parameters TopQueryStatisticsInput, options *TopQueryStatisticsClientListByServerOptions) *runtime.Pager[TopQueryStatisticsClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[TopQueryStatisticsClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[TopQueryStatisticsClientListByServerResponse]{ More: func(page TopQueryStatisticsClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -171,7 +173,7 @@ func (client *TopQueryStatisticsClient) listByServerCreateRequest(ctx context.Co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_virtualnetworkrules_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_virtualnetworkrules_client.go index c6ab2ed06787..c69c5a373bec 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_virtualnetworkrules_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_virtualnetworkrules_client.go @@ -38,7 +38,7 @@ func NewVirtualNetworkRulesClient(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,26 +56,28 @@ func NewVirtualNetworkRulesClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Creates or updates an existing virtual network rule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // virtualNetworkRuleName - The name of the virtual network rule. // parameters - The requested virtual Network Rule Resource state. // options - VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate // method. -func (client *VirtualNetworkRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, options *VirtualNetworkRulesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error) { +func (client *VirtualNetworkRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, options *VirtualNetworkRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[VirtualNetworkRulesClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[VirtualNetworkRulesClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[VirtualNetworkRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[VirtualNetworkRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates or updates an existing virtual network rule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *VirtualNetworkRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, options *VirtualNetworkRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters, options) if err != nil { @@ -117,31 +119,33 @@ func (client *VirtualNetworkRulesClient) createOrUpdateCreateRequest(ctx context reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 virtual network rule with the given name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // virtualNetworkRuleName - The name of the virtual network rule. // options - VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete // method. -func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*armruntime.Poller[VirtualNetworkRulesClientDeleteResponse], error) { +func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serverName, virtualNetworkRuleName, options) if err != nil { return nil, err } - return armruntime.NewPoller[VirtualNetworkRulesClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[VirtualNetworkRulesClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[VirtualNetworkRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[VirtualNetworkRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the virtual network rule with the given name. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *VirtualNetworkRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serverName, virtualNetworkRuleName, options) if err != nil { @@ -188,6 +192,7 @@ func (client *VirtualNetworkRulesClient) deleteCreateRequest(ctx context.Context // Get - Gets a virtual network rule. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // virtualNetworkRuleName - The name of the virtual network rule. @@ -233,7 +238,7 @@ func (client *VirtualNetworkRulesClient) getCreateRequest(ctx context.Context, r reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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 *VirtualNetworkRulesClient) getHandleResponse(resp *http.Response) // NewListByServerPager - Gets a list of virtual network rules in a server. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // options - VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.ListByServer // method. func (client *VirtualNetworkRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *VirtualNetworkRulesClientListByServerOptions) *runtime.Pager[VirtualNetworkRulesClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[VirtualNetworkRulesClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkRulesClientListByServerResponse]{ More: func(page VirtualNetworkRulesClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -302,7 +308,7 @@ func (client *VirtualNetworkRulesClient) listByServerCreateRequest(ctx context.C reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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/mariadb/armmariadb/zz_generated_waitstatistics_client.go b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_waitstatistics_client.go index 601e05c1a411..860f1878f1ce 100644 --- a/sdk/resourcemanager/mariadb/armmariadb/zz_generated_waitstatistics_client.go +++ b/sdk/resourcemanager/mariadb/armmariadb/zz_generated_waitstatistics_client.go @@ -38,7 +38,7 @@ func NewWaitStatisticsClient(subscriptionID string, credential azcore.TokenCrede 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 NewWaitStatisticsClient(subscriptionID string, credential azcore.TokenCrede // Get - Retrieve wait statistics for specified identifier. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // waitStatisticsID - The Wait Statistic identifier. @@ -101,7 +102,7 @@ func (client *WaitStatisticsClient) getCreateRequest(ctx context.Context, resour reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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,13 +117,14 @@ func (client *WaitStatisticsClient) getHandleResponse(resp *http.Response) (Wait // NewListByServerPager - Retrieve wait statistics for specified aggregation window. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // serverName - The name of the server. // parameters - The required parameters for retrieving wait statistics. // options - WaitStatisticsClientListByServerOptions contains the optional parameters for the WaitStatisticsClient.ListByServer // method. func (client *WaitStatisticsClient) NewListByServerPager(resourceGroupName string, serverName string, parameters WaitStatisticsInput, options *WaitStatisticsClientListByServerOptions) *runtime.Pager[WaitStatisticsClientListByServerResponse] { - return runtime.NewPager(runtime.PageProcessor[WaitStatisticsClientListByServerResponse]{ + return runtime.NewPager(runtime.PagingHandler[WaitStatisticsClientListByServerResponse]{ More: func(page WaitStatisticsClientListByServerResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -171,7 +173,7 @@ func (client *WaitStatisticsClient) listByServerCreateRequest(ctx context.Contex reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2018-06-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) }