From b7e9c8a6c20102b5321877ef1fe3893a27ad7098 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 13 Sep 2022 03:13:21 +0000 Subject: [PATCH] CodeGen from PR 20641 in Azure/azure-rest-api-specs Remove unused Microsoft.MobileNetwork 2022-01-01-preview API (#20641) --- .../armmobilenetwork/CHANGELOG.md | 4 + .../attacheddatanetworks_client.go | 1 - ...ttacheddatanetworks_client_example_test.go | 184 ---------------- .../armmobilenetwork/autorest.md | 6 +- .../armmobilenetwork/constants.go | 2 +- .../armmobilenetwork/datanetworks_client.go | 1 - .../datanetworks_client_example_test.go | 154 -------------- .../mobilenetwork/armmobilenetwork/go.mod | 14 +- .../mobilenetwork/armmobilenetwork/go.sum | 24 +-- .../armmobilenetwork/mobilenetworks_client.go | 2 - .../mobilenetworks_client_example_test.go | 176 ---------------- .../armmobilenetwork/operations_client.go | 1 - .../operations_client_example_test.go | 41 ---- .../packetcorecontrolplanes_client.go | 2 - ...etcorecontrolplanes_client_example_test.go | 198 ------------------ .../packetcorecontrolplaneversions_client.go | 1 - ...ontrolplaneversions_client_example_test.go | 62 ------ .../packetcoredataplanes_client.go | 1 - ...acketcoredataplanes_client_example_test.go | 156 -------------- .../armmobilenetwork/services_client.go | 1 - .../services_client_example_test.go | 190 ----------------- .../armmobilenetwork/simgroups_client.go | 2 - .../simgroups_client_example_test.go | 178 ---------------- .../armmobilenetwork/simpolicies_client.go | 1 - .../simpolicies_client_example_test.go | 190 ----------------- .../armmobilenetwork/sims_client.go | 1 - .../sims_client_example_test.go | 143 ------------- .../armmobilenetwork/sites_client.go | 1 - .../sites_client_example_test.go | 157 -------------- .../armmobilenetwork/slices_client.go | 1 - .../slices_client_example_test.go | 158 -------------- 31 files changed, 14 insertions(+), 2039 deletions(-) delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client_example_test.go delete mode 100644 sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client_example_test.go diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md index c91d21202a49..f66fd06d4cde 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 0.6.1 (2022-09-13) +### Other Changes + + ## 0.6.0 (2022-07-21) ### Breaking Changes diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go index 6193e889db57..064372fd1b11 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go @@ -274,7 +274,6 @@ func (client *AttachedDataNetworksClient) getHandleResponse(resp *http.Response) } // NewListByPacketCoreDataPlanePager - Gets all the attached data networks associated with a packet core data plane. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // packetCoreControlPlaneName - The name of the packet core control plane. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client_example_test.go deleted file mode 100644 index 5ceeefe62457..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client_example_test.go +++ /dev/null @@ -1,184 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkDelete.json -func ExampleAttachedDataNetworksClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewAttachedDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "TestPacketCoreCP", - "TestPacketCoreDP", - "TestAttachedDataNetwork", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkGet.json -func ExampleAttachedDataNetworksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewAttachedDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "TestPacketCoreCP", - "TestPacketCoreDP", - "TestAttachedDataNetwork", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkCreate.json -func ExampleAttachedDataNetworksClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewAttachedDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "TestPacketCoreCP", - "TestPacketCoreDP", - "TestAttachedDataNetwork", - armmobilenetwork.AttachedDataNetwork{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.AttachedDataNetworkPropertiesFormat{ - DNSAddresses: []*string{ - to.Ptr("1.1.1.1")}, - NaptConfiguration: &armmobilenetwork.NaptConfiguration{ - Enabled: to.Ptr(armmobilenetwork.NaptEnabledEnabled), - PinholeLimits: to.Ptr[int32](65536), - PinholeTimeouts: &armmobilenetwork.PinholeTimeouts{ - Icmp: to.Ptr[int32](30), - TCP: to.Ptr[int32](180), - UDP: to.Ptr[int32](30), - }, - PortRange: &armmobilenetwork.PortRange{ - MaxPort: to.Ptr[int32](49999), - MinPort: to.Ptr[int32](1024), - }, - PortReuseHoldTime: &armmobilenetwork.PortReuseHoldTimes{ - TCP: to.Ptr[int32](120), - UDP: to.Ptr[int32](60), - }, - }, - UserEquipmentAddressPoolPrefix: []*string{ - to.Ptr("2.2.0.0/16")}, - UserEquipmentStaticAddressPoolPrefix: []*string{ - to.Ptr("2.4.0.0/16")}, - UserPlaneDataInterface: &armmobilenetwork.InterfaceProperties{ - Name: to.Ptr("N6"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkUpdateTags.json -func ExampleAttachedDataNetworksClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewAttachedDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "TestPacketCoreCP", - "TestPacketCoreDP", - "TestAttachedDataNetwork", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/AttachedDataNetworkListByPacketCoreDataPlane.json -func ExampleAttachedDataNetworksClient_NewListByPacketCoreDataPlanePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewAttachedDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByPacketCoreDataPlanePager("rg1", - "TestPacketCoreCP", - "TestPacketCoreDP", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/autorest.md b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/autorest.md index 6a637ff04120..9462135d5030 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/autorest.md +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/f705a46c74af9e4c096556e914d9a45c01c47b5e/specification/mobilenetwork/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/f705a46c74af9e4c096556e914d9a45c01c47b5e/specification/mobilenetwork/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/mobilenetwork/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/mobilenetwork/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.6.0 +module-version: 0.6.1 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go index 0d511c819605..afb7901710f2 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go @@ -11,7 +11,7 @@ package armmobilenetwork const ( moduleName = "armmobilenetwork" - moduleVersion = "v0.6.0" + moduleVersion = "v0.6.1" ) // BillingSKU - The SKU of the packet core control plane resource. The SKU list may change over time when a new SKU gets added diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go index c2cce481d71b..c300a6a62480 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go @@ -258,7 +258,6 @@ func (client *DataNetworksClient) getHandleResponse(resp *http.Response) (DataNe } // NewListByMobileNetworkPager - Lists all data networks in the mobile network. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // mobileNetworkName - The name of the mobile network. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client_example_test.go deleted file mode 100644 index e1c18bc17efd..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client_example_test.go +++ /dev/null @@ -1,154 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkDelete.json -func ExampleDataNetworksClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "testMobileNetwork", - "testDataNetwork", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkGet.json -func ExampleDataNetworksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "testMobileNetwork", - "testDataNetwork", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkCreate.json -func ExampleDataNetworksClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testMobileNetwork", - "testDataNetwork", - armmobilenetwork.DataNetwork{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.DataNetworkPropertiesFormat{ - Description: to.Ptr("myFavouriteDataNetwork"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkUpdateTags.json -func ExampleDataNetworksClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "testMobileNetwork", - "testDataNetwork", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/DataNetworkListByMobileNetwork.json -func ExampleDataNetworksClient_NewListByMobileNetworkPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewDataNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByMobileNetworkPager("rg1", - "testMobileNetwork", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod index ac4049365c8b..94a3b2231155 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mobilenetwork/armmo go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 // 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-20220511200225-c6db032c6c88 // indirect + github.com/davecgh/go-spew v1.1.1 // 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 + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.sum b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.sum index 8828b17b1853..3afb578030a5 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.sum +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.sum @@ -1,33 +1,15 @@ 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.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= 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.5.1 h1:BWe8a+f/t+7KY7zH2mqygeUD0t8hNFXe08p1Pb3/jKE= -github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= 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/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/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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -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-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= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go index 40cd8f603fbb..0f048f0f17e5 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go @@ -243,7 +243,6 @@ func (client *MobileNetworksClient) getHandleResponse(resp *http.Response) (Mobi } // NewListByResourceGroupPager - Lists all the mobile networks in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // options - MobileNetworksClientListByResourceGroupOptions contains the optional parameters for the MobileNetworksClient.ListByResourceGroup @@ -308,7 +307,6 @@ func (client *MobileNetworksClient) listByResourceGroupHandleResponse(resp *http } // NewListBySubscriptionPager - Lists all the mobile networks in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // options - MobileNetworksClientListBySubscriptionOptions contains the optional parameters for the MobileNetworksClient.ListBySubscription // method. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client_example_test.go deleted file mode 100644 index 7b2436198a87..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client_example_test.go +++ /dev/null @@ -1,176 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkDelete.json -func ExampleMobileNetworksClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewMobileNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "testMobileNetwork", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkGet.json -func ExampleMobileNetworksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewMobileNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "testMobileNetwork", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkCreate.json -func ExampleMobileNetworksClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewMobileNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testMobileNetwork", - armmobilenetwork.MobileNetwork{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.PropertiesFormat{ - PublicLandMobileNetworkIdentifier: &armmobilenetwork.PlmnID{ - Mcc: to.Ptr("001"), - Mnc: to.Ptr("01"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkUpdateTags.json -func ExampleMobileNetworksClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewMobileNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "testMobileNetwork", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkListBySubscription.json -func ExampleMobileNetworksClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewMobileNetworksClient("subid", 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) - } - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/MobileNetworkListByResourceGroup.json -func ExampleMobileNetworksClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewMobileNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go index 569f08bfd184..eb4f1ff1e5d6 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go @@ -50,7 +50,6 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO } // NewListPager - Gets a list of the operations. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client_example_test.go deleted file mode 100644 index 4a5996d79753..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client_example_test.go +++ /dev/null @@ -1,41 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/OperationList.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go index 7f26705ccfc3..8ec43e3aeffc 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go @@ -244,7 +244,6 @@ func (client *PacketCoreControlPlanesClient) getHandleResponse(resp *http.Respon } // NewListByResourceGroupPager - Lists all the packet core control planes in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // options - PacketCoreControlPlanesClientListByResourceGroupOptions contains the optional parameters for the PacketCoreControlPlanesClient.ListByResourceGroup @@ -309,7 +308,6 @@ func (client *PacketCoreControlPlanesClient) listByResourceGroupHandleResponse(r } // NewListBySubscriptionPager - Lists all the packet core control planes in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // options - PacketCoreControlPlanesClientListBySubscriptionOptions contains the optional parameters for the PacketCoreControlPlanesClient.ListBySubscription // method. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client_example_test.go deleted file mode 100644 index 3c36a04766b8..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client_example_test.go +++ /dev/null @@ -1,198 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneDelete.json -func ExamplePacketCoreControlPlanesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreControlPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "TestPacketCoreCP", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneGet.json -func ExamplePacketCoreControlPlanesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreControlPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "TestPacketCoreCP", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneCreate.json -func ExamplePacketCoreControlPlanesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreControlPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "TestPacketCoreCP", - armmobilenetwork.PacketCoreControlPlane{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.PacketCoreControlPlanePropertiesFormat{ - ControlPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - Name: to.Ptr("N2"), - }, - CoreNetworkTechnology: to.Ptr(armmobilenetwork.CoreNetworkTypeFiveGC), - LocalDiagnosticsAccess: &armmobilenetwork.LocalDiagnosticsAccessConfiguration{ - HTTPSServerCertificate: &armmobilenetwork.KeyVaultCertificate{ - CertificateURL: to.Ptr("https://contosovault.vault.azure.net/certificates/ingress"), - }, - }, - MobileNetwork: &armmobilenetwork.ResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - }, - Platform: &armmobilenetwork.PlatformConfiguration{ - Type: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - AzureStackEdgeDevice: &armmobilenetwork.AzureStackEdgeDeviceResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - }, - ConnectedCluster: &armmobilenetwork.ConnectedClusterResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster"), - }, - CustomLocation: &armmobilenetwork.CustomLocationResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"), - }, - }, - SKU: to.Ptr(armmobilenetwork.BillingSKU("testSku")), - Version: to.Ptr("0.2.0"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneUpdateTags.json -func ExamplePacketCoreControlPlanesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreControlPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "TestPacketCoreCP", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListBySubscription.json -func ExamplePacketCoreControlPlanesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreControlPlanesClient("subid", 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) - } - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneListByResourceGroup.json -func ExamplePacketCoreControlPlanesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreControlPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go index 9b237a40bda0..337fd13a0ba4 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go @@ -101,7 +101,6 @@ func (client *PacketCoreControlPlaneVersionsClient) getHandleResponse(resp *http } // NewListByResourceGroupPager - Lists all supported packet core control planes versions. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // options - PacketCoreControlPlaneVersionsClientListByResourceGroupOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.ListByResourceGroup // method. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client_example_test.go deleted file mode 100644 index 8bede0bccd6b..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client_example_test.go +++ /dev/null @@ -1,62 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionGet.json -func ExamplePacketCoreControlPlaneVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreControlPlaneVersionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "PMN-4-11-1", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreControlPlaneVersionListByResourceGroup.json -func ExamplePacketCoreControlPlaneVersionsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreControlPlaneVersionsClient(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) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go index 8e9678c273fb..c34b3edab2e1 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go @@ -259,7 +259,6 @@ func (client *PacketCoreDataPlanesClient) getHandleResponse(resp *http.Response) } // NewListByPacketCoreControlPlanePager - Lists all the packet core data planes associated with a packet core control plane. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // packetCoreControlPlaneName - The name of the packet core control plane. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client_example_test.go deleted file mode 100644 index a1657aa133f4..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client_example_test.go +++ /dev/null @@ -1,156 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneDelete.json -func ExamplePacketCoreDataPlanesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreDataPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "testPacketCoreCP", - "testPacketCoreDP", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneGet.json -func ExamplePacketCoreDataPlanesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreDataPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "testPacketCoreCP", - "testPacketCoreDP", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneCreate.json -func ExamplePacketCoreDataPlanesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreDataPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testPacketCoreCP", - "testPacketCoreDP", - armmobilenetwork.PacketCoreDataPlane{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.PacketCoreDataPlanePropertiesFormat{ - UserPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - Name: to.Ptr("N3"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneUpdateTags.json -func ExamplePacketCoreDataPlanesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreDataPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "testPacketCoreCP", - "testPacketCoreDP", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json -func ExamplePacketCoreDataPlanesClient_NewListByPacketCoreControlPlanePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewPacketCoreDataPlanesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByPacketCoreControlPlanePager("rg1", - "testPacketCoreCP", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go index 0688a5a449b2..d9ce09326c60 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go @@ -257,7 +257,6 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl } // NewListByMobileNetworkPager - Gets all the services in a mobile network. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // mobileNetworkName - The name of the mobile network. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client_example_test.go deleted file mode 100644 index c59e54d8f053..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client_example_test.go +++ /dev/null @@ -1,190 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceDelete.json -func ExampleServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "testMobileNetwork", - "TestService", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceGet.json -func ExampleServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "testMobileNetwork", - "TestService", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceCreate.json -func ExampleServicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testMobileNetwork", - "TestService", - armmobilenetwork.Service{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.ServicePropertiesFormat{ - PccRules: []*armmobilenetwork.PccRuleConfiguration{ - { - RuleName: to.Ptr("default-rule"), - RulePrecedence: to.Ptr[int32](255), - RuleQosPolicy: &armmobilenetwork.PccRuleQosPolicy{ - FiveQi: to.Ptr[int32](9), - AllocationAndRetentionPriorityLevel: to.Ptr[int32](9), - MaximumBitRate: &armmobilenetwork.Ambr{ - Downlink: to.Ptr("1 Gbps"), - Uplink: to.Ptr("500 Mbps"), - }, - PreemptionCapability: to.Ptr(armmobilenetwork.PreemptionCapabilityNotPreempt), - PreemptionVulnerability: to.Ptr(armmobilenetwork.PreemptionVulnerabilityPreemptable), - }, - ServiceDataFlowTemplates: []*armmobilenetwork.ServiceDataFlowTemplate{ - { - Direction: to.Ptr(armmobilenetwork.SdfDirectionUplink), - Ports: []*string{}, - RemoteIPList: []*string{ - to.Ptr("10.3.4.0/24")}, - TemplateName: to.Ptr("IP-to-server"), - Protocol: []*string{ - to.Ptr("ip")}, - }}, - TrafficControl: to.Ptr(armmobilenetwork.TrafficControlPermissionEnabled), - }}, - ServicePrecedence: to.Ptr[int32](255), - ServiceQosPolicy: &armmobilenetwork.QosPolicy{ - FiveQi: to.Ptr[int32](9), - AllocationAndRetentionPriorityLevel: to.Ptr[int32](9), - MaximumBitRate: &armmobilenetwork.Ambr{ - Downlink: to.Ptr("1 Gbps"), - Uplink: to.Ptr("500 Mbps"), - }, - PreemptionCapability: to.Ptr(armmobilenetwork.PreemptionCapabilityNotPreempt), - PreemptionVulnerability: to.Ptr(armmobilenetwork.PreemptionVulnerabilityPreemptable), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceUpdateTags.json -func ExampleServicesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "testMobileNetwork", - "TestService", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/ServiceListByMobileNetwork.json -func ExampleServicesClient_NewListByMobileNetworkPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByMobileNetworkPager("testResourceGroupName", - "testMobileNetwork", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go index 2310a957502d..f5ae3ba36f9d 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go @@ -242,7 +242,6 @@ func (client *SimGroupsClient) getHandleResponse(resp *http.Response) (SimGroups } // NewListByResourceGroupPager - Gets all the SIM groups in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // options - SimGroupsClientListByResourceGroupOptions contains the optional parameters for the SimGroupsClient.ListByResourceGroup @@ -307,7 +306,6 @@ func (client *SimGroupsClient) listByResourceGroupHandleResponse(resp *http.Resp } // NewListBySubscriptionPager - Gets all the SIM groups in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // options - SimGroupsClientListBySubscriptionOptions contains the optional parameters for the SimGroupsClient.ListBySubscription // method. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client_example_test.go deleted file mode 100644 index 7e460b541330..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client_example_test.go +++ /dev/null @@ -1,178 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupDelete.json -func ExampleSimGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testResourceGroupName", - "testSimGroup", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupGet.json -func ExampleSimGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testResourceGroupName", - "testSimGroupName", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupCreate.json -func ExampleSimGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testSimGroup", - armmobilenetwork.SimGroup{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.SimGroupPropertiesFormat{ - EncryptionKey: &armmobilenetwork.KeyVaultKey{ - KeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/azureKey"), - }, - MobileNetwork: &armmobilenetwork.ResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupUpdateTags.json -func ExampleSimGroupsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "testSimGroup", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupListBySubscription.json -func ExampleSimGroupsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimGroupsClient("subid", 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) - } - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGroupListByResourceGroup.json -func ExampleSimGroupsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go index b98e73f8a994..31370705aa8a 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go @@ -257,7 +257,6 @@ func (client *SimPoliciesClient) getHandleResponse(resp *http.Response) (SimPoli } // NewListByMobileNetworkPager - Gets all the SIM policies in a mobile network. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // mobileNetworkName - The name of the mobile network. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client_example_test.go deleted file mode 100644 index 4297b81f320a..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client_example_test.go +++ /dev/null @@ -1,190 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyDelete.json -func ExampleSimPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "testMobileNetwork", - "testPolicy", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyGet.json -func ExampleSimPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "testMobileNetwork", - "testPolicy", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyCreate.json -func ExampleSimPoliciesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testMobileNetwork", - "testPolicy", - armmobilenetwork.SimPolicy{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.SimPolicyPropertiesFormat{ - DefaultSlice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - }, - RegistrationTimer: to.Ptr[int32](3240), - SliceConfigurations: []*armmobilenetwork.SliceConfiguration{ - { - DataNetworkConfigurations: []*armmobilenetwork.DataNetworkConfiguration{ - { - FiveQi: to.Ptr[int32](9), - AdditionalAllowedSessionTypes: []*armmobilenetwork.PduSessionType{}, - AllocationAndRetentionPriorityLevel: to.Ptr[int32](9), - AllowedServices: []*armmobilenetwork.ServiceResourceID{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"), - }}, - DataNetwork: &armmobilenetwork.DataNetworkResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork"), - }, - DefaultSessionType: to.Ptr(armmobilenetwork.PduSessionTypeIPv4), - PreemptionCapability: to.Ptr(armmobilenetwork.PreemptionCapabilityNotPreempt), - PreemptionVulnerability: to.Ptr(armmobilenetwork.PreemptionVulnerabilityPreemptable), - SessionAmbr: &armmobilenetwork.Ambr{ - Downlink: to.Ptr("1 Gbps"), - Uplink: to.Ptr("500 Mbps"), - }, - }}, - DefaultDataNetwork: &armmobilenetwork.DataNetworkResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork"), - }, - Slice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - }, - }}, - UeAmbr: &armmobilenetwork.Ambr{ - Downlink: to.Ptr("1 Gbps"), - Uplink: to.Ptr("500 Mbps"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyUpdateTags.json -func ExampleSimPoliciesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "testMobileNetwork", - "testPolicy", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimPolicyListByMobileNetwork.json -func ExampleSimPoliciesClient_NewListByMobileNetworkPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByMobileNetworkPager("testResourceGroupName", - "testMobileNetwork", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go index f052a1350d4d..7de4e3435188 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go @@ -257,7 +257,6 @@ func (client *SimsClient) getHandleResponse(resp *http.Response) (SimsClientGetR } // NewListBySimGroupPager - Gets all the SIMs in a SIM group. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // simGroupName - The name of the SIM Group. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client_example_test.go deleted file mode 100644 index ad74364832bd..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client_example_test.go +++ /dev/null @@ -1,143 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimDelete.json -func ExampleSimsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testResourceGroupName", - "testSimGroup", - "testSim", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimGet.json -func ExampleSimsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testResourceGroupName", - "testSimGroup", - "testSimName", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimCreate.json -func ExampleSimsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testSimGroup", - "testSim", - armmobilenetwork.Sim{ - Properties: &armmobilenetwork.SimPropertiesFormat{ - AuthenticationKey: to.Ptr("00000000000000000000000000000000"), - DeviceType: to.Ptr("Video camera"), - IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000000"), - InternationalMobileSubscriberIdentity: to.Ptr("00000"), - OperatorKeyCode: to.Ptr("00000000000000000000000000000000"), - SimPolicy: &armmobilenetwork.SimPolicyResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - }, - StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - { - AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - }, - Slice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - }, - StaticIP: &armmobilenetwork.SimStaticIPPropertiesStaticIP{ - IPv4Address: to.Ptr("2.4.0.1"), - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SimListBySimGroup.json -func ExampleSimsClient_NewListBySimGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSimsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySimGroupPager("rg1", - "testSimGroup", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go index 64bca62c9c08..e2498e81dd80 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go @@ -257,7 +257,6 @@ func (client *SitesClient) getHandleResponse(resp *http.Response) (SitesClientGe } // NewListByMobileNetworkPager - Lists all sites in the mobile network. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // mobileNetworkName - The name of the mobile network. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client_example_test.go deleted file mode 100644 index 909b8e968b43..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client_example_test.go +++ /dev/null @@ -1,157 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteDelete.json -func ExampleSitesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "testMobileNetwork", - "testSite", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteGet.json -func ExampleSitesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "testMobileNetwork", - "testSite", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteCreate.json -func ExampleSitesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testMobileNetwork", - "testSite", - armmobilenetwork.Site{ - Location: to.Ptr("testLocation"), - Properties: &armmobilenetwork.SitePropertiesFormat{ - NetworkFunctions: []*armmobilenetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/testNf"), - }}, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteUpdateTags.json -func ExampleSitesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "testMobileNetwork", - "testSite", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SiteListByMobileNetwork.json -func ExampleSitesClient_NewListByMobileNetworkPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByMobileNetworkPager("rg1", - "testMobileNetwork", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go index 474a29d4bd08..ee4252b39379 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go @@ -257,7 +257,6 @@ func (client *SlicesClient) getHandleResponse(resp *http.Response) (SlicesClient } // NewListByMobileNetworkPager - Lists all slices in the mobile network. -// If the operation fails it returns an *azcore.ResponseError type. // Generated from API version 2022-04-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // mobileNetworkName - The name of the mobile network. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client_example_test.go deleted file mode 100644 index b72bf7d7ca9c..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client_example_test.go +++ /dev/null @@ -1,158 +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 armmobilenetwork_test - -import ( - "context" - "log" - - "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/mobilenetwork/armmobilenetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceDelete.json -func ExampleSlicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSlicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "rg1", - "testMobileNetwork", - "testSlice", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceGet.json -func ExampleSlicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSlicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg1", - "testMobileNetwork", - "testSlice", - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceCreate.json -func ExampleSlicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSlicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "rg1", - "testMobileNetwork", - "testSlice", - armmobilenetwork.Slice{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.SlicePropertiesFormat{ - Description: to.Ptr("myFavouriteSlice"), - Snssai: &armmobilenetwork.Snssai{ - Sd: to.Ptr("1abcde"), - Sst: to.Ptr[int32](1), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceUpdateTags.json -func ExampleSlicesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSlicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, - "rg1", - "testMobileNetwork", - "testSlice", - armmobilenetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - 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/mobilenetwork/resource-manager/Microsoft.MobileNetwork/preview/2022-04-01-preview/examples/SliceListByMobileNetwork.json -func ExampleSlicesClient_NewListByMobileNetworkPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmobilenetwork.NewSlicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByMobileNetworkPager("rg1", - "testMobileNetwork", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -}