diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md index 527bb9596ada..a9cd8490969d 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 3.1.0 (2023-10-09) +### Features Added + +- New value `InstallationReasonControlPlaneAccessInterfaceHasChanged`, `InstallationReasonControlPlaneAccessVirtualIPv4AddressesHasChanged`, `InstallationReasonPublicLandMobileNetworkIdentifierHasChanged`, `InstallationReasonUserPlaneAccessInterfaceHasChanged`, `InstallationReasonUserPlaneAccessVirtualIPv4AddressesHasChanged`, `InstallationReasonUserPlaneDataInterfaceHasChanged` added to enum type `InstallationReason` +- New struct `EventHubConfiguration` +- New struct `NASRerouteConfiguration` +- New struct `SignalingConfiguration` +- New field `OutputFiles` in struct `PacketCapturePropertiesFormat` +- New field `ControlPlaneAccessVirtualIPv4Addresses`, `EventHub`, `Signaling` in struct `PacketCoreControlPlanePropertiesFormat` +- New field `UserPlaneAccessVirtualIPv4Addresses` in struct `PacketCoreDataPlanePropertiesFormat` + + ## 3.0.0 (2023-07-28) ### Breaking Changes diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go index 46e464d5906d..ac05195d437a 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client.go @@ -47,7 +47,7 @@ func NewAttachedDataNetworksClient(subscriptionID string, credential azcore.Toke // core data plane. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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. @@ -74,7 +74,7 @@ func (client *AttachedDataNetworksClient) BeginCreateOrUpdate(ctx context.Contex // core data plane. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *AttachedDataNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, attachedDataNetworkName string, parameters AttachedDataNetwork, options *AttachedDataNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, parameters, options) @@ -117,7 +117,7 @@ func (client *AttachedDataNetworksClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -129,7 +129,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -154,7 +154,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *AttachedDataNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, attachedDataNetworkName string, options *AttachedDataNetworksClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName, options) @@ -197,7 +197,7 @@ func (client *AttachedDataNetworksClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -206,7 +206,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -256,7 +256,7 @@ func (client *AttachedDataNetworksClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,7 +273,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -328,7 +328,7 @@ func (client *AttachedDataNetworksClient) listByPacketCoreDataPlaneCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,7 +346,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -397,7 +397,7 @@ func (client *AttachedDataNetworksClient) updateTagsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 323e244f65df..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/attacheddatanetworks_client_example_test.go +++ /dev/null @@ -1,349 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAttachedDataNetworksClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAttachedDataNetworksClient().Get(ctx, "rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AttachedDataNetwork = armmobilenetwork.AttachedDataNetwork{ - // Name: to.Ptr("TestAttachedDataNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/attachedDataNetwork"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // 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), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAttachedDataNetworksClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AttachedDataNetwork = armmobilenetwork.AttachedDataNetwork{ - // Name: to.Ptr("TestAttachedDataNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/attachedDataNetwork"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // 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), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAttachedDataNetworksClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AttachedDataNetwork = armmobilenetwork.AttachedDataNetwork{ - // Name: to.Ptr("TestAccessPoint"), - // Type: to.Ptr("Microsoft.MobileNetwork/attachedDataNetwork"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // 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), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAttachedDataNetworksClient().NewListByPacketCoreDataPlanePager("rg1", "TestPacketCoreCP", "TestPacketCoreDP", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AttachedDataNetworkListResult = armmobilenetwork.AttachedDataNetworkListResult{ - // Value: []*armmobilenetwork.AttachedDataNetwork{ - // { - // Name: to.Ptr("TestAttachedDataNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/attachedDataNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // 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), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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"), - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/autorest.md b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/autorest.md index 0b958dc23a9c..79a7530e5c9b 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/autorest.md +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/autorest.md @@ -5,9 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/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: 3.0.0 -tag: package-2023-06 +module-version: 3.1.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go index e418fdbe4b3a..5ff2a49ecca6 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/constants.go @@ -10,7 +10,7 @@ package armmobilenetwork const ( moduleName = "armmobilenetwork" - moduleVersion = "v3.0.0" + moduleVersion = "v3.1.0" ) // AuthenticationType - How to authenticate users who access local diagnostics APIs. @@ -159,24 +159,51 @@ func PossibleDiagnosticsPackageStatusValues() []DiagnosticsPackageStatus { } } -// InstallationReason - The reason for the installation state of the packet core. +// InstallationReason - The reason or list of reasons why a packet core has not been installed or requires a reinstall. type InstallationReason string const ( - // InstallationReasonNoAttachedDataNetworks - The packet core has no attached data networks. + // InstallationReasonControlPlaneAccessInterfaceHasChanged - A reinstall is required as the packet core is running with out-of-date + // control plane access interface information. + InstallationReasonControlPlaneAccessInterfaceHasChanged InstallationReason = "ControlPlaneAccessInterfaceHasChanged" + // InstallationReasonControlPlaneAccessVirtualIPv4AddressesHasChanged - A reinstall is required as the packet core is running + // with out-of-date control plane access network virtual IP address. + InstallationReasonControlPlaneAccessVirtualIPv4AddressesHasChanged InstallationReason = "ControlPlaneAccessVirtualIpv4AddressesHasChanged" + // InstallationReasonNoAttachedDataNetworks - The packet core has not been installed as the packet core has no attached data + // networks. InstallationReasonNoAttachedDataNetworks InstallationReason = "NoAttachedDataNetworks" - // InstallationReasonNoPacketCoreDataPlane - There is no configured data plane for this packet core. + // InstallationReasonNoPacketCoreDataPlane - The packet core has not been installed as there is no configured data plane for + // this packet core. InstallationReasonNoPacketCoreDataPlane InstallationReason = "NoPacketCoreDataPlane" - // InstallationReasonNoSlices - The mobile network does not have any applicable configured slices. + // InstallationReasonNoSlices - The packet core has not been installed as the mobile network does not have any applicable + // configured slices. InstallationReasonNoSlices InstallationReason = "NoSlices" + // InstallationReasonPublicLandMobileNetworkIdentifierHasChanged - A reinstall is required as the packet core is running with + // out-of-date PLMN ID. + InstallationReasonPublicLandMobileNetworkIdentifierHasChanged InstallationReason = "PublicLandMobileNetworkIdentifierHasChanged" + // InstallationReasonUserPlaneAccessInterfaceHasChanged - A reinstall is required as the packet core is running with out-of-date + // user plane core interface. + InstallationReasonUserPlaneAccessInterfaceHasChanged InstallationReason = "UserPlaneAccessInterfaceHasChanged" + // InstallationReasonUserPlaneAccessVirtualIPv4AddressesHasChanged - A reinstall is required as the packet core is running + // with out-of-date user plane access network virtual IP address. + InstallationReasonUserPlaneAccessVirtualIPv4AddressesHasChanged InstallationReason = "UserPlaneAccessVirtualIpv4AddressesHasChanged" + // InstallationReasonUserPlaneDataInterfaceHasChanged - A reinstall is required as the packet core is running with out-of-date + // user plane access interface. + InstallationReasonUserPlaneDataInterfaceHasChanged InstallationReason = "UserPlaneDataInterfaceHasChanged" ) // PossibleInstallationReasonValues returns the possible values for the InstallationReason const type. func PossibleInstallationReasonValues() []InstallationReason { return []InstallationReason{ + InstallationReasonControlPlaneAccessInterfaceHasChanged, + InstallationReasonControlPlaneAccessVirtualIPv4AddressesHasChanged, InstallationReasonNoAttachedDataNetworks, InstallationReasonNoPacketCoreDataPlane, InstallationReasonNoSlices, + InstallationReasonPublicLandMobileNetworkIdentifierHasChanged, + InstallationReasonUserPlaneAccessInterfaceHasChanged, + InstallationReasonUserPlaneAccessVirtualIPv4AddressesHasChanged, + InstallationReasonUserPlaneDataInterfaceHasChanged, } } diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go index 0ac458aaa55a..8dcb4fc30275 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client.go @@ -46,7 +46,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -71,7 +71,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *DataNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, dataNetworkName string, parameters DataNetwork, options *DataNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, dataNetworkName, parameters, options) @@ -110,7 +110,7 @@ func (client *DataNetworksClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -122,7 +122,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -146,7 +146,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *DataNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, dataNetworkName string, options *DataNetworksClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, dataNetworkName, options) @@ -185,7 +185,7 @@ func (client *DataNetworksClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,7 +194,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -238,7 +238,7 @@ func (client *DataNetworksClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +255,7 @@ func (client *DataNetworksClient) getHandleResponse(resp *http.Response) (DataNe // NewListByMobileNetworkPager - Lists all data networks in the mobile network. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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.NewListByMobileNetworkPager @@ -305,7 +305,7 @@ func (client *DataNetworksClient) listByMobileNetworkCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -323,7 +323,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -368,7 +368,7 @@ func (client *DataNetworksClient) updateTagsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 fb03f0f6be29..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/datanetworks_client_example_test.go +++ /dev/null @@ -1,224 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDataNetworksClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataNetworksClient().Get(ctx, "rg1", "testMobileNetwork", "testDataNetwork", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataNetwork = armmobilenetwork.DataNetwork{ - // Name: to.Ptr("testDataNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/dataNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testDataNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.DataNetworkPropertiesFormat{ - // Description: to.Ptr("myFavouriteDataNetwork"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDataNetworksClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataNetwork = armmobilenetwork.DataNetwork{ - // Name: to.Ptr("testDataNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/dataNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testDataNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.DataNetworkPropertiesFormat{ - // Description: to.Ptr("myFavouriteDataNetwork"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDataNetworksClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DataNetwork = armmobilenetwork.DataNetwork{ - // Name: to.Ptr("testDataNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/dataNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testDataNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armmobilenetwork.DataNetworkPropertiesFormat{ - // Description: to.Ptr("myFavouriteDataNetwork"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDataNetworksClient().NewListByMobileNetworkPager("rg1", "testMobileNetwork", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DataNetworkListResult = armmobilenetwork.DataNetworkListResult{ - // Value: []*armmobilenetwork.DataNetwork{ - // { - // Name: to.Ptr("testDataNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/dataNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testDataNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.DataNetworkPropertiesFormat{ - // Description: to.Ptr("myFavouriteDataNetwork"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/diagnosticspackages_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/diagnosticspackages_client.go index 4f82fe9039dc..29b7a28032e8 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/diagnosticspackages_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/diagnosticspackages_client.go @@ -46,7 +46,7 @@ func NewDiagnosticsPackagesClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Creates or updates a diagnostics package. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - diagnosticsPackageName - The name of the diagnostics package. @@ -70,7 +70,7 @@ func (client *DiagnosticsPackagesClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates a diagnostics package. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *DiagnosticsPackagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, diagnosticsPackageName string, options *DiagnosticsPackagesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, options) @@ -109,7 +109,7 @@ func (client *DiagnosticsPackagesClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *DiagnosticsPackagesClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Deletes the specified diagnostics package. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - diagnosticsPackageName - The name of the diagnostics package. @@ -142,7 +142,7 @@ func (client *DiagnosticsPackagesClient) BeginDelete(ctx context.Context, resour // Delete - Deletes the specified diagnostics package. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *DiagnosticsPackagesClient) deleteOperation(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, diagnosticsPackageName string, options *DiagnosticsPackagesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, options) @@ -181,7 +181,7 @@ func (client *DiagnosticsPackagesClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +190,7 @@ func (client *DiagnosticsPackagesClient) deleteCreateRequest(ctx context.Context // Get - Gets information about the specified diagnostics package. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - diagnosticsPackageName - The name of the diagnostics package. @@ -234,7 +234,7 @@ func (client *DiagnosticsPackagesClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -251,7 +251,7 @@ func (client *DiagnosticsPackagesClient) getHandleResponse(resp *http.Response) // NewListByPacketCoreControlPlanePager - Lists all the diagnostics packages under a packet core control plane. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - options - DiagnosticsPackagesClientListByPacketCoreControlPlaneOptions contains the optional parameters for the DiagnosticsPackagesClient.NewListByPacketCoreControlPlanePager @@ -301,7 +301,7 @@ func (client *DiagnosticsPackagesClient) listByPacketCoreControlPlaneCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/diagnosticspackages_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/diagnosticspackages_client_example_test.go deleted file mode 100644 index 9d5a5233a8c4..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/diagnosticspackages_client_example_test.go +++ /dev/null @@ -1,143 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageCreate.json -func ExampleDiagnosticsPackagesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDiagnosticsPackagesClient().BeginCreateOrUpdate(ctx, "rg1", "TestPacketCoreCP", "dp1", 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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DiagnosticsPackage = armmobilenetwork.DiagnosticsPackage{ - // Name: to.Ptr("dp1"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/diagnosticsPackages/dp1"), - // Properties: &armmobilenetwork.DiagnosticsPackagePropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Status: to.Ptr(armmobilenetwork.DiagnosticsPackageStatusCollected), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageGet.json -func ExampleDiagnosticsPackagesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsPackagesClient().Get(ctx, "rg1", "TestPacketCoreCP", "dp1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DiagnosticsPackage = armmobilenetwork.DiagnosticsPackage{ - // Name: to.Ptr("dp1"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/diagnosticsPackages/dp1"), - // Properties: &armmobilenetwork.DiagnosticsPackagePropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Status: to.Ptr(armmobilenetwork.DiagnosticsPackageStatus("Stopped")), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageDelete.json -func ExampleDiagnosticsPackagesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDiagnosticsPackagesClient().BeginDelete(ctx, "rg1", "TestPacketCoreCP", "dp1", 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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageListByPacketCoreControlPlane.json -func ExampleDiagnosticsPackagesClient_NewListByPacketCoreControlPlanePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsPackagesClient().NewListByPacketCoreControlPlanePager("rg1", "TestPacketCoreCP", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DiagnosticsPackageListResult = armmobilenetwork.DiagnosticsPackageListResult{ - // Value: []*armmobilenetwork.DiagnosticsPackage{ - // { - // Name: to.Ptr("dp1"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/diagnosticsPackages/pc1"), - // Properties: &armmobilenetwork.DiagnosticsPackagePropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Status: to.Ptr(armmobilenetwork.DiagnosticsPackageStatus("Stopped")), - // }, - // }, - // { - // Name: to.Ptr("dp2"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/diagnosticsPackages/dp2"), - // Properties: &armmobilenetwork.DiagnosticsPackagePropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Status: to.Ptr(armmobilenetwork.DiagnosticsPackageStatus("Stopped")), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod index d749566fd781..f6081e7ef4a5 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/go.mod @@ -4,13 +4,13 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/stretchr/testify v1.7.0 ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go index c65e4be1c7aa..152dbf3bd78c 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client.go @@ -46,7 +46,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -70,7 +70,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *MobileNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, parameters MobileNetwork, options *MobileNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, parameters, options) @@ -105,7 +105,7 @@ func (client *MobileNetworksClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -117,7 +117,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -140,7 +140,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *MobileNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, options *MobileNetworksClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, options) @@ -175,7 +175,7 @@ func (client *MobileNetworksClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,7 +184,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -223,7 +223,7 @@ func (client *MobileNetworksClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -240,7 +240,7 @@ func (client *MobileNetworksClient) getHandleResponse(resp *http.Response) (Mobi // NewListByResourceGroupPager - Lists all the mobile networks in a resource group. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - MobileNetworksClientListByResourceGroupOptions contains the optional parameters for the MobileNetworksClient.NewListByResourceGroupPager // method. @@ -285,7 +285,7 @@ func (client *MobileNetworksClient) listByResourceGroupCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +302,7 @@ func (client *MobileNetworksClient) listByResourceGroupHandleResponse(resp *http // NewListBySubscriptionPager - Lists all the mobile networks in a subscription. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - options - MobileNetworksClientListBySubscriptionOptions contains the optional parameters for the MobileNetworksClient.NewListBySubscriptionPager // method. func (client *MobileNetworksClient) NewListBySubscriptionPager(options *MobileNetworksClientListBySubscriptionOptions) *runtime.Pager[MobileNetworksClientListBySubscriptionResponse] { @@ -342,7 +342,7 @@ func (client *MobileNetworksClient) listBySubscriptionCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -360,7 +360,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -401,7 +401,7 @@ func (client *MobileNetworksClient) updateTagsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 9eca4c58375c..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/mobilenetworks_client_example_test.go +++ /dev/null @@ -1,290 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMobileNetworksClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMobileNetworksClient().Get(ctx, "rg1", "testMobileNetwork", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MobileNetwork = armmobilenetwork.MobileNetwork{ - // Name: to.Ptr("testMobileNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // PublicLandMobileNetworkIdentifier: &armmobilenetwork.PlmnID{ - // Mcc: to.Ptr("001"), - // Mnc: to.Ptr("01"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMobileNetworksClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MobileNetwork = armmobilenetwork.MobileNetwork{ - // Name: to.Ptr("testMobileNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // PublicLandMobileNetworkIdentifier: &armmobilenetwork.PlmnID{ - // Mcc: to.Ptr("001"), - // Mnc: to.Ptr("01"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMobileNetworksClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.MobileNetwork = armmobilenetwork.MobileNetwork{ - // Name: to.Ptr("testMobileNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armmobilenetwork.PropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // PublicLandMobileNetworkIdentifier: &armmobilenetwork.PlmnID{ - // Mcc: to.Ptr("001"), - // Mnc: to.Ptr("01"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMobileNetworksClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListResult = armmobilenetwork.ListResult{ - // Value: []*armmobilenetwork.MobileNetwork{ - // { - // Name: to.Ptr("testMobileNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // PublicLandMobileNetworkIdentifier: &armmobilenetwork.PlmnID{ - // Mcc: to.Ptr("001"), - // Mnc: to.Ptr("01"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMobileNetworksClient().NewListByResourceGroupPager("rg1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ListResult = armmobilenetwork.ListResult{ - // Value: []*armmobilenetwork.MobileNetwork{ - // { - // Name: to.Ptr("testMobileNetwork"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // PublicLandMobileNetworkIdentifier: &armmobilenetwork.PlmnID{ - // Mcc: to.Ptr("001"), - // Mnc: to.Ptr("01"), - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models.go index fee238b08398..a1a19e8f4577 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models.go @@ -444,6 +444,15 @@ type ErrorResponse struct { Error *ErrorDetail } +// EventHubConfiguration - Configuration for sending packet core events to Azure Event Hub. +type EventHubConfiguration struct { + // REQUIRED; Resource ID of Azure Event Hub to send packet core events to. + ID *string + + // The duration (in seconds) between UE usage reports. + ReportingInterval *int32 +} + // HTTPSServerCertificate - HTTPS server certificate configuration. type HTTPSServerCertificate struct { // REQUIRED; The certificate URL, unversioned. For example: https://contosovault.vault.azure.net/certificates/ingress. @@ -557,6 +566,12 @@ type MobileNetwork struct { Type *string } +// NASRerouteConfiguration - Configuration enabling NAS reroute. +type NASRerouteConfiguration struct { + // REQUIRED; The macro network's MME group ID. This is where unknown UEs are sent to via NAS reroute. + MacroMmeGroupID *int32 +} + // NaptConfiguration - The network address and port translation settings to use for the attached data network. type NaptConfiguration struct { // Whether NAPT is enabled for connections to this attached data network. @@ -660,6 +675,9 @@ type PacketCapturePropertiesFormat struct { // READ-ONLY; The start time of the packet capture session. CaptureStartTime *time.Time + // READ-ONLY; The list of output files of a packet capture session. + OutputFiles []*string + // READ-ONLY; The provisioning state of the packet capture session resource. ProvisioningState *ProvisioningState @@ -731,18 +749,30 @@ type PacketCoreControlPlanePropertiesFormat struct { // as the packet core control plane. Sites []*SiteResourceID + // The virtual IP address(es) for the control plane on the access network in a High Availability (HA) system. In an HA deployment + // the access network router should be configured to anycast traffic for + // this address to the control plane access interfaces on the active and standby nodes. In non-HA system this list should + // be omitted or empty. + ControlPlaneAccessVirtualIPv4Addresses []*string + // The core network technology generation (5G core or EPC / 4G core). CoreNetworkTechnology *CoreNetworkType // Configuration for uploading packet core diagnostics DiagnosticsUpload *DiagnosticsUploadConfiguration + // Configuration for sending packet core events to an Azure Event Hub. + EventHub *EventHubConfiguration + // The installation state of the packet core control plane resource. Installation *Installation // Settings to allow interoperability with third party components e.g. RANs and UEs. InteropSettings any + // Signaling configuration for the packet core. + Signaling *SignalingConfiguration + // 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 // value to allow for GTP encapsulation. @@ -843,6 +873,12 @@ type PacketCoreDataPlanePropertiesFormat struct { // is the S1-U interface. UserPlaneAccessInterface *InterfaceProperties + // The virtual IP address(es) for the user plane on the access network in a High Availability (HA) system. In an HA deployment + // the access network router should be configured to forward traffic for this + // address to the control plane access interface on the active or standby node. In non-HA system this list should be omitted + // or empty. + UserPlaneAccessVirtualIPv4Addresses []*string + // READ-ONLY; The provisioning state of the packet core data plane resource. ProvisioningState *ProvisioningState } @@ -1154,6 +1190,12 @@ type ServiceResourceID struct { ID *string } +// SignalingConfiguration - Signaling configuration for the packet core. +type SignalingConfiguration struct { + // Configuration enabling 4G NAS reroute. + NasReroute *NASRerouteConfiguration +} + // Sim - SIM resource. type Sim struct { // REQUIRED; SIM Properties. diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models_serde.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models_serde.go index 33dcbae7127b..bade0d246696 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models_serde.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/models_serde.go @@ -1079,6 +1079,37 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EventHubConfiguration. +func (e EventHubConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "reportingInterval", e.ReportingInterval) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubConfiguration. +func (e *EventHubConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "reportingInterval": + err = unpopulate(val, "ReportingInterval", &e.ReportingInterval) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type HTTPSServerCertificate. func (h HTTPSServerCertificate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1394,6 +1425,33 @@ func (m *MobileNetwork) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type NASRerouteConfiguration. +func (n NASRerouteConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "macroMmeGroupId", n.MacroMmeGroupID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NASRerouteConfiguration. +func (n *NASRerouteConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "macroMmeGroupId": + err = unpopulate(val, "MacroMmeGroupID", &n.MacroMmeGroupID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type NaptConfiguration. func (n NaptConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1622,6 +1680,7 @@ func (p PacketCapturePropertiesFormat) MarshalJSON() ([]byte, error) { populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) populateTimeRFC3339(objectMap, "captureStartTime", p.CaptureStartTime) populate(objectMap, "networkInterfaces", p.NetworkInterfaces) + populate(objectMap, "outputFiles", p.OutputFiles) populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "reason", p.Reason) populate(objectMap, "status", p.Status) @@ -1648,6 +1707,9 @@ func (p *PacketCapturePropertiesFormat) UnmarshalJSON(data []byte) error { case "networkInterfaces": err = unpopulate(val, "NetworkInterfaces", &p.NetworkInterfaces) delete(rawMsg, key) + case "outputFiles": + err = unpopulate(val, "OutputFiles", &p.OutputFiles) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) delete(rawMsg, key) @@ -1788,8 +1850,10 @@ func (p *PacketCoreControlPlaneListResult) UnmarshalJSON(data []byte) error { func (p PacketCoreControlPlanePropertiesFormat) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "controlPlaneAccessInterface", p.ControlPlaneAccessInterface) + populate(objectMap, "controlPlaneAccessVirtualIpv4Addresses", p.ControlPlaneAccessVirtualIPv4Addresses) populate(objectMap, "coreNetworkTechnology", p.CoreNetworkTechnology) populate(objectMap, "diagnosticsUpload", p.DiagnosticsUpload) + populate(objectMap, "eventHub", p.EventHub) populate(objectMap, "installation", p.Installation) populate(objectMap, "installedVersion", p.InstalledVersion) populateAny(objectMap, "interopSettings", p.InteropSettings) @@ -1798,6 +1862,7 @@ func (p PacketCoreControlPlanePropertiesFormat) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "rollbackVersion", p.RollbackVersion) populate(objectMap, "sku", p.SKU) + populate(objectMap, "signaling", p.Signaling) populate(objectMap, "sites", p.Sites) populate(objectMap, "ueMtu", p.UeMtu) populate(objectMap, "version", p.Version) @@ -1816,12 +1881,18 @@ func (p *PacketCoreControlPlanePropertiesFormat) UnmarshalJSON(data []byte) erro case "controlPlaneAccessInterface": err = unpopulate(val, "ControlPlaneAccessInterface", &p.ControlPlaneAccessInterface) delete(rawMsg, key) + case "controlPlaneAccessVirtualIpv4Addresses": + err = unpopulate(val, "ControlPlaneAccessVirtualIPv4Addresses", &p.ControlPlaneAccessVirtualIPv4Addresses) + delete(rawMsg, key) case "coreNetworkTechnology": err = unpopulate(val, "CoreNetworkTechnology", &p.CoreNetworkTechnology) delete(rawMsg, key) case "diagnosticsUpload": err = unpopulate(val, "DiagnosticsUpload", &p.DiagnosticsUpload) delete(rawMsg, key) + case "eventHub": + err = unpopulate(val, "EventHub", &p.EventHub) + delete(rawMsg, key) case "installation": err = unpopulate(val, "Installation", &p.Installation) delete(rawMsg, key) @@ -1846,6 +1917,9 @@ func (p *PacketCoreControlPlanePropertiesFormat) UnmarshalJSON(data []byte) erro case "sku": err = unpopulate(val, "SKU", &p.SKU) delete(rawMsg, key) + case "signaling": + err = unpopulate(val, "Signaling", &p.Signaling) + delete(rawMsg, key) case "sites": err = unpopulate(val, "Sites", &p.Sites) delete(rawMsg, key) @@ -2082,6 +2156,7 @@ func (p PacketCoreDataPlanePropertiesFormat) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "userPlaneAccessInterface", p.UserPlaneAccessInterface) + populate(objectMap, "userPlaneAccessVirtualIpv4Addresses", p.UserPlaneAccessVirtualIPv4Addresses) return json.Marshal(objectMap) } @@ -2100,6 +2175,9 @@ func (p *PacketCoreDataPlanePropertiesFormat) UnmarshalJSON(data []byte) error { case "userPlaneAccessInterface": err = unpopulate(val, "UserPlaneAccessInterface", &p.UserPlaneAccessInterface) delete(rawMsg, key) + case "userPlaneAccessVirtualIpv4Addresses": + err = unpopulate(val, "UserPlaneAccessVirtualIPv4Addresses", &p.UserPlaneAccessVirtualIPv4Addresses) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", p, err) @@ -2794,6 +2872,33 @@ func (s *ServiceResourceID) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SignalingConfiguration. +func (s SignalingConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nasReroute", s.NasReroute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignalingConfiguration. +func (s *SignalingConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nasReroute": + err = unpopulate(val, "NasReroute", &s.NasReroute) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Sim. func (s Sim) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go index 71b0ab657d1a..5c534d4935bc 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Gets a list of the operations. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - 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]{ @@ -77,7 +77,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil 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 c0bf600aea27..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/operations_client_example_test.go +++ /dev/null @@ -1,56 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationList = armmobilenetwork.OperationList{ - // Value: []*armmobilenetwork.Operation{ - // { - // Name: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/read"), - // Display: &armmobilenetwork.OperationDisplay{ - // Description: to.Ptr("Gets mobileNetwork"), - // Operation: to.Ptr("Get mobileNetwork"), - // Provider: to.Ptr("Microsoft.MobileNetwok"), - // Resource: to.Ptr("MobileNetwork"), - // }, - // IsDataAction: to.Ptr(false), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcaptures_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcaptures_client.go index 5faf3cf7e3e4..04cf954c4ebd 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcaptures_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcaptures_client.go @@ -46,7 +46,7 @@ func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates or updates a packet capture. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - packetCaptureName - The name of the packet capture session. @@ -71,7 +71,7 @@ func (client *PacketCapturesClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates or updates a packet capture. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCapturesClient) createOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters, options) @@ -110,7 +110,7 @@ func (client *PacketCapturesClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -122,7 +122,7 @@ func (client *PacketCapturesClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes the specified packet capture. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - packetCaptureName - The name of the packet capture session. @@ -146,7 +146,7 @@ func (client *PacketCapturesClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes the specified packet capture. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCapturesClient) deleteOperation(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCaptureName, options) @@ -185,7 +185,7 @@ func (client *PacketCapturesClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,7 +194,7 @@ func (client *PacketCapturesClient) deleteCreateRequest(ctx context.Context, res // Get - Gets information about the specified packet capture session. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - packetCaptureName - The name of the packet capture session. @@ -238,7 +238,7 @@ func (client *PacketCapturesClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +255,7 @@ func (client *PacketCapturesClient) getHandleResponse(resp *http.Response) (Pack // NewListByPacketCoreControlPlanePager - Lists all the packet capture sessions under a packet core control plane. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - options - PacketCapturesClientListByPacketCoreControlPlaneOptions contains the optional parameters for the PacketCapturesClient.NewListByPacketCoreControlPlanePager @@ -305,7 +305,7 @@ func (client *PacketCapturesClient) listByPacketCoreControlPlaneCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -323,7 +323,7 @@ func (client *PacketCapturesClient) listByPacketCoreControlPlaneHandleResponse(r // BeginStop - Stop a packet capture session. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - packetCoreControlPlaneName - The name of the packet core control plane. // - packetCaptureName - The name of the packet capture session. @@ -347,7 +347,7 @@ func (client *PacketCapturesClient) BeginStop(ctx context.Context, resourceGroup // Stop - Stop a packet capture session. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCapturesClient) stop(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*http.Response, error) { var err error req, err := client.stopCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCaptureName, options) @@ -386,7 +386,7 @@ func (client *PacketCapturesClient) stopCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcaptures_client_example_test.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcaptures_client_example_test.go deleted file mode 100644 index c4e7f1f8fc1a..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcaptures_client_example_test.go +++ /dev/null @@ -1,213 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureCreate.json -func ExamplePacketCapturesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCapturesClient().BeginCreateOrUpdate(ctx, "rg1", "TestPacketCoreCP", "pc1", armmobilenetwork.PacketCapture{ - Properties: &armmobilenetwork.PacketCapturePropertiesFormat{ - BytesToCapturePerPacket: to.Ptr[int64](10000), - NetworkInterfaces: []*string{ - to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")}, - TimeLimitInSeconds: to.Ptr[int32](100), - TotalBytesPerSession: to.Ptr[int64](100000), - }, - }, 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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCapture = armmobilenetwork.PacketCapture{ - // Name: to.Ptr("pc1"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCaptures/pc1"), - // Properties: &armmobilenetwork.PacketCapturePropertiesFormat{ - // BytesToCapturePerPacket: to.Ptr[int64](10000), - // NetworkInterfaces: []*string{ - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Status: to.Ptr(armmobilenetwork.PacketCaptureStatusStopped), - // TimeLimitInSeconds: to.Ptr[int32](100), - // TotalBytesPerSession: to.Ptr[int64](100000), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureGet.json -func ExamplePacketCapturesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPacketCapturesClient().Get(ctx, "rg1", "TestPacketCoreCP", "pc1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCapture = armmobilenetwork.PacketCapture{ - // Name: to.Ptr("pc1"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCaptures/pc1"), - // Properties: &armmobilenetwork.PacketCapturePropertiesFormat{ - // BytesToCapturePerPacket: to.Ptr[int64](10000), - // NetworkInterfaces: []*string{ - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Status: to.Ptr(armmobilenetwork.PacketCaptureStatusStopped), - // TimeLimitInSeconds: to.Ptr[int32](100), - // TotalBytesPerSession: to.Ptr[int64](100000), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureDelete.json -func ExamplePacketCapturesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCapturesClient().BeginDelete(ctx, "rg1", "TestPacketCoreCP", "pc1", 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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureStop.json -func ExamplePacketCapturesClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCapturesClient().BeginStop(ctx, "rg1", "TestPacketCoreCP", "pc1", 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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AsyncOperationStatus = armmobilenetwork.AsyncOperationStatus{ - // Name: to.Ptr("testOperation"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureListByPacketCoreControlPlane.json -func ExamplePacketCapturesClient_NewListByPacketCoreControlPlanePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPacketCapturesClient().NewListByPacketCoreControlPlanePager("rg1", "TestPacketCoreCP", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PacketCaptureListResult = armmobilenetwork.PacketCaptureListResult{ - // Value: []*armmobilenetwork.PacketCapture{ - // { - // Name: to.Ptr("pc1"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCaptures/pc1"), - // Properties: &armmobilenetwork.PacketCapturePropertiesFormat{ - // BytesToCapturePerPacket: to.Ptr[int64](10000), - // NetworkInterfaces: []*string{ - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Status: to.Ptr(armmobilenetwork.PacketCaptureStatusStopped), - // TimeLimitInSeconds: to.Ptr[int32](100), - // TotalBytesPerSession: to.Ptr[int64](100000), - // }, - // }, - // { - // Name: to.Ptr("pc2"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCaptures/pc2"), - // Properties: &armmobilenetwork.PacketCapturePropertiesFormat{ - // BytesToCapturePerPacket: to.Ptr[int64](10000), - // NetworkInterfaces: []*string{ - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - // to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Status: to.Ptr(armmobilenetwork.PacketCaptureStatusStopped), - // TimeLimitInSeconds: to.Ptr[int32](100), - // TotalBytesPerSession: to.Ptr[int64](100000), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go index 2e130319caee..7d2a88effbfc 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client.go @@ -47,7 +47,7 @@ func NewPacketCoreControlPlanesClient(subscriptionID string, credential azcore.T // will upload the diagnostics to a storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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. @@ -72,7 +72,7 @@ func (client *PacketCoreControlPlanesClient) BeginCollectDiagnosticsPackage(ctx // upload the diagnostics to a storage account. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCoreControlPlanesClient) collectDiagnosticsPackage(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, parameters PacketCoreControlPlaneCollectDiagnosticsPackage, options *PacketCoreControlPlanesClientBeginCollectDiagnosticsPackageOptions) (*http.Response, error) { var err error req, err := client.collectDiagnosticsPackageCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, parameters, options) @@ -107,7 +107,7 @@ func (client *PacketCoreControlPlanesClient) collectDiagnosticsPackageCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -119,7 +119,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -143,7 +143,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCoreControlPlanesClient) createOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, parameters PacketCoreControlPlane, options *PacketCoreControlPlanesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, parameters, options) @@ -178,7 +178,7 @@ func (client *PacketCoreControlPlanesClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -190,7 +190,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -213,7 +213,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCoreControlPlanesClient) deleteOperation(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -248,7 +248,7 @@ func (client *PacketCoreControlPlanesClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,7 +257,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -297,7 +297,7 @@ func (client *PacketCoreControlPlanesClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -314,7 +314,7 @@ func (client *PacketCoreControlPlanesClient) getHandleResponse(resp *http.Respon // NewListByResourceGroupPager - Lists all the packet core control planes in a resource group. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - PacketCoreControlPlanesClientListByResourceGroupOptions contains the optional parameters for the PacketCoreControlPlanesClient.NewListByResourceGroupPager // method. @@ -359,7 +359,7 @@ func (client *PacketCoreControlPlanesClient) listByResourceGroupCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -376,7 +376,7 @@ func (client *PacketCoreControlPlanesClient) listByResourceGroupHandleResponse(r // NewListBySubscriptionPager - Lists all the packet core control planes in a subscription. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - options - PacketCoreControlPlanesClientListBySubscriptionOptions contains the optional parameters for the PacketCoreControlPlanesClient.NewListBySubscriptionPager // method. func (client *PacketCoreControlPlanesClient) NewListBySubscriptionPager(options *PacketCoreControlPlanesClientListBySubscriptionOptions) *runtime.Pager[PacketCoreControlPlanesClientListBySubscriptionResponse] { @@ -416,7 +416,7 @@ func (client *PacketCoreControlPlanesClient) listBySubscriptionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -435,7 +435,7 @@ func (client *PacketCoreControlPlanesClient) listBySubscriptionHandleResponse(re // 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -459,7 +459,7 @@ func (client *PacketCoreControlPlanesClient) BeginReinstall(ctx context.Context, // 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 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCoreControlPlanesClient) reinstall(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginReinstallOptions) (*http.Response, error) { var err error req, err := client.reinstallCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -494,7 +494,7 @@ func (client *PacketCoreControlPlanesClient) reinstallCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -504,7 +504,7 @@ func (client *PacketCoreControlPlanesClient) reinstallCreateRequest(ctx context. // 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -528,7 +528,7 @@ func (client *PacketCoreControlPlanesClient) BeginRollback(ctx context.Context, // 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 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCoreControlPlanesClient) rollback(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, options *PacketCoreControlPlanesClientBeginRollbackOptions) (*http.Response, error) { var err error req, err := client.rollbackCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, options) @@ -563,7 +563,7 @@ func (client *PacketCoreControlPlanesClient) rollbackCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -572,7 +572,7 @@ func (client *PacketCoreControlPlanesClient) rollbackCreateRequest(ctx context.C // UpdateTags - Patch packet core control plane resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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 patch packet core control plane resource. @@ -613,7 +613,7 @@ func (client *PacketCoreControlPlanesClient) updateTagsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 e11476ddddca..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplanes_client_example_test.go +++ /dev/null @@ -1,633 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCoreControlPlanesClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPacketCoreControlPlanesClient().Get(ctx, "rg1", "TestPacketCoreCP", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCoreControlPlane = armmobilenetwork.PacketCoreControlPlane{ - // Name: to.Ptr("TestPacketCoreCP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PacketCoreControlPlanePropertiesFormat{ - // ControlPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N2"), - // }, - // CoreNetworkTechnology: to.Ptr(armmobilenetwork.CoreNetworkTypeFiveGC), - // Installation: &armmobilenetwork.Installation{ - // Operation: &armmobilenetwork.AsyncOperationID{ - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/EASTUS/operationStatuses/abc"), - // }, - // State: to.Ptr(armmobilenetwork.InstallationStateInstalling), - // }, - // InstalledVersion: to.Ptr("0.2.0"), - // LocalDiagnosticsAccess: &armmobilenetwork.LocalDiagnosticsAccessConfiguration{ - // AuthenticationType: to.Ptr(armmobilenetwork.AuthenticationTypePassword), - // HTTPSServerCertificate: &armmobilenetwork.HTTPSServerCertificate{ - // CertificateURL: to.Ptr("https://contosovault.vault.azure.net/certificates/ingress"), - // Provisioning: &armmobilenetwork.CertificateProvisioning{ - // State: to.Ptr(armmobilenetwork.CertificateProvisioningStateNotProvisioned), - // }, - // }, - // }, - // Platform: &armmobilenetwork.PlatformConfiguration{ - // Type: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // AzureStackEdgeDevice: &armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // AzureStackEdgeDevices: []*armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice2"), - // }}, - // ConnectedCluster: &armmobilenetwork.ConnectedClusterResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster"), - // }, - // CustomLocation: &armmobilenetwork.CustomLocationResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // RollbackVersion: to.Ptr("0.1.0"), - // Sites: []*armmobilenetwork.SiteResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCoreControlPlanesClient().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), - Installation: &armmobilenetwork.Installation{ - DesiredState: to.Ptr(armmobilenetwork.DesiredInstallationStateInstalled), - }, - 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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - }, - ConnectedCluster: &armmobilenetwork.ConnectedClusterResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster"), - }, - CustomLocation: &armmobilenetwork.CustomLocationResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"), - }, - }, - Sites: []*armmobilenetwork.SiteResourceID{ - { - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCoreControlPlane = armmobilenetwork.PacketCoreControlPlane{ - // Name: to.Ptr("TestPacketCoreCP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PacketCoreControlPlanePropertiesFormat{ - // ControlPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N2"), - // }, - // CoreNetworkTechnology: to.Ptr(armmobilenetwork.CoreNetworkTypeFiveGC), - // Installation: &armmobilenetwork.Installation{ - // DesiredState: to.Ptr(armmobilenetwork.DesiredInstallationStateInstalled), - // ReinstallRequired: to.Ptr(armmobilenetwork.ReinstallRequiredNotRequired), - // State: to.Ptr(armmobilenetwork.InstallationStateInstalled), - // }, - // LocalDiagnosticsAccess: &armmobilenetwork.LocalDiagnosticsAccessConfiguration{ - // AuthenticationType: to.Ptr(armmobilenetwork.AuthenticationTypeAAD), - // HTTPSServerCertificate: &armmobilenetwork.HTTPSServerCertificate{ - // CertificateURL: to.Ptr("https://contosovault.vault.azure.net/certificates/ingress"), - // Provisioning: &armmobilenetwork.CertificateProvisioning{ - // State: to.Ptr(armmobilenetwork.CertificateProvisioningStateNotProvisioned), - // }, - // }, - // }, - // Platform: &armmobilenetwork.PlatformConfiguration{ - // Type: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // AzureStackEdgeDevice: &armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // AzureStackEdgeDevices: []*armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice2"), - // }}, - // ConnectedCluster: &armmobilenetwork.ConnectedClusterResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster"), - // }, - // CustomLocation: &armmobilenetwork.CustomLocationResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Sites: []*armmobilenetwork.SiteResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlanePatch.json -func ExamplePacketCoreControlPlanesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPacketCoreControlPlanesClient().UpdateTags(ctx, "rg1", "TestPacketCoreCP", armmobilenetwork.IdentityAndTagsObject{ - Identity: &armmobilenetwork.ManagedServiceIdentity{ - Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": {}, - }, - }, - 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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCoreControlPlane = armmobilenetwork.PacketCoreControlPlane{ - // Name: to.Ptr("TestPacketCoreCP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Identity: &armmobilenetwork.ManagedServiceIdentity{ - // Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": &armmobilenetwork.UserAssignedIdentity{ - // ClientID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // PrincipalID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // }, - // }, - // }, - // Properties: &armmobilenetwork.PacketCoreControlPlanePropertiesFormat{ - // ControlPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N2"), - // }, - // CoreNetworkTechnology: to.Ptr(armmobilenetwork.CoreNetworkTypeFiveGC), - // Installation: &armmobilenetwork.Installation{ - // State: to.Ptr(armmobilenetwork.InstallationStateInstalled), - // }, - // InstalledVersion: to.Ptr("0.2.0"), - // LocalDiagnosticsAccess: &armmobilenetwork.LocalDiagnosticsAccessConfiguration{ - // AuthenticationType: to.Ptr(armmobilenetwork.AuthenticationTypePassword), - // HTTPSServerCertificate: &armmobilenetwork.HTTPSServerCertificate{ - // CertificateURL: to.Ptr("https://contosovault.vault.azure.net/certificates/ingress"), - // Provisioning: &armmobilenetwork.CertificateProvisioning{ - // State: to.Ptr(armmobilenetwork.CertificateProvisioningStateNotProvisioned), - // }, - // }, - // }, - // Platform: &armmobilenetwork.PlatformConfiguration{ - // Type: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // AzureStackEdgeDevice: &armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // AzureStackEdgeDevices: []*armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice2"), - // }}, - // ConnectedCluster: &armmobilenetwork.ConnectedClusterResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster"), - // }, - // CustomLocation: &armmobilenetwork.CustomLocationResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // RollbackVersion: to.Ptr("0.1.0"), - // Sites: []*armmobilenetwork.SiteResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPacketCoreControlPlanesClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PacketCoreControlPlaneListResult = armmobilenetwork.PacketCoreControlPlaneListResult{ - // Value: []*armmobilenetwork.PacketCoreControlPlane{ - // { - // Name: to.Ptr("TestPacketCoreCP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PacketCoreControlPlanePropertiesFormat{ - // ControlPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N2"), - // }, - // CoreNetworkTechnology: to.Ptr(armmobilenetwork.CoreNetworkTypeFiveGC), - // Installation: &armmobilenetwork.Installation{ - // State: to.Ptr(armmobilenetwork.InstallationStateInstalled), - // }, - // InstalledVersion: to.Ptr("0.2.0"), - // LocalDiagnosticsAccess: &armmobilenetwork.LocalDiagnosticsAccessConfiguration{ - // AuthenticationType: to.Ptr(armmobilenetwork.AuthenticationTypePassword), - // HTTPSServerCertificate: &armmobilenetwork.HTTPSServerCertificate{ - // CertificateURL: to.Ptr("https://contosovault.vault.azure.net/certificates/ingress"), - // Provisioning: &armmobilenetwork.CertificateProvisioning{ - // State: to.Ptr(armmobilenetwork.CertificateProvisioningStateNotProvisioned), - // }, - // }, - // }, - // Platform: &armmobilenetwork.PlatformConfiguration{ - // Type: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // AzureStackEdgeDevice: &armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // AzureStackEdgeDevices: []*armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice2"), - // }}, - // ConnectedCluster: &armmobilenetwork.ConnectedClusterResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster"), - // }, - // CustomLocation: &armmobilenetwork.CustomLocationResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // RollbackVersion: to.Ptr("0.1.0"), - // Sites: []*armmobilenetwork.SiteResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPacketCoreControlPlanesClient().NewListByResourceGroupPager("rg1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PacketCoreControlPlaneListResult = armmobilenetwork.PacketCoreControlPlaneListResult{ - // Value: []*armmobilenetwork.PacketCoreControlPlane{ - // { - // Name: to.Ptr("TestPacketCoreCP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PacketCoreControlPlanePropertiesFormat{ - // ControlPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N2"), - // }, - // CoreNetworkTechnology: to.Ptr(armmobilenetwork.CoreNetworkTypeFiveGC), - // Installation: &armmobilenetwork.Installation{ - // Reasons: []*armmobilenetwork.InstallationReason{ - // to.Ptr(armmobilenetwork.InstallationReasonNoSlices)}, - // State: to.Ptr(armmobilenetwork.InstallationStateUninstalled), - // }, - // InstalledVersion: to.Ptr("0.2.0"), - // LocalDiagnosticsAccess: &armmobilenetwork.LocalDiagnosticsAccessConfiguration{ - // AuthenticationType: to.Ptr(armmobilenetwork.AuthenticationTypePassword), - // HTTPSServerCertificate: &armmobilenetwork.HTTPSServerCertificate{ - // CertificateURL: to.Ptr("https://contosovault.vault.azure.net/certificates/ingress"), - // Provisioning: &armmobilenetwork.CertificateProvisioning{ - // State: to.Ptr(armmobilenetwork.CertificateProvisioningStateNotProvisioned), - // }, - // }, - // }, - // Platform: &armmobilenetwork.PlatformConfiguration{ - // Type: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // AzureStackEdgeDevice: &armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // AzureStackEdgeDevices: []*armmobilenetwork.AzureStackEdgeDeviceResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice2"), - // }}, - // ConnectedCluster: &armmobilenetwork.ConnectedClusterResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster"), - // }, - // CustomLocation: &armmobilenetwork.CustomLocationResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"), - // }, - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // RollbackVersion: to.Ptr("0.1.0"), - // Sites: []*armmobilenetwork.SiteResourceID{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCoreControlPlanesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AsyncOperationStatus = armmobilenetwork.AsyncOperationStatus{ - // Name: to.Ptr("testOperation"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCoreControlPlanesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AsyncOperationStatus = armmobilenetwork.AsyncOperationStatus{ - // Name: to.Ptr("testOperation"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCoreControlPlanesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AsyncOperationStatus = armmobilenetwork.AsyncOperationStatus{ - // Name: to.Ptr("testOperation"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go index 85ce94b5a004..e7b44e30b2f2 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client.go @@ -43,7 +43,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-01 // - versionName - The name of the packet core control plane version. // - options - PacketCoreControlPlaneVersionsClientGetOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.Get // method. @@ -77,7 +77,7 @@ func (client *PacketCoreControlPlaneVersionsClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -95,7 +95,7 @@ func (client *PacketCoreControlPlaneVersionsClient) getHandleResponse(resp *http // GetBySubscription - Gets information about the specified packet core control plane version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - versionName - The name of the packet core control plane version. // - subscriptionID - The ID of the target subscription. The value must be an UUID. // - options - PacketCoreControlPlaneVersionsClientGetBySubscriptionOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.GetBySubscription @@ -131,7 +131,7 @@ func (client *PacketCoreControlPlaneVersionsClient) getBySubscriptionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -148,7 +148,7 @@ func (client *PacketCoreControlPlaneVersionsClient) getBySubscriptionHandleRespo // NewListPager - Lists all supported packet core control planes versions. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - options - PacketCoreControlPlaneVersionsClientListOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.NewListPager // method. func (client *PacketCoreControlPlaneVersionsClient) NewListPager(options *PacketCoreControlPlaneVersionsClientListOptions) *runtime.Pager[PacketCoreControlPlaneVersionsClientListResponse] { @@ -187,7 +187,7 @@ func (client *PacketCoreControlPlaneVersionsClient) listCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +204,7 @@ func (client *PacketCoreControlPlaneVersionsClient) listHandleResponse(resp *htt // NewListBySubscriptionPager - Lists all supported packet core control planes versions. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - subscriptionID - The ID of the target subscription. The value must be an UUID. // - options - PacketCoreControlPlaneVersionsClientListBySubscriptionOptions contains the optional parameters for the PacketCoreControlPlaneVersionsClient.NewListBySubscriptionPager // method. @@ -245,7 +245,7 @@ func (client *PacketCoreControlPlaneVersionsClient) listBySubscriptionCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil 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 546d5cbce13f..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcorecontrolplaneversions_client_example_test.go +++ /dev/null @@ -1,234 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPacketCoreControlPlaneVersionsClient().Get(ctx, "PMN-4-11-1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCoreControlPlaneVersion = armmobilenetwork.PacketCoreControlPlaneVersion{ - // Name: to.Ptr("PMN-4-11-1"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlaneVersions"), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/PMN-4-11-1"), - // Properties: &armmobilenetwork.PacketCoreControlPlaneVersionPropertiesFormat{ - // Platforms: []*armmobilenetwork.Platform{ - // { - // MaximumPlatformSoftwareVersion: to.Ptr("2211"), - // MinimumPlatformSoftwareVersion: to.Ptr("2209"), - // PlatformType: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // RecommendedVersion: to.Ptr(armmobilenetwork.RecommendedVersionRecommended), - // VersionState: to.Ptr(armmobilenetwork.VersionStateActive), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPacketCoreControlPlaneVersionsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PacketCoreControlPlaneVersionListResult = armmobilenetwork.PacketCoreControlPlaneVersionListResult{ - // Value: []*armmobilenetwork.PacketCoreControlPlaneVersion{ - // { - // Name: to.Ptr("PMN-4-9-4"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlaneVersions"), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/PMN-4-9-4"), - // Properties: &armmobilenetwork.PacketCoreControlPlaneVersionPropertiesFormat{ - // Platforms: []*armmobilenetwork.Platform{ - // { - // MaximumPlatformSoftwareVersion: to.Ptr("2211"), - // MinimumPlatformSoftwareVersion: to.Ptr("2209"), - // PlatformType: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // RecommendedVersion: to.Ptr(armmobilenetwork.RecommendedVersionNotRecommended), - // VersionState: to.Ptr(armmobilenetwork.VersionStateActive), - // }}, - // }, - // }, - // { - // Name: to.Ptr("PMN-4-10-2"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlaneVersions"), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/PMN-4-10-2"), - // Properties: &armmobilenetwork.PacketCoreControlPlaneVersionPropertiesFormat{ - // Platforms: []*armmobilenetwork.Platform{ - // { - // MaximumPlatformSoftwareVersion: to.Ptr("2212"), - // MinimumPlatformSoftwareVersion: to.Ptr("2210"), - // PlatformType: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // RecommendedVersion: to.Ptr(armmobilenetwork.RecommendedVersionNotRecommended), - // VersionState: to.Ptr(armmobilenetwork.VersionStateActive), - // }}, - // }, - // }, - // { - // Name: to.Ptr("PMN-4-11-1"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlaneVersions"), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/PMN-4-11-1"), - // Properties: &armmobilenetwork.PacketCoreControlPlaneVersionPropertiesFormat{ - // Platforms: []*armmobilenetwork.Platform{ - // { - // MaximumPlatformSoftwareVersion: to.Ptr("2301"), - // MinimumPlatformSoftwareVersion: to.Ptr("2211"), - // PlatformType: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // RecommendedVersion: to.Ptr(armmobilenetwork.RecommendedVersionRecommended), - // VersionState: to.Ptr(armmobilenetwork.VersionStateActive), - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneVersionGetBySubscription.json -func ExamplePacketCoreControlPlaneVersionsClient_GetBySubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPacketCoreControlPlaneVersionsClient().GetBySubscription(ctx, "PMN-4-11-1", "00000000-0000-0000-0000-000000000000", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCoreControlPlaneVersion = armmobilenetwork.PacketCoreControlPlaneVersion{ - // Name: to.Ptr("PMN-4-11-1"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlaneVersions"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/PMN-4-11-1"), - // Properties: &armmobilenetwork.PacketCoreControlPlaneVersionPropertiesFormat{ - // Platforms: []*armmobilenetwork.Platform{ - // { - // MaximumPlatformSoftwareVersion: to.Ptr("2211"), - // MinimumPlatformSoftwareVersion: to.Ptr("2209"), - // PlatformType: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // RecommendedVersion: to.Ptr(armmobilenetwork.RecommendedVersionRecommended), - // VersionState: to.Ptr(armmobilenetwork.VersionStateActive), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneVersionListBySubscription.json -func ExamplePacketCoreControlPlaneVersionsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPacketCoreControlPlaneVersionsClient().NewListBySubscriptionPager("00000000-0000-0000-0000-000000000000", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PacketCoreControlPlaneVersionListResult = armmobilenetwork.PacketCoreControlPlaneVersionListResult{ - // Value: []*armmobilenetwork.PacketCoreControlPlaneVersion{ - // { - // Name: to.Ptr("PMN-4-9-4"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlaneVersions"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/PMN-4-9-4"), - // Properties: &armmobilenetwork.PacketCoreControlPlaneVersionPropertiesFormat{ - // Platforms: []*armmobilenetwork.Platform{ - // { - // MaximumPlatformSoftwareVersion: to.Ptr("2211"), - // MinimumPlatformSoftwareVersion: to.Ptr("2209"), - // PlatformType: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // RecommendedVersion: to.Ptr(armmobilenetwork.RecommendedVersionNotRecommended), - // VersionState: to.Ptr(armmobilenetwork.VersionStateActive), - // }}, - // }, - // }, - // { - // Name: to.Ptr("PMN-4-10-2"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlaneVersions"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/PMN-4-10-2"), - // Properties: &armmobilenetwork.PacketCoreControlPlaneVersionPropertiesFormat{ - // Platforms: []*armmobilenetwork.Platform{ - // { - // MaximumPlatformSoftwareVersion: to.Ptr("2212"), - // MinimumPlatformSoftwareVersion: to.Ptr("2210"), - // PlatformType: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // RecommendedVersion: to.Ptr(armmobilenetwork.RecommendedVersionNotRecommended), - // VersionState: to.Ptr(armmobilenetwork.VersionStateActive), - // }}, - // }, - // }, - // { - // Name: to.Ptr("PMN-4-11-1"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreControlPlaneVersions"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/PMN-4-11-1"), - // Properties: &armmobilenetwork.PacketCoreControlPlaneVersionPropertiesFormat{ - // Platforms: []*armmobilenetwork.Platform{ - // { - // MaximumPlatformSoftwareVersion: to.Ptr("2301"), - // MinimumPlatformSoftwareVersion: to.Ptr("2211"), - // PlatformType: to.Ptr(armmobilenetwork.PlatformTypeAKSHCI), - // RecommendedVersion: to.Ptr(armmobilenetwork.RecommendedVersionRecommended), - // VersionState: to.Ptr(armmobilenetwork.VersionStateActive), - // }}, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go index 9501d853216f..0c7c1f0a7b3b 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client.go @@ -47,7 +47,7 @@ func NewPacketCoreDataPlanesClient(subscriptionID string, credential azcore.Toke // core control plane. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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. @@ -73,7 +73,7 @@ func (client *PacketCoreDataPlanesClient) BeginCreateOrUpdate(ctx context.Contex // core control plane. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCoreDataPlanesClient) createOrUpdate(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, parameters PacketCoreDataPlane, options *PacketCoreDataPlanesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, options) @@ -112,7 +112,7 @@ func (client *PacketCoreDataPlanesClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -124,7 +124,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -148,7 +148,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *PacketCoreDataPlanesClient) deleteOperation(ctx context.Context, resourceGroupName string, packetCoreControlPlaneName string, packetCoreDataPlaneName string, options *PacketCoreDataPlanesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, options) @@ -187,7 +187,7 @@ func (client *PacketCoreDataPlanesClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,7 +196,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -241,7 +241,7 @@ func (client *PacketCoreDataPlanesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,7 +258,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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.NewListByPacketCoreControlPlanePager @@ -308,7 +308,7 @@ func (client *PacketCoreDataPlanesClient) listByPacketCoreControlPlaneCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -326,7 +326,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -372,7 +372,7 @@ func (client *PacketCoreDataPlanesClient) updateTagsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 54b3bacff6b0..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/packetcoredataplanes_client_example_test.go +++ /dev/null @@ -1,234 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCoreDataPlanesClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPacketCoreDataPlanesClient().Get(ctx, "rg1", "testPacketCoreCP", "testPacketCoreDP", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCoreDataPlane = armmobilenetwork.PacketCoreDataPlane{ - // Name: to.Ptr("TestPacketCoreDP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreDataPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PacketCoreDataPlanePropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // UserPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N3"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPacketCoreDataPlanesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCoreDataPlane = armmobilenetwork.PacketCoreDataPlane{ - // Name: to.Ptr("TestPacketCoreDP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreDataPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PacketCoreDataPlanePropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // UserPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N3"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPacketCoreDataPlanesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PacketCoreDataPlane = armmobilenetwork.PacketCoreDataPlane{ - // Name: to.Ptr("TestPacketCoreDP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreDataPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armmobilenetwork.PacketCoreDataPlanePropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // UserPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N3"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPacketCoreDataPlanesClient().NewListByPacketCoreControlPlanePager("rg1", "testPacketCoreCP", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PacketCoreDataPlaneListResult = armmobilenetwork.PacketCoreDataPlaneListResult{ - // Value: []*armmobilenetwork.PacketCoreDataPlane{ - // { - // Name: to.Ptr("TestPacketCoreDP"), - // Type: to.Ptr("Microsoft.MobileNetwork/packetCoreDataPlane"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.PacketCoreDataPlanePropertiesFormat{ - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // UserPlaneAccessInterface: &armmobilenetwork.InterfaceProperties{ - // Name: to.Ptr("N3"), - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go index 36f045437be8..a1ad17bd44d6 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client.go @@ -46,7 +46,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -71,7 +71,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *ServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, serviceName string, parameters Service, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, serviceName, parameters, options) @@ -110,7 +110,7 @@ func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -122,7 +122,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -145,7 +145,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *ServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, serviceName, options) @@ -184,7 +184,7 @@ func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +193,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -237,7 +237,7 @@ func (client *ServicesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +254,7 @@ func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesCl // NewListByMobileNetworkPager - Gets all the services in a mobile network. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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.NewListByMobileNetworkPager @@ -304,7 +304,7 @@ func (client *ServicesClient) listByMobileNetworkCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -322,7 +322,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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 @@ -367,7 +367,7 @@ func (client *ServicesClient) updateTagsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 32f4cd89b3b7..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/services_client_example_test.go +++ /dev/null @@ -1,407 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServicesClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServicesClient().Get(ctx, "rg1", "testMobileNetwork", "TestService", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Service = armmobilenetwork.Service{ - // Name: to.Ptr("testPolicy"), - // Type: to.Ptr("Microsoft.MobileNetwork/service"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/TestService"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // 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), - // }}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewServicesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Service = armmobilenetwork.Service{ - // Name: to.Ptr("testPolicy"), - // Type: to.Ptr("Microsoft.MobileNetwork/service"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/TestService"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // 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), - // }}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewServicesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Service = armmobilenetwork.Service{ - // Name: to.Ptr("TestService"), - // Type: to.Ptr("Microsoft.MobileNetwork/service"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/TestService"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // 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), - // }}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewServicesClient().NewListByMobileNetworkPager("testResourceGroupName", "testMobileNetwork", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ServiceListResult = armmobilenetwork.ServiceListResult{ - // Value: []*armmobilenetwork.Service{ - // { - // Type: to.Ptr("Microsoft.MobileNetwork/service"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/TestService"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // 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), - // }}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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), - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go index ef58511883ae..9f13a5466bc1 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client.go @@ -46,7 +46,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -70,7 +70,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimGroup, options *SimGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) @@ -105,7 +105,7 @@ func (client *SimGroupsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -117,7 +117,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -139,7 +139,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, simGroupName string, options *SimGroupsClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, simGroupName, options) @@ -174,7 +174,7 @@ func (client *SimGroupsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +183,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -222,7 +222,7 @@ func (client *SimGroupsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -239,7 +239,7 @@ func (client *SimGroupsClient) getHandleResponse(resp *http.Response) (SimGroups // NewListByResourceGroupPager - Gets all the SIM groups in a resource group. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - SimGroupsClientListByResourceGroupOptions contains the optional parameters for the SimGroupsClient.NewListByResourceGroupPager // method. @@ -284,7 +284,7 @@ func (client *SimGroupsClient) listByResourceGroupCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -301,7 +301,7 @@ func (client *SimGroupsClient) listByResourceGroupHandleResponse(resp *http.Resp // NewListBySubscriptionPager - Gets all the SIM groups in a subscription. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - options - SimGroupsClientListBySubscriptionOptions contains the optional parameters for the SimGroupsClient.NewListBySubscriptionPager // method. func (client *SimGroupsClient) NewListBySubscriptionPager(options *SimGroupsClientListBySubscriptionOptions) *runtime.Pager[SimGroupsClientListBySubscriptionResponse] { @@ -341,7 +341,7 @@ func (client *SimGroupsClient) listBySubscriptionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -359,7 +359,7 @@ func (client *SimGroupsClient) listBySubscriptionHandleResponse(resp *http.Respo // UpdateTags - Patch SIM group resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - simGroupName - The name of the SIM Group. // - parameters - Parameters supplied to patch SIM group resource. @@ -399,7 +399,7 @@ func (client *SimGroupsClient) updateTagsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 607a0f26600a..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simgroups_client_example_test.go +++ /dev/null @@ -1,359 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimGroupsClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSimGroupsClient().Get(ctx, "testResourceGroupName", "testSimGroupName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SimGroup = armmobilenetwork.SimGroup{ - // Name: to.Ptr("testSimGroup"), - // Type: to.Ptr("Microsoft.MobileNetwork/simGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/simGroups/testSimGroup"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armmobilenetwork.ManagedServiceIdentity{ - // Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": &armmobilenetwork.UserAssignedIdentity{ - // ClientID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // PrincipalID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // }, - // }, - // }, - // Properties: &armmobilenetwork.SimGroupPropertiesFormat{ - // EncryptionKey: &armmobilenetwork.KeyVaultKey{ - // KeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/azureKey"), - // }, - // MobileNetwork: &armmobilenetwork.ResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimGroupsClient().BeginCreateOrUpdate(ctx, "rg1", "testSimGroup", armmobilenetwork.SimGroup{ - Location: to.Ptr("eastus"), - Identity: &armmobilenetwork.ManagedServiceIdentity{ - Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SimGroup = armmobilenetwork.SimGroup{ - // Name: to.Ptr("testSimGroup"), - // Type: to.Ptr("Microsoft.MobileNetwork/simGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/simGroups/testSimGroup"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armmobilenetwork.ManagedServiceIdentity{ - // Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": &armmobilenetwork.UserAssignedIdentity{ - // ClientID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // PrincipalID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // }, - // }, - // }, - // Properties: &armmobilenetwork.SimGroupPropertiesFormat{ - // EncryptionKey: &armmobilenetwork.KeyVaultKey{ - // KeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/azureKey"), - // }, - // MobileNetwork: &armmobilenetwork.ResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupPatch.json -func ExampleSimGroupsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSimGroupsClient().UpdateTags(ctx, "rg1", "testSimGroup", armmobilenetwork.IdentityAndTagsObject{ - Identity: &armmobilenetwork.ManagedServiceIdentity{ - Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": {}, - }, - }, - 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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SimGroup = armmobilenetwork.SimGroup{ - // Name: to.Ptr("testSimGroup"), - // Type: to.Ptr("Microsoft.MobileNetwork/simGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/simGroups/testSimGroup"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Identity: &armmobilenetwork.ManagedServiceIdentity{ - // Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": &armmobilenetwork.UserAssignedIdentity{ - // ClientID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // PrincipalID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // }, - // }, - // }, - // Properties: &armmobilenetwork.SimGroupPropertiesFormat{ - // EncryptionKey: &armmobilenetwork.KeyVaultKey{ - // KeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/azureKey"), - // }, - // MobileNetwork: &armmobilenetwork.ResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSimGroupsClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SimGroupListResult = armmobilenetwork.SimGroupListResult{ - // Value: []*armmobilenetwork.SimGroup{ - // { - // Name: to.Ptr("testSimGroup"), - // Type: to.Ptr("Microsoft.MobileNetwork/simGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/simGroups/testSimGroup"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armmobilenetwork.ManagedServiceIdentity{ - // Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": &armmobilenetwork.UserAssignedIdentity{ - // ClientID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // PrincipalID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // }, - // }, - // }, - // Properties: &armmobilenetwork.SimGroupPropertiesFormat{ - // EncryptionKey: &armmobilenetwork.KeyVaultKey{ - // KeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/azureKey"), - // }, - // MobileNetwork: &armmobilenetwork.ResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSimGroupsClient().NewListByResourceGroupPager("rg1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SimGroupListResult = armmobilenetwork.SimGroupListResult{ - // Value: []*armmobilenetwork.SimGroup{ - // { - // Name: to.Ptr("testSimGroup"), - // Type: to.Ptr("Microsoft.MobileNetwork/simGroups"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/simGroups/testSimGroup"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Identity: &armmobilenetwork.ManagedServiceIdentity{ - // Type: to.Ptr(armmobilenetwork.ManagedServiceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armmobilenetwork.UserAssignedIdentity{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity": &armmobilenetwork.UserAssignedIdentity{ - // ClientID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // PrincipalID: to.Ptr("12345678-abcd-dcba-abcd-0123456789ef"), - // }, - // }, - // }, - // Properties: &armmobilenetwork.SimGroupPropertiesFormat{ - // EncryptionKey: &armmobilenetwork.KeyVaultKey{ - // KeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/azureKey"), - // }, - // MobileNetwork: &armmobilenetwork.ResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go index 536f7969f0fc..84eb95b50d5e 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client.go @@ -46,7 +46,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -71,7 +71,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, simPolicyName string, parameters SimPolicy, options *SimPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, simPolicyName, parameters, options) @@ -110,7 +110,7 @@ func (client *SimPoliciesClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -122,7 +122,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -145,7 +145,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, simPolicyName string, options *SimPoliciesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, simPolicyName, options) @@ -184,7 +184,7 @@ func (client *SimPoliciesClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +193,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -237,7 +237,7 @@ func (client *SimPoliciesClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +254,7 @@ func (client *SimPoliciesClient) getHandleResponse(resp *http.Response) (SimPoli // NewListByMobileNetworkPager - Gets all the SIM policies in a mobile network. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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.NewListByMobileNetworkPager @@ -304,7 +304,7 @@ func (client *SimPoliciesClient) listByMobileNetworkCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -322,7 +322,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -367,7 +367,7 @@ func (client *SimPoliciesClient) updateTagsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 86a448361bde..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/simpolicies_client_example_test.go +++ /dev/null @@ -1,420 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimPoliciesClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSimPoliciesClient().Get(ctx, "rg1", "testMobileNetwork", "testPolicy", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SimPolicy = armmobilenetwork.SimPolicy{ - // Name: to.Ptr("testPolicy"), - // Type: to.Ptr("Microsoft.MobileNetwork/simPolicy"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/testPolicy"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.SimPolicyPropertiesFormat{ - // DefaultSlice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // RegistrationTimer: to.Ptr[int32](3240), - // SiteProvisioningState: map[string]*armmobilenetwork.SiteProvisioningState{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite": to.Ptr(armmobilenetwork.SiteProvisioningStateAdding), - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite2": to.Ptr(armmobilenetwork.SiteProvisioningStateAdding), - // }, - // 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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"), - // }}, - // DataNetwork: &armmobilenetwork.DataNetworkResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork"), - // }, - // Slice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // }}, - // UeAmbr: &armmobilenetwork.Ambr{ - // Downlink: to.Ptr("1 Gbps"), - // Uplink: to.Ptr("500 Mbps"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimPoliciesClient().BeginCreateOrUpdate(ctx, "rg1", "testMobileNetwork", "testPolicy", armmobilenetwork.SimPolicy{ - Location: to.Ptr("eastus"), - Properties: &armmobilenetwork.SimPolicyPropertiesFormat{ - DefaultSlice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"), - }}, - DataNetwork: &armmobilenetwork.DataNetworkResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork"), - }, - Slice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SimPolicy = armmobilenetwork.SimPolicy{ - // Name: to.Ptr("testPolicy"), - // Type: to.Ptr("Microsoft.MobileNetwork/simPolicy"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/testPolicy"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.SimPolicyPropertiesFormat{ - // DefaultSlice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // RegistrationTimer: to.Ptr[int32](3240), - // SiteProvisioningState: map[string]*armmobilenetwork.SiteProvisioningState{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite": to.Ptr(armmobilenetwork.SiteProvisioningStateProvisioned), - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite2": to.Ptr(armmobilenetwork.SiteProvisioningStateProvisioned), - // }, - // 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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"), - // }}, - // DataNetwork: &armmobilenetwork.DataNetworkResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork"), - // }, - // Slice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // }}, - // UeAmbr: &armmobilenetwork.Ambr{ - // Downlink: to.Ptr("1 Gbps"), - // Uplink: to.Ptr("500 Mbps"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSimPoliciesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SimPolicy = armmobilenetwork.SimPolicy{ - // Name: to.Ptr("testPolicy"), - // Type: to.Ptr("Microsoft.MobileNetwork/simPolicy"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/testPolicy"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armmobilenetwork.SimPolicyPropertiesFormat{ - // DefaultSlice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"), - // }}, - // DataNetwork: &armmobilenetwork.DataNetworkResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork"), - // }, - // Slice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // }}, - // UeAmbr: &armmobilenetwork.Ambr{ - // Downlink: to.Ptr("1 Gbps"), - // Uplink: to.Ptr("500 Mbps"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSimPoliciesClient().NewListByMobileNetworkPager("testResourceGroupName", "testMobileNetwork", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SimPolicyListResult = armmobilenetwork.SimPolicyListResult{ - // Value: []*armmobilenetwork.SimPolicy{ - // { - // Type: to.Ptr("Microsoft.MobileNetwork/simPolicy"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/testPolicy"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.SimPolicyPropertiesFormat{ - // DefaultSlice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // 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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"), - // }}, - // DataNetwork: &armmobilenetwork.DataNetworkResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork"), - // }, - // Slice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // }}, - // UeAmbr: &armmobilenetwork.Ambr{ - // Downlink: to.Ptr("1 Gbps"), - // Uplink: to.Ptr("500 Mbps"), - // }, - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go index 64ef401e16af..41d176aa19c0 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client.go @@ -46,7 +46,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -69,7 +69,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimsClient) bulkDelete(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimDeleteList, options *SimsClientBeginBulkDeleteOptions) (*http.Response, error) { var err error req, err := client.bulkDeleteCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) @@ -104,7 +104,7 @@ func (client *SimsClient) bulkDeleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -116,7 +116,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -139,7 +139,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimsClient) bulkUpload(ctx context.Context, resourceGroupName string, simGroupName string, parameters SimUploadList, options *SimsClientBeginBulkUploadOptions) (*http.Response, error) { var err error req, err := client.bulkUploadCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) @@ -174,7 +174,7 @@ func (client *SimsClient) bulkUploadCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -186,7 +186,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -210,7 +210,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimsClient) bulkUploadEncrypted(ctx context.Context, resourceGroupName string, simGroupName string, parameters EncryptedSimUploadList, options *SimsClientBeginBulkUploadEncryptedOptions) (*http.Response, error) { var err error req, err := client.bulkUploadEncryptedCreateRequest(ctx, resourceGroupName, simGroupName, parameters, options) @@ -245,7 +245,7 @@ func (client *SimsClient) bulkUploadEncryptedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -257,7 +257,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -282,7 +282,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimsClient) createOrUpdate(ctx context.Context, resourceGroupName string, simGroupName string, simName string, parameters Sim, options *SimsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, simGroupName, simName, parameters, options) @@ -321,7 +321,7 @@ func (client *SimsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -333,7 +333,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -356,7 +356,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SimsClient) deleteOperation(ctx context.Context, resourceGroupName string, simGroupName string, simName string, options *SimsClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, simGroupName, simName, options) @@ -395,7 +395,7 @@ func (client *SimsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -404,7 +404,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -448,7 +448,7 @@ func (client *SimsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -465,7 +465,7 @@ func (client *SimsClient) getHandleResponse(resp *http.Response) (SimsClientGetR // NewListByGroupPager - Gets all the SIMs in a SIM group. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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.NewListByGroupPager method. @@ -514,7 +514,7 @@ func (client *SimsClient) listByGroupCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil 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 a1adacf6d7fd..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sims_client_example_test.go +++ /dev/null @@ -1,456 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimsClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSimsClient().Get(ctx, "testResourceGroupName", "testSimGroup", "testSimName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Sim = armmobilenetwork.Sim{ - // Name: to.Ptr("testSim"), - // Type: to.Ptr("Microsoft.MobileNetwork/simGroups/sims"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/simGroups/testSimGroup/sims/testSim"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Properties: &armmobilenetwork.SimPropertiesFormat{ - // DeviceType: to.Ptr("Video camera"), - // IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000000"), - // InternationalMobileSubscriberIdentity: to.Ptr("00000"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // SimPolicy: &armmobilenetwork.SimPolicyResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - // }, - // SimState: to.Ptr(armmobilenetwork.SimStateEnabled), - // SiteProvisioningState: map[string]*armmobilenetwork.SiteProvisioningState{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite": to.Ptr(armmobilenetwork.SiteProvisioningStateProvisioned), - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite2": to.Ptr(armmobilenetwork.SiteProvisioningStateProvisioned), - // }, - // StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - // { - // AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - // }, - // Slice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // StaticIP: &armmobilenetwork.SimStaticIPPropertiesStaticIP{ - // IPv4Address: to.Ptr("2.4.0.1"), - // }, - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimsClient().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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - }, - StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - { - AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - }, - Slice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Sim = armmobilenetwork.Sim{ - // Name: to.Ptr("testSim"), - // Type: to.Ptr("Microsoft.MobileNetwork/simGroups/sims"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/simGroups/testSimGroup/sims/testSim"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Properties: &armmobilenetwork.SimPropertiesFormat{ - // DeviceType: to.Ptr("Video camera"), - // IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000000"), - // InternationalMobileSubscriberIdentity: to.Ptr("00000"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // SimPolicy: &armmobilenetwork.SimPolicyResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - // }, - // SimState: to.Ptr(armmobilenetwork.SimStateEnabled), - // SiteProvisioningState: map[string]*armmobilenetwork.SiteProvisioningState{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite": to.Ptr(armmobilenetwork.SiteProvisioningStateProvisioned), - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite2": to.Ptr(armmobilenetwork.SiteProvisioningStateProvisioned), - // }, - // StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - // { - // AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - // }, - // Slice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // StaticIP: &armmobilenetwork.SimStaticIPPropertiesStaticIP{ - // IPv4Address: to.Ptr("2.4.0.1"), - // }, - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSimsClient().NewListByGroupPager("rg1", "testSimGroup", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SimListResult = armmobilenetwork.SimListResult{ - // Value: []*armmobilenetwork.Sim{ - // { - // Name: to.Ptr("testSim"), - // Type: to.Ptr("Microsoft.MobileNetwork/simGroups/sims"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/simGroups/testSimGroup/sims/testSim"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Properties: &armmobilenetwork.SimPropertiesFormat{ - // DeviceType: to.Ptr("Video camera"), - // IntegratedCircuitCardIdentifier: to.Ptr("8900000000000000000"), - // InternationalMobileSubscriberIdentity: to.Ptr("00000"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // SimPolicy: &armmobilenetwork.SimPolicyResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - // }, - // SimState: to.Ptr(armmobilenetwork.SimStateEnabled), - // SiteProvisioningState: map[string]*armmobilenetwork.SiteProvisioningState{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite": to.Ptr(armmobilenetwork.SiteProvisioningStateProvisioned), - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite2": to.Ptr(armmobilenetwork.SiteProvisioningStateProvisioned), - // }, - // StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - // { - // AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - // }, - // Slice: &armmobilenetwork.SliceResourceID{ - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // }, - // StaticIP: &armmobilenetwork.SimStaticIPPropertiesStaticIP{ - // IPv4Address: to.Ptr("2.4.0.1"), - // }, - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimsClient().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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - }, - StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - { - AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - }, - Slice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - }, - StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - { - AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - }, - Slice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AsyncOperationStatus = armmobilenetwork.AsyncOperationStatus{ - // Name: to.Ptr("testOperation"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimsClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AsyncOperationStatus = armmobilenetwork.AsyncOperationStatus{ - // Name: to.Ptr("testOperation"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSimsClient().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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - }, - StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - { - AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - }, - Slice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy"), - }, - StaticIPConfiguration: []*armmobilenetwork.SimStaticIPProperties{ - { - AttachedDataNetwork: &armmobilenetwork.AttachedDataNetworkResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork"), - }, - Slice: &armmobilenetwork.SliceResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AsyncOperationStatus = armmobilenetwork.AsyncOperationStatus{ - // Name: to.Ptr("testOperation"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), - // ID: to.Ptr("/providers/Microsoft.MobileNetwork/locations/testLocation/operationStatuses/testOperation"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), - // Status: to.Ptr("Succeeded"), - // } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go index 44ebdc7c9fe6..91b7f9ed6332 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client.go @@ -47,7 +47,7 @@ func NewSitesClient(subscriptionID string, credential azcore.TokenCredential, op // network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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. @@ -72,7 +72,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SitesClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, parameters Site, options *SitesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, siteName, parameters, options) @@ -111,7 +111,7 @@ func (client *SitesClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -124,7 +124,7 @@ func (client *SitesClient) createOrUpdateCreateRequest(ctx context.Context, reso // this site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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. @@ -148,7 +148,7 @@ func (client *SitesClient) BeginDelete(ctx context.Context, resourceGroupName st // site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *SitesClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, options *SitesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, siteName, options) @@ -187,7 +187,7 @@ func (client *SitesClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,7 +196,7 @@ func (client *SitesClient) deleteCreateRequest(ctx context.Context, resourceGrou // BeginDeletePacketCore - Deletes a packet core under the specified mobile network site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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. @@ -221,7 +221,7 @@ func (client *SitesClient) BeginDeletePacketCore(ctx context.Context, resourceGr // DeletePacketCore - Deletes a packet core under the specified mobile network site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-01 func (client *SitesClient) deletePacketCore(ctx context.Context, resourceGroupName string, mobileNetworkName string, siteName string, parameters SiteDeletePacketCore, options *SitesClientBeginDeletePacketCoreOptions) (*http.Response, error) { var err error req, err := client.deletePacketCoreCreateRequest(ctx, resourceGroupName, mobileNetworkName, siteName, parameters, options) @@ -260,7 +260,7 @@ func (client *SitesClient) deletePacketCoreCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -272,7 +272,7 @@ func (client *SitesClient) deletePacketCoreCreateRequest(ctx context.Context, re // Get - Gets information about the specified mobile network site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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. @@ -316,7 +316,7 @@ func (client *SitesClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -333,7 +333,7 @@ func (client *SitesClient) getHandleResponse(resp *http.Response) (SitesClientGe // NewListByMobileNetworkPager - Lists all sites in the mobile network. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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.NewListByMobileNetworkPager @@ -383,7 +383,7 @@ func (client *SitesClient) listByMobileNetworkCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -401,7 +401,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -446,7 +446,7 @@ func (client *SitesClient) updateTagsCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 22c6db97d47d..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/sites_client_example_test.go +++ /dev/null @@ -1,251 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSitesClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSitesClient().Get(ctx, "rg1", "testMobileNetwork", "testSite", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armmobilenetwork.Site{ - // Name: to.Ptr("testSite"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/sites"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("testLocation"), - // Properties: &armmobilenetwork.SitePropertiesFormat{ - // NetworkFunctions: []*armmobilenetwork.SubResource{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/testNf"), - // }}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSitesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armmobilenetwork.Site{ - // Name: to.Ptr("testSite"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/sites"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("testLocation"), - // Properties: &armmobilenetwork.SitePropertiesFormat{ - // NetworkFunctions: []*armmobilenetwork.SubResource{ - // }, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSitesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armmobilenetwork.Site{ - // Name: to.Ptr("testSite"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/sites"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("testLocation"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armmobilenetwork.SitePropertiesFormat{ - // NetworkFunctions: []*armmobilenetwork.SubResource{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/testNf"), - // }}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSitesClient().NewListByMobileNetworkPager("rg1", "testMobileNetwork", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SiteListResult = armmobilenetwork.SiteListResult{ - // Value: []*armmobilenetwork.Site{ - // { - // Name: to.Ptr("testSite"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/sites"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("testLocation"), - // Properties: &armmobilenetwork.SitePropertiesFormat{ - // NetworkFunctions: []*armmobilenetwork.SubResource{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/testNf"), - // }}, - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteDeletePacketCore.json -func ExampleSitesClient_BeginDeletePacketCore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSitesClient().BeginDeletePacketCore(ctx, "rg1", "testMobileNetwork", "testSite", armmobilenetwork.SiteDeletePacketCore{ - PacketCore: &armmobilenetwork.PacketCoreControlPlaneResourceID{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/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) - } -} diff --git a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go index 3ad611634c6e..677f3104bf64 100644 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go +++ b/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client.go @@ -46,7 +46,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -71,7 +71,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SlicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, mobileNetworkName string, sliceName string, parameters Slice, options *SlicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, mobileNetworkName, sliceName, parameters, options) @@ -110,7 +110,7 @@ func (client *SlicesClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -122,7 +122,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -145,7 +145,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 2023-06-01 +// Generated from API version 2023-09-01 func (client *SlicesClient) deleteOperation(ctx context.Context, resourceGroupName string, mobileNetworkName string, sliceName string, options *SlicesClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, mobileNetworkName, sliceName, options) @@ -184,7 +184,7 @@ func (client *SlicesClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +193,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -237,7 +237,7 @@ func (client *SlicesClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +254,7 @@ func (client *SlicesClient) getHandleResponse(resp *http.Response) (SlicesClient // NewListByMobileNetworkPager - Lists all slices in the mobile network. // -// Generated from API version 2023-06-01 +// Generated from API version 2023-09-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.NewListByMobileNetworkPager @@ -304,7 +304,7 @@ func (client *SlicesClient) listByMobileNetworkCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -322,7 +322,7 @@ 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 2023-06-01 +// Generated from API version 2023-09-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. @@ -367,7 +367,7 @@ func (client *SlicesClient) updateTagsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-06-01") + reqQP.Set("api-version", "2023-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); 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 4cd407bc4d19..000000000000 --- a/sdk/resourcemanager/mobilenetwork/armmobilenetwork/slices_client_example_test.go +++ /dev/null @@ -1,244 +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. -// DO NOT EDIT. - -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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSlicesClient().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/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSlicesClient().Get(ctx, "rg1", "testMobileNetwork", "testSlice", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Slice = armmobilenetwork.Slice{ - // Name: to.Ptr("testSlice"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/slices"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.SlicePropertiesFormat{ - // Description: to.Ptr("myFavouriteSlice"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Snssai: &armmobilenetwork.Snssai{ - // Sd: to.Ptr("1abcde"), - // Sst: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSlicesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Slice = armmobilenetwork.Slice{ - // Name: to.Ptr("testSlice"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/slices"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.SlicePropertiesFormat{ - // Description: to.Ptr("myFavouriteSlice"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Snssai: &armmobilenetwork.Snssai{ - // Sd: to.Ptr("1abcde"), - // Sst: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSlicesClient().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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Slice = armmobilenetwork.Slice{ - // Name: to.Ptr("testSlice"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/slices"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tag1": to.Ptr("value1"), - // "tag2": to.Ptr("value2"), - // }, - // Properties: &armmobilenetwork.SlicePropertiesFormat{ - // Description: to.Ptr("myFavouriteSlice"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Snssai: &armmobilenetwork.Snssai{ - // Sd: to.Ptr("1abcde"), - // Sst: to.Ptr[int32](1), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/eba34b9c764e877193788a87a81cebfa915eb858/specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-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() - clientFactory, err := armmobilenetwork.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSlicesClient().NewListByMobileNetworkPager("rg1", "testMobileNetwork", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SliceListResult = armmobilenetwork.SliceListResult{ - // Value: []*armmobilenetwork.Slice{ - // { - // Name: to.Ptr("testSlice"), - // Type: to.Ptr("Microsoft.MobileNetwork/mobileNetworks/slices"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice"), - // SystemData: &armmobilenetwork.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armmobilenetwork.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // }, - // Properties: &armmobilenetwork.SlicePropertiesFormat{ - // Description: to.Ptr("myFavouriteSlice"), - // ProvisioningState: to.Ptr(armmobilenetwork.ProvisioningStateSucceeded), - // Snssai: &armmobilenetwork.Snssai{ - // Sd: to.Ptr("1abcde"), - // Sst: to.Ptr[int32](1), - // }, - // }, - // }}, - // } - } -}