diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md index 5d81606a40de..e53c0c2580c9 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 3.0.0 (2023-03-20) +### Breaking Changes + +- Const `BillingSKUG3`, `BillingSKUG4` from type alias `BillingSKU` has been removed + + ## 2.0.0 (2023-01-27) ### Breaking Changes diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go index be6794886627..8b6c7edebafb 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go @@ -32,9 +32,9 @@ type AttachedDataNetworksClient struct { } // NewAttachedDataNetworksClient creates a new instance of AttachedDataNetworksClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAttachedDataNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AttachedDataNetworksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ func NewAttachedDataNetworksClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Creates or updates an attached data network. Must be created in the same location as its parent packet // core data plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// attachedDataNetworkName - The name of the attached data network. -// parameters - Parameters supplied to the create or update attached data network operation. -// options - AttachedDataNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the AttachedDataNetworksClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - attachedDataNetworkName - The name of the attached data network. +// - parameters - Parameters supplied to the create or update attached data network operation. +// - options - AttachedDataNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the AttachedDataNetworksClient.BeginCreateOrUpdate +// method. func (client *AttachedDataNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, attachedDataNetworkName string, parameters AttachedDataNetwork, options *AttachedDataNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[AttachedDataNetworksClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, parameters, options) @@ -83,6 +84,7 @@ func (client *AttachedDataNetworksClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Creates or updates an attached data network. Must be created in the same location as its parent packet // core data plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *AttachedDataNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, attachedDataNetworkName string, parameters AttachedDataNetwork, options *AttachedDataNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, parameters, options) @@ -135,13 +137,14 @@ func (client *AttachedDataNetworksClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Deletes the specified attached data network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// attachedDataNetworkName - The name of the attached data network. -// options - AttachedDataNetworksClientBeginDeleteOptions contains the optional parameters for the AttachedDataNetworksClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - attachedDataNetworkName - The name of the attached data network. +// - options - AttachedDataNetworksClientBeginDeleteOptions contains the optional parameters for the AttachedDataNetworksClient.BeginDelete +// method. func (client *AttachedDataNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, attachedDataNetworkName string, options *AttachedDataNetworksClientBeginDeleteOptions) (*runtime.Poller[AttachedDataNetworksClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, options) @@ -158,6 +161,7 @@ func (client *AttachedDataNetworksClient) BeginDelete(ctx context.Context, resou // Delete - Deletes the specified attached data network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *AttachedDataNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, attachedDataNetworkName string, options *AttachedDataNetworksClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, options) @@ -210,13 +214,14 @@ func (client *AttachedDataNetworksClient) deleteCreateRequest(ctx context.Contex // Get - Gets information about the specified attached data network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// attachedDataNetworkName - The name of the attached data network. -// options - AttachedDataNetworksClientGetOptions contains the optional parameters for the AttachedDataNetworksClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - attachedDataNetworkName - The name of the attached data network. +// - options - AttachedDataNetworksClientGetOptions contains the optional parameters for the AttachedDataNetworksClient.Get +// method. func (client *AttachedDataNetworksClient) Get(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, attachedDataNetworkName string, options *AttachedDataNetworksClientGetOptions) (AttachedDataNetworksClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, options) if err != nil { @@ -276,12 +281,13 @@ func (client *AttachedDataNetworksClient) getHandleResponse(resp *http.Response) } // NewListByPacketCoreDataPlanePager - Gets all the attached data networks associated with a packet core data plane. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// options - AttachedDataNetworksClientListByPacketCoreDataPlaneOptions contains the optional parameters for the AttachedDataNetworksClient.ListByPacketCoreDataPlane -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - options - AttachedDataNetworksClientListByPacketCoreDataPlaneOptions contains the optional parameters for the AttachedDataNetworksClient.NewListByPacketCoreDataPlanePager +// method. func (client *AttachedDataNetworksClient) NewListByPacketCoreDataPlanePager(resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, options *AttachedDataNetworksClientListByPacketCoreDataPlaneOptions) *runtime.Pager[AttachedDataNetworksClientListByPacketCoreDataPlaneResponse] { return runtime.NewPager(runtime.PagingHandler[AttachedDataNetworksClientListByPacketCoreDataPlaneResponse]{ More: func(page AttachedDataNetworksClientListByPacketCoreDataPlaneResponse) bool { @@ -351,14 +357,15 @@ func (client *AttachedDataNetworksClient) listByPacketCoreDataPlaneHandleRespons // UpdateTags - Updates an attached data network tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// attachedDataNetworkName - The name of the attached data network. -// parameters - Parameters supplied to update attached data network tags. -// options - AttachedDataNetworksClientUpdateTagsOptions contains the optional parameters for the AttachedDataNetworksClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - attachedDataNetworkName - The name of the attached data network. +// - parameters - Parameters supplied to update attached data network tags. +// - options - AttachedDataNetworksClientUpdateTagsOptions contains the optional parameters for the AttachedDataNetworksClient.UpdateTags +// method. func (client *AttachedDataNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, attachedDataNetworkName string, parameters TagsObject, options *AttachedDataNetworksClientUpdateTagsOptions) (AttachedDataNetworksClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, parameters, options) if err != nil { 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 231a3cb4e498..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client_example_test.go +++ /dev/null @@ -1,159 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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 5e3eb9e1bc5c..d8815ac7f6a7 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/340d577969b7bff5ad0488d79543314bc17daa50/specification/mobilenetwork/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/340d577969b7bff5ad0488d79543314bc17daa50/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: 2.0.0 +module-version: 3.0.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go index c589556179a7..da59f76c8ede 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 = "v2.0.0" + moduleVersion = "v3.0.0" ) // AuthenticationType - How to authenticate users who access local diagnostics APIs. @@ -37,18 +37,14 @@ func PossibleAuthenticationTypeValues() []AuthenticationType { type BillingSKU string const ( - // BillingSKUG0 - 100 Mbps, 20 active SIMs plan + // BillingSKUG0 - 100 Mbps, 20 active SIMs plan, 2 RANs BillingSKUG0 BillingSKU = "G0" - // BillingSKUG1 - 1 Gbps, 100 active SIMs plan + // BillingSKUG1 - 1 Gbps, 100 active SIMs plan, 5 RANs BillingSKUG1 BillingSKU = "G1" // BillingSKUG10 - 10 Gbps, 1000 active SIMs plan BillingSKUG10 BillingSKU = "G10" - // BillingSKUG2 - 2 Gbps, 200 active SIMs plan + // BillingSKUG2 - 2 Gbps, 200 active SIMs plan, 10 RANs BillingSKUG2 BillingSKU = "G2" - // BillingSKUG3 - 3 Gbps, 300 active SIMs plan - BillingSKUG3 BillingSKU = "G3" - // BillingSKUG4 - 4 Gbps, 400 active SIMs plan - BillingSKUG4 BillingSKU = "G4" // BillingSKUG5 - 5 Gbps, 500 active SIMs plan BillingSKUG5 BillingSKU = "G5" ) @@ -60,8 +56,6 @@ func PossibleBillingSKUValues() []BillingSKU { BillingSKUG1, BillingSKUG10, BillingSKUG2, - BillingSKUG3, - BillingSKUG4, BillingSKUG5, } } diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go index 83353f204c92..4e13c79ac1a7 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go @@ -32,9 +32,9 @@ type DataNetworksClient struct { } // NewDataNetworksClient creates a new instance of DataNetworksClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDataNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataNetworksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ func NewDataNetworksClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Creates or updates a data network. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// dataNetworkName - The name of the data network. -// parameters - Parameters supplied to the create or update data network operation. -// options - DataNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the DataNetworksClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - dataNetworkName - The name of the data network. +// - parameters - Parameters supplied to the create or update data network operation. +// - options - DataNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the DataNetworksClient.BeginCreateOrUpdate +// method. func (client *DataNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, dataNetworkName string, parameters DataNetwork, options *DataNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[DataNetworksClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, mobileNetworkName, dataNetworkName, parameters, options) @@ -80,6 +81,7 @@ func (client *DataNetworksClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Creates or updates a data network. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *DataNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, dataNetworkName string, parameters DataNetwork, options *DataNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, dataNetworkName, parameters, options) @@ -128,12 +130,13 @@ func (client *DataNetworksClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Deletes the specified data network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// dataNetworkName - The name of the data network. -// options - DataNetworksClientBeginDeleteOptions contains the optional parameters for the DataNetworksClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - dataNetworkName - The name of the data network. +// - options - DataNetworksClientBeginDeleteOptions contains the optional parameters for the DataNetworksClient.BeginDelete +// method. func (client *DataNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, mobileNetworkName string, dataNetworkName string, options *DataNetworksClientBeginDeleteOptions) (*runtime.Poller[DataNetworksClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, mobileNetworkName, dataNetworkName, options) @@ -150,6 +153,7 @@ func (client *DataNetworksClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Deletes the specified data network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *DataNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, dataNetworkName string, options *DataNetworksClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, dataNetworkName, options) @@ -198,11 +202,12 @@ func (client *DataNetworksClient) deleteCreateRequest(ctx context.Context, resou // Get - Gets information about the specified data network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// dataNetworkName - The name of the data network. -// options - DataNetworksClientGetOptions contains the optional parameters for the DataNetworksClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - dataNetworkName - The name of the data network. +// - options - DataNetworksClientGetOptions contains the optional parameters for the DataNetworksClient.Get method. func (client *DataNetworksClient) Get(ctx context.Context, resourceGroupName string, mobileNetworkName string, dataNetworkName string, options *DataNetworksClientGetOptions) (DataNetworksClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, mobileNetworkName, dataNetworkName, options) if err != nil { @@ -258,11 +263,12 @@ func (client *DataNetworksClient) getHandleResponse(resp *http.Response) (DataNe } // NewListByMobileNetworkPager - Lists all data networks in the mobile network. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// options - DataNetworksClientListByMobileNetworkOptions contains the optional parameters for the DataNetworksClient.ListByMobileNetwork -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - options - DataNetworksClientListByMobileNetworkOptions contains the optional parameters for the DataNetworksClient.NewListByMobileNetworkPager +// method. func (client *DataNetworksClient) NewListByMobileNetworkPager(resourceGroupName string, mobileNetworkName string, options *DataNetworksClientListByMobileNetworkOptions) *runtime.Pager[DataNetworksClientListByMobileNetworkResponse] { return runtime.NewPager(runtime.PagingHandler[DataNetworksClientListByMobileNetworkResponse]{ More: func(page DataNetworksClientListByMobileNetworkResponse) bool { @@ -328,12 +334,13 @@ func (client *DataNetworksClient) listByMobileNetworkHandleResponse(resp *http.R // UpdateTags - Updates data network tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// dataNetworkName - The name of the data network. -// parameters - Parameters supplied to update data network tags. -// options - DataNetworksClientUpdateTagsOptions contains the optional parameters for the DataNetworksClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - dataNetworkName - The name of the data network. +// - parameters - Parameters supplied to update data network tags. +// - options - DataNetworksClientUpdateTagsOptions contains the optional parameters for the DataNetworksClient.UpdateTags method. func (client *DataNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, mobileNetworkName string, dataNetworkName string, parameters TagsObject, options *DataNetworksClientUpdateTagsOptions) (DataNetworksClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, mobileNetworkName, dataNetworkName, parameters, options) if err != nil { 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 0b9121c2a0fe..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client_example_test.go +++ /dev/null @@ -1,134 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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 e94133eb9543..98abf8ccc20d 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod @@ -1,21 +1,13 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mobilenetwork/armmobilenetwork/v2 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mobilenetwork/armmobilenetwork/v3 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.2.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.7.0 // indirect - github.com/golang-jwt/jwt/v4 v4.4.2 // 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 8c0539b73123..3afb578030a5 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.sum +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.sum @@ -1,30 +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.2.0 h1:t/W5MYAuQy81cvM8VUNfRLzhtKpXhVUAN7Cd7KVbTyc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM= 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.7.0 h1:VgSJlZH5u0k2qxSpqyghcFQKmvYckj46uymKK5XzkBM= -github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= 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/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -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/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-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 988ac0f67f5c..82da067f0d22 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go @@ -32,9 +32,9 @@ type MobileNetworksClient struct { } // NewMobileNetworksClient creates a new instance of MobileNetworksClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewMobileNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MobileNetworksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,12 +57,13 @@ func NewMobileNetworksClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates or updates a mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// parameters - Parameters supplied to the create or update mobile network operation. -// options - MobileNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the MobileNetworksClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - parameters - Parameters supplied to the create or update mobile network operation. +// - options - MobileNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the MobileNetworksClient.BeginCreateOrUpdate +// method. func (client *MobileNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, parameters MobileNetwork, options *MobileNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[MobileNetworksClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, mobileNetworkName, parameters, options) @@ -79,6 +80,7 @@ func (client *MobileNetworksClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates or updates a mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *MobileNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, parameters MobileNetwork, options *MobileNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, parameters, options) @@ -123,11 +125,12 @@ func (client *MobileNetworksClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes the specified mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// options - MobileNetworksClientBeginDeleteOptions contains the optional parameters for the MobileNetworksClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - options - MobileNetworksClientBeginDeleteOptions contains the optional parameters for the MobileNetworksClient.BeginDelete +// method. func (client *MobileNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, mobileNetworkName string, options *MobileNetworksClientBeginDeleteOptions) (*runtime.Poller[MobileNetworksClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, mobileNetworkName, options) @@ -144,6 +147,7 @@ func (client *MobileNetworksClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes the specified mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *MobileNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, options *MobileNetworksClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, options) @@ -188,10 +192,11 @@ func (client *MobileNetworksClient) deleteCreateRequest(ctx context.Context, res // Get - Gets information about the specified mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// options - MobileNetworksClientGetOptions contains the optional parameters for the MobileNetworksClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - options - MobileNetworksClientGetOptions contains the optional parameters for the MobileNetworksClient.Get method. func (client *MobileNetworksClient) Get(ctx context.Context, resourceGroupName string, mobileNetworkName string, options *MobileNetworksClientGetOptions) (MobileNetworksClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, mobileNetworkName, options) if err != nil { @@ -243,10 +248,11 @@ func (client *MobileNetworksClient) getHandleResponse(resp *http.Response) (Mobi } // NewListByResourceGroupPager - Lists all the mobile networks in a resource group. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - MobileNetworksClientListByResourceGroupOptions contains the optional parameters for the MobileNetworksClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - MobileNetworksClientListByResourceGroupOptions contains the optional parameters for the MobileNetworksClient.NewListByResourceGroupPager +// method. func (client *MobileNetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *MobileNetworksClientListByResourceGroupOptions) *runtime.Pager[MobileNetworksClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[MobileNetworksClientListByResourceGroupResponse]{ More: func(page MobileNetworksClientListByResourceGroupResponse) bool { @@ -307,9 +313,10 @@ func (client *MobileNetworksClient) listByResourceGroupHandleResponse(resp *http } // NewListBySubscriptionPager - Lists all the mobile networks in a subscription. +// // Generated from API version 2022-11-01 -// options - MobileNetworksClientListBySubscriptionOptions contains the optional parameters for the MobileNetworksClient.ListBySubscription -// method. +// - options - MobileNetworksClientListBySubscriptionOptions contains the optional parameters for the MobileNetworksClient.NewListBySubscriptionPager +// method. func (client *MobileNetworksClient) NewListBySubscriptionPager(options *MobileNetworksClientListBySubscriptionOptions) *runtime.Pager[MobileNetworksClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[MobileNetworksClientListBySubscriptionResponse]{ More: func(page MobileNetworksClientListBySubscriptionResponse) bool { @@ -367,12 +374,13 @@ func (client *MobileNetworksClient) listBySubscriptionHandleResponse(resp *http. // UpdateTags - Updates mobile network tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// parameters - Parameters supplied to update mobile network tags. -// options - MobileNetworksClientUpdateTagsOptions contains the optional parameters for the MobileNetworksClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - parameters - Parameters supplied to update mobile network tags. +// - options - MobileNetworksClientUpdateTagsOptions contains the optional parameters for the MobileNetworksClient.UpdateTags +// method. func (client *MobileNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, mobileNetworkName string, parameters TagsObject, options *MobileNetworksClientUpdateTagsOptions) (MobileNetworksClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, mobileNetworkName, parameters, options) if err != nil { 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 f7ee26c00e24..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client_example_test.go +++ /dev/null @@ -1,161 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/models.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models.go index c75db830698e..e77f801d8a51 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models.go @@ -59,7 +59,7 @@ type AsyncOperationStatus struct { PercentComplete *float64 `json:"percentComplete,omitempty"` // Properties returned by the resource provider on a successful operation - Properties interface{} `json:"properties,omitempty"` + Properties any `json:"properties,omitempty"` // Fully qualified ID for the resource that this async operation status relates to. ResourceID *string `json:"resourceId,omitempty"` @@ -159,7 +159,7 @@ type AttachedDataNetworksClientGetOptions struct { // placeholder for future optional parameters } -// AttachedDataNetworksClientListByPacketCoreDataPlaneOptions contains the optional parameters for the AttachedDataNetworksClient.ListByPacketCoreDataPlane +// AttachedDataNetworksClientListByPacketCoreDataPlaneOptions contains the optional parameters for the AttachedDataNetworksClient.NewListByPacketCoreDataPlanePager // method. type AttachedDataNetworksClientListByPacketCoreDataPlaneOptions struct { // placeholder for future optional parameters @@ -290,11 +290,9 @@ type DataNetworkConfiguration struct { // The default PDU session type, which is used if the UE does not request a specific session type. DefaultSessionType *PduSessionType `json:"defaultSessionType,omitempty"` - // Default QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. - // This must not be a standardized 5QI value corresponding to a GBR (guaranteed - // bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. - // See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, - // and table 5.7.4-1 for the definition of which are the GBR 5QI values. + // Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. See + // 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and + // table 5.7.4-1 for the definition the 5QI values. FiveQi *int32 `json:"5qi,omitempty"` // The maximum number of downlink packets to buffer at the user plane for High Latency Communication - Extended Buffering. @@ -355,7 +353,7 @@ type DataNetworksClientGetOptions struct { // placeholder for future optional parameters } -// DataNetworksClientListByMobileNetworkOptions contains the optional parameters for the DataNetworksClient.ListByMobileNetwork +// DataNetworksClientListByMobileNetworkOptions contains the optional parameters for the DataNetworksClient.NewListByMobileNetworkPager // method. type DataNetworksClientListByMobileNetworkOptions struct { // placeholder for future optional parameters @@ -430,7 +428,7 @@ type EncryptedSimUploadList struct { // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty" azure:"ro"` + Info any `json:"info,omitempty" azure:"ro"` // READ-ONLY; The additional info type. Type *string `json:"type,omitempty" azure:"ro"` @@ -581,13 +579,13 @@ type MobileNetworksClientGetOptions struct { // placeholder for future optional parameters } -// MobileNetworksClientListByResourceGroupOptions contains the optional parameters for the MobileNetworksClient.ListByResourceGroup +// MobileNetworksClientListByResourceGroupOptions contains the optional parameters for the MobileNetworksClient.NewListByResourceGroupPager // method. type MobileNetworksClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// MobileNetworksClientListBySubscriptionOptions contains the optional parameters for the MobileNetworksClient.ListBySubscription +// MobileNetworksClientListBySubscriptionOptions contains the optional parameters for the MobileNetworksClient.NewListBySubscriptionPager // method. type MobileNetworksClientListBySubscriptionOptions struct { // placeholder for future optional parameters @@ -656,7 +654,7 @@ type OperationList struct { Value []*Operation `json:"value,omitempty" azure:"ro"` } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters } @@ -726,7 +724,7 @@ type PacketCoreControlPlanePropertiesFormat struct { CoreNetworkTechnology *CoreNetworkType `json:"coreNetworkTechnology,omitempty"` // Settings to allow interoperability with third party components e.g. RANs and UEs. - InteropSettings interface{} `json:"interopSettings,omitempty"` + InteropSettings any `json:"interopSettings,omitempty"` // The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links for all data networks. The MTU // set on the user plane access link is calculated to be 60 bytes greater than this @@ -788,7 +786,7 @@ type PacketCoreControlPlaneVersionsClientGetOptions struct { // placeholder for future optional parameters } -// PacketCoreControlPlaneVersionsClientListOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.List +// PacketCoreControlPlaneVersionsClientListOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.NewListPager // method. type PacketCoreControlPlaneVersionsClientListOptions struct { // placeholder for future optional parameters @@ -834,13 +832,13 @@ type PacketCoreControlPlanesClientGetOptions struct { // placeholder for future optional parameters } -// PacketCoreControlPlanesClientListByResourceGroupOptions contains the optional parameters for the PacketCoreControlPlanesClient.ListByResourceGroup +// PacketCoreControlPlanesClientListByResourceGroupOptions contains the optional parameters for the PacketCoreControlPlanesClient.NewListByResourceGroupPager // method. type PacketCoreControlPlanesClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// PacketCoreControlPlanesClientListBySubscriptionOptions contains the optional parameters for the PacketCoreControlPlanesClient.ListBySubscription +// PacketCoreControlPlanesClientListBySubscriptionOptions contains the optional parameters for the PacketCoreControlPlanesClient.NewListBySubscriptionPager // method. type PacketCoreControlPlanesClientListBySubscriptionOptions struct { // placeholder for future optional parameters @@ -915,7 +913,7 @@ type PacketCoreDataPlanesClientGetOptions struct { // placeholder for future optional parameters } -// PacketCoreDataPlanesClientListByPacketCoreControlPlaneOptions contains the optional parameters for the PacketCoreDataPlanesClient.ListByPacketCoreControlPlane +// PacketCoreDataPlanesClientListByPacketCoreControlPlaneOptions contains the optional parameters for the PacketCoreDataPlanesClient.NewListByPacketCoreControlPlanePager // method. type PacketCoreDataPlanesClientListByPacketCoreControlPlaneOptions struct { // placeholder for future optional parameters @@ -960,11 +958,9 @@ type PccRuleQosPolicy struct { // section 5.7.2.2 for a full description of the ARP parameters. AllocationAndRetentionPriorityLevel *int32 `json:"allocationAndRetentionPriorityLevel,omitempty"` - // QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This - // must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) - // QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP + // 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. See 3GPP // TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table - // 5.7.4-1 for the definition of which are the GBR 5QI values. + // 5.7.4-1 for the definition the 5QI values. FiveQi *int32 `json:"5qi,omitempty"` // The guaranteed bit rate (GBR) for all service data flows that use this data flow policy rule. This is an optional setting. @@ -1112,11 +1108,9 @@ type QosPolicy struct { // section 5.7.2.2 for a full description of the ARP parameters. AllocationAndRetentionPriorityLevel *int32 `json:"allocationAndRetentionPriorityLevel,omitempty"` - // QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. This - // must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) - // QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP + // 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. See 3GPP // TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table - // 5.7.4-1 for the definition of which are the GBR 5QI values. + // 5.7.4-1 for the definition the 5QI values. FiveQi *int32 `json:"5qi,omitempty"` // QoS Flow preemption capability. The preemption capability of a QoS Flow controls whether it can preempt another QoS Flow @@ -1255,7 +1249,8 @@ type ServicesClientGetOptions struct { // placeholder for future optional parameters } -// ServicesClientListByMobileNetworkOptions contains the optional parameters for the ServicesClient.ListByMobileNetwork method. +// ServicesClientListByMobileNetworkOptions contains the optional parameters for the ServicesClient.NewListByMobileNetworkPager +// method. type ServicesClientListByMobileNetworkOptions struct { // placeholder for future optional parameters } @@ -1361,13 +1356,14 @@ type SimGroupsClientGetOptions struct { // placeholder for future optional parameters } -// SimGroupsClientListByResourceGroupOptions contains the optional parameters for the SimGroupsClient.ListByResourceGroup +// SimGroupsClientListByResourceGroupOptions contains the optional parameters for the SimGroupsClient.NewListByResourceGroupPager // method. type SimGroupsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// SimGroupsClientListBySubscriptionOptions contains the optional parameters for the SimGroupsClient.ListBySubscription method. +// SimGroupsClientListBySubscriptionOptions contains the optional parameters for the SimGroupsClient.NewListBySubscriptionPager +// method. type SimGroupsClientListBySubscriptionOptions struct { // placeholder for future optional parameters } @@ -1422,7 +1418,7 @@ type SimPoliciesClientGetOptions struct { // placeholder for future optional parameters } -// SimPoliciesClientListByMobileNetworkOptions contains the optional parameters for the SimPoliciesClient.ListByMobileNetwork +// SimPoliciesClientListByMobileNetworkOptions contains the optional parameters for the SimPoliciesClient.NewListByMobileNetworkPager // method. type SimPoliciesClientListByMobileNetworkOptions struct { // placeholder for future optional parameters @@ -1606,7 +1602,7 @@ type SimsClientGetOptions struct { // placeholder for future optional parameters } -// SimsClientListByGroupOptions contains the optional parameters for the SimsClient.ListByGroup method. +// SimsClientListByGroupOptions contains the optional parameters for the SimsClient.NewListByGroupPager method. type SimsClientListByGroupOptions struct { // placeholder for future optional parameters } @@ -1677,7 +1673,8 @@ type SitesClientGetOptions struct { // placeholder for future optional parameters } -// SitesClientListByMobileNetworkOptions contains the optional parameters for the SitesClient.ListByMobileNetwork method. +// SitesClientListByMobileNetworkOptions contains the optional parameters for the SitesClient.NewListByMobileNetworkPager +// method. type SitesClientListByMobileNetworkOptions struct { // placeholder for future optional parameters } @@ -1770,7 +1767,8 @@ type SlicesClientGetOptions struct { // placeholder for future optional parameters } -// SlicesClientListByMobileNetworkOptions contains the optional parameters for the SlicesClient.ListByMobileNetwork method. +// SlicesClientListByMobileNetworkOptions contains the optional parameters for the SlicesClient.NewListByMobileNetworkPager +// method. type SlicesClientListByMobileNetworkOptions struct { // placeholder for future optional parameters } diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models_serde.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models_serde.go index cc1f9f371b1c..93d93e71648e 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models_serde.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models_serde.go @@ -18,7 +18,7 @@ import ( // MarshalJSON implements the json.Marshaller interface for type Ambr. func (a Ambr) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "downlink", a.Downlink) populate(objectMap, "uplink", a.Uplink) return json.Marshal(objectMap) @@ -49,7 +49,7 @@ func (a *Ambr) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Arp. func (a Arp) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "preemptCap", a.PreemptCap) populate(objectMap, "preemptVuln", a.PreemptVuln) populate(objectMap, "priorityLevel", a.PriorityLevel) @@ -84,7 +84,7 @@ func (a *Arp) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AsyncOperationID. func (a AsyncOperationID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) return json.Marshal(objectMap) } @@ -111,7 +111,7 @@ func (a *AsyncOperationID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AsyncOperationStatus. func (a AsyncOperationStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "endTime", a.EndTime) populate(objectMap, "error", a.Error) populate(objectMap, "id", a.ID) @@ -170,7 +170,7 @@ func (a *AsyncOperationStatus) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AttachedDataNetwork. func (a AttachedDataNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "location", a.Location) populate(objectMap, "name", a.Name) @@ -221,7 +221,7 @@ func (a *AttachedDataNetwork) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AttachedDataNetworkListResult. func (a AttachedDataNetworkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -252,7 +252,7 @@ func (a *AttachedDataNetworkListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AttachedDataNetworkPropertiesFormat. func (a AttachedDataNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dnsAddresses", a.DNSAddresses) populate(objectMap, "naptConfiguration", a.NaptConfiguration) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -299,7 +299,7 @@ func (a *AttachedDataNetworkPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AttachedDataNetworkResourceID. func (a AttachedDataNetworkResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) return json.Marshal(objectMap) } @@ -326,7 +326,7 @@ func (a *AttachedDataNetworkResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureStackEdgeDeviceResourceID. func (a AzureStackEdgeDeviceResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) return json.Marshal(objectMap) } @@ -353,7 +353,7 @@ func (a *AzureStackEdgeDeviceResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureStackHCIClusterResourceID. func (a AzureStackHCIClusterResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) return json.Marshal(objectMap) } @@ -380,7 +380,7 @@ func (a *AzureStackHCIClusterResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CertificateProvisioning. func (c CertificateProvisioning) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "reason", c.Reason) populate(objectMap, "state", c.State) return json.Marshal(objectMap) @@ -411,7 +411,7 @@ func (c *CertificateProvisioning) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CommonSimPropertiesFormat. func (c CommonSimPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "deviceType", c.DeviceType) populate(objectMap, "integratedCircuitCardIdentifier", c.IntegratedCircuitCardIdentifier) populate(objectMap, "internationalMobileSubscriberIdentity", c.InternationalMobileSubscriberIdentity) @@ -474,7 +474,7 @@ func (c *CommonSimPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectedClusterResourceID. func (c ConnectedClusterResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) return json.Marshal(objectMap) } @@ -501,7 +501,7 @@ func (c *ConnectedClusterResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomLocationResourceID. func (c CustomLocationResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) return json.Marshal(objectMap) } @@ -528,7 +528,7 @@ func (c *CustomLocationResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataNetwork. func (d DataNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", d.ID) populate(objectMap, "location", d.Location) populate(objectMap, "name", d.Name) @@ -579,7 +579,7 @@ func (d *DataNetwork) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataNetworkConfiguration. func (d DataNetworkConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "additionalAllowedSessionTypes", d.AdditionalAllowedSessionTypes) populate(objectMap, "allocationAndRetentionPriorityLevel", d.AllocationAndRetentionPriorityLevel) populate(objectMap, "allowedServices", d.AllowedServices) @@ -642,7 +642,7 @@ func (d *DataNetworkConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataNetworkListResult. func (d DataNetworkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) @@ -673,7 +673,7 @@ func (d *DataNetworkListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataNetworkPropertiesFormat. func (d DataNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", d.Description) populate(objectMap, "provisioningState", d.ProvisioningState) return json.Marshal(objectMap) @@ -704,7 +704,7 @@ func (d *DataNetworkPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataNetworkResourceID. func (d DataNetworkResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", d.ID) return json.Marshal(objectMap) } @@ -731,7 +731,7 @@ func (d *DataNetworkResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EncryptedSimPropertiesFormat. func (e EncryptedSimPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "deviceType", e.DeviceType) populate(objectMap, "encryptedCredentials", e.EncryptedCredentials) populate(objectMap, "integratedCircuitCardIdentifier", e.IntegratedCircuitCardIdentifier) @@ -798,7 +798,7 @@ func (e *EncryptedSimPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EncryptedSimUploadList. func (e EncryptedSimUploadList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "azureKeyIdentifier", e.AzureKeyIdentifier) populate(objectMap, "encryptedTransportKey", e.EncryptedTransportKey) populate(objectMap, "signedTransportKey", e.SignedTransportKey) @@ -845,7 +845,7 @@ func (e *EncryptedSimUploadList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "info", &e.Info) populate(objectMap, "type", e.Type) return json.Marshal(objectMap) @@ -876,7 +876,7 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorDetail. func (e ErrorDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "additionalInfo", e.AdditionalInfo) populate(objectMap, "code", e.Code) populate(objectMap, "details", e.Details) @@ -919,7 +919,7 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorResponse. func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "error", e.Error) return json.Marshal(objectMap) } @@ -946,7 +946,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HTTPSServerCertificate. func (h HTTPSServerCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "certificateUrl", h.CertificateURL) populate(objectMap, "provisioning", h.Provisioning) return json.Marshal(objectMap) @@ -977,7 +977,7 @@ func (h *HTTPSServerCertificate) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Installation. func (i Installation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "operation", i.Operation) populate(objectMap, "state", i.State) return json.Marshal(objectMap) @@ -1008,7 +1008,7 @@ func (i *Installation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceProperties. func (i InterfaceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ipv4Address", i.IPv4Address) populate(objectMap, "ipv4Gateway", i.IPv4Gateway) populate(objectMap, "ipv4Subnet", i.IPv4Subnet) @@ -1047,7 +1047,7 @@ func (i *InterfaceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KeyVaultKey. func (k KeyVaultKey) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "keyUrl", k.KeyURL) return json.Marshal(objectMap) } @@ -1074,7 +1074,7 @@ func (k *KeyVaultKey) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListResult. func (l ListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -1105,7 +1105,7 @@ func (l *ListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LocalDiagnosticsAccessConfiguration. func (l LocalDiagnosticsAccessConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authenticationType", l.AuthenticationType) populate(objectMap, "httpsServerCertificate", l.HTTPSServerCertificate) return json.Marshal(objectMap) @@ -1136,7 +1136,7 @@ func (l *LocalDiagnosticsAccessConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "principalId", m.PrincipalID) populate(objectMap, "tenantId", m.TenantID) populate(objectMap, "type", m.Type) @@ -1175,7 +1175,7 @@ func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MobileNetwork. func (m MobileNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", m.ID) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) @@ -1226,7 +1226,7 @@ func (m *MobileNetwork) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NaptConfiguration. func (n NaptConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", n.Enabled) populate(objectMap, "pinholeLimits", n.PinholeLimits) populate(objectMap, "pinholeTimeouts", n.PinholeTimeouts) @@ -1269,7 +1269,7 @@ func (n *NaptConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "display", o.Display) populate(objectMap, "isDataAction", o.IsDataAction) populate(objectMap, "name", o.Name) @@ -1304,7 +1304,7 @@ func (o *Operation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationDisplay. func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", o.Description) populate(objectMap, "operation", o.Operation) populate(objectMap, "provider", o.Provider) @@ -1343,7 +1343,7 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationList. func (o OperationList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", o.NextLink) populate(objectMap, "value", o.Value) return json.Marshal(objectMap) @@ -1374,7 +1374,7 @@ func (o *OperationList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCoreControlPlane. func (p PacketCoreControlPlane) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "identity", p.Identity) populate(objectMap, "location", p.Location) @@ -1429,7 +1429,7 @@ func (p *PacketCoreControlPlane) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCoreControlPlaneCollectDiagnosticsPackage. func (p PacketCoreControlPlaneCollectDiagnosticsPackage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "storageAccountBlobUrl", p.StorageAccountBlobURL) return json.Marshal(objectMap) } @@ -1456,7 +1456,7 @@ func (p *PacketCoreControlPlaneCollectDiagnosticsPackage) UnmarshalJSON(data []b // MarshalJSON implements the json.Marshaller interface for type PacketCoreControlPlaneListResult. func (p PacketCoreControlPlaneListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -1487,7 +1487,7 @@ func (p *PacketCoreControlPlaneListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCoreControlPlanePropertiesFormat. func (p PacketCoreControlPlanePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "controlPlaneAccessInterface", p.ControlPlaneAccessInterface) populate(objectMap, "coreNetworkTechnology", p.CoreNetworkTechnology) populate(objectMap, "installation", p.Installation) @@ -1558,7 +1558,7 @@ func (p *PacketCoreControlPlanePropertiesFormat) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type PacketCoreControlPlaneVersion. func (p PacketCoreControlPlaneVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) populate(objectMap, "properties", p.Properties) @@ -1601,7 +1601,7 @@ func (p *PacketCoreControlPlaneVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCoreControlPlaneVersionListResult. func (p PacketCoreControlPlaneVersionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -1632,7 +1632,7 @@ func (p *PacketCoreControlPlaneVersionListResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type PacketCoreControlPlaneVersionPropertiesFormat. func (p PacketCoreControlPlaneVersionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "platforms", p.Platforms) populate(objectMap, "provisioningState", p.ProvisioningState) return json.Marshal(objectMap) @@ -1663,7 +1663,7 @@ func (p *PacketCoreControlPlaneVersionPropertiesFormat) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type PacketCoreDataPlane. func (p PacketCoreDataPlane) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "location", p.Location) populate(objectMap, "name", p.Name) @@ -1714,7 +1714,7 @@ func (p *PacketCoreDataPlane) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCoreDataPlaneListResult. func (p PacketCoreDataPlaneListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -1745,7 +1745,7 @@ func (p *PacketCoreDataPlaneListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCoreDataPlanePropertiesFormat. func (p PacketCoreDataPlanePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "userPlaneAccessInterface", p.UserPlaneAccessInterface) return json.Marshal(objectMap) @@ -1776,7 +1776,7 @@ func (p *PacketCoreDataPlanePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PccRuleConfiguration. func (p PccRuleConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleName", p.RuleName) populate(objectMap, "rulePrecedence", p.RulePrecedence) populate(objectMap, "ruleQosPolicy", p.RuleQosPolicy) @@ -1819,7 +1819,7 @@ func (p *PccRuleConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PccRuleQosPolicy. func (p PccRuleQosPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allocationAndRetentionPriorityLevel", p.AllocationAndRetentionPriorityLevel) populate(objectMap, "5qi", p.FiveQi) populate(objectMap, "guaranteedBitRate", p.GuaranteedBitRate) @@ -1866,7 +1866,7 @@ func (p *PccRuleQosPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PinholeTimeouts. func (p PinholeTimeouts) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "icmp", p.Icmp) populate(objectMap, "tcp", p.TCP) populate(objectMap, "udp", p.UDP) @@ -1901,7 +1901,7 @@ func (p *PinholeTimeouts) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Platform. func (p Platform) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "maximumPlatformSoftwareVersion", p.MaximumPlatformSoftwareVersion) populate(objectMap, "minimumPlatformSoftwareVersion", p.MinimumPlatformSoftwareVersion) populate(objectMap, "obsoleteVersion", p.ObsoleteVersion) @@ -1948,7 +1948,7 @@ func (p *Platform) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PlatformConfiguration. func (p PlatformConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "azureStackEdgeDevice", p.AzureStackEdgeDevice) populate(objectMap, "azureStackEdgeDevices", p.AzureStackEdgeDevices) populate(objectMap, "azureStackHciCluster", p.AzureStackHciCluster) @@ -1995,7 +1995,7 @@ func (p *PlatformConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PlmnID. func (p PlmnID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "mcc", p.Mcc) populate(objectMap, "mnc", p.Mnc) return json.Marshal(objectMap) @@ -2026,7 +2026,7 @@ func (p *PlmnID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PortRange. func (p PortRange) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "maxPort", p.MaxPort) populate(objectMap, "minPort", p.MinPort) return json.Marshal(objectMap) @@ -2057,7 +2057,7 @@ func (p *PortRange) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PortReuseHoldTimes. func (p PortReuseHoldTimes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "tcp", p.TCP) populate(objectMap, "udp", p.UDP) return json.Marshal(objectMap) @@ -2088,7 +2088,7 @@ func (p *PortReuseHoldTimes) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PropertiesFormat. func (p PropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "publicLandMobileNetworkIdentifier", p.PublicLandMobileNetworkIdentifier) populate(objectMap, "serviceKey", p.ServiceKey) @@ -2123,7 +2123,7 @@ func (p *PropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProxyResource. func (p ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) populate(objectMap, "systemData", p.SystemData) @@ -2162,7 +2162,7 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QosPolicy. func (q QosPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allocationAndRetentionPriorityLevel", q.AllocationAndRetentionPriorityLevel) populate(objectMap, "5qi", q.FiveQi) populate(objectMap, "maximumBitRate", q.MaximumBitRate) @@ -2205,7 +2205,7 @@ func (q *QosPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) populate(objectMap, "systemData", r.SystemData) @@ -2244,7 +2244,7 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceID. func (r ResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) return json.Marshal(objectMap) } @@ -2271,7 +2271,7 @@ func (r *ResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Service. func (s Service) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) @@ -2322,7 +2322,7 @@ func (s *Service) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceDataFlowTemplate. func (s ServiceDataFlowTemplate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "direction", s.Direction) populate(objectMap, "ports", s.Ports) populate(objectMap, "protocol", s.Protocol) @@ -2365,7 +2365,7 @@ func (s *ServiceDataFlowTemplate) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceListResult. func (s ServiceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -2396,7 +2396,7 @@ func (s *ServiceListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServicePropertiesFormat. func (s ServicePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "pccRules", s.PccRules) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "servicePrecedence", s.ServicePrecedence) @@ -2435,7 +2435,7 @@ func (s *ServicePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceResourceID. func (s ServiceResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) return json.Marshal(objectMap) } @@ -2462,7 +2462,7 @@ func (s *ServiceResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Sim. func (s Sim) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -2505,7 +2505,7 @@ func (s *Sim) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimDeleteList. func (s SimDeleteList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sims", s.Sims) return json.Marshal(objectMap) } @@ -2532,7 +2532,7 @@ func (s *SimDeleteList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimGroup. func (s SimGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "identity", s.Identity) populate(objectMap, "location", s.Location) @@ -2587,7 +2587,7 @@ func (s *SimGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimGroupListResult. func (s SimGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -2618,7 +2618,7 @@ func (s *SimGroupListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimGroupPropertiesFormat. func (s SimGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "encryptionKey", s.EncryptionKey) populate(objectMap, "mobileNetwork", s.MobileNetwork) populate(objectMap, "provisioningState", s.ProvisioningState) @@ -2653,7 +2653,7 @@ func (s *SimGroupPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimGroupResourceID. func (s SimGroupResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) return json.Marshal(objectMap) } @@ -2680,7 +2680,7 @@ func (s *SimGroupResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimListResult. func (s SimListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -2711,7 +2711,7 @@ func (s *SimListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimNameAndEncryptedProperties. func (s SimNameAndEncryptedProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) return json.Marshal(objectMap) @@ -2742,7 +2742,7 @@ func (s *SimNameAndEncryptedProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimNameAndProperties. func (s SimNameAndProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) return json.Marshal(objectMap) @@ -2773,7 +2773,7 @@ func (s *SimNameAndProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimPolicy. func (s SimPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) @@ -2824,7 +2824,7 @@ func (s *SimPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimPolicyListResult. func (s SimPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -2855,7 +2855,7 @@ func (s *SimPolicyListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimPolicyPropertiesFormat. func (s SimPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "defaultSlice", s.DefaultSlice) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "registrationTimer", s.RegistrationTimer) @@ -2906,7 +2906,7 @@ func (s *SimPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimPolicyResourceID. func (s SimPolicyResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) return json.Marshal(objectMap) } @@ -2933,7 +2933,7 @@ func (s *SimPolicyResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimPropertiesFormat. func (s SimPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authenticationKey", s.AuthenticationKey) populate(objectMap, "deviceType", s.DeviceType) populate(objectMap, "integratedCircuitCardIdentifier", s.IntegratedCircuitCardIdentifier) @@ -3004,7 +3004,7 @@ func (s *SimPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimStaticIPProperties. func (s SimStaticIPProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "attachedDataNetwork", s.AttachedDataNetwork) populate(objectMap, "slice", s.Slice) populate(objectMap, "staticIp", s.StaticIP) @@ -3039,7 +3039,7 @@ func (s *SimStaticIPProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimStaticIPPropertiesStaticIP. func (s SimStaticIPPropertiesStaticIP) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ipv4Address", s.IPv4Address) return json.Marshal(objectMap) } @@ -3066,7 +3066,7 @@ func (s *SimStaticIPPropertiesStaticIP) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SimUploadList. func (s SimUploadList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sims", s.Sims) return json.Marshal(objectMap) } @@ -3093,7 +3093,7 @@ func (s *SimUploadList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Site. func (s Site) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) @@ -3144,7 +3144,7 @@ func (s *Site) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SiteListResult. func (s SiteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -3175,7 +3175,7 @@ func (s *SiteListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SitePropertiesFormat. func (s SitePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "networkFunctions", s.NetworkFunctions) populate(objectMap, "provisioningState", s.ProvisioningState) return json.Marshal(objectMap) @@ -3206,7 +3206,7 @@ func (s *SitePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SiteResourceID. func (s SiteResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) return json.Marshal(objectMap) } @@ -3233,7 +3233,7 @@ func (s *SiteResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Slice. func (s Slice) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) @@ -3284,7 +3284,7 @@ func (s *Slice) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SliceConfiguration. func (s SliceConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dataNetworkConfigurations", s.DataNetworkConfigurations) populate(objectMap, "defaultDataNetwork", s.DefaultDataNetwork) populate(objectMap, "slice", s.Slice) @@ -3319,7 +3319,7 @@ func (s *SliceConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SliceListResult. func (s SliceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -3350,7 +3350,7 @@ func (s *SliceListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SlicePropertiesFormat. func (s SlicePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", s.Description) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "snssai", s.Snssai) @@ -3385,7 +3385,7 @@ func (s *SlicePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SliceResourceID. func (s SliceResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) return json.Marshal(objectMap) } @@ -3412,7 +3412,7 @@ func (s *SliceResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Snssai. func (s Snssai) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sd", s.Sd) populate(objectMap, "sst", s.Sst) return json.Marshal(objectMap) @@ -3443,7 +3443,7 @@ func (s *Snssai) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SubResource. func (s SubResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) return json.Marshal(objectMap) } @@ -3470,7 +3470,7 @@ func (s *SubResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) @@ -3517,7 +3517,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TagsObject. func (t TagsObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "tags", t.Tags) return json.Marshal(objectMap) } @@ -3544,7 +3544,7 @@ func (t *TagsObject) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TrackedResource. func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", t.ID) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) @@ -3591,7 +3591,7 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", u.ClientID) populate(objectMap, "principalId", u.PrincipalID) return json.Marshal(objectMap) @@ -3620,7 +3620,7 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { return nil } -func populate(m map[string]interface{}, k string, v interface{}) { +func populate(m map[string]any, k string, v any) { if v == nil { return } else if azcore.IsNullValue(v) { @@ -3630,7 +3630,7 @@ func populate(m map[string]interface{}, k string, v interface{}) { } } -func unpopulate(data json.RawMessage, fn string, v interface{}) error { +func unpopulate(data json.RawMessage, fn string, v any) error { if data == nil { return nil } diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go index 5f2c8eb2b047..ef5160d2d90d 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go @@ -28,8 +28,8 @@ type OperationsClient struct { } // NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -50,8 +50,9 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO } // NewListPager - Gets a list of the operations. +// // Generated from API version 2022-11-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { 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 3607db7dd4a6..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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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 381111801170..1206e885ccc7 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go @@ -32,9 +32,9 @@ type PacketCoreControlPlanesClient struct { } // NewPacketCoreControlPlanesClient creates a new instance of PacketCoreControlPlanesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPacketCoreControlPlanesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PacketCoreControlPlanesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewPacketCoreControlPlanesClient(subscriptionID string, credential azcore.T // BeginCollectDiagnosticsPackage - Collect a diagnostics package for the specified packet core control plane. This action // will upload the diagnostics to a storage account. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// parameters - Parameters supplied to the packet core control plane collect diagnostics package operation. -// options - PacketCoreControlPlanesClientBeginCollectDiagnosticsPackageOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginCollectDiagnosticsPackage -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - parameters - Parameters supplied to the packet core control plane collect diagnostics package operation. +// - options - PacketCoreControlPlanesClientBeginCollectDiagnosticsPackageOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginCollectDiagnosticsPackage +// method. func (client *PacketCoreControlPlanesClient) BeginCollectDiagnosticsPackage(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, parameters PacketCoreControlPlaneCollectDiagnosticsPackage, options *PacketCoreControlPlanesClientBeginCollectDiagnosticsPackageOptions) (*runtime.Poller[PacketCoreControlPlanesClientCollectDiagnosticsPackageResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.collectDiagnosticsPackage(ctx, resourceGroupName, packetCoreControlPlaneName, parameters, options) @@ -81,6 +82,7 @@ func (client *PacketCoreControlPlanesClient) BeginCollectDiagnosticsPackage(ctx // CollectDiagnosticsPackage - Collect a diagnostics package for the specified packet core control plane. This action will // upload the diagnostics to a storage account. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *PacketCoreControlPlanesClient) collectDiagnosticsPackage(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, parameters PacketCoreControlPlaneCollectDiagnosticsPackage, options *PacketCoreControlPlanesClientBeginCollectDiagnosticsPackageOptions) (*http.Response, error) { req, err := client.collectDiagnosticsPackageCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, parameters, options) @@ -125,12 +127,13 @@ func (client *PacketCoreControlPlanesClient) collectDiagnosticsPackageCreateRequ // BeginCreateOrUpdate - Creates or updates a packet core control plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// parameters - Parameters supplied to the create or update packet core control plane operation. -// options - PacketCoreControlPlanesClientBeginCreateOrUpdateOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - parameters - Parameters supplied to the create or update packet core control plane operation. +// - options - PacketCoreControlPlanesClientBeginCreateOrUpdateOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginCreateOrUpdate +// method. func (client *PacketCoreControlPlanesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, parameters PacketCoreControlPlane, options *PacketCoreControlPlanesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PacketCoreControlPlanesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, packetCoreControlPlaneName, parameters, options) @@ -147,6 +150,7 @@ func (client *PacketCoreControlPlanesClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Creates or updates a packet core control plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *PacketCoreControlPlanesClient) createOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, parameters PacketCoreControlPlane, options *PacketCoreControlPlanesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, parameters, options) @@ -191,11 +195,12 @@ func (client *PacketCoreControlPlanesClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes the specified packet core control plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// options - PacketCoreControlPlanesClientBeginDeleteOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - options - PacketCoreControlPlanesClientBeginDeleteOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginDelete +// method. func (client *PacketCoreControlPlanesClient) BeginDelete(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginDeleteOptions) (*runtime.Poller[PacketCoreControlPlanesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -212,6 +217,7 @@ func (client *PacketCoreControlPlanesClient) BeginDelete(ctx context.Context, re // Delete - Deletes the specified packet core control plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *PacketCoreControlPlanesClient) deleteOperation(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -256,11 +262,12 @@ func (client *PacketCoreControlPlanesClient) deleteCreateRequest(ctx context.Con // Get - Gets information about the specified packet core control plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// options - PacketCoreControlPlanesClientGetOptions contains the optional parameters for the PacketCoreControlPlanesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - options - PacketCoreControlPlanesClientGetOptions contains the optional parameters for the PacketCoreControlPlanesClient.Get +// method. func (client *PacketCoreControlPlanesClient) Get(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientGetOptions) (PacketCoreControlPlanesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, options) if err != nil { @@ -312,10 +319,11 @@ func (client *PacketCoreControlPlanesClient) getHandleResponse(resp *http.Respon } // NewListByResourceGroupPager - Lists all the packet core control planes in a resource group. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - PacketCoreControlPlanesClientListByResourceGroupOptions contains the optional parameters for the PacketCoreControlPlanesClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - PacketCoreControlPlanesClientListByResourceGroupOptions contains the optional parameters for the PacketCoreControlPlanesClient.NewListByResourceGroupPager +// method. func (client *PacketCoreControlPlanesClient) NewListByResourceGroupPager(resourceGroupName string, options *PacketCoreControlPlanesClientListByResourceGroupOptions) *runtime.Pager[PacketCoreControlPlanesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[PacketCoreControlPlanesClientListByResourceGroupResponse]{ More: func(page PacketCoreControlPlanesClientListByResourceGroupResponse) bool { @@ -376,9 +384,10 @@ func (client *PacketCoreControlPlanesClient) listByResourceGroupHandleResponse(r } // NewListBySubscriptionPager - Lists all the packet core control planes in a subscription. +// // Generated from API version 2022-11-01 -// options - PacketCoreControlPlanesClientListBySubscriptionOptions contains the optional parameters for the PacketCoreControlPlanesClient.ListBySubscription -// method. +// - options - PacketCoreControlPlanesClientListBySubscriptionOptions contains the optional parameters for the PacketCoreControlPlanesClient.NewListBySubscriptionPager +// method. func (client *PacketCoreControlPlanesClient) NewListBySubscriptionPager(options *PacketCoreControlPlanesClientListBySubscriptionOptions) *runtime.Pager[PacketCoreControlPlanesClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[PacketCoreControlPlanesClientListBySubscriptionResponse]{ More: func(page PacketCoreControlPlanesClientListBySubscriptionResponse) bool { @@ -437,11 +446,12 @@ func (client *PacketCoreControlPlanesClient) listBySubscriptionHandleResponse(re // BeginReinstall - Reinstall the specified packet core control plane. This action will remove any transaction state from // the packet core to return it to a known state. This action will cause a service outage. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// options - PacketCoreControlPlanesClientBeginReinstallOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginReinstall -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - options - PacketCoreControlPlanesClientBeginReinstallOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginReinstall +// method. func (client *PacketCoreControlPlanesClient) BeginReinstall(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginReinstallOptions) (*runtime.Poller[PacketCoreControlPlanesClientReinstallResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.reinstall(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -459,6 +469,7 @@ func (client *PacketCoreControlPlanesClient) BeginReinstall(ctx context.Context, // Reinstall - Reinstall the specified packet core control plane. This action will remove any transaction state from the packet // core to return it to a known state. This action will cause a service outage. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *PacketCoreControlPlanesClient) reinstall(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginReinstallOptions) (*http.Response, error) { req, err := client.reinstallCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -504,11 +515,12 @@ func (client *PacketCoreControlPlanesClient) reinstallCreateRequest(ctx context. // BeginRollback - Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple // consecutive rollbacks are not possible. This action may cause a service outage. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// options - PacketCoreControlPlanesClientBeginRollbackOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginRollback -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - options - PacketCoreControlPlanesClientBeginRollbackOptions contains the optional parameters for the PacketCoreControlPlanesClient.BeginRollback +// method. func (client *PacketCoreControlPlanesClient) BeginRollback(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginRollbackOptions) (*runtime.Poller[PacketCoreControlPlanesClientRollbackResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.rollback(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -526,6 +538,7 @@ func (client *PacketCoreControlPlanesClient) BeginRollback(ctx context.Context, // Rollback - Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple consecutive // rollbacks are not possible. This action may cause a service outage. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *PacketCoreControlPlanesClient) rollback(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginRollbackOptions) (*http.Response, error) { req, err := client.rollbackCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -570,12 +583,13 @@ func (client *PacketCoreControlPlanesClient) rollbackCreateRequest(ctx context.C // UpdateTags - Updates packet core control planes tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// parameters - Parameters supplied to update packet core control plane tags. -// options - PacketCoreControlPlanesClientUpdateTagsOptions contains the optional parameters for the PacketCoreControlPlanesClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - parameters - Parameters supplied to update packet core control plane tags. +// - options - PacketCoreControlPlanesClientUpdateTagsOptions contains the optional parameters for the PacketCoreControlPlanesClient.UpdateTags +// method. func (client *PacketCoreControlPlanesClient) UpdateTags(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, parameters TagsObject, options *PacketCoreControlPlanesClientUpdateTagsOptions) (PacketCoreControlPlanesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, parameters, options) if err != nil { 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 1570ac0faadf..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client_example_test.go +++ /dev/null @@ -1,257 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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{ - AuthenticationType: to.Ptr(armmobilenetwork.AuthenticationTypeAAD), - HTTPSServerCertificate: &armmobilenetwork.HTTPSServerCertificate{ - CertificateURL: to.Ptr("https://contosovault.vault.azure.net/certificates/ingress"), - }, - }, - 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"), - }, - }, - Sites: []*armmobilenetwork.SiteResourceID{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"), - }}, - SKU: to.Ptr(armmobilenetwork.BillingSKUG0), - UeMtu: to.Ptr[int32](1600), - 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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json -func ExamplePacketCoreControlPlanesClient_BeginRollback() { - 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.BeginRollback(ctx, "rg1", "TestPacketCoreCP", 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/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json -func ExamplePacketCoreControlPlanesClient_BeginReinstall() { - 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.BeginReinstall(ctx, "rg1", "TestPacketCoreCP", 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/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json -func ExamplePacketCoreControlPlanesClient_BeginCollectDiagnosticsPackage() { - 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.BeginCollectDiagnosticsPackage(ctx, "rg1", "TestPacketCoreCP", armmobilenetwork.PacketCoreControlPlaneCollectDiagnosticsPackage{ - StorageAccountBlobURL: to.Ptr("https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip"), - }, 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 -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go index 5c4894b75809..6b381b165866 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go @@ -31,8 +31,8 @@ type PacketCoreControlPlaneVersionsClient struct { } // NewPacketCoreControlPlaneVersionsClient creates a new instance of PacketCoreControlPlaneVersionsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPacketCoreControlPlaneVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PacketCoreControlPlaneVersionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -54,10 +54,11 @@ func NewPacketCoreControlPlaneVersionsClient(credential azcore.TokenCredential, // Get - Gets information about the specified packet core control plane version. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// versionName - The name of the packet core control plane version. -// options - PacketCoreControlPlaneVersionsClientGetOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.Get -// method. +// - versionName - The name of the packet core control plane version. +// - options - PacketCoreControlPlaneVersionsClientGetOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.Get +// method. func (client *PacketCoreControlPlaneVersionsClient) Get(ctx context.Context, versionName string, options *PacketCoreControlPlaneVersionsClientGetOptions) (PacketCoreControlPlaneVersionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, versionName, options) if err != nil { @@ -101,9 +102,10 @@ func (client *PacketCoreControlPlaneVersionsClient) getHandleResponse(resp *http } // NewListPager - Lists all supported packet core control planes versions. +// // Generated from API version 2022-11-01 -// options - PacketCoreControlPlaneVersionsClientListOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.List -// method. +// - options - PacketCoreControlPlaneVersionsClientListOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.NewListPager +// method. func (client *PacketCoreControlPlaneVersionsClient) NewListPager(options *PacketCoreControlPlaneVersionsClientListOptions) *runtime.Pager[PacketCoreControlPlaneVersionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PacketCoreControlPlaneVersionsClientListResponse]{ More: func(page PacketCoreControlPlaneVersionsClientListResponse) bool { 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 4e74f653f9c5..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client_example_test.go +++ /dev/null @@ -1,60 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json -func ExamplePacketCoreControlPlaneVersionsClient_NewListPager() { - 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.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/packetcoredataplanes_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go index 0ef225a0e13b..1b4fc22209b0 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go @@ -32,9 +32,9 @@ type PacketCoreDataPlanesClient struct { } // NewPacketCoreDataPlanesClient creates a new instance of PacketCoreDataPlanesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPacketCoreDataPlanesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PacketCoreDataPlanesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewPacketCoreDataPlanesClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Creates or updates a packet core data plane. Must be created in the same location as its parent packet // core control plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// parameters - Parameters supplied to the create or update packet core data plane operation. -// options - PacketCoreDataPlanesClientBeginCreateOrUpdateOptions contains the optional parameters for the PacketCoreDataPlanesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - parameters - Parameters supplied to the create or update packet core data plane operation. +// - options - PacketCoreDataPlanesClientBeginCreateOrUpdateOptions contains the optional parameters for the PacketCoreDataPlanesClient.BeginCreateOrUpdate +// method. func (client *PacketCoreDataPlanesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, parameters PacketCoreDataPlane, options *PacketCoreDataPlanesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PacketCoreDataPlanesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, options) @@ -82,6 +83,7 @@ func (client *PacketCoreDataPlanesClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Creates or updates a packet core data plane. Must be created in the same location as its parent packet // core control plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *PacketCoreDataPlanesClient) createOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, parameters PacketCoreDataPlane, options *PacketCoreDataPlanesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, options) @@ -130,12 +132,13 @@ func (client *PacketCoreDataPlanesClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Deletes the specified packet core data plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// options - PacketCoreDataPlanesClientBeginDeleteOptions contains the optional parameters for the PacketCoreDataPlanesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - options - PacketCoreDataPlanesClientBeginDeleteOptions contains the optional parameters for the PacketCoreDataPlanesClient.BeginDelete +// method. func (client *PacketCoreDataPlanesClient) BeginDelete(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, options *PacketCoreDataPlanesClientBeginDeleteOptions) (*runtime.Poller[PacketCoreDataPlanesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, options) @@ -152,6 +155,7 @@ func (client *PacketCoreDataPlanesClient) BeginDelete(ctx context.Context, resou // Delete - Deletes the specified packet core data plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *PacketCoreDataPlanesClient) deleteOperation(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, options *PacketCoreDataPlanesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, options) @@ -200,12 +204,13 @@ func (client *PacketCoreDataPlanesClient) deleteCreateRequest(ctx context.Contex // Get - Gets information about the specified packet core data plane. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// options - PacketCoreDataPlanesClientGetOptions contains the optional parameters for the PacketCoreDataPlanesClient.Get -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - options - PacketCoreDataPlanesClientGetOptions contains the optional parameters for the PacketCoreDataPlanesClient.Get +// method. func (client *PacketCoreDataPlanesClient) Get(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, options *PacketCoreDataPlanesClientGetOptions) (PacketCoreDataPlanesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, options) if err != nil { @@ -261,11 +266,12 @@ func (client *PacketCoreDataPlanesClient) getHandleResponse(resp *http.Response) } // NewListByPacketCoreControlPlanePager - Lists all the packet core data planes associated with a packet core control plane. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// options - PacketCoreDataPlanesClientListByPacketCoreControlPlaneOptions contains the optional parameters for the PacketCoreDataPlanesClient.ListByPacketCoreControlPlane -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - options - PacketCoreDataPlanesClientListByPacketCoreControlPlaneOptions contains the optional parameters for the PacketCoreDataPlanesClient.NewListByPacketCoreControlPlanePager +// method. func (client *PacketCoreDataPlanesClient) NewListByPacketCoreControlPlanePager(resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreDataPlanesClientListByPacketCoreControlPlaneOptions) *runtime.Pager[PacketCoreDataPlanesClientListByPacketCoreControlPlaneResponse] { return runtime.NewPager(runtime.PagingHandler[PacketCoreDataPlanesClientListByPacketCoreControlPlaneResponse]{ More: func(page PacketCoreDataPlanesClientListByPacketCoreControlPlaneResponse) bool { @@ -331,13 +337,14 @@ func (client *PacketCoreDataPlanesClient) listByPacketCoreControlPlaneHandleResp // UpdateTags - Updates packet core data planes tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// packetCoreControlPlaneName - The name of the packet core control plane. -// packetCoreDataPlaneName - The name of the packet core data plane. -// parameters - Parameters supplied to update packet core data plane tags. -// options - PacketCoreDataPlanesClientUpdateTagsOptions contains the optional parameters for the PacketCoreDataPlanesClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - packetCoreControlPlaneName - The name of the packet core control plane. +// - packetCoreDataPlaneName - The name of the packet core data plane. +// - parameters - Parameters supplied to update packet core data plane tags. +// - options - PacketCoreDataPlanesClientUpdateTagsOptions contains the optional parameters for the PacketCoreDataPlanesClient.UpdateTags +// method. func (client *PacketCoreDataPlanesClient) UpdateTags(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, parameters TagsObject, options *PacketCoreDataPlanesClientUpdateTagsOptions) (PacketCoreDataPlanesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, options) if err != nil { 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 ae484af2204b..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client_example_test.go +++ /dev/null @@ -1,136 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/response_types.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/response_types.go index f80771060115..834a5fd912eb 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/response_types.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/response_types.go @@ -9,12 +9,12 @@ package armmobilenetwork -// AttachedDataNetworksClientCreateOrUpdateResponse contains the response from method AttachedDataNetworksClient.CreateOrUpdate. +// AttachedDataNetworksClientCreateOrUpdateResponse contains the response from method AttachedDataNetworksClient.BeginCreateOrUpdate. type AttachedDataNetworksClientCreateOrUpdateResponse struct { AttachedDataNetwork } -// AttachedDataNetworksClientDeleteResponse contains the response from method AttachedDataNetworksClient.Delete. +// AttachedDataNetworksClientDeleteResponse contains the response from method AttachedDataNetworksClient.BeginDelete. type AttachedDataNetworksClientDeleteResponse struct { // placeholder for future response values } @@ -24,7 +24,7 @@ type AttachedDataNetworksClientGetResponse struct { AttachedDataNetwork } -// AttachedDataNetworksClientListByPacketCoreDataPlaneResponse contains the response from method AttachedDataNetworksClient.ListByPacketCoreDataPlane. +// AttachedDataNetworksClientListByPacketCoreDataPlaneResponse contains the response from method AttachedDataNetworksClient.NewListByPacketCoreDataPlanePager. type AttachedDataNetworksClientListByPacketCoreDataPlaneResponse struct { AttachedDataNetworkListResult } @@ -34,12 +34,12 @@ type AttachedDataNetworksClientUpdateTagsResponse struct { AttachedDataNetwork } -// DataNetworksClientCreateOrUpdateResponse contains the response from method DataNetworksClient.CreateOrUpdate. +// DataNetworksClientCreateOrUpdateResponse contains the response from method DataNetworksClient.BeginCreateOrUpdate. type DataNetworksClientCreateOrUpdateResponse struct { DataNetwork } -// DataNetworksClientDeleteResponse contains the response from method DataNetworksClient.Delete. +// DataNetworksClientDeleteResponse contains the response from method DataNetworksClient.BeginDelete. type DataNetworksClientDeleteResponse struct { // placeholder for future response values } @@ -49,7 +49,7 @@ type DataNetworksClientGetResponse struct { DataNetwork } -// DataNetworksClientListByMobileNetworkResponse contains the response from method DataNetworksClient.ListByMobileNetwork. +// DataNetworksClientListByMobileNetworkResponse contains the response from method DataNetworksClient.NewListByMobileNetworkPager. type DataNetworksClientListByMobileNetworkResponse struct { DataNetworkListResult } @@ -59,12 +59,12 @@ type DataNetworksClientUpdateTagsResponse struct { DataNetwork } -// MobileNetworksClientCreateOrUpdateResponse contains the response from method MobileNetworksClient.CreateOrUpdate. +// MobileNetworksClientCreateOrUpdateResponse contains the response from method MobileNetworksClient.BeginCreateOrUpdate. type MobileNetworksClientCreateOrUpdateResponse struct { MobileNetwork } -// MobileNetworksClientDeleteResponse contains the response from method MobileNetworksClient.Delete. +// MobileNetworksClientDeleteResponse contains the response from method MobileNetworksClient.BeginDelete. type MobileNetworksClientDeleteResponse struct { // placeholder for future response values } @@ -74,12 +74,12 @@ type MobileNetworksClientGetResponse struct { MobileNetwork } -// MobileNetworksClientListByResourceGroupResponse contains the response from method MobileNetworksClient.ListByResourceGroup. +// MobileNetworksClientListByResourceGroupResponse contains the response from method MobileNetworksClient.NewListByResourceGroupPager. type MobileNetworksClientListByResourceGroupResponse struct { ListResult } -// MobileNetworksClientListBySubscriptionResponse contains the response from method MobileNetworksClient.ListBySubscription. +// MobileNetworksClientListBySubscriptionResponse contains the response from method MobileNetworksClient.NewListBySubscriptionPager. type MobileNetworksClientListBySubscriptionResponse struct { ListResult } @@ -89,7 +89,7 @@ type MobileNetworksClientUpdateTagsResponse struct { MobileNetwork } -// OperationsClientListResponse contains the response from method OperationsClient.List. +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { OperationList } @@ -99,22 +99,22 @@ type PacketCoreControlPlaneVersionsClientGetResponse struct { PacketCoreControlPlaneVersion } -// PacketCoreControlPlaneVersionsClientListResponse contains the response from method PacketCoreControlPlaneVersionsClient.List. +// PacketCoreControlPlaneVersionsClientListResponse contains the response from method PacketCoreControlPlaneVersionsClient.NewListPager. type PacketCoreControlPlaneVersionsClientListResponse struct { PacketCoreControlPlaneVersionListResult } -// PacketCoreControlPlanesClientCollectDiagnosticsPackageResponse contains the response from method PacketCoreControlPlanesClient.CollectDiagnosticsPackage. +// PacketCoreControlPlanesClientCollectDiagnosticsPackageResponse contains the response from method PacketCoreControlPlanesClient.BeginCollectDiagnosticsPackage. type PacketCoreControlPlanesClientCollectDiagnosticsPackageResponse struct { AsyncOperationStatus } -// PacketCoreControlPlanesClientCreateOrUpdateResponse contains the response from method PacketCoreControlPlanesClient.CreateOrUpdate. +// PacketCoreControlPlanesClientCreateOrUpdateResponse contains the response from method PacketCoreControlPlanesClient.BeginCreateOrUpdate. type PacketCoreControlPlanesClientCreateOrUpdateResponse struct { PacketCoreControlPlane } -// PacketCoreControlPlanesClientDeleteResponse contains the response from method PacketCoreControlPlanesClient.Delete. +// PacketCoreControlPlanesClientDeleteResponse contains the response from method PacketCoreControlPlanesClient.BeginDelete. type PacketCoreControlPlanesClientDeleteResponse struct { // placeholder for future response values } @@ -124,22 +124,22 @@ type PacketCoreControlPlanesClientGetResponse struct { PacketCoreControlPlane } -// PacketCoreControlPlanesClientListByResourceGroupResponse contains the response from method PacketCoreControlPlanesClient.ListByResourceGroup. +// PacketCoreControlPlanesClientListByResourceGroupResponse contains the response from method PacketCoreControlPlanesClient.NewListByResourceGroupPager. type PacketCoreControlPlanesClientListByResourceGroupResponse struct { PacketCoreControlPlaneListResult } -// PacketCoreControlPlanesClientListBySubscriptionResponse contains the response from method PacketCoreControlPlanesClient.ListBySubscription. +// PacketCoreControlPlanesClientListBySubscriptionResponse contains the response from method PacketCoreControlPlanesClient.NewListBySubscriptionPager. type PacketCoreControlPlanesClientListBySubscriptionResponse struct { PacketCoreControlPlaneListResult } -// PacketCoreControlPlanesClientReinstallResponse contains the response from method PacketCoreControlPlanesClient.Reinstall. +// PacketCoreControlPlanesClientReinstallResponse contains the response from method PacketCoreControlPlanesClient.BeginReinstall. type PacketCoreControlPlanesClientReinstallResponse struct { AsyncOperationStatus } -// PacketCoreControlPlanesClientRollbackResponse contains the response from method PacketCoreControlPlanesClient.Rollback. +// PacketCoreControlPlanesClientRollbackResponse contains the response from method PacketCoreControlPlanesClient.BeginRollback. type PacketCoreControlPlanesClientRollbackResponse struct { AsyncOperationStatus } @@ -149,12 +149,12 @@ type PacketCoreControlPlanesClientUpdateTagsResponse struct { PacketCoreControlPlane } -// PacketCoreDataPlanesClientCreateOrUpdateResponse contains the response from method PacketCoreDataPlanesClient.CreateOrUpdate. +// PacketCoreDataPlanesClientCreateOrUpdateResponse contains the response from method PacketCoreDataPlanesClient.BeginCreateOrUpdate. type PacketCoreDataPlanesClientCreateOrUpdateResponse struct { PacketCoreDataPlane } -// PacketCoreDataPlanesClientDeleteResponse contains the response from method PacketCoreDataPlanesClient.Delete. +// PacketCoreDataPlanesClientDeleteResponse contains the response from method PacketCoreDataPlanesClient.BeginDelete. type PacketCoreDataPlanesClientDeleteResponse struct { // placeholder for future response values } @@ -164,7 +164,7 @@ type PacketCoreDataPlanesClientGetResponse struct { PacketCoreDataPlane } -// PacketCoreDataPlanesClientListByPacketCoreControlPlaneResponse contains the response from method PacketCoreDataPlanesClient.ListByPacketCoreControlPlane. +// PacketCoreDataPlanesClientListByPacketCoreControlPlaneResponse contains the response from method PacketCoreDataPlanesClient.NewListByPacketCoreControlPlanePager. type PacketCoreDataPlanesClientListByPacketCoreControlPlaneResponse struct { PacketCoreDataPlaneListResult } @@ -174,12 +174,12 @@ type PacketCoreDataPlanesClientUpdateTagsResponse struct { PacketCoreDataPlane } -// ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.CreateOrUpdate. +// ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.BeginCreateOrUpdate. type ServicesClientCreateOrUpdateResponse struct { Service } -// ServicesClientDeleteResponse contains the response from method ServicesClient.Delete. +// ServicesClientDeleteResponse contains the response from method ServicesClient.BeginDelete. type ServicesClientDeleteResponse struct { // placeholder for future response values } @@ -189,7 +189,7 @@ type ServicesClientGetResponse struct { Service } -// ServicesClientListByMobileNetworkResponse contains the response from method ServicesClient.ListByMobileNetwork. +// ServicesClientListByMobileNetworkResponse contains the response from method ServicesClient.NewListByMobileNetworkPager. type ServicesClientListByMobileNetworkResponse struct { ServiceListResult } @@ -199,12 +199,12 @@ type ServicesClientUpdateTagsResponse struct { Service } -// SimGroupsClientCreateOrUpdateResponse contains the response from method SimGroupsClient.CreateOrUpdate. +// SimGroupsClientCreateOrUpdateResponse contains the response from method SimGroupsClient.BeginCreateOrUpdate. type SimGroupsClientCreateOrUpdateResponse struct { SimGroup } -// SimGroupsClientDeleteResponse contains the response from method SimGroupsClient.Delete. +// SimGroupsClientDeleteResponse contains the response from method SimGroupsClient.BeginDelete. type SimGroupsClientDeleteResponse struct { // placeholder for future response values } @@ -214,12 +214,12 @@ type SimGroupsClientGetResponse struct { SimGroup } -// SimGroupsClientListByResourceGroupResponse contains the response from method SimGroupsClient.ListByResourceGroup. +// SimGroupsClientListByResourceGroupResponse contains the response from method SimGroupsClient.NewListByResourceGroupPager. type SimGroupsClientListByResourceGroupResponse struct { SimGroupListResult } -// SimGroupsClientListBySubscriptionResponse contains the response from method SimGroupsClient.ListBySubscription. +// SimGroupsClientListBySubscriptionResponse contains the response from method SimGroupsClient.NewListBySubscriptionPager. type SimGroupsClientListBySubscriptionResponse struct { SimGroupListResult } @@ -229,12 +229,12 @@ type SimGroupsClientUpdateTagsResponse struct { SimGroup } -// SimPoliciesClientCreateOrUpdateResponse contains the response from method SimPoliciesClient.CreateOrUpdate. +// SimPoliciesClientCreateOrUpdateResponse contains the response from method SimPoliciesClient.BeginCreateOrUpdate. type SimPoliciesClientCreateOrUpdateResponse struct { SimPolicy } -// SimPoliciesClientDeleteResponse contains the response from method SimPoliciesClient.Delete. +// SimPoliciesClientDeleteResponse contains the response from method SimPoliciesClient.BeginDelete. type SimPoliciesClientDeleteResponse struct { // placeholder for future response values } @@ -244,7 +244,7 @@ type SimPoliciesClientGetResponse struct { SimPolicy } -// SimPoliciesClientListByMobileNetworkResponse contains the response from method SimPoliciesClient.ListByMobileNetwork. +// SimPoliciesClientListByMobileNetworkResponse contains the response from method SimPoliciesClient.NewListByMobileNetworkPager. type SimPoliciesClientListByMobileNetworkResponse struct { SimPolicyListResult } @@ -254,27 +254,27 @@ type SimPoliciesClientUpdateTagsResponse struct { SimPolicy } -// SimsClientBulkDeleteResponse contains the response from method SimsClient.BulkDelete. +// SimsClientBulkDeleteResponse contains the response from method SimsClient.BeginBulkDelete. type SimsClientBulkDeleteResponse struct { AsyncOperationStatus } -// SimsClientBulkUploadEncryptedResponse contains the response from method SimsClient.BulkUploadEncrypted. +// SimsClientBulkUploadEncryptedResponse contains the response from method SimsClient.BeginBulkUploadEncrypted. type SimsClientBulkUploadEncryptedResponse struct { AsyncOperationStatus } -// SimsClientBulkUploadResponse contains the response from method SimsClient.BulkUpload. +// SimsClientBulkUploadResponse contains the response from method SimsClient.BeginBulkUpload. type SimsClientBulkUploadResponse struct { AsyncOperationStatus } -// SimsClientCreateOrUpdateResponse contains the response from method SimsClient.CreateOrUpdate. +// SimsClientCreateOrUpdateResponse contains the response from method SimsClient.BeginCreateOrUpdate. type SimsClientCreateOrUpdateResponse struct { Sim } -// SimsClientDeleteResponse contains the response from method SimsClient.Delete. +// SimsClientDeleteResponse contains the response from method SimsClient.BeginDelete. type SimsClientDeleteResponse struct { // placeholder for future response values } @@ -284,17 +284,17 @@ type SimsClientGetResponse struct { Sim } -// SimsClientListByGroupResponse contains the response from method SimsClient.ListByGroup. +// SimsClientListByGroupResponse contains the response from method SimsClient.NewListByGroupPager. type SimsClientListByGroupResponse struct { SimListResult } -// SitesClientCreateOrUpdateResponse contains the response from method SitesClient.CreateOrUpdate. +// SitesClientCreateOrUpdateResponse contains the response from method SitesClient.BeginCreateOrUpdate. type SitesClientCreateOrUpdateResponse struct { Site } -// SitesClientDeleteResponse contains the response from method SitesClient.Delete. +// SitesClientDeleteResponse contains the response from method SitesClient.BeginDelete. type SitesClientDeleteResponse struct { // placeholder for future response values } @@ -304,7 +304,7 @@ type SitesClientGetResponse struct { Site } -// SitesClientListByMobileNetworkResponse contains the response from method SitesClient.ListByMobileNetwork. +// SitesClientListByMobileNetworkResponse contains the response from method SitesClient.NewListByMobileNetworkPager. type SitesClientListByMobileNetworkResponse struct { SiteListResult } @@ -314,12 +314,12 @@ type SitesClientUpdateTagsResponse struct { Site } -// SlicesClientCreateOrUpdateResponse contains the response from method SlicesClient.CreateOrUpdate. +// SlicesClientCreateOrUpdateResponse contains the response from method SlicesClient.BeginCreateOrUpdate. type SlicesClientCreateOrUpdateResponse struct { Slice } -// SlicesClientDeleteResponse contains the response from method SlicesClient.Delete. +// SlicesClientDeleteResponse contains the response from method SlicesClient.BeginDelete. type SlicesClientDeleteResponse struct { // placeholder for future response values } @@ -329,7 +329,7 @@ type SlicesClientGetResponse struct { Slice } -// SlicesClientListByMobileNetworkResponse contains the response from method SlicesClient.ListByMobileNetwork. +// SlicesClientListByMobileNetworkResponse contains the response from method SlicesClient.NewListByMobileNetworkPager. type SlicesClientListByMobileNetworkResponse struct { SliceListResult } diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go index 2a1c36477701..0ea8c7961634 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go @@ -32,9 +32,9 @@ type ServicesClient struct { } // NewServicesClient creates a new instance of ServicesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates or updates a service. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// serviceName - The name of the service. You must not use any of the following reserved strings - default, requested or service -// parameters - Parameters supplied to the create or update service operation. -// options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - serviceName - The name of the service. You must not use any of the following reserved strings - default, requested or service +// - parameters - Parameters supplied to the create or update service operation. +// - options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate +// method. func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, serviceName string, parameters Service, options *ServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, mobileNetworkName, serviceName, parameters, options) @@ -80,6 +81,7 @@ func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Creates or updates a service. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *ServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, serviceName string, parameters Service, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, serviceName, parameters, options) @@ -128,11 +130,12 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes the specified service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// serviceName - The name of the service. You must not use any of the following reserved strings - default, requested or service -// options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - serviceName - The name of the service. You must not use any of the following reserved strings - default, requested or service +// - options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, mobileNetworkName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, mobileNetworkName, serviceName, options) @@ -149,6 +152,7 @@ func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes the specified service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *ServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, serviceName, options) @@ -197,11 +201,12 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets information about the specified service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// serviceName - The name of the service. You must not use any of the following reserved strings - default, requested or service -// options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - serviceName - The name of the service. You must not use any of the following reserved strings - default, requested or service +// - options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, mobileNetworkName string, serviceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, mobileNetworkName, serviceName, options) if err != nil { @@ -257,11 +262,12 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl } // NewListByMobileNetworkPager - Gets all the services in a mobile network. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// options - ServicesClientListByMobileNetworkOptions contains the optional parameters for the ServicesClient.ListByMobileNetwork -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - options - ServicesClientListByMobileNetworkOptions contains the optional parameters for the ServicesClient.NewListByMobileNetworkPager +// method. func (client *ServicesClient) NewListByMobileNetworkPager(resourceGroupName string, mobileNetworkName string, options *ServicesClientListByMobileNetworkOptions) *runtime.Pager[ServicesClientListByMobileNetworkResponse] { return runtime.NewPager(runtime.PagingHandler[ServicesClientListByMobileNetworkResponse]{ More: func(page ServicesClientListByMobileNetworkResponse) bool { @@ -327,12 +333,13 @@ func (client *ServicesClient) listByMobileNetworkHandleResponse(resp *http.Respo // UpdateTags - Updates service tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// serviceName - The name of the service. You must not use any of the following reserved strings - default, requested or service -// parameters - Parameters supplied to update service tags. -// options - ServicesClientUpdateTagsOptions contains the optional parameters for the ServicesClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - serviceName - The name of the service. You must not use any of the following reserved strings - default, requested or service +// - parameters - Parameters supplied to update service tags. +// - options - ServicesClientUpdateTagsOptions contains the optional parameters for the ServicesClient.UpdateTags method. func (client *ServicesClient) UpdateTags(ctx context.Context, resourceGroupName string, mobileNetworkName string, serviceName string, parameters TagsObject, options *ServicesClientUpdateTagsOptions) (ServicesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, mobileNetworkName, serviceName, parameters, options) if err != nil { 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 46fa0dc0d027..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client_example_test.go +++ /dev/null @@ -1,170 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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 c5c4140406eb..d4e0b5647ce2 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go @@ -32,9 +32,9 @@ type SimGroupsClient struct { } // NewSimGroupsClient creates a new instance of SimGroupsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSimGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SimGroupsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,12 +57,13 @@ func NewSimGroupsClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Creates or updates a SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// parameters - Parameters supplied to the create or update SIM group operation. -// options - SimGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SimGroupsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - parameters - Parameters supplied to the create or update SIM group operation. +// - options - SimGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SimGroupsClient.BeginCreateOrUpdate +// method. func (client *SimGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimGroup, options *SimGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SimGroupsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, simGroupName, parameters, options) @@ -79,6 +80,7 @@ func (client *SimGroupsClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Creates or updates a SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimGroup, options *SimGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) @@ -123,10 +125,11 @@ func (client *SimGroupsClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes the specified SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// options - SimGroupsClientBeginDeleteOptions contains the optional parameters for the SimGroupsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - options - SimGroupsClientBeginDeleteOptions contains the optional parameters for the SimGroupsClient.BeginDelete method. func (client *SimGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, simGroupName string, options *SimGroupsClientBeginDeleteOptions) (*runtime.Poller[SimGroupsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, simGroupName, options) @@ -143,6 +146,7 @@ func (client *SimGroupsClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Deletes the specified SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, simGroupName string, options *SimGroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, simGroupName, options) @@ -187,10 +191,11 @@ func (client *SimGroupsClient) deleteCreateRequest(ctx context.Context, resource // Get - Gets information about the specified SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// options - SimGroupsClientGetOptions contains the optional parameters for the SimGroupsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - options - SimGroupsClientGetOptions contains the optional parameters for the SimGroupsClient.Get method. func (client *SimGroupsClient) Get(ctx context.Context, resourceGroupName string, simGroupName string, options *SimGroupsClientGetOptions) (SimGroupsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, simGroupName, options) if err != nil { @@ -242,10 +247,11 @@ func (client *SimGroupsClient) getHandleResponse(resp *http.Response) (SimGroups } // NewListByResourceGroupPager - Gets all the SIM groups in a resource group. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - SimGroupsClientListByResourceGroupOptions contains the optional parameters for the SimGroupsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - SimGroupsClientListByResourceGroupOptions contains the optional parameters for the SimGroupsClient.NewListByResourceGroupPager +// method. func (client *SimGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *SimGroupsClientListByResourceGroupOptions) *runtime.Pager[SimGroupsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[SimGroupsClientListByResourceGroupResponse]{ More: func(page SimGroupsClientListByResourceGroupResponse) bool { @@ -306,9 +312,10 @@ func (client *SimGroupsClient) listByResourceGroupHandleResponse(resp *http.Resp } // NewListBySubscriptionPager - Gets all the SIM groups in a subscription. +// // Generated from API version 2022-11-01 -// options - SimGroupsClientListBySubscriptionOptions contains the optional parameters for the SimGroupsClient.ListBySubscription -// method. +// - options - SimGroupsClientListBySubscriptionOptions contains the optional parameters for the SimGroupsClient.NewListBySubscriptionPager +// method. func (client *SimGroupsClient) NewListBySubscriptionPager(options *SimGroupsClientListBySubscriptionOptions) *runtime.Pager[SimGroupsClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[SimGroupsClientListBySubscriptionResponse]{ More: func(page SimGroupsClientListBySubscriptionResponse) bool { @@ -366,11 +373,12 @@ func (client *SimGroupsClient) listBySubscriptionHandleResponse(resp *http.Respo // UpdateTags - Updates SIM group tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// parameters - Parameters supplied to update SIM group tags. -// options - SimGroupsClientUpdateTagsOptions contains the optional parameters for the SimGroupsClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - parameters - Parameters supplied to update SIM group tags. +// - options - SimGroupsClientUpdateTagsOptions contains the optional parameters for the SimGroupsClient.UpdateTags method. func (client *SimGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, simGroupName string, parameters TagsObject, options *SimGroupsClientUpdateTagsOptions) (SimGroupsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) if err != nil { 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 4ab8b09a060c..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client_example_test.go +++ /dev/null @@ -1,169 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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"), - Identity: &armmobilenetwork.ManagedServiceIdentity{ - Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": {}, - }, - }, - 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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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 7a0dde17e67f..edc21233fc20 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go @@ -32,9 +32,9 @@ type SimPoliciesClient struct { } // NewSimPoliciesClient creates a new instance of SimPoliciesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSimPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SimPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ func NewSimPoliciesClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// simPolicyName - The name of the SIM policy. -// parameters - Parameters supplied to the create or update SIM policy operation. -// options - SimPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the SimPoliciesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - simPolicyName - The name of the SIM policy. +// - parameters - Parameters supplied to the create or update SIM policy operation. +// - options - SimPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the SimPoliciesClient.BeginCreateOrUpdate +// method. func (client *SimPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, simPolicyName string, parameters SimPolicy, options *SimPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SimPoliciesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, mobileNetworkName, simPolicyName, parameters, options) @@ -80,6 +81,7 @@ func (client *SimPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Creates or updates a SIM policy. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, simPolicyName string, parameters SimPolicy, options *SimPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, simPolicyName, parameters, options) @@ -128,11 +130,12 @@ func (client *SimPoliciesClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes the specified SIM policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// simPolicyName - The name of the SIM policy. -// options - SimPoliciesClientBeginDeleteOptions contains the optional parameters for the SimPoliciesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - simPolicyName - The name of the SIM policy. +// - options - SimPoliciesClientBeginDeleteOptions contains the optional parameters for the SimPoliciesClient.BeginDelete method. func (client *SimPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, mobileNetworkName string, simPolicyName string, options *SimPoliciesClientBeginDeleteOptions) (*runtime.Poller[SimPoliciesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, mobileNetworkName, simPolicyName, options) @@ -149,6 +152,7 @@ func (client *SimPoliciesClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes the specified SIM policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, simPolicyName string, options *SimPoliciesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, simPolicyName, options) @@ -197,11 +201,12 @@ func (client *SimPoliciesClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets information about the specified SIM policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// simPolicyName - The name of the SIM policy. -// options - SimPoliciesClientGetOptions contains the optional parameters for the SimPoliciesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - simPolicyName - The name of the SIM policy. +// - options - SimPoliciesClientGetOptions contains the optional parameters for the SimPoliciesClient.Get method. func (client *SimPoliciesClient) Get(ctx context.Context, resourceGroupName string, mobileNetworkName string, simPolicyName string, options *SimPoliciesClientGetOptions) (SimPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, mobileNetworkName, simPolicyName, options) if err != nil { @@ -257,11 +262,12 @@ func (client *SimPoliciesClient) getHandleResponse(resp *http.Response) (SimPoli } // NewListByMobileNetworkPager - Gets all the SIM policies in a mobile network. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// options - SimPoliciesClientListByMobileNetworkOptions contains the optional parameters for the SimPoliciesClient.ListByMobileNetwork -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - options - SimPoliciesClientListByMobileNetworkOptions contains the optional parameters for the SimPoliciesClient.NewListByMobileNetworkPager +// method. func (client *SimPoliciesClient) NewListByMobileNetworkPager(resourceGroupName string, mobileNetworkName string, options *SimPoliciesClientListByMobileNetworkOptions) *runtime.Pager[SimPoliciesClientListByMobileNetworkResponse] { return runtime.NewPager(runtime.PagingHandler[SimPoliciesClientListByMobileNetworkResponse]{ More: func(page SimPoliciesClientListByMobileNetworkResponse) bool { @@ -327,12 +333,13 @@ func (client *SimPoliciesClient) listByMobileNetworkHandleResponse(resp *http.Re // UpdateTags - Updates SIM policy tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// simPolicyName - The name of the SIM policy. -// parameters - Parameters supplied to update SIM policy tags. -// options - SimPoliciesClientUpdateTagsOptions contains the optional parameters for the SimPoliciesClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - simPolicyName - The name of the SIM policy. +// - parameters - Parameters supplied to update SIM policy tags. +// - options - SimPoliciesClientUpdateTagsOptions contains the optional parameters for the SimPoliciesClient.UpdateTags method. func (client *SimPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, mobileNetworkName string, simPolicyName string, parameters TagsObject, options *SimPoliciesClientUpdateTagsOptions) (SimPoliciesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, mobileNetworkName, simPolicyName, parameters, options) if err != nil { 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 9ee4775a54ca..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client_example_test.go +++ /dev/null @@ -1,171 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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), - MaximumNumberOfBufferedPackets: to.Ptr[int32](200), - 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/stable/2022-11-01/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/stable/2022-11-01/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 e4f594053418..685a00a95b6d 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go @@ -32,9 +32,9 @@ type SimsClient struct { } // NewSimsClient creates a new instance of SimsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSimsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SimsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,11 +57,12 @@ func NewSimsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginBulkDelete - Bulk delete SIMs from a SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// parameters - Parameters supplied to the bulk SIM delete operation. -// options - SimsClientBeginBulkDeleteOptions contains the optional parameters for the SimsClient.BeginBulkDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - parameters - Parameters supplied to the bulk SIM delete operation. +// - options - SimsClientBeginBulkDeleteOptions contains the optional parameters for the SimsClient.BeginBulkDelete method. func (client *SimsClient) BeginBulkDelete(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimDeleteList, options *SimsClientBeginBulkDeleteOptions) (*runtime.Poller[SimsClientBulkDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.bulkDelete(ctx, resourceGroupName, simGroupName, parameters, options) @@ -78,6 +79,7 @@ func (client *SimsClient) BeginBulkDelete(ctx context.Context, resourceGroupName // BulkDelete - Bulk delete SIMs from a SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimsClient) bulkDelete(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimDeleteList, options *SimsClientBeginBulkDeleteOptions) (*http.Response, error) { req, err := client.bulkDeleteCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) @@ -122,11 +124,12 @@ func (client *SimsClient) bulkDeleteCreateRequest(ctx context.Context, resourceG // BeginBulkUpload - Bulk upload SIMs to a SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// parameters - Parameters supplied to the bulk SIM upload operation. -// options - SimsClientBeginBulkUploadOptions contains the optional parameters for the SimsClient.BeginBulkUpload method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - parameters - Parameters supplied to the bulk SIM upload operation. +// - options - SimsClientBeginBulkUploadOptions contains the optional parameters for the SimsClient.BeginBulkUpload method. func (client *SimsClient) BeginBulkUpload(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimUploadList, options *SimsClientBeginBulkUploadOptions) (*runtime.Poller[SimsClientBulkUploadResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.bulkUpload(ctx, resourceGroupName, simGroupName, parameters, options) @@ -143,6 +146,7 @@ func (client *SimsClient) BeginBulkUpload(ctx context.Context, resourceGroupName // BulkUpload - Bulk upload SIMs to a SIM group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimsClient) bulkUpload(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimUploadList, options *SimsClientBeginBulkUploadOptions) (*http.Response, error) { req, err := client.bulkUploadCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) @@ -187,12 +191,13 @@ func (client *SimsClient) bulkUploadCreateRequest(ctx context.Context, resourceG // BeginBulkUploadEncrypted - Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// parameters - Parameters supplied to the encrypted SIMs upload operation. -// options - SimsClientBeginBulkUploadEncryptedOptions contains the optional parameters for the SimsClient.BeginBulkUploadEncrypted -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - parameters - Parameters supplied to the encrypted SIMs upload operation. +// - options - SimsClientBeginBulkUploadEncryptedOptions contains the optional parameters for the SimsClient.BeginBulkUploadEncrypted +// method. func (client *SimsClient) BeginBulkUploadEncrypted(ctx context.Context, resourceGroupName string, simGroupName string, parameters EncryptedSimUploadList, options *SimsClientBeginBulkUploadEncryptedOptions) (*runtime.Poller[SimsClientBulkUploadEncryptedResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.bulkUploadEncrypted(ctx, resourceGroupName, simGroupName, parameters, options) @@ -209,6 +214,7 @@ func (client *SimsClient) BeginBulkUploadEncrypted(ctx context.Context, resource // BulkUploadEncrypted - Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimsClient) bulkUploadEncrypted(ctx context.Context, resourceGroupName string, simGroupName string, parameters EncryptedSimUploadList, options *SimsClientBeginBulkUploadEncryptedOptions) (*http.Response, error) { req, err := client.bulkUploadEncryptedCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) @@ -253,13 +259,14 @@ func (client *SimsClient) bulkUploadEncryptedCreateRequest(ctx context.Context, // BeginCreateOrUpdate - Creates or updates a SIM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// simName - The name of the SIM. -// parameters - Parameters supplied to the create or update SIM operation. -// options - SimsClientBeginCreateOrUpdateOptions contains the optional parameters for the SimsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - simName - The name of the SIM. +// - parameters - Parameters supplied to the create or update SIM operation. +// - options - SimsClientBeginCreateOrUpdateOptions contains the optional parameters for the SimsClient.BeginCreateOrUpdate +// method. func (client *SimsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, simGroupName string, simName string, parameters Sim, options *SimsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SimsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, simGroupName, simName, parameters, options) @@ -276,6 +283,7 @@ func (client *SimsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup // CreateOrUpdate - Creates or updates a SIM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimsClient) createOrUpdate(ctx context.Context, resourceGroupName string, simGroupName string, simName string, parameters Sim, options *SimsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, simGroupName, simName, parameters, options) @@ -324,11 +332,12 @@ func (client *SimsClient) createOrUpdateCreateRequest(ctx context.Context, resou // BeginDelete - Deletes the specified SIM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// simName - The name of the SIM. -// options - SimsClientBeginDeleteOptions contains the optional parameters for the SimsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - simName - The name of the SIM. +// - options - SimsClientBeginDeleteOptions contains the optional parameters for the SimsClient.BeginDelete method. func (client *SimsClient) BeginDelete(ctx context.Context, resourceGroupName string, simGroupName string, simName string, options *SimsClientBeginDeleteOptions) (*runtime.Poller[SimsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, simGroupName, simName, options) @@ -345,6 +354,7 @@ func (client *SimsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Deletes the specified SIM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SimsClient) deleteOperation(ctx context.Context, resourceGroupName string, simGroupName string, simName string, options *SimsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, simGroupName, simName, options) @@ -393,11 +403,12 @@ func (client *SimsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Gets information about the specified SIM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// simName - The name of the SIM. -// options - SimsClientGetOptions contains the optional parameters for the SimsClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - simName - The name of the SIM. +// - options - SimsClientGetOptions contains the optional parameters for the SimsClient.Get method. func (client *SimsClient) Get(ctx context.Context, resourceGroupName string, simGroupName string, simName string, options *SimsClientGetOptions) (SimsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, simGroupName, simName, options) if err != nil { @@ -453,10 +464,11 @@ func (client *SimsClient) getHandleResponse(resp *http.Response) (SimsClientGetR } // NewListByGroupPager - Gets all the SIMs in a SIM group. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// simGroupName - The name of the SIM Group. -// options - SimsClientListByGroupOptions contains the optional parameters for the SimsClient.ListByGroup method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - simGroupName - The name of the SIM Group. +// - options - SimsClientListByGroupOptions contains the optional parameters for the SimsClient.NewListByGroupPager method. func (client *SimsClient) NewListByGroupPager(resourceGroupName string, simGroupName string, options *SimsClientListByGroupOptions) *runtime.Pager[SimsClientListByGroupResponse] { return runtime.NewPager(runtime.PagingHandler[SimsClientListByGroupResponse]{ More: func(page SimsClientListByGroupResponse) bool { 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 c867b165d333..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client_example_test.go +++ /dev/null @@ -1,308 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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{ - DeviceType: to.Ptr("Video camera"), - IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000000"), - InternationalMobileSubscriberIdentity: to.Ptr("00000"), - 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"), - }, - }}, - AuthenticationKey: to.Ptr("00000000000000000000000000000000"), - OperatorKeyCode: to.Ptr("00000000000000000000000000000000"), - }, - }, 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/stable/2022-11-01/examples/SimListBySimGroup.json -func ExampleSimsClient_NewListByGroupPager() { - 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.NewListByGroupPager("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 - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json -func ExampleSimsClient_BeginBulkUpload() { - 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.BeginBulkUpload(ctx, "rg1", "testSimGroup", armmobilenetwork.SimUploadList{ - Sims: []*armmobilenetwork.SimNameAndProperties{ - { - Name: to.Ptr("testSim"), - Properties: &armmobilenetwork.SimPropertiesFormat{ - DeviceType: to.Ptr("Video camera"), - IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000000"), - InternationalMobileSubscriberIdentity: to.Ptr("00000"), - 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"), - }, - }}, - AuthenticationKey: to.Ptr("00000000000000000000000000000000"), - OperatorKeyCode: to.Ptr("00000000000000000000000000000000"), - }, - }, - { - Name: to.Ptr("testSim2"), - Properties: &armmobilenetwork.SimPropertiesFormat{ - DeviceType: to.Ptr("Video camera"), - IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000001"), - InternationalMobileSubscriberIdentity: to.Ptr("00000"), - 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.2"), - }, - }}, - AuthenticationKey: to.Ptr("00000000000000000000000000000000"), - OperatorKeyCode: to.Ptr("00000000000000000000000000000000"), - }, - }}, - }, 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/stable/2022-11-01/examples/SimBulkDelete.json -func ExampleSimsClient_BeginBulkDelete() { - 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.BeginBulkDelete(ctx, "testResourceGroupName", "testSimGroup", armmobilenetwork.SimDeleteList{ - Sims: []*string{ - to.Ptr("testSim"), - to.Ptr("testSim2")}, - }, 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/stable/2022-11-01/examples/SimBulkUploadEncrypted.json -func ExampleSimsClient_BeginBulkUploadEncrypted() { - 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.BeginBulkUploadEncrypted(ctx, "rg1", "testSimGroup", armmobilenetwork.EncryptedSimUploadList{ - AzureKeyIdentifier: to.Ptr[int32](1), - EncryptedTransportKey: to.Ptr("ABC123"), - SignedTransportKey: to.Ptr("ABC123"), - Sims: []*armmobilenetwork.SimNameAndEncryptedProperties{ - { - Name: to.Ptr("testSim"), - Properties: &armmobilenetwork.EncryptedSimPropertiesFormat{ - DeviceType: to.Ptr("Video camera"), - IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000000"), - InternationalMobileSubscriberIdentity: to.Ptr("00000"), - 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"), - }, - }}, - EncryptedCredentials: to.Ptr("ABC123"), - }, - }, - { - Name: to.Ptr("testSim2"), - Properties: &armmobilenetwork.EncryptedSimPropertiesFormat{ - DeviceType: to.Ptr("Video camera"), - IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000001"), - InternationalMobileSubscriberIdentity: to.Ptr("00000"), - 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.2"), - }, - }}, - EncryptedCredentials: to.Ptr("ABC123"), - }, - }}, - VendorKeyFingerprint: to.Ptr("ABC123"), - Version: 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 -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go index 175395dea0c7..810da7816b5a 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go @@ -32,9 +32,9 @@ type SitesClient struct { } // NewSitesClient creates a new instance of SitesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SitesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewSitesClient(subscriptionID string, credential azcore.TokenCredential, op // BeginCreateOrUpdate - Creates or updates a mobile network site. Must be created in the same location as its parent mobile // network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// siteName - The name of the mobile network site. -// parameters - Parameters supplied to the create or update mobile network site operation. -// options - SitesClientBeginCreateOrUpdateOptions contains the optional parameters for the SitesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - siteName - The name of the mobile network site. +// - parameters - Parameters supplied to the create or update mobile network site operation. +// - options - SitesClientBeginCreateOrUpdateOptions contains the optional parameters for the SitesClient.BeginCreateOrUpdate +// method. func (client *SitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, parameters Site, options *SitesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SitesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, mobileNetworkName, siteName, parameters, options) @@ -81,6 +82,7 @@ func (client *SitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou // CreateOrUpdate - Creates or updates a mobile network site. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SitesClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, parameters Site, options *SitesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, siteName, parameters, options) @@ -130,11 +132,12 @@ func (client *SitesClient) createOrUpdateCreateRequest(ctx context.Context, reso // BeginDelete - Deletes the specified mobile network site. This will also delete any network functions that are a part of // this site. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// siteName - The name of the mobile network site. -// options - SitesClientBeginDeleteOptions contains the optional parameters for the SitesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - siteName - The name of the mobile network site. +// - options - SitesClientBeginDeleteOptions contains the optional parameters for the SitesClient.BeginDelete method. func (client *SitesClient) BeginDelete(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, options *SitesClientBeginDeleteOptions) (*runtime.Poller[SitesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, mobileNetworkName, siteName, options) @@ -152,6 +155,7 @@ func (client *SitesClient) BeginDelete(ctx context.Context, resourceGroupName st // Delete - Deletes the specified mobile network site. This will also delete any network functions that are a part of this // site. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SitesClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, options *SitesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, siteName, options) @@ -200,11 +204,12 @@ func (client *SitesClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Gets information about the specified mobile network site. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// siteName - The name of the mobile network site. -// options - SitesClientGetOptions contains the optional parameters for the SitesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - siteName - The name of the mobile network site. +// - options - SitesClientGetOptions contains the optional parameters for the SitesClient.Get method. func (client *SitesClient) Get(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, options *SitesClientGetOptions) (SitesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, mobileNetworkName, siteName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *SitesClient) getHandleResponse(resp *http.Response) (SitesClientGe } // NewListByMobileNetworkPager - Lists all sites in the mobile network. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// options - SitesClientListByMobileNetworkOptions contains the optional parameters for the SitesClient.ListByMobileNetwork -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - options - SitesClientListByMobileNetworkOptions contains the optional parameters for the SitesClient.NewListByMobileNetworkPager +// method. func (client *SitesClient) NewListByMobileNetworkPager(resourceGroupName string, mobileNetworkName string, options *SitesClientListByMobileNetworkOptions) *runtime.Pager[SitesClientListByMobileNetworkResponse] { return runtime.NewPager(runtime.PagingHandler[SitesClientListByMobileNetworkResponse]{ More: func(page SitesClientListByMobileNetworkResponse) bool { @@ -330,12 +336,13 @@ func (client *SitesClient) listByMobileNetworkHandleResponse(resp *http.Response // UpdateTags - Updates site tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// siteName - The name of the mobile network site. -// parameters - Parameters supplied to update network site tags. -// options - SitesClientUpdateTagsOptions contains the optional parameters for the SitesClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - siteName - The name of the mobile network site. +// - parameters - Parameters supplied to update network site tags. +// - options - SitesClientUpdateTagsOptions contains the optional parameters for the SitesClient.UpdateTags method. func (client *SitesClient) UpdateTags(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, parameters TagsObject, options *SitesClientUpdateTagsOptions) (SitesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, mobileNetworkName, siteName, parameters, options) if err != nil { 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 3c263aa162e4..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client_example_test.go +++ /dev/null @@ -1,132 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package 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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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{}, - }, 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/stable/2022-11-01/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/stable/2022-11-01/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 156bb49efe0c..9e9368fc36f9 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go @@ -32,9 +32,9 @@ type SlicesClient struct { } // NewSlicesClient creates a new instance of SlicesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSlicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SlicesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ func NewSlicesClient(subscriptionID string, credential azcore.TokenCredential, o // BeginCreateOrUpdate - Creates or updates a network slice. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// sliceName - The name of the network slice. -// parameters - Parameters supplied to the create or update network slice operation. -// options - SlicesClientBeginCreateOrUpdateOptions contains the optional parameters for the SlicesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - sliceName - The name of the network slice. +// - parameters - Parameters supplied to the create or update network slice operation. +// - options - SlicesClientBeginCreateOrUpdateOptions contains the optional parameters for the SlicesClient.BeginCreateOrUpdate +// method. func (client *SlicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, sliceName string, parameters Slice, options *SlicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SlicesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, mobileNetworkName, sliceName, parameters, options) @@ -80,6 +81,7 @@ func (client *SlicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGro // CreateOrUpdate - Creates or updates a network slice. Must be created in the same location as its parent mobile network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SlicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, sliceName string, parameters Slice, options *SlicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, sliceName, parameters, options) @@ -128,11 +130,12 @@ func (client *SlicesClient) createOrUpdateCreateRequest(ctx context.Context, res // BeginDelete - Deletes the specified network slice. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// sliceName - The name of the network slice. -// options - SlicesClientBeginDeleteOptions contains the optional parameters for the SlicesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - sliceName - The name of the network slice. +// - options - SlicesClientBeginDeleteOptions contains the optional parameters for the SlicesClient.BeginDelete method. func (client *SlicesClient) BeginDelete(ctx context.Context, resourceGroupName string, mobileNetworkName string, sliceName string, options *SlicesClientBeginDeleteOptions) (*runtime.Poller[SlicesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, mobileNetworkName, sliceName, options) @@ -149,6 +152,7 @@ func (client *SlicesClient) BeginDelete(ctx context.Context, resourceGroupName s // Delete - Deletes the specified network slice. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 func (client *SlicesClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, sliceName string, options *SlicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, sliceName, options) @@ -197,11 +201,12 @@ func (client *SlicesClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets information about the specified network slice. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// sliceName - The name of the network slice. -// options - SlicesClientGetOptions contains the optional parameters for the SlicesClient.Get method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - sliceName - The name of the network slice. +// - options - SlicesClientGetOptions contains the optional parameters for the SlicesClient.Get method. func (client *SlicesClient) Get(ctx context.Context, resourceGroupName string, mobileNetworkName string, sliceName string, options *SlicesClientGetOptions) (SlicesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, mobileNetworkName, sliceName, options) if err != nil { @@ -257,11 +262,12 @@ func (client *SlicesClient) getHandleResponse(resp *http.Response) (SlicesClient } // NewListByMobileNetworkPager - Lists all slices in the mobile network. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// options - SlicesClientListByMobileNetworkOptions contains the optional parameters for the SlicesClient.ListByMobileNetwork -// method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - options - SlicesClientListByMobileNetworkOptions contains the optional parameters for the SlicesClient.NewListByMobileNetworkPager +// method. func (client *SlicesClient) NewListByMobileNetworkPager(resourceGroupName string, mobileNetworkName string, options *SlicesClientListByMobileNetworkOptions) *runtime.Pager[SlicesClientListByMobileNetworkResponse] { return runtime.NewPager(runtime.PagingHandler[SlicesClientListByMobileNetworkResponse]{ More: func(page SlicesClientListByMobileNetworkResponse) bool { @@ -327,12 +333,13 @@ func (client *SlicesClient) listByMobileNetworkHandleResponse(resp *http.Respons // UpdateTags - Updates slice tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-11-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// mobileNetworkName - The name of the mobile network. -// sliceName - The name of the network slice. -// parameters - Parameters supplied to update network slice tags. -// options - SlicesClientUpdateTagsOptions contains the optional parameters for the SlicesClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - mobileNetworkName - The name of the mobile network. +// - sliceName - The name of the network slice. +// - parameters - Parameters supplied to update network slice tags. +// - options - SlicesClientUpdateTagsOptions contains the optional parameters for the SlicesClient.UpdateTags method. func (client *SlicesClient) UpdateTags(ctx context.Context, resourceGroupName string, mobileNetworkName string, sliceName string, parameters TagsObject, options *SlicesClientUpdateTagsOptions) (SlicesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, mobileNetworkName, sliceName, parameters, options) if err != nil { 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 de61f9c9ad94..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client_example_test.go +++ /dev/null @@ -1,138 +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/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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/stable/2022-11-01/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 - } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/time_rfc3339.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/time_rfc3339.go index 30077a7e0625..ccc57ce01d61 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/time_rfc3339.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/time_rfc3339.go @@ -62,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) {