diff --git a/sdk/resourcemanager/databricks/armdatabricks/CHANGELOG.md b/sdk/resourcemanager/databricks/armdatabricks/CHANGELOG.md index 763fd8f45df3..accb6a54c490 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/CHANGELOG.md +++ b/sdk/resourcemanager/databricks/armdatabricks/CHANGELOG.md @@ -1,5 +1,25 @@ # Release History +## 0.6.0 (2022-05-18) +### Breaking Changes + +- Function `*WorkspacesClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[WorkspacesClientUpdateResponse], error)` to `(*runtime.Poller[WorkspacesClientUpdateResponse], error)` +- Function `*WorkspacesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[WorkspacesClientDeleteResponse], error)` to `(*runtime.Poller[WorkspacesClientDeleteResponse], error)` +- Function `*WorkspacesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[WorkspacesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[WorkspacesClientCreateOrUpdateResponse], error)` +- Function `*PrivateEndpointConnectionsClient.BeginCreate` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientCreateResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientCreateResponse], error)` +- Function `*VNetPeeringClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[VNetPeeringClientDeleteResponse], error)` to `(*runtime.Poller[VNetPeeringClientDeleteResponse], error)` +- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` +- Function `*VNetPeeringClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[VNetPeeringClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[VNetPeeringClientCreateOrUpdateResponse], error)` +- Function `WorkspaceListResult.MarshalJSON` has been removed +- Function `OperationListResult.MarshalJSON` has been removed +- Function `OutboundEnvironmentEndpoint.MarshalJSON` has been removed +- Function `PrivateLinkResourcesList.MarshalJSON` has been removed +- Function `EndpointDependency.MarshalJSON` has been removed +- Function `ErrorInfo.MarshalJSON` has been removed +- Function `PrivateEndpointConnectionsList.MarshalJSON` has been removed +- Function `VirtualNetworkPeeringList.MarshalJSON` has been removed + + ## 0.5.0 (2022-04-15) ### Breaking Changes diff --git a/sdk/resourcemanager/databricks/armdatabricks/autorest.md b/sdk/resourcemanager/databricks/armdatabricks/autorest.md index ac4452f2e837..be0a9fa8b61a 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/autorest.md +++ b/sdk/resourcemanager/databricks/armdatabricks/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/cc26f1d28c939bbcde00a29aa8958b3eebb10cea/specification/databricks/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/cc26f1d28c939bbcde00a29aa8958b3eebb10cea/specification/databricks/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databricks/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/databricks/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.5.0 +module-version: 0.6.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/databricks/armdatabricks/go.mod b/sdk/resourcemanager/databricks/armdatabricks/go.mod index 67b62c65e664..6b802279517c 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/go.mod +++ b/sdk/resourcemanager/databricks/armdatabricks/go.mod @@ -3,19 +3,19 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/databricks/armdatab 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/databricks/armdatabricks/go.sum b/sdk/resourcemanager/databricks/armdatabricks/go.sum index 56d1c32628ae..ed5b814680ee 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/go.sum +++ b/sdk/resourcemanager/databricks/armdatabricks/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/databricks/armdatabricks/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_operations_client_test.go index 4568b835e849..ba259f14be17 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_operations_client_test.go +++ b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_operations_client_test.go @@ -32,7 +32,6 @@ func ExampleOperationsClient_NewListPager() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item diff --git a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_outboundnetworkdependenciesendpoints_client_test.go b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_outboundnetworkdependenciesendpoints_client_test.go index f45296ef8a04..a274ed2ec6ed 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_outboundnetworkdependenciesendpoints_client_test.go +++ b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_outboundnetworkdependenciesendpoints_client_test.go @@ -23,13 +23,13 @@ func ExampleOutboundNetworkDependenciesEndpointsClient_List() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewOutboundNetworkDependenciesEndpointsClient("", cred, nil) + client, err := armdatabricks.NewOutboundNetworkDependenciesEndpointsClient("11111111-1111-1111-1111-111111111111", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.List(ctx, - "", - "", + "myResourceGroup", + "myWorkspace", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) diff --git a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_privateendpointconnections_client_test.go b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_privateendpointconnections_client_test.go index 1c9dedad24ad..0592b742313c 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_privateendpointconnections_client_test.go +++ b/sdk/resourcemanager/databricks/armdatabricks/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/databricks/armdatabricks" @@ -26,18 +24,17 @@ func ExamplePrivateEndpointConnectionsClient_NewListPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armdatabricks.NewPrivateEndpointConnectionsClient("11111111-1111-1111-1111-111111111111", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("", - "", + pager := client.NewListPager("myResourceGroup", + "myWorkspace", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item @@ -53,14 +50,14 @@ func ExamplePrivateEndpointConnectionsClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armdatabricks.NewPrivateEndpointConnectionsClient("11111111-1111-1111-1111-111111111111", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "myResourceGroup", + "myWorkspace", + "myWorkspace.23456789-1111-1111-1111-111111111111", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -76,27 +73,27 @@ func ExamplePrivateEndpointConnectionsClient_BeginCreate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armdatabricks.NewPrivateEndpointConnectionsClient("11111111-1111-1111-1111-111111111111", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, - "", - "", - "", + "myResourceGroup", + "myWorkspace", + "myWorkspace.23456789-1111-1111-1111-111111111111", armdatabricks.PrivateEndpointConnection{ Properties: &armdatabricks.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armdatabricks.PrivateLinkServiceConnectionState{ - Description: to.Ptr(""), + Description: to.Ptr("Approved by databricksadmin@contoso.com"), Status: to.Ptr(armdatabricks.PrivateLinkServiceConnectionStatusApproved), }, }, }, - &armdatabricks.PrivateEndpointConnectionsClientBeginCreateOptions{ResumeToken: ""}) + nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } - res, err := poller.PollUntilDone(ctx, 30*time.Second) + res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } @@ -111,19 +108,19 @@ func ExamplePrivateEndpointConnectionsClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewPrivateEndpointConnectionsClient("", cred, nil) + client, err := armdatabricks.NewPrivateEndpointConnectionsClient("11111111-1111-1111-1111-111111111111", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdatabricks.PrivateEndpointConnectionsClientBeginDeleteOptions{ResumeToken: ""}) + "myResourceGroup", + "myWorkspace", + "myWorkspace.23456789-1111-1111-1111-111111111111", + 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/databricks/armdatabricks/ze_generated_example_privatelinkresources_client_test.go b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_privatelinkresources_client_test.go index a6834ceb9e8a..116d0488aea8 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_privatelinkresources_client_test.go +++ b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_privatelinkresources_client_test.go @@ -23,18 +23,17 @@ func ExamplePrivateLinkResourcesClient_NewListPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewPrivateLinkResourcesClient("", cred, nil) + client, err := armdatabricks.NewPrivateLinkResourcesClient("11111111-1111-1111-1111-111111111111", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListPager("", - "", + pager := client.NewListPager("myResourceGroup", + "myWorkspace", 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 := armdatabricks.NewPrivateLinkResourcesClient("", cred, nil) + client, err := armdatabricks.NewPrivateLinkResourcesClient("11111111-1111-1111-1111-111111111111", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "myResourceGroup", + "myWorkspace", + "databricks_ui_api", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) diff --git a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_vnetpeering_client_test.go b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_vnetpeering_client_test.go index bf14949394bf..5af006760cd8 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_vnetpeering_client_test.go +++ b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_vnetpeering_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/databricks/armdatabricks" @@ -26,14 +24,14 @@ func ExampleVNetPeeringClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewVNetPeeringClient("", cred, nil) + client, err := armdatabricks.NewVNetPeeringClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", - "", + "rg", + "myWorkspace", + "vNetPeering", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -49,19 +47,19 @@ func ExampleVNetPeeringClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewVNetPeeringClient("", cred, nil) + client, err := armdatabricks.NewVNetPeeringClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - "", - &armdatabricks.VNetPeeringClientBeginDeleteOptions{ResumeToken: ""}) + "rg", + "myWorkspace", + "vNetPeering", + 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) } @@ -74,30 +72,30 @@ func ExampleVNetPeeringClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewVNetPeeringClient("", cred, nil) + client, err := armdatabricks.NewVNetPeeringClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", + "rg", + "myWorkspace", + "vNetPeeringTest", armdatabricks.VirtualNetworkPeering{ Properties: &armdatabricks.VirtualNetworkPeeringPropertiesFormat{ AllowForwardedTraffic: to.Ptr(false), AllowGatewayTransit: to.Ptr(false), AllowVirtualNetworkAccess: to.Ptr(true), RemoteVirtualNetwork: &armdatabricks.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork{ - ID: to.Ptr(""), + ID: to.Ptr("/subscriptions/0140911e-1040-48da-8bc9-b99fb3dd88a6/resourceGroups/subramantest/providers/Microsoft.Network/virtualNetworks/subramanvnet"), }, UseRemoteGateways: to.Ptr(false), }, }, - &armdatabricks.VNetPeeringClientBeginCreateOrUpdateOptions{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) } @@ -112,18 +110,17 @@ func ExampleVNetPeeringClient_NewListByWorkspacePager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewVNetPeeringClient("", cred, nil) + client, err := armdatabricks.NewVNetPeeringClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByWorkspacePager("", - "", + pager := client.NewListByWorkspacePager("rg", + "myWorkspace", 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/databricks/armdatabricks/ze_generated_example_workspaces_client_test.go b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_workspaces_client_test.go index 9d4443b1641a..a3233ba64847 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_workspaces_client_test.go +++ b/sdk/resourcemanager/databricks/armdatabricks/ze_generated_example_workspaces_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/databricks/armdatabricks" @@ -26,13 +24,13 @@ func ExampleWorkspacesClient_Get() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewWorkspacesClient("", cred, nil) + client, err := armdatabricks.NewWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, - "", - "", + "rg", + "myWorkspace", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) @@ -48,18 +46,18 @@ func ExampleWorkspacesClient_BeginDelete() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewWorkspacesClient("", cred, nil) + client, err := armdatabricks.NewWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, - "", - "", - &armdatabricks.WorkspacesClientBeginDeleteOptions{ResumeToken: ""}) + "rg", + "myWorkspace", + 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) } @@ -72,17 +70,17 @@ func ExampleWorkspacesClient_BeginCreateOrUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewWorkspacesClient("", cred, nil) + client, err := armdatabricks.NewWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", + "rg", + "myWorkspace", armdatabricks.Workspace{ - Location: to.Ptr(""), + Location: to.Ptr("westus"), Properties: &armdatabricks.WorkspaceProperties{ - ManagedResourceGroupID: to.Ptr(""), + ManagedResourceGroupID: to.Ptr("/subscriptions/subid/resourceGroups/myManagedRG"), Parameters: &armdatabricks.WorkspaceCustomParameters{ PrepareEncryption: &armdatabricks.WorkspaceCustomBooleanParameter{ Value: to.Ptr(true), @@ -90,11 +88,11 @@ func ExampleWorkspacesClient_BeginCreateOrUpdate() { }, }, }, - &armdatabricks.WorkspacesClientBeginCreateOrUpdateOptions{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) } @@ -109,23 +107,23 @@ func ExampleWorkspacesClient_BeginUpdate() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewWorkspacesClient("", cred, nil) + client, err := armdatabricks.NewWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, - "", - "", + "rg", + "myWorkspace", armdatabricks.WorkspaceUpdate{ Tags: map[string]*string{ "mytag1": to.Ptr("myvalue1"), }, }, - &armdatabricks.WorkspacesClientBeginUpdateOptions{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) } @@ -140,17 +138,16 @@ func ExampleWorkspacesClient_NewListByResourceGroupPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewWorkspacesClient("", cred, nil) + client, err := armdatabricks.NewWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } - pager := client.NewListByResourceGroupPager("", + pager := client.NewListByResourceGroupPager("rg", 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 @@ -166,7 +163,7 @@ func ExampleWorkspacesClient_NewListBySubscriptionPager() { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() - client, err := armdatabricks.NewWorkspacesClient("", cred, nil) + client, err := armdatabricks.NewWorkspacesClient("subid", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } @@ -175,7 +172,6 @@ func ExampleWorkspacesClient_NewListBySubscriptionPager() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) - return } for _, v := range nextResult.Value { // TODO: use page item diff --git a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_constants.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_constants.go index 6b25c85fbda1..b73b978a63c7 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_constants.go +++ b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_constants.go @@ -10,7 +10,7 @@ package armdatabricks const ( moduleName = "armdatabricks" - moduleVersion = "v0.5.0" + moduleVersion = "v0.6.0" ) // CreatedByType - The type of identity that created the resource. diff --git a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_models_serde.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_models_serde.go index 264e98469b4d..d43ac37ffda9 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_models_serde.go +++ b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_models_serde.go @@ -10,6 +10,7 @@ package armdatabricks import ( "encoding/json" + "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "reflect" ) @@ -21,24 +22,6 @@ func (a AddressSpace) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type EndpointDependency. -func (e EndpointDependency) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "domainName", e.DomainName) - populate(objectMap, "endpointDetails", e.EndpointDetails) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorInfo. -func (e ErrorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "innererror", e.Innererror) - populate(objectMap, "message", e.Message) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type GroupIDInformationProperties. func (g GroupIDInformationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -48,38 +31,6 @@ func (g GroupIDInformationProperties) 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 OutboundEnvironmentEndpoint. -func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "category", o.Category) - populate(objectMap, "endpoints", o.Endpoints) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionsList. -func (p PrivateEndpointConnectionsList) 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 PrivateLinkResourcesList. -func (p PrivateLinkResourcesList) 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 SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -96,32 +47,32 @@ func (s SystemData) MarshalJSON() ([]byte, error) { func (s *SystemData) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { case "createdAt": - err = unpopulateTimeRFC3339(val, &s.CreatedAt) + err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, &s.CreatedBy) + err = unpopulate(val, "CreatedBy", &s.CreatedBy) delete(rawMsg, key) case "createdByType": - err = unpopulate(val, &s.CreatedByType) + err = unpopulate(val, "CreatedByType", &s.CreatedByType) delete(rawMsg, key) case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, &s.LastModifiedAt) + err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) delete(rawMsg, key) case "lastModifiedBy": - err = unpopulate(val, &s.LastModifiedBy) + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) delete(rawMsg, key) case "lastModifiedByType": - err = unpopulate(val, &s.LastModifiedByType) + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil @@ -138,14 +89,6 @@ func (t TrackedResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringList. -func (v VirtualNetworkPeeringList) 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 Workspace. func (w Workspace) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -160,14 +103,6 @@ func (w Workspace) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// MarshalJSON implements the json.Marshaller interface for type WorkspaceListResult. -func (w WorkspaceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", w.NextLink) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - // MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -193,59 +128,59 @@ func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { func (w *WorkspaceProperties) 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 "authorizations": - err = unpopulate(val, &w.Authorizations) + err = unpopulate(val, "Authorizations", &w.Authorizations) delete(rawMsg, key) case "createdBy": - err = unpopulate(val, &w.CreatedBy) + err = unpopulate(val, "CreatedBy", &w.CreatedBy) delete(rawMsg, key) case "createdDateTime": - err = unpopulateTimeRFC3339(val, &w.CreatedDateTime) + err = unpopulateTimeRFC3339(val, "CreatedDateTime", &w.CreatedDateTime) delete(rawMsg, key) case "encryption": - err = unpopulate(val, &w.Encryption) + err = unpopulate(val, "Encryption", &w.Encryption) delete(rawMsg, key) case "managedResourceGroupId": - err = unpopulate(val, &w.ManagedResourceGroupID) + err = unpopulate(val, "ManagedResourceGroupID", &w.ManagedResourceGroupID) delete(rawMsg, key) case "parameters": - err = unpopulate(val, &w.Parameters) + err = unpopulate(val, "Parameters", &w.Parameters) delete(rawMsg, key) case "privateEndpointConnections": - err = unpopulate(val, &w.PrivateEndpointConnections) + err = unpopulate(val, "PrivateEndpointConnections", &w.PrivateEndpointConnections) delete(rawMsg, key) case "provisioningState": - err = unpopulate(val, &w.ProvisioningState) + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) delete(rawMsg, key) case "publicNetworkAccess": - err = unpopulate(val, &w.PublicNetworkAccess) + err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) delete(rawMsg, key) case "requiredNsgRules": - err = unpopulate(val, &w.RequiredNsgRules) + err = unpopulate(val, "RequiredNsgRules", &w.RequiredNsgRules) delete(rawMsg, key) case "storageAccountIdentity": - err = unpopulate(val, &w.StorageAccountIdentity) + err = unpopulate(val, "StorageAccountIdentity", &w.StorageAccountIdentity) delete(rawMsg, key) case "uiDefinitionUri": - err = unpopulate(val, &w.UIDefinitionURI) + err = unpopulate(val, "UIDefinitionURI", &w.UIDefinitionURI) delete(rawMsg, key) case "updatedBy": - err = unpopulate(val, &w.UpdatedBy) + err = unpopulate(val, "UpdatedBy", &w.UpdatedBy) delete(rawMsg, key) case "workspaceId": - err = unpopulate(val, &w.WorkspaceID) + err = unpopulate(val, "WorkspaceID", &w.WorkspaceID) delete(rawMsg, key) case "workspaceUrl": - err = unpopulate(val, &w.WorkspaceURL) + err = unpopulate(val, "WorkspaceURL", &w.WorkspaceURL) delete(rawMsg, key) } if err != nil { - return err + return fmt.Errorf("unmarshalling type %T: %v", w, err) } } return nil @@ -268,9 +203,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/databricks/armdatabricks/zz_generated_operations_client.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_operations_client.go index 1d03b491c967..3964d7474d4d 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_operations_client.go +++ b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_operations_client.go @@ -33,7 +33,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -50,9 +50,10 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available RP operations. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[OperationsClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -89,7 +90,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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/databricks/armdatabricks/zz_generated_outboundnetworkdependenciesendpoints_client.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_outboundnetworkdependenciesendpoints_client.go index 02fdbf824f91..fe3373d5e315 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_outboundnetworkdependenciesendpoints_client.go +++ b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_outboundnetworkdependenciesendpoints_client.go @@ -38,7 +38,7 @@ func NewOutboundNetworkDependenciesEndpointsClient(subscriptionID string, creden 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 } @@ -58,6 +58,7 @@ func NewOutboundNetworkDependenciesEndpointsClient(subscriptionID string, creden // outbound access with these endpoints. For more information, see // https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/udr // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - OutboundNetworkDependenciesEndpointsClientListOptions contains the optional parameters for the OutboundNetworkDependenciesEndpointsClient.List @@ -99,7 +100,7 @@ func (client *OutboundNetworkDependenciesEndpointsClient) listCreateRequest(ctx reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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/databricks/armdatabricks/zz_generated_privateendpointconnections_client.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_privateendpointconnections_client.go index 31e3fa370d41..c54f4e5b8cae 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_privateendpointconnections_client.go +++ b/sdk/resourcemanager/databricks/armdatabricks/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,26 +56,28 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginCreate - Update the status of a private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // privateEndpointConnectionName - The name of the private endpoint connection // privateEndpointConnection - The private endpoint connection with updated properties // options - PrivateEndpointConnectionsClientBeginCreateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreate // method. -func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOptions) (*armruntime.Poller[PrivateEndpointConnectionsClientCreateResponse], error) { +func (client *PrivateEndpointConnectionsClient) BeginCreate(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, privateEndpointConnection, options) if err != nil { return nil, err } - return armruntime.NewPoller[PrivateEndpointConnectionsClientCreateResponse](resp, client.pl, nil) + return runtime.NewPoller[PrivateEndpointConnectionsClientCreateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateResponse](options.ResumeToken, client.pl, nil) } } // Create - Update the status of a private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview func (client *PrivateEndpointConnectionsClient) create(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, privateEndpointConnection, options) if err != nil { @@ -117,31 +119,33 @@ func (client *PrivateEndpointConnectionsClient) createCreateRequest(ctx context. reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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, privateEndpointConnection) } // BeginDelete - Remove private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // privateEndpointConnectionName - The name of the private endpoint connection // options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete // method. -func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { +func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, 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 - Remove private endpoint connection with the specified name // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) if err != nil { @@ -183,12 +187,13 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } // Get - Get a private endpoint connection properties for a workspace // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // privateEndpointConnectionName - The name of the private endpoint connection @@ -235,7 +240,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -250,12 +255,13 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListPager - List private endpoint connections of the workspace // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List // method. func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, workspaceName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[PrivateEndpointConnectionsClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListResponse]{ More: func(page PrivateEndpointConnectionsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -304,7 +310,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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/databricks/armdatabricks/zz_generated_privatelinkresources_client.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_privatelinkresources_client.go index c36a5e380f6f..cd0ec8a91a6c 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_privatelinkresources_client.go +++ b/sdk/resourcemanager/databricks/armdatabricks/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 - Get the specified private link resource for the given group id (sub-resource) // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // groupID - 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", "2021-04-01-preview") 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) // NewListPager - List private link resources for a given workspace // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List // method. func (client *PrivateLinkResourcesClient) NewListPager(resourceGroupName string, workspaceName string, options *PrivateLinkResourcesClientListOptions) *runtime.Pager[PrivateLinkResourcesClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[PrivateLinkResourcesClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListResponse]{ More: func(page PrivateLinkResourcesClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -171,7 +173,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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/databricks/armdatabricks/zz_generated_time_rfc3339.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_time_rfc3339.go index a9ab44a33eee..ef89f9c9a174 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_time_rfc3339.go +++ b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_time_rfc3339.go @@ -10,6 +10,7 @@ package armdatabricks 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/databricks/armdatabricks/zz_generated_vnetpeering_client.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_vnetpeering_client.go index 4b1a1904664c..672422a0d324 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_vnetpeering_client.go +++ b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_vnetpeering_client.go @@ -38,7 +38,7 @@ func NewVNetPeeringClient(subscriptionID string, credential azcore.TokenCredenti 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 NewVNetPeeringClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Creates vNet Peering for workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // peeringName - The name of the workspace vNet peering. // virtualNetworkPeeringParameters - Parameters supplied to the create workspace vNet Peering. // options - VNetPeeringClientBeginCreateOrUpdateOptions contains the optional parameters for the VNetPeeringClient.BeginCreateOrUpdate // method. -func (client *VNetPeeringClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, peeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VNetPeeringClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VNetPeeringClientCreateOrUpdateResponse], error) { +func (client *VNetPeeringClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, peeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VNetPeeringClientBeginCreateOrUpdateOptions) (*runtime.Poller[VNetPeeringClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[VNetPeeringClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[VNetPeeringClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[VNetPeeringClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[VNetPeeringClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates vNet Peering for workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview func (client *VNetPeeringClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, peeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VNetPeeringClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, peeringName, virtualNetworkPeeringParameters, options) if err != nil { @@ -117,30 +119,32 @@ func (client *VNetPeeringClient) createOrUpdateCreateRequest(ctx context.Context reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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, virtualNetworkPeeringParameters) } // BeginDelete - Deletes the workspace vNetPeering. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // peeringName - The name of the workspace vNet peering. // options - VNetPeeringClientBeginDeleteOptions contains the optional parameters for the VNetPeeringClient.BeginDelete method. -func (client *VNetPeeringClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, peeringName string, options *VNetPeeringClientBeginDeleteOptions) (*armruntime.Poller[VNetPeeringClientDeleteResponse], error) { +func (client *VNetPeeringClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, peeringName string, options *VNetPeeringClientBeginDeleteOptions) (*runtime.Poller[VNetPeeringClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, peeringName, options) if err != nil { return nil, err } - return armruntime.NewPoller[VNetPeeringClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[VNetPeeringClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[VNetPeeringClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[VNetPeeringClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the workspace vNetPeering. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview func (client *VNetPeeringClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, peeringName string, options *VNetPeeringClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, peeringName, options) if err != nil { @@ -182,12 +186,13 @@ func (client *VNetPeeringClient) deleteCreateRequest(ctx context.Context, resour reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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 workspace vNet Peering. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // peeringName - The name of the workspace vNet peering. @@ -233,7 +238,7 @@ func (client *VNetPeeringClient) getCreateRequest(ctx context.Context, resourceG reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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 *VNetPeeringClient) getHandleResponse(resp *http.Response) (VNetPee // NewListByWorkspacePager - Lists the workspace vNet Peerings. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - VNetPeeringClientListByWorkspaceOptions contains the optional parameters for the VNetPeeringClient.ListByWorkspace // method. func (client *VNetPeeringClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *VNetPeeringClientListByWorkspaceOptions) *runtime.Pager[VNetPeeringClientListByWorkspaceResponse] { - return runtime.NewPager(runtime.PageProcessor[VNetPeeringClientListByWorkspaceResponse]{ + return runtime.NewPager(runtime.PagingHandler[VNetPeeringClientListByWorkspaceResponse]{ More: func(page VNetPeeringClientListByWorkspaceResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -302,7 +308,7 @@ func (client *VNetPeeringClient) listByWorkspaceCreateRequest(ctx context.Contex reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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/databricks/armdatabricks/zz_generated_workspaces_client.go b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_workspaces_client.go index a4d19c2c81e9..001c386e8b05 100644 --- a/sdk/resourcemanager/databricks/armdatabricks/zz_generated_workspaces_client.go +++ b/sdk/resourcemanager/databricks/armdatabricks/zz_generated_workspaces_client.go @@ -38,7 +38,7 @@ func NewWorkspacesClient(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,25 +56,27 @@ func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates a new workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // parameters - Parameters supplied to the create or update a workspace. // options - WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate // method. -func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[WorkspacesClientCreateOrUpdateResponse], error) { +func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspacesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[WorkspacesClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[WorkspacesClientCreateOrUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[WorkspacesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[WorkspacesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } } // CreateOrUpdate - Creates a new workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, parameters, options) if err != nil { @@ -112,29 +114,31 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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 workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. -func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*armruntime.Poller[WorkspacesClientDeleteResponse], error) { +func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*runtime.Poller[WorkspacesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, options) if err != nil { return nil, err } - return armruntime.NewPoller[WorkspacesClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[WorkspacesClientDeleteResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[WorkspacesClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[WorkspacesClientDeleteResponse](options.ResumeToken, client.pl, nil) } } // Delete - Deletes the workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -172,12 +176,13 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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 workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. @@ -218,7 +223,7 @@ func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGr reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -233,11 +238,12 @@ func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (Workspac // NewListByResourceGroupPager - Gets all the workspaces within a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup // method. func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PageProcessor[WorkspacesClientListByResourceGroupResponse]{ + return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListByResourceGroupResponse]{ More: func(page WorkspacesClientListByResourceGroupResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -282,7 +288,7 @@ func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Con reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -297,10 +303,11 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res // NewListBySubscriptionPager - Gets all the workspaces within a subscription. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription // method. func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PageProcessor[WorkspacesClientListBySubscriptionResponse]{ + return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListBySubscriptionResponse]{ More: func(page WorkspacesClientListBySubscriptionResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -341,7 +348,7 @@ func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Cont reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -356,24 +363,26 @@ func (client *WorkspacesClient) listBySubscriptionHandleResponse(resp *http.Resp // BeginUpdate - Updates a workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - The name of the workspace. // parameters - The update to the workspace. // options - WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method. -func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdate, options *WorkspacesClientBeginUpdateOptions) (*armruntime.Poller[WorkspacesClientUpdateResponse], error) { +func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdate, options *WorkspacesClientBeginUpdateOptions) (*runtime.Poller[WorkspacesClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, parameters, options) if err != nil { return nil, err } - return armruntime.NewPoller[WorkspacesClientUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[WorkspacesClientUpdateResponse](resp, client.pl, nil) } else { - return armruntime.NewPollerFromResumeToken[WorkspacesClientUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[WorkspacesClientUpdateResponse](options.ResumeToken, client.pl, nil) } } // Update - Updates a workspace. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2021-04-01-preview func (client *WorkspacesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdate, options *WorkspacesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, parameters, options) if err != nil { @@ -411,6 +420,6 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2021-04-01-preview") 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) }