From 87867f4972433fd4516c64ee586f8d01de7fdd45 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 16 May 2022 12:36:30 +0000 Subject: [PATCH] CodeGen from PR 19063 in Azure/azure-rest-api-specs {azure-rest-api-specs} | update description of $top parameter (#19063) Fixes https://github.com/Azure/azure-rest-api-specs/issues/18525 --- .../armmanagedapplications/CHANGELOG.md | 16 ++ .../armmanagedapplications/autorest.md | 6 +- .../resources/armmanagedapplications/go.mod | 16 +- .../resources/armmanagedapplications/go.sum | 57 +----- ...d_example_applicationclient_client_test.go | 42 ---- ...mple_applicationdefinitions_client_test.go | 132 ------------- ...erated_example_applications_client_test.go | 179 ------------------ .../zz_generated_application_client.go | 7 +- ...generated_applicationdefinitions_client.go | 53 ++++-- .../zz_generated_applications_client.go | 64 ++++--- .../zz_generated_constants.go | 2 +- .../zz_generated_models_serde.go | 24 --- 12 files changed, 106 insertions(+), 492 deletions(-) delete mode 100644 sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applicationclient_client_test.go delete mode 100644 sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applicationdefinitions_client_test.go delete mode 100644 sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applications_client_test.go diff --git a/sdk/resourcemanager/resources/armmanagedapplications/CHANGELOG.md b/sdk/resourcemanager/resources/armmanagedapplications/CHANGELOG.md index d72dba76502d..e13d376d0330 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/CHANGELOG.md +++ b/sdk/resourcemanager/resources/armmanagedapplications/CHANGELOG.md @@ -1,5 +1,21 @@ # Release History +## 0.5.0 (2022-05-16) +### Breaking Changes + +- Function `*ApplicationDefinitionsClient.BeginCreateOrUpdateByID` return value(s) have been changed from `(*armruntime.Poller[ApplicationDefinitionsClientCreateOrUpdateByIDResponse], error)` to `(*runtime.Poller[ApplicationDefinitionsClientCreateOrUpdateByIDResponse], error)` +- Function `*ApplicationDefinitionsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ApplicationDefinitionsClientDeleteResponse], error)` to `(*runtime.Poller[ApplicationDefinitionsClientDeleteResponse], error)` +- Function `*ApplicationsClient.BeginCreateOrUpdateByID` return value(s) have been changed from `(*armruntime.Poller[ApplicationsClientCreateOrUpdateByIDResponse], error)` to `(*runtime.Poller[ApplicationsClientCreateOrUpdateByIDResponse], error)` +- Function `*ApplicationsClient.BeginDeleteByID` return value(s) have been changed from `(*armruntime.Poller[ApplicationsClientDeleteByIDResponse], error)` to `(*runtime.Poller[ApplicationsClientDeleteByIDResponse], error)` +- Function `*ApplicationDefinitionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ApplicationDefinitionsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ApplicationDefinitionsClientCreateOrUpdateResponse], error)` +- Function `*ApplicationDefinitionsClient.BeginDeleteByID` return value(s) have been changed from `(*armruntime.Poller[ApplicationDefinitionsClientDeleteByIDResponse], error)` to `(*runtime.Poller[ApplicationDefinitionsClientDeleteByIDResponse], error)` +- Function `*ApplicationsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ApplicationsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ApplicationsClientCreateOrUpdateResponse], error)` +- Function `*ApplicationsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ApplicationsClientDeleteResponse], error)` to `(*runtime.Poller[ApplicationsClientDeleteResponse], error)` +- Function `ApplicationListResult.MarshalJSON` has been removed +- Function `ApplicationDefinitionListResult.MarshalJSON` has been removed +- Function `OperationListResult.MarshalJSON` has been removed + + ## 0.4.0 (2022-04-18) ### Breaking Changes diff --git a/sdk/resourcemanager/resources/armmanagedapplications/autorest.md b/sdk/resourcemanager/resources/armmanagedapplications/autorest.md index 633552702abb..e42690507bbc 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/autorest.md +++ b/sdk/resourcemanager/resources/armmanagedapplications/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/f92aaf88f4c9d1ffb9a014eba196d887a9288c3a/specification/resources/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/f92aaf88f4c9d1ffb9a014eba196d887a9288c3a/specification/resources/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/resources/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/resources/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.4.0 +module-version: 0.5.0 package-managedapplications: true ``` \ No newline at end of file diff --git a/sdk/resourcemanager/resources/armmanagedapplications/go.mod b/sdk/resourcemanager/resources/armmanagedapplications/go.mod index 5116079f2da3..459e0cf9f40e 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/go.mod +++ b/sdk/resourcemanager/resources/armmanagedapplications/go.mod @@ -2,20 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armmanage 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 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1 // 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 + github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect + golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/sdk/resourcemanager/resources/armmanagedapplications/go.sum b/sdk/resourcemanager/resources/armmanagedapplications/go.sum index 56d1c32628ae..3f874a3bc5a6 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/go.sum +++ b/sdk/resourcemanager/resources/armmanagedapplications/go.sum @@ -1,53 +1,12 @@ -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/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= -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/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/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 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/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/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/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= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applicationclient_client_test.go b/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applicationclient_client_test.go deleted file mode 100644 index b04730564076..000000000000 --- a/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applicationclient_client_test.go +++ /dev/null @@ -1,42 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmanagedapplications_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armmanagedapplications" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listSolutionsOperations.json -func ExampleApplicationClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListOperationsPager(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 - _ = v - } - } -} diff --git a/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applicationdefinitions_client_test.go b/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applicationdefinitions_client_test.go deleted file mode 100644 index 221ca0f7925b..000000000000 --- a/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applicationdefinitions_client_test.go +++ /dev/null @@ -1,132 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmanagedapplications_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armmanagedapplications" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplicationDefinition.json -func ExampleApplicationDefinitionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationDefinitionsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplicationDefinition.json -func ExampleApplicationDefinitionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationDefinitionsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "", - "", - &armmanagedapplications.ApplicationDefinitionsClientBeginDeleteOptions{ResumeToken: ""}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplicationDefinition.json -func ExampleApplicationDefinitionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationDefinitionsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armmanagedapplications.ApplicationDefinition{ - Location: to.Ptr(""), - Properties: &armmanagedapplications.ApplicationDefinitionProperties{ - Description: to.Ptr(""), - Authorizations: []*armmanagedapplications.ApplicationProviderAuthorization{ - { - PrincipalID: to.Ptr(""), - RoleDefinitionID: to.Ptr(""), - }}, - DisplayName: to.Ptr(""), - LockLevel: to.Ptr(armmanagedapplications.ApplicationLockLevelNone), - PackageFileURI: to.Ptr(""), - }, - }, - &armmanagedapplications.ApplicationDefinitionsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationDefinitionsByResourceGroup.json -func ExampleApplicationDefinitionsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationDefinitionsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("", - 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 - _ = v - } - } -} diff --git a/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applications_client_test.go b/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applications_client_test.go deleted file mode 100644 index dcee75da4b15..000000000000 --- a/sdk/resourcemanager/resources/armmanagedapplications/ze_generated_example_applications_client_test.go +++ /dev/null @@ -1,179 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmanagedapplications_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armmanagedapplications" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/getApplication.json -func ExampleApplicationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/deleteApplication.json -func ExampleApplicationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "", - "", - &armmanagedapplications.ApplicationsClientBeginDeleteOptions{ResumeToken: ""}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/createOrUpdateApplication.json -func ExampleApplicationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armmanagedapplications.Application{ - Location: to.Ptr(""), - Kind: to.Ptr(""), - Properties: &armmanagedapplications.ApplicationProperties{ - ManagedResourceGroupID: to.Ptr(""), - }, - }, - &armmanagedapplications.ApplicationsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/updateApplication.json -func ExampleApplicationsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "", - "", - &armmanagedapplications.ApplicationsClientUpdateOptions{Parameters: &armmanagedapplications.ApplicationPatchable{ - Kind: to.Ptr(""), - Properties: &armmanagedapplications.ApplicationPropertiesPatchable{ - ApplicationDefinitionID: to.Ptr(""), - ManagedResourceGroupID: to.Ptr(""), - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationsByResourceGroup.json -func ExampleApplicationsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("", - 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 - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Solutions/stable/2018-06-01/examples/listApplicationsBySubscription.json -func ExampleApplicationsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmanagedapplications.NewApplicationsClient("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(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 - _ = v - } - } -} diff --git a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_application_client.go b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_application_client.go index d7923b29fdd5..0e1cd6608943 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_application_client.go +++ b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_application_client.go @@ -33,7 +33,7 @@ func NewApplicationClient(credential azcore.TokenCredential, options *arm.Client 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,10 +50,11 @@ func NewApplicationClient(credential azcore.TokenCredential, options *arm.Client // NewListOperationsPager - Lists all of the available Microsoft.Solutions REST API operations. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // options - ApplicationClientListOperationsOptions contains the optional parameters for the ApplicationClient.ListOperations // method. func (client *ApplicationClient) NewListOperationsPager(options *ApplicationClientListOperationsOptions) *runtime.Pager[ApplicationClientListOperationsResponse] { - return runtime.NewPager(runtime.PageProcessor[ApplicationClientListOperationsResponse]{ + return runtime.NewPager(runtime.PagingHandler[ApplicationClientListOperationsResponse]{ More: func(page ApplicationClientListOperationsResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -90,7 +91,7 @@ func (client *ApplicationClient) listOperationsCreateRequest(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/resources/armmanagedapplications/zz_generated_applicationdefinitions_client.go b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_applicationdefinitions_client.go index 7d93185d6d46..728121ba3b0a 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_applicationdefinitions_client.go +++ b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_applicationdefinitions_client.go @@ -38,7 +38,7 @@ func NewApplicationDefinitionsClient(subscriptionID string, credential azcore.To if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,25 +56,27 @@ func NewApplicationDefinitionsClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - Creates a new managed application 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. // applicationDefinitionName - The name of the managed application definition. // parameters - Parameters supplied to the create or update an managed application definition. // options - ApplicationDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationDefinitionsClient.BeginCreateOrUpdate // method. -func (client *ApplicationDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition, options *ApplicationDefinitionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ApplicationDefinitionsClientCreateOrUpdateResponse], error) { +func (client *ApplicationDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition, options *ApplicationDefinitionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationDefinitionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationDefinitionName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[ApplicationDefinitionsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ApplicationDefinitionsClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ApplicationDefinitionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ApplicationDefinitionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new managed application definition. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ApplicationDefinitionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition, options *ApplicationDefinitionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationDefinitionName, parameters, options) if err != nil { @@ -112,31 +114,33 @@ func (client *ApplicationDefinitionsClient) createOrUpdateCreateRequest(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) } // BeginCreateOrUpdateByID - Creates a new managed application 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. // applicationDefinitionName - The name of the managed application definition. // parameters - Parameters supplied to the create or update a managed application definition. // options - ApplicationDefinitionsClientBeginCreateOrUpdateByIDOptions contains the optional parameters for the ApplicationDefinitionsClient.BeginCreateOrUpdateByID // method. -func (client *ApplicationDefinitionsClient) BeginCreateOrUpdateByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition, options *ApplicationDefinitionsClientBeginCreateOrUpdateByIDOptions) (*armruntime.Poller[ApplicationDefinitionsClientCreateOrUpdateByIDResponse], error) { +func (client *ApplicationDefinitionsClient) BeginCreateOrUpdateByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition, options *ApplicationDefinitionsClientBeginCreateOrUpdateByIDOptions) (*runtime.Poller[ApplicationDefinitionsClientCreateOrUpdateByIDResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdateByID(ctx, resourceGroupName, applicationDefinitionName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[ApplicationDefinitionsClientCreateOrUpdateByIDResponse](resp, client.pl, nil) + return runtime.NewPoller[ApplicationDefinitionsClientCreateOrUpdateByIDResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ApplicationDefinitionsClientCreateOrUpdateByIDResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ApplicationDefinitionsClientCreateOrUpdateByIDResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdateByID - Creates a new managed application definition. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ApplicationDefinitionsClient) createOrUpdateByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition, options *ApplicationDefinitionsClientBeginCreateOrUpdateByIDOptions) (*http.Response, error) { req, err := client.createOrUpdateByIDCreateRequest(ctx, resourceGroupName, applicationDefinitionName, parameters, options) if err != nil { @@ -174,30 +178,32 @@ func (client *ApplicationDefinitionsClient) createOrUpdateByIDCreateRequest(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 the managed application 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. // applicationDefinitionName - The name of the managed application definition to delete. // options - ApplicationDefinitionsClientBeginDeleteOptions contains the optional parameters for the ApplicationDefinitionsClient.BeginDelete // method. -func (client *ApplicationDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationDefinitionName string, options *ApplicationDefinitionsClientBeginDeleteOptions) (*armruntime.Poller[ApplicationDefinitionsClientDeleteResponse], error) { +func (client *ApplicationDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationDefinitionName string, options *ApplicationDefinitionsClientBeginDeleteOptions) (*runtime.Poller[ApplicationDefinitionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, applicationDefinitionName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ApplicationDefinitionsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[ApplicationDefinitionsClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ApplicationDefinitionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ApplicationDefinitionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the managed application definition. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ApplicationDefinitionsClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationDefinitionName string, options *ApplicationDefinitionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationDefinitionName, options) if err != nil { @@ -235,30 +241,32 @@ func (client *ApplicationDefinitionsClient) deleteCreateRequest(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, nil } // BeginDeleteByID - Deletes the managed application 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. // applicationDefinitionName - The name of the managed application definition. // options - ApplicationDefinitionsClientBeginDeleteByIDOptions contains the optional parameters for the ApplicationDefinitionsClient.BeginDeleteByID // method. -func (client *ApplicationDefinitionsClient) BeginDeleteByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string, options *ApplicationDefinitionsClientBeginDeleteByIDOptions) (*armruntime.Poller[ApplicationDefinitionsClientDeleteByIDResponse], error) { +func (client *ApplicationDefinitionsClient) BeginDeleteByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string, options *ApplicationDefinitionsClientBeginDeleteByIDOptions) (*runtime.Poller[ApplicationDefinitionsClientDeleteByIDResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteByID(ctx, resourceGroupName, applicationDefinitionName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ApplicationDefinitionsClientDeleteByIDResponse](resp, client.pl, nil) + return runtime.NewPoller[ApplicationDefinitionsClientDeleteByIDResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ApplicationDefinitionsClientDeleteByIDResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ApplicationDefinitionsClientDeleteByIDResponse](options.ResumeToken, client.pl, nil) } } // DeleteByID - Deletes the managed application definition. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ApplicationDefinitionsClient) deleteByID(ctx context.Context, resourceGroupName string, applicationDefinitionName string, options *ApplicationDefinitionsClientBeginDeleteByIDOptions) (*http.Response, error) { req, err := client.deleteByIDCreateRequest(ctx, resourceGroupName, applicationDefinitionName, options) if err != nil { @@ -296,12 +304,13 @@ func (client *ApplicationDefinitionsClient) deleteByIDCreateRequest(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 the managed application 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. // applicationDefinitionName - The name of the managed application definition. // options - ApplicationDefinitionsClientGetOptions contains the optional parameters for the ApplicationDefinitionsClient.Get @@ -343,7 +352,7 @@ func (client *ApplicationDefinitionsClient) 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 } @@ -358,6 +367,7 @@ func (client *ApplicationDefinitionsClient) getHandleResponse(resp *http.Respons // GetByID - Gets the managed application 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. // applicationDefinitionName - The name of the managed application definition. // options - ApplicationDefinitionsClientGetByIDOptions contains the optional parameters for the ApplicationDefinitionsClient.GetByID @@ -399,7 +409,7 @@ func (client *ApplicationDefinitionsClient) getByIDCreateRequest(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 } @@ -414,11 +424,12 @@ func (client *ApplicationDefinitionsClient) getByIDHandleResponse(resp *http.Res // NewListByResourceGroupPager - Lists the managed application definitions in a 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 - ApplicationDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ApplicationDefinitionsClient.ListByResourceGroup // method. func (client *ApplicationDefinitionsClient) NewListByResourceGroupPager(resourceGroupName string, options *ApplicationDefinitionsClientListByResourceGroupOptions) *runtime.Pager[ApplicationDefinitionsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PageProcessor[ApplicationDefinitionsClientListByResourceGroupResponse]{ + return runtime.NewPager(runtime.PagingHandler[ApplicationDefinitionsClientListByResourceGroupResponse]{ More: func(page ApplicationDefinitionsClientListByResourceGroupResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -463,7 +474,7 @@ func (client *ApplicationDefinitionsClient) listByResourceGroupCreateRequest(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, nil } diff --git a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_applications_client.go b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_applications_client.go index ac2cdfa7c043..f57797c2f4c0 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_applications_client.go +++ b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_applications_client.go @@ -38,7 +38,7 @@ func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredent if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,25 +56,27 @@ func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Creates a new managed application. // 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. // applicationName - The name of the managed application. // parameters - Parameters supplied to the create or update a managed application. // options - ApplicationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.BeginCreateOrUpdate // method. -func (client *ApplicationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationName string, parameters Application, options *ApplicationsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ApplicationsClientCreateOrUpdateResponse], error) { +func (client *ApplicationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationName string, parameters Application, options *ApplicationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[ApplicationsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ApplicationsClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ApplicationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ApplicationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new managed application. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ApplicationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, applicationName string, parameters Application, options *ApplicationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationName, parameters, options) if err != nil { @@ -112,32 +114,34 @@ func (client *ApplicationsClient) createOrUpdateCreateRequest(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) } // BeginCreateOrUpdateByID - Creates a new managed application. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // applicationID - The fully qualified ID of the managed application, including the managed application name and the managed // application resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} // parameters - Parameters supplied to the create or update a managed application. // options - ApplicationsClientBeginCreateOrUpdateByIDOptions contains the optional parameters for the ApplicationsClient.BeginCreateOrUpdateByID // method. -func (client *ApplicationsClient) BeginCreateOrUpdateByID(ctx context.Context, applicationID string, parameters Application, options *ApplicationsClientBeginCreateOrUpdateByIDOptions) (*armruntime.Poller[ApplicationsClientCreateOrUpdateByIDResponse], error) { +func (client *ApplicationsClient) BeginCreateOrUpdateByID(ctx context.Context, applicationID string, parameters Application, options *ApplicationsClientBeginCreateOrUpdateByIDOptions) (*runtime.Poller[ApplicationsClientCreateOrUpdateByIDResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdateByID(ctx, applicationID, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[ApplicationsClientCreateOrUpdateByIDResponse](resp, client.pl, nil) + return runtime.NewPoller[ApplicationsClientCreateOrUpdateByIDResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ApplicationsClientCreateOrUpdateByIDResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ApplicationsClientCreateOrUpdateByIDResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdateByID - Creates a new managed application. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ApplicationsClient) createOrUpdateByID(ctx context.Context, applicationID string, parameters Application, options *ApplicationsClientBeginCreateOrUpdateByIDOptions) (*http.Response, error) { req, err := client.createOrUpdateByIDCreateRequest(ctx, applicationID, parameters, options) if err != nil { @@ -164,30 +168,32 @@ func (client *ApplicationsClient) createOrUpdateByIDCreateRequest(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) } // BeginDelete - Deletes the managed application. // 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. // applicationName - The name of the managed application. // options - ApplicationsClientBeginDeleteOptions contains the optional parameters for the ApplicationsClient.BeginDelete // method. -func (client *ApplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationName string, options *ApplicationsClientBeginDeleteOptions) (*armruntime.Poller[ApplicationsClientDeleteResponse], error) { +func (client *ApplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationName string, options *ApplicationsClientBeginDeleteOptions) (*runtime.Poller[ApplicationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, applicationName, options) if err != nil { return nil, err } - return armruntime.NewPoller[ApplicationsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[ApplicationsClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ApplicationsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ApplicationsClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the managed application. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ApplicationsClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationName string, options *ApplicationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationName, options) if err != nil { @@ -225,31 +231,33 @@ func (client *ApplicationsClient) deleteCreateRequest(ctx context.Context, resou 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 } // BeginDeleteByID - Deletes the managed application. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // applicationID - The fully qualified ID of the managed application, including the managed application name and the managed // application resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} // options - ApplicationsClientBeginDeleteByIDOptions contains the optional parameters for the ApplicationsClient.BeginDeleteByID // method. -func (client *ApplicationsClient) BeginDeleteByID(ctx context.Context, applicationID string, options *ApplicationsClientBeginDeleteByIDOptions) (*armruntime.Poller[ApplicationsClientDeleteByIDResponse], error) { +func (client *ApplicationsClient) BeginDeleteByID(ctx context.Context, applicationID string, options *ApplicationsClientBeginDeleteByIDOptions) (*runtime.Poller[ApplicationsClientDeleteByIDResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteByID(ctx, applicationID, options) if err != nil { return nil, err } - return armruntime.NewPoller[ApplicationsClientDeleteByIDResponse](resp, client.pl, nil) + return runtime.NewPoller[ApplicationsClientDeleteByIDResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[ApplicationsClientDeleteByIDResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ApplicationsClientDeleteByIDResponse](options.ResumeToken, client.pl, nil) } } // DeleteByID - Deletes the managed application. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 func (client *ApplicationsClient) deleteByID(ctx context.Context, applicationID string, options *ApplicationsClientBeginDeleteByIDOptions) (*http.Response, error) { req, err := client.deleteByIDCreateRequest(ctx, applicationID, options) if err != nil { @@ -276,12 +284,13 @@ func (client *ApplicationsClient) deleteByIDCreateRequest(ctx context.Context, a 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 the managed application. // 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. // applicationName - The name of the managed application. // options - ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method. @@ -322,7 +331,7 @@ func (client *ApplicationsClient) getCreateRequest(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 } @@ -337,6 +346,7 @@ func (client *ApplicationsClient) getHandleResponse(resp *http.Response) (Applic // GetByID - Gets the managed application. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // applicationID - The fully qualified ID of the managed application, including the managed application name and the managed // application resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} @@ -367,7 +377,7 @@ func (client *ApplicationsClient) getByIDCreateRequest(ctx context.Context, appl 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 } @@ -382,11 +392,12 @@ func (client *ApplicationsClient) getByIDHandleResponse(resp *http.Response) (Ap // NewListByResourceGroupPager - Gets all the applications within a 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 - ApplicationsClientListByResourceGroupOptions contains the optional parameters for the ApplicationsClient.ListByResourceGroup // method. func (client *ApplicationsClient) NewListByResourceGroupPager(resourceGroupName string, options *ApplicationsClientListByResourceGroupOptions) *runtime.Pager[ApplicationsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PageProcessor[ApplicationsClientListByResourceGroupResponse]{ + return runtime.NewPager(runtime.PagingHandler[ApplicationsClientListByResourceGroupResponse]{ More: func(page ApplicationsClientListByResourceGroupResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -431,7 +442,7 @@ func (client *ApplicationsClient) listByResourceGroupCreateRequest(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 } @@ -446,10 +457,11 @@ func (client *ApplicationsClient) listByResourceGroupHandleResponse(resp *http.R // NewListBySubscriptionPager - Gets all the applications within a subscription. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // options - ApplicationsClientListBySubscriptionOptions contains the optional parameters for the ApplicationsClient.ListBySubscription // method. func (client *ApplicationsClient) NewListBySubscriptionPager(options *ApplicationsClientListBySubscriptionOptions) *runtime.Pager[ApplicationsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PageProcessor[ApplicationsClientListBySubscriptionResponse]{ + return runtime.NewPager(runtime.PagingHandler[ApplicationsClientListBySubscriptionResponse]{ More: func(page ApplicationsClientListBySubscriptionResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -490,7 +502,7 @@ func (client *ApplicationsClient) listBySubscriptionCreateRequest(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 } @@ -505,6 +517,7 @@ func (client *ApplicationsClient) listBySubscriptionHandleResponse(resp *http.Re // Update - Updates an existing managed application. The only value that can be updated via PATCH currently is the 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. // applicationName - The name of the managed application. // options - ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method. @@ -545,7 +558,7 @@ func (client *ApplicationsClient) updateCreateRequest(ctx context.Context, resou 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"} if options != nil && options.Parameters != nil { return req, runtime.MarshalAsJSON(req, *options.Parameters) } @@ -563,6 +576,7 @@ func (client *ApplicationsClient) updateHandleResponse(resp *http.Response) (App // UpdateByID - Updates an existing managed application. The only value that can be updated via PATCH currently is the tags. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2018-06-01 // applicationID - The fully qualified ID of the managed application, including the managed application name and the managed // application resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} @@ -593,7 +607,7 @@ func (client *ApplicationsClient) updateByIDCreateRequest(ctx context.Context, a 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"} if options != nil && options.Parameters != nil { return req, runtime.MarshalAsJSON(req, *options.Parameters) } diff --git a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_constants.go b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_constants.go index cfb54903a3ad..855ef389bfaa 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_constants.go +++ b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_constants.go @@ -10,7 +10,7 @@ package armmanagedapplications const ( moduleName = "armmanagedapplications" - moduleVersion = "v0.4.0" + moduleVersion = "v0.5.0" ) // ApplicationArtifactType - The managed application artifact type. diff --git a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_models_serde.go b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_models_serde.go index a9f84ecac640..2908f343880e 100644 --- a/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_models_serde.go +++ b/sdk/resourcemanager/resources/armmanagedapplications/zz_generated_models_serde.go @@ -46,14 +46,6 @@ func (a ApplicationDefinition) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type ApplicationDefinitionListResult. -func (a ApplicationDefinitionListResult) 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 ApplicationDefinitionProperties. func (a ApplicationDefinitionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -69,14 +61,6 @@ func (a ApplicationDefinitionProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type ApplicationListResult. -func (a ApplicationListResult) 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 ApplicationPatchable. func (a ApplicationPatchable) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -108,14 +92,6 @@ func (g GenericResource) MarshalJSON() ([]byte, error) { 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, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{})