From 0b5caab602e9c5dd97259dcb51f41a35cadfef97 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 9 Jan 2023 08:03:19 +0000 Subject: [PATCH] CodeGen from PR 22101 in Azure/azure-rest-api-specs Merge 16aa7b0419a56432ff9d2d4672f0e02c1359fc1d into 9bfb9a0eca48d80d69453973e7597a31a0ecc9c2 --- .../CHANGELOG.md | 4 +- .../README.md | 2 +- .../SAMPLE.md | 542 +++++----- .../mobilenetwork/MobileNetworkManager.java | 35 +- .../fluent/MobileNetworkManagementClient.java | 14 - ...acketCoreControlPlaneOperationsClient.java | 214 ---- .../fluent/PacketCoreControlPlanesClient.java | 198 ++++ .../fluent/SimOperationsClient.java | 202 ---- .../mobilenetwork/fluent/SimsClient.java | 188 ++++ .../MobileNetworkManagementClientImpl.java | 28 - .../PacketCoreControlPlaneImpl.java | 35 + ...tCoreControlPlaneOperationsClientImpl.java | 964 ------------------ .../PacketCoreControlPlaneOperationsImpl.java | 104 -- .../PacketCoreControlPlanesClientImpl.java | 900 ++++++++++++++++ .../PacketCoreControlPlanesImpl.java | 71 ++ .../SimOperationsClientImpl.java | 930 ----------------- .../implementation/SimOperationsImpl.java | 99 -- .../implementation/SimsClientImpl.java | 872 ++++++++++++++++ .../implementation/SimsImpl.java | 67 ++ .../models/PacketCoreControlPlane.java | 70 ++ .../PacketCoreControlPlaneOperations.java | 100 -- .../models/PacketCoreControlPlanes.java | 90 ++ .../mobilenetwork/models/SimOperations.java | 95 -- .../mobilenetwork/models/Sims.java | 85 ++ ...anesCollectDiagnosticsPackageSamples.java} | 6 +- ...ketCoreControlPlanesReinstallSamples.java} | 6 +- ...cketCoreControlPlanesRollbackSamples.java} | 6 +- ...amples.java => SimsBulkDeleteSamples.java} | 6 +- ...va => SimsBulkUploadEncryptedSamples.java} | 6 +- ...amples.java => SimsBulkUploadSamples.java} | 6 +- 30 files changed, 2867 insertions(+), 3078 deletions(-) delete mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneOperationsClient.java delete mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimOperationsClient.java delete mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneOperationsClientImpl.java delete mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneOperationsImpl.java delete mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimOperationsClientImpl.java delete mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimOperationsImpl.java delete mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneOperations.java delete mode 100644 sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimOperations.java rename sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/{PacketCoreControlPlaneOperationCollectDiagnosticsPackageSamples.java => PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java} (85%) rename sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/{PacketCoreControlPlaneOperationReinstallSamples.java => PacketCoreControlPlanesReinstallSamples.java} (75%) rename sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/{PacketCoreControlPlaneOperationRollbackSamples.java => PacketCoreControlPlanesRollbackSamples.java} (75%) rename sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/{SimOperationBulkDeleteSamples.java => SimsBulkDeleteSamples.java} (89%) rename sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/{SimOperationBulkUploadEncryptedSamples.java => SimsBulkUploadEncryptedSamples.java} (97%) rename sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/{SimOperationBulkUploadSamples.java => SimsBulkUploadSamples.java} (97%) diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md index 858d4a5db83db..190faf529edac 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2023-01-09) + +- Azure Resource Manager MobileNetwork client library for Java. This package contains Microsoft Azure SDK for MobileNetwork Management SDK. The resources in this API specification will be used to manage attached data network resources in mobile network attached to a particular packet core instance. Package tag package-2022-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md index c4379516b6bf1..0fff047433571 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mobilenetwork - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md index 3b844e2f2093c..f5cd9cf8f6790 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md @@ -30,12 +30,6 @@ - [List](#operations_list) -## PacketCoreControlPlaneOperation - -- [CollectDiagnosticsPackage](#packetcorecontrolplaneoperation_collectdiagnosticspackage) -- [Reinstall](#packetcorecontrolplaneoperation_reinstall) -- [Rollback](#packetcorecontrolplaneoperation_rollback) - ## PacketCoreControlPlaneVersions - [Get](#packetcorecontrolplaneversions_get) @@ -43,11 +37,14 @@ ## PacketCoreControlPlanes +- [CollectDiagnosticsPackage](#packetcorecontrolplanes_collectdiagnosticspackage) - [CreateOrUpdate](#packetcorecontrolplanes_createorupdate) - [Delete](#packetcorecontrolplanes_delete) - [GetByResourceGroup](#packetcorecontrolplanes_getbyresourcegroup) - [List](#packetcorecontrolplanes_list) - [ListByResourceGroup](#packetcorecontrolplanes_listbyresourcegroup) +- [Reinstall](#packetcorecontrolplanes_reinstall) +- [Rollback](#packetcorecontrolplanes_rollback) - [UpdateTags](#packetcorecontrolplanes_updatetags) ## PacketCoreDataPlanes @@ -75,12 +72,6 @@ - [ListByResourceGroup](#simgroups_listbyresourcegroup) - [UpdateTags](#simgroups_updatetags) -## SimOperation - -- [BulkDelete](#simoperation_bulkdelete) -- [BulkUpload](#simoperation_bulkupload) -- [BulkUploadEncrypted](#simoperation_bulkuploadencrypted) - ## SimPolicies - [CreateOrUpdate](#simpolicies_createorupdate) @@ -91,6 +82,9 @@ ## Sims +- [BulkDelete](#sims_bulkdelete) +- [BulkUpload](#sims_bulkupload) +- [BulkUploadEncrypted](#sims_bulkuploadencrypted) - [CreateOrUpdate](#sims_createorupdate) - [Delete](#sims_delete) - [Get](#sims_get) @@ -569,121 +563,77 @@ public final class OperationsListSamples { } ``` -### PacketCoreControlPlaneOperation_CollectDiagnosticsPackage - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; - -/** Samples for PacketCoreControlPlaneOperation CollectDiagnosticsPackage. */ -public final class PacketCoreControlPlaneOperationCollectDiagnosticsPackageSamples { - /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json - */ - /** - * Sample code: Collect diagnostics package from packet core control plane. - * - * @param manager Entry point to MobileNetworkManager. - */ - public static void collectDiagnosticsPackageFromPacketCoreControlPlane( - com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager - .packetCoreControlPlaneOperations() - .collectDiagnosticsPackage( - "rg1", - "TestPacketCoreCP", - new PacketCoreControlPlaneCollectDiagnosticsPackage() - .withStorageAccountBlobUrl( - "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip"), - Context.NONE); - } -} -``` - -### PacketCoreControlPlaneOperation_Reinstall - -```java -import com.azure.core.util.Context; - -/** Samples for PacketCoreControlPlaneOperation Reinstall. */ -public final class PacketCoreControlPlaneOperationReinstallSamples { - /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json - */ - /** - * Sample code: Reinstall packet core control plane. - * - * @param manager Entry point to MobileNetworkManager. - */ - public static void reinstallPacketCoreControlPlane( - com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlaneOperations().reinstall("rg1", "TestPacketCoreCP", Context.NONE); - } -} -``` - -### PacketCoreControlPlaneOperation_Rollback +### PacketCoreControlPlaneVersions_Get ```java import com.azure.core.util.Context; -/** Samples for PacketCoreControlPlaneOperation Rollback. */ -public final class PacketCoreControlPlaneOperationRollbackSamples { +/** Samples for PacketCoreControlPlaneVersions Get. */ +public final class PacketCoreControlPlaneVersionsGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json */ /** - * Sample code: Rollback packet core control plane. + * Sample code: Get packet core control plane version. * * @param manager Entry point to MobileNetworkManager. */ - public static void rollbackPacketCoreControlPlane( + public static void getPacketCoreControlPlaneVersion( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlaneOperations().rollback("rg1", "TestPacketCoreCP", Context.NONE); + manager.packetCoreControlPlaneVersions().getWithResponse("PMN-4-11-1", Context.NONE); } } ``` -### PacketCoreControlPlaneVersions_Get +### PacketCoreControlPlaneVersions_List ```java import com.azure.core.util.Context; -/** Samples for PacketCoreControlPlaneVersions Get. */ -public final class PacketCoreControlPlaneVersionsGetSamples { +/** Samples for PacketCoreControlPlaneVersions List. */ +public final class PacketCoreControlPlaneVersionsListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json */ /** - * Sample code: Get packet core control plane version. + * Sample code: Get supported packet core control plane versions. * * @param manager Entry point to MobileNetworkManager. */ - public static void getPacketCoreControlPlaneVersion( + public static void getSupportedPacketCoreControlPlaneVersions( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlaneVersions().getWithResponse("PMN-4-11-1", Context.NONE); + manager.packetCoreControlPlaneVersions().list(Context.NONE); } } ``` -### PacketCoreControlPlaneVersions_List +### PacketCoreControlPlanes_CollectDiagnosticsPackage ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; -/** Samples for PacketCoreControlPlaneVersions List. */ -public final class PacketCoreControlPlaneVersionsListSamples { +/** Samples for PacketCoreControlPlanes CollectDiagnosticsPackage. */ +public final class PacketCoreControlPlanesCollectDiagnosticsPackageSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneVersionList.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json */ /** - * Sample code: Get supported packet core control plane versions. + * Sample code: Collect diagnostics package from packet core control plane. * * @param manager Entry point to MobileNetworkManager. */ - public static void getSupportedPacketCoreControlPlaneVersions( + public static void collectDiagnosticsPackageFromPacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlaneVersions().list(Context.NONE); + manager + .packetCoreControlPlanes() + .collectDiagnosticsPackage( + "rg1", + "TestPacketCoreCP", + new PacketCoreControlPlaneCollectDiagnosticsPackage() + .withStorageAccountBlobUrl( + "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip"), + Context.NONE); } } ``` @@ -846,6 +796,50 @@ public final class PacketCoreControlPlanesListByResourceGroupSamples { } ``` +### PacketCoreControlPlanes_Reinstall + +```java +import com.azure.core.util.Context; + +/** Samples for PacketCoreControlPlanes Reinstall. */ +public final class PacketCoreControlPlanesReinstallSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json + */ + /** + * Sample code: Reinstall packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void reinstallPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().reinstall("rg1", "TestPacketCoreCP", Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_Rollback + +```java +import com.azure.core.util.Context; + +/** Samples for PacketCoreControlPlanes Rollback. */ +public final class PacketCoreControlPlanesRollbackSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json + */ + /** + * Sample code: Rollback packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void rollbackPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlanes().rollback("rg1", "TestPacketCoreCP", Context.NONE); + } +} +``` + ### PacketCoreControlPlanes_UpdateTags ```java @@ -1364,15 +1358,191 @@ public final class SimGroupsUpdateTagsSamples { } ``` -### SimOperation_BulkDelete +### SimPolicies_CreateOrUpdate + +```java +import com.azure.resourcemanager.mobilenetwork.models.Ambr; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.PduSessionType; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; +import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; +import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** Samples for SimPolicies CreateOrUpdate. */ +public final class SimPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json + */ + /** + * Sample code: Create SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .simPolicies() + .define("testPolicy") + .withRegion("eastus") + .withExistingMobileNetwork("rg1", "testMobileNetwork") + .withUeAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) + .withDefaultSlice( + new SliceResourceId() + .withId( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withSliceConfigurations( + Arrays + .asList( + new SliceConfiguration() + .withSlice( + new SliceResourceId() + .withId( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + .withDefaultDataNetwork( + new DataNetworkResourceId() + .withId( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + .withDataNetworkConfigurations( + Arrays + .asList( + new DataNetworkConfiguration() + .withDataNetwork( + new DataNetworkResourceId() + .withId( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + .withSessionAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) + .withFiveQi(9) + .withAllocationAndRetentionPriorityLevel(9) + .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) + .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) + .withDefaultSessionType(PduSessionType.IPV4) + .withAdditionalAllowedSessionTypes(Arrays.asList()) + .withAllowedServices( + Arrays + .asList( + new ServiceResourceId() + .withId( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"))) + .withMaximumNumberOfBufferedPackets(200))))) + .withRegistrationTimer(3240) + .create(); + } +} +``` + +### SimPolicies_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for SimPolicies Delete. */ +public final class SimPoliciesDeleteSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json + */ + /** + * Sample code: Delete SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies().delete("rg1", "testMobileNetwork", "testPolicy", Context.NONE); + } +} +``` + +### SimPolicies_Get + +```java +import com.azure.core.util.Context; + +/** Samples for SimPolicies Get. */ +public final class SimPoliciesGetSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json + */ + /** + * Sample code: Get SIM policy. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies().getWithResponse("rg1", "testMobileNetwork", "testPolicy", Context.NONE); + } +} +``` + +### SimPolicies_ListByMobileNetwork + +```java +import com.azure.core.util.Context; + +/** Samples for SimPolicies ListByMobileNetwork. */ +public final class SimPoliciesListByMobileNetworkSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json + */ + /** + * Sample code: List SIM policies in a mobile network. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listSIMPoliciesInAMobileNetwork( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies().listByMobileNetwork("testResourceGroupName", "testMobileNetwork", Context.NONE); + } +} +``` + +### SimPolicies_UpdateTags + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; +import java.util.HashMap; +import java.util.Map; + +/** Samples for SimPolicies UpdateTags. */ +public final class SimPoliciesUpdateTagsSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json + */ + /** + * Sample code: Update SIM policy tags. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void updateSIMPolicyTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + SimPolicy resource = + manager.simPolicies().getWithResponse("rg1", "testMobileNetwork", "testPolicy", Context.NONE).getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Sims_BulkDelete ```java import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; import java.util.Arrays; -/** Samples for SimOperation BulkDelete. */ -public final class SimOperationBulkDeleteSamples { +/** Samples for Sims BulkDelete. */ +public final class SimsBulkDeleteSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json */ @@ -1384,7 +1554,7 @@ public final class SimOperationBulkDeleteSamples { public static void bulkDeleteSIMsFromASIMGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkDelete( "testResourceGroupName", "testSimGroup", @@ -1394,7 +1564,7 @@ public final class SimOperationBulkDeleteSamples { } ``` -### SimOperation_BulkUpload +### Sims_BulkUpload ```java import com.azure.core.util.Context; @@ -1407,8 +1577,8 @@ import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; import java.util.Arrays; -/** Samples for SimOperation BulkUpload. */ -public final class SimOperationBulkUploadSamples { +/** Samples for Sims BulkUpload. */ +public final class SimsBulkUploadSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json */ @@ -1419,7 +1589,7 @@ public final class SimOperationBulkUploadSamples { */ public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkUpload( "rg1", "testSimGroup", @@ -1484,7 +1654,7 @@ public final class SimOperationBulkUploadSamples { } ``` -### SimOperation_BulkUploadEncrypted +### Sims_BulkUploadEncrypted ```java import com.azure.core.util.Context; @@ -1497,8 +1667,8 @@ import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStati import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; import java.util.Arrays; -/** Samples for SimOperation BulkUploadEncrypted. */ -public final class SimOperationBulkUploadEncryptedSamples { +/** Samples for Sims BulkUploadEncrypted. */ +public final class SimsBulkUploadEncryptedSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json */ @@ -1510,7 +1680,7 @@ public final class SimOperationBulkUploadEncryptedSamples { public static void bulkUploadEncryptedSIMsToASIMGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkUploadEncrypted( "rg1", "testSimGroup", @@ -1578,182 +1748,6 @@ public final class SimOperationBulkUploadEncryptedSamples { } ``` -### SimPolicies_CreateOrUpdate - -```java -import com.azure.resourcemanager.mobilenetwork.models.Ambr; -import com.azure.resourcemanager.mobilenetwork.models.DataNetworkConfiguration; -import com.azure.resourcemanager.mobilenetwork.models.DataNetworkResourceId; -import com.azure.resourcemanager.mobilenetwork.models.PduSessionType; -import com.azure.resourcemanager.mobilenetwork.models.PreemptionCapability; -import com.azure.resourcemanager.mobilenetwork.models.PreemptionVulnerability; -import com.azure.resourcemanager.mobilenetwork.models.ServiceResourceId; -import com.azure.resourcemanager.mobilenetwork.models.SliceConfiguration; -import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; -import java.util.Arrays; - -/** Samples for SimPolicies CreateOrUpdate. */ -public final class SimPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json - */ - /** - * Sample code: Create SIM policy. - * - * @param manager Entry point to MobileNetworkManager. - */ - public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager - .simPolicies() - .define("testPolicy") - .withRegion("eastus") - .withExistingMobileNetwork("rg1", "testMobileNetwork") - .withUeAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) - .withDefaultSlice( - new SliceResourceId() - .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) - .withSliceConfigurations( - Arrays - .asList( - new SliceConfiguration() - .withSlice( - new SliceResourceId() - .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) - .withDefaultDataNetwork( - new DataNetworkResourceId() - .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) - .withDataNetworkConfigurations( - Arrays - .asList( - new DataNetworkConfiguration() - .withDataNetwork( - new DataNetworkResourceId() - .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) - .withSessionAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) - .withFiveQi(9) - .withAllocationAndRetentionPriorityLevel(9) - .withPreemptionCapability(PreemptionCapability.NOT_PREEMPT) - .withPreemptionVulnerability(PreemptionVulnerability.PREEMPTABLE) - .withDefaultSessionType(PduSessionType.IPV4) - .withAdditionalAllowedSessionTypes(Arrays.asList()) - .withAllowedServices( - Arrays - .asList( - new ServiceResourceId() - .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"))) - .withMaximumNumberOfBufferedPackets(200))))) - .withRegistrationTimer(3240) - .create(); - } -} -``` - -### SimPolicies_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for SimPolicies Delete. */ -public final class SimPoliciesDeleteSamples { - /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json - */ - /** - * Sample code: Delete SIM policy. - * - * @param manager Entry point to MobileNetworkManager. - */ - public static void deleteSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simPolicies().delete("rg1", "testMobileNetwork", "testPolicy", Context.NONE); - } -} -``` - -### SimPolicies_Get - -```java -import com.azure.core.util.Context; - -/** Samples for SimPolicies Get. */ -public final class SimPoliciesGetSamples { - /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyGet.json - */ - /** - * Sample code: Get SIM policy. - * - * @param manager Entry point to MobileNetworkManager. - */ - public static void getSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simPolicies().getWithResponse("rg1", "testMobileNetwork", "testPolicy", Context.NONE); - } -} -``` - -### SimPolicies_ListByMobileNetwork - -```java -import com.azure.core.util.Context; - -/** Samples for SimPolicies ListByMobileNetwork. */ -public final class SimPoliciesListByMobileNetworkSamples { - /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyListByMobileNetwork.json - */ - /** - * Sample code: List SIM policies in a mobile network. - * - * @param manager Entry point to MobileNetworkManager. - */ - public static void listSIMPoliciesInAMobileNetwork( - com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simPolicies().listByMobileNetwork("testResourceGroupName", "testMobileNetwork", Context.NONE); - } -} -``` - -### SimPolicies_UpdateTags - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; -import java.util.HashMap; -import java.util.Map; - -/** Samples for SimPolicies UpdateTags. */ -public final class SimPoliciesUpdateTagsSamples { - /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyUpdateTags.json - */ - /** - * Sample code: Update SIM policy tags. - * - * @param manager Entry point to MobileNetworkManager. - */ - public static void updateSIMPolicyTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - SimPolicy resource = - manager.simPolicies().getWithResponse("rg1", "testMobileNetwork", "testPolicy", Context.NONE).getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - ### Sims_CreateOrUpdate ```java diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/MobileNetworkManager.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/MobileNetworkManager.java index 4c5acb5602765..67acb256284f5 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/MobileNetworkManager.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/MobileNetworkManager.java @@ -29,13 +29,11 @@ import com.azure.resourcemanager.mobilenetwork.implementation.MobileNetworkManagementClientBuilder; import com.azure.resourcemanager.mobilenetwork.implementation.MobileNetworksImpl; import com.azure.resourcemanager.mobilenetwork.implementation.OperationsImpl; -import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlaneOperationsImpl; import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlaneVersionsImpl; import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlanesImpl; import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreDataPlanesImpl; import com.azure.resourcemanager.mobilenetwork.implementation.ServicesImpl; import com.azure.resourcemanager.mobilenetwork.implementation.SimGroupsImpl; -import com.azure.resourcemanager.mobilenetwork.implementation.SimOperationsImpl; import com.azure.resourcemanager.mobilenetwork.implementation.SimPoliciesImpl; import com.azure.resourcemanager.mobilenetwork.implementation.SimsImpl; import com.azure.resourcemanager.mobilenetwork.implementation.SitesImpl; @@ -44,13 +42,11 @@ import com.azure.resourcemanager.mobilenetwork.models.DataNetworks; import com.azure.resourcemanager.mobilenetwork.models.MobileNetworks; import com.azure.resourcemanager.mobilenetwork.models.Operations; -import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneOperations; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersions; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlanes; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlanes; import com.azure.resourcemanager.mobilenetwork.models.Services; import com.azure.resourcemanager.mobilenetwork.models.SimGroups; -import com.azure.resourcemanager.mobilenetwork.models.SimOperations; import com.azure.resourcemanager.mobilenetwork.models.SimPolicies; import com.azure.resourcemanager.mobilenetwork.models.Sims; import com.azure.resourcemanager.mobilenetwork.models.Sites; @@ -77,8 +73,6 @@ public final class MobileNetworkManager { private PacketCoreControlPlanes packetCoreControlPlanes; - private PacketCoreControlPlaneOperations packetCoreControlPlaneOperations; - private PacketCoreControlPlaneVersions packetCoreControlPlaneVersions; private PacketCoreDataPlanes packetCoreDataPlanes; @@ -87,8 +81,6 @@ public final class MobileNetworkManager { private Sims sims; - private SimOperations simOperations; - private SimGroups simGroups; private SimPolicies simPolicies; @@ -262,7 +254,7 @@ public MobileNetworkManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.mobilenetwork") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -380,19 +372,6 @@ public PacketCoreControlPlanes packetCoreControlPlanes() { return packetCoreControlPlanes; } - /** - * Gets the resource collection API of PacketCoreControlPlaneOperations. - * - * @return Resource collection API of PacketCoreControlPlaneOperations. - */ - public PacketCoreControlPlaneOperations packetCoreControlPlaneOperations() { - if (this.packetCoreControlPlaneOperations == null) { - this.packetCoreControlPlaneOperations = - new PacketCoreControlPlaneOperationsImpl(clientObject.getPacketCoreControlPlaneOperations(), this); - } - return packetCoreControlPlaneOperations; - } - /** * Gets the resource collection API of PacketCoreControlPlaneVersions. * @@ -442,18 +421,6 @@ public Sims sims() { return sims; } - /** - * Gets the resource collection API of SimOperations. - * - * @return Resource collection API of SimOperations. - */ - public SimOperations simOperations() { - if (this.simOperations == null) { - this.simOperations = new SimOperationsImpl(clientObject.getSimOperations(), this); - } - return simOperations; - } - /** * Gets the resource collection API of SimGroups. It manages SimGroup. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworkManagementClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworkManagementClient.java index e9667d014884d..ed392138d570e 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworkManagementClient.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/MobileNetworkManagementClient.java @@ -79,13 +79,6 @@ public interface MobileNetworkManagementClient { */ PacketCoreControlPlanesClient getPacketCoreControlPlanes(); - /** - * Gets the PacketCoreControlPlaneOperationsClient object to access its operations. - * - * @return the PacketCoreControlPlaneOperationsClient object. - */ - PacketCoreControlPlaneOperationsClient getPacketCoreControlPlaneOperations(); - /** * Gets the PacketCoreControlPlaneVersionsClient object to access its operations. * @@ -114,13 +107,6 @@ public interface MobileNetworkManagementClient { */ SimsClient getSims(); - /** - * Gets the SimOperationsClient object to access its operations. - * - * @return the SimOperationsClient object. - */ - SimOperationsClient getSimOperations(); - /** * Gets the SimGroupsClient object to access its operations. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneOperationsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneOperationsClient.java deleted file mode 100644 index 0a7bdde51351a..0000000000000 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneOperationsClient.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mobilenetwork.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; -import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; - -/** - * An instance of this class provides access to all the operations defined in PacketCoreControlPlaneOperationsClient. - */ -public interface PacketCoreControlPlaneOperationsClient { - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginRollback( - String resourceGroupName, String packetCoreControlPlaneName); - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginRollback( - String resourceGroupName, String packetCoreControlPlaneName, Context context); - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName); - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context); - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginReinstall( - String resourceGroupName, String packetCoreControlPlaneName); - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginReinstall( - String resourceGroupName, String packetCoreControlPlaneName, Context context); - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName); - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName, Context context); - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters); - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context); - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner collectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters); - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner collectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context); -} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlanesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlanesClient.java index ff1d25a674850..173e5b91fc02a 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlanesClient.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlanesClient.java @@ -11,7 +11,9 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; import com.azure.resourcemanager.mobilenetwork.models.TagsObject; /** An instance of this class provides access to all the operations defined in PacketCoreControlPlanesClient. */ @@ -246,4 +248,200 @@ PacketCoreControlPlaneInner updateTags( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginRollback( + String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginRollback( + String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginReinstall( + String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginReinstall( + String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner collectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner collectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimOperationsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimOperationsClient.java deleted file mode 100644 index bcae3e1beadae..0000000000000 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimOperationsClient.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mobilenetwork.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; -import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; -import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; -import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; - -/** An instance of this class provides access to all the operations defined in SimOperationsClient. */ -public interface SimOperationsClient { - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginBulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters); - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginBulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context); - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters); - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner bulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context); - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginBulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters); - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginBulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context); - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters); - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner bulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context); - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters); - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context); - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner bulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters); - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AsyncOperationStatusInner bulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context); -} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimsClient.java index 89e967da74c02..c2bb2940ad272 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimsClient.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimsClient.java @@ -11,7 +11,11 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; /** An instance of this class provides access to all the operations defined in SimsClient. */ public interface SimsClient { @@ -192,4 +196,188 @@ SimInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByGroup(String resourceGroupName, String simGroupName, Context context); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginBulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginBulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginBulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginBulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AsyncOperationStatusInner bulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientImpl.java index 558e8ba55447a..2d2eb71ed85e4 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientImpl.java @@ -27,13 +27,11 @@ import com.azure.resourcemanager.mobilenetwork.fluent.MobileNetworkManagementClient; import com.azure.resourcemanager.mobilenetwork.fluent.MobileNetworksClient; import com.azure.resourcemanager.mobilenetwork.fluent.OperationsClient; -import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlaneOperationsClient; import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlaneVersionsClient; import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlanesClient; import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreDataPlanesClient; import com.azure.resourcemanager.mobilenetwork.fluent.ServicesClient; import com.azure.resourcemanager.mobilenetwork.fluent.SimGroupsClient; -import com.azure.resourcemanager.mobilenetwork.fluent.SimOperationsClient; import com.azure.resourcemanager.mobilenetwork.fluent.SimPoliciesClient; import com.azure.resourcemanager.mobilenetwork.fluent.SimsClient; import com.azure.resourcemanager.mobilenetwork.fluent.SitesClient; @@ -182,18 +180,6 @@ public PacketCoreControlPlanesClient getPacketCoreControlPlanes() { return this.packetCoreControlPlanes; } - /** The PacketCoreControlPlaneOperationsClient object to access its operations. */ - private final PacketCoreControlPlaneOperationsClient packetCoreControlPlaneOperations; - - /** - * Gets the PacketCoreControlPlaneOperationsClient object to access its operations. - * - * @return the PacketCoreControlPlaneOperationsClient object. - */ - public PacketCoreControlPlaneOperationsClient getPacketCoreControlPlaneOperations() { - return this.packetCoreControlPlaneOperations; - } - /** The PacketCoreControlPlaneVersionsClient object to access its operations. */ private final PacketCoreControlPlaneVersionsClient packetCoreControlPlaneVersions; @@ -242,18 +228,6 @@ public SimsClient getSims() { return this.sims; } - /** The SimOperationsClient object to access its operations. */ - private final SimOperationsClient simOperations; - - /** - * Gets the SimOperationsClient object to access its operations. - * - * @return the SimOperationsClient object. - */ - public SimOperationsClient getSimOperations() { - return this.simOperations; - } - /** The SimGroupsClient object to access its operations. */ private final SimGroupsClient simGroups; @@ -330,12 +304,10 @@ public SlicesClient getSlices() { this.mobileNetworks = new MobileNetworksClientImpl(this); this.operations = new OperationsClientImpl(this); this.packetCoreControlPlanes = new PacketCoreControlPlanesClientImpl(this); - this.packetCoreControlPlaneOperations = new PacketCoreControlPlaneOperationsClientImpl(this); this.packetCoreControlPlaneVersions = new PacketCoreControlPlaneVersionsClientImpl(this); this.packetCoreDataPlanes = new PacketCoreDataPlanesClientImpl(this); this.services = new ServicesClientImpl(this); this.sims = new SimsClientImpl(this); - this.simOperations = new SimOperationsClientImpl(this); this.simGroups = new SimGroupsClientImpl(this); this.simPolicies = new SimPoliciesClientImpl(this); this.sites = new SitesClientImpl(this); diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneImpl.java index eaaa37b38a5b0..25593b5211749 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneImpl.java @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; import com.azure.resourcemanager.mobilenetwork.models.BillingSku; import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; import com.azure.resourcemanager.mobilenetwork.models.Installation; @@ -15,6 +16,7 @@ import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; import com.azure.resourcemanager.mobilenetwork.models.SiteResourceId; @@ -225,6 +227,39 @@ public PacketCoreControlPlane refresh(Context context) { return this; } + public AsyncOperationStatus rollback() { + return serviceManager.packetCoreControlPlanes().rollback(resourceGroupName, packetCoreControlPlaneName); + } + + public AsyncOperationStatus rollback(Context context) { + return serviceManager + .packetCoreControlPlanes() + .rollback(resourceGroupName, packetCoreControlPlaneName, context); + } + + public AsyncOperationStatus reinstall() { + return serviceManager.packetCoreControlPlanes().reinstall(resourceGroupName, packetCoreControlPlaneName); + } + + public AsyncOperationStatus reinstall(Context context) { + return serviceManager + .packetCoreControlPlanes() + .reinstall(resourceGroupName, packetCoreControlPlaneName, context); + } + + public AsyncOperationStatus collectDiagnosticsPackage(PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + return serviceManager + .packetCoreControlPlanes() + .collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters); + } + + public AsyncOperationStatus collectDiagnosticsPackage( + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, Context context) { + return serviceManager + .packetCoreControlPlanes() + .collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters, context); + } + public PacketCoreControlPlaneImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneOperationsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneOperationsClientImpl.java deleted file mode 100644 index 7afae43fba6aa..0000000000000 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneOperationsClientImpl.java +++ /dev/null @@ -1,964 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mobilenetwork.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlaneOperationsClient; -import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; -import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in PacketCoreControlPlaneOperationsClient. - */ -public final class PacketCoreControlPlaneOperationsClientImpl implements PacketCoreControlPlaneOperationsClient { - /** The proxy service used to perform REST calls. */ - private final PacketCoreControlPlaneOperationsService service; - - /** The service client containing this operation class. */ - private final MobileNetworkManagementClientImpl client; - - /** - * Initializes an instance of PacketCoreControlPlaneOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PacketCoreControlPlaneOperationsClientImpl(MobileNetworkManagementClientImpl client) { - this.service = - RestProxy - .create( - PacketCoreControlPlaneOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for MobileNetworkManagementClientPacketCoreControlPlaneOperations to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "MobileNetworkManagem") - public interface PacketCoreControlPlaneOperationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rollback( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reinstall( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> collectDiagnosticsPackage( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rollbackWithResponseAsync( - String resourceGroupName, String packetCoreControlPlaneName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (packetCoreControlPlaneName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter packetCoreControlPlaneName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .rollback( - this.client.getEndpoint(), - resourceGroupName, - packetCoreControlPlaneName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rollbackWithResponseAsync( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (packetCoreControlPlaneName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter packetCoreControlPlaneName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .rollback( - this.client.getEndpoint(), - resourceGroupName, - packetCoreControlPlaneName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginRollbackAsync( - String resourceGroupName, String packetCoreControlPlaneName) { - Mono>> mono = - rollbackWithResponseAsync(resourceGroupName, packetCoreControlPlaneName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - this.client.getContext()); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginRollbackAsync( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - rollbackWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - context); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginRollback( - String resourceGroupName, String packetCoreControlPlaneName) { - return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginRollback( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rollbackAsync(String resourceGroupName, String packetCoreControlPlaneName) { - return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rollbackAsync( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName) { - return rollbackAsync(resourceGroupName, packetCoreControlPlaneName).block(); - } - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner rollback( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - return rollbackAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reinstallWithResponseAsync( - String resourceGroupName, String packetCoreControlPlaneName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (packetCoreControlPlaneName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter packetCoreControlPlaneName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .reinstall( - this.client.getEndpoint(), - resourceGroupName, - packetCoreControlPlaneName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reinstallWithResponseAsync( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (packetCoreControlPlaneName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter packetCoreControlPlaneName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .reinstall( - this.client.getEndpoint(), - resourceGroupName, - packetCoreControlPlaneName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginReinstallAsync( - String resourceGroupName, String packetCoreControlPlaneName) { - Mono>> mono = - reinstallWithResponseAsync(resourceGroupName, packetCoreControlPlaneName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - this.client.getContext()); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginReinstallAsync( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - reinstallWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - context); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginReinstall( - String resourceGroupName, String packetCoreControlPlaneName) { - return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginReinstall( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reinstallAsync( - String resourceGroupName, String packetCoreControlPlaneName) { - return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reinstallAsync( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName) { - return reinstallAsync(resourceGroupName, packetCoreControlPlaneName).block(); - } - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner reinstall( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - return reinstallAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> collectDiagnosticsPackageWithResponseAsync( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (packetCoreControlPlaneName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter packetCoreControlPlaneName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .collectDiagnosticsPackage( - this.client.getEndpoint(), - resourceGroupName, - packetCoreControlPlaneName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> collectDiagnosticsPackageWithResponseAsync( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (packetCoreControlPlaneName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter packetCoreControlPlaneName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .collectDiagnosticsPackage( - this.client.getEndpoint(), - resourceGroupName, - packetCoreControlPlaneName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> - beginCollectDiagnosticsPackageAsync( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { - Mono>> mono = - collectDiagnosticsPackageWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - this.client.getContext()); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> - beginCollectDiagnosticsPackageAsync( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - collectDiagnosticsPackageWithResponseAsync( - resourceGroupName, packetCoreControlPlaneName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - context); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { - return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters) - .getSyncPoller(); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context) { - return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) - .getSyncPoller(); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono collectDiagnosticsPackageAsync( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { - return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono collectDiagnosticsPackageAsync( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context) { - return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner collectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { - return collectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters).block(); - } - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner collectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context) { - return collectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) - .block(); - } -} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneOperationsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneOperationsImpl.java deleted file mode 100644 index fad3cbb9d72e6..0000000000000 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneOperationsImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mobilenetwork.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlaneOperationsClient; -import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; -import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; -import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; -import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneOperations; - -public final class PacketCoreControlPlaneOperationsImpl implements PacketCoreControlPlaneOperations { - private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlaneOperationsImpl.class); - - private final PacketCoreControlPlaneOperationsClient innerClient; - - private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; - - public PacketCoreControlPlaneOperationsImpl( - PacketCoreControlPlaneOperationsClient innerClient, - com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName) { - AsyncOperationStatusInner inner = this.serviceClient().rollback(resourceGroupName, packetCoreControlPlaneName); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context) { - AsyncOperationStatusInner inner = - this.serviceClient().rollback(resourceGroupName, packetCoreControlPlaneName, context); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName) { - AsyncOperationStatusInner inner = this.serviceClient().reinstall(resourceGroupName, packetCoreControlPlaneName); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus reinstall( - String resourceGroupName, String packetCoreControlPlaneName, Context context) { - AsyncOperationStatusInner inner = - this.serviceClient().reinstall(resourceGroupName, packetCoreControlPlaneName, context); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus collectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { - AsyncOperationStatusInner inner = - this.serviceClient().collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus collectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context) { - AsyncOperationStatusInner inner = - this - .serviceClient() - .collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters, context); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - private PacketCoreControlPlaneOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesClientImpl.java index 357872d66774e..5e0c315449024 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -33,7 +34,9 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlanesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneListResult; import com.azure.resourcemanager.mobilenetwork.models.TagsObject; import java.nio.ByteBuffer; @@ -154,6 +157,52 @@ Mono> listByResourceGroup( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" + + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rollback( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" + + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reinstall( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" + + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> collectDiagnosticsPackage( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1338,6 +1387,857 @@ public PagedIterable listByResourceGroup(String res return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rollbackWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .rollback( + this.client.getEndpoint(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> rollbackWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .rollback( + this.client.getEndpoint(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginRollbackAsync( + String resourceGroupName, String packetCoreControlPlaneName) { + Mono>> mono = + rollbackWithResponseAsync(resourceGroupName, packetCoreControlPlaneName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginRollbackAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + rollbackWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + context); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginRollback( + String resourceGroupName, String packetCoreControlPlaneName) { + return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginRollback( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rollbackAsync(String resourceGroupName, String packetCoreControlPlaneName) { + return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rollbackAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return beginRollbackAsync(resourceGroupName, packetCoreControlPlaneName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner rollback(String resourceGroupName, String packetCoreControlPlaneName) { + return rollbackAsync(resourceGroupName, packetCoreControlPlaneName).block(); + } + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner rollback( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return rollbackAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> reinstallWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .reinstall( + this.client.getEndpoint(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> reinstallWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .reinstall( + this.client.getEndpoint(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginReinstallAsync( + String resourceGroupName, String packetCoreControlPlaneName) { + Mono>> mono = + reinstallWithResponseAsync(resourceGroupName, packetCoreControlPlaneName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginReinstallAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + reinstallWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + context); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginReinstall( + String resourceGroupName, String packetCoreControlPlaneName) { + return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginReinstall( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono reinstallAsync( + String resourceGroupName, String packetCoreControlPlaneName) { + return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono reinstallAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return beginReinstallAsync(resourceGroupName, packetCoreControlPlaneName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner reinstall(String resourceGroupName, String packetCoreControlPlaneName) { + return reinstallAsync(resourceGroupName, packetCoreControlPlaneName).block(); + } + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner reinstall( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return reinstallAsync(resourceGroupName, packetCoreControlPlaneName, context).block(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> collectDiagnosticsPackageWithResponseAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .collectDiagnosticsPackage( + this.client.getEndpoint(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> collectDiagnosticsPackageWithResponseAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (packetCoreControlPlaneName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter packetCoreControlPlaneName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .collectDiagnosticsPackage( + this.client.getEndpoint(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + parameters, + accept, + context); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginCollectDiagnosticsPackageAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + Mono>> mono = + collectDiagnosticsPackageWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> + beginCollectDiagnosticsPackageAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + collectDiagnosticsPackageWithResponseAsync( + resourceGroupName, packetCoreControlPlaneName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + context); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters) + .getSyncPoller(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginCollectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) + .getSyncPoller(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono collectDiagnosticsPackageAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono collectDiagnosticsPackageAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + return beginCollectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner collectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + return collectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters).block(); + } + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner collectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + return collectDiagnosticsPackageAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) + .block(); + } + /** * Get the next page of items. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesImpl.java index 73b28b2eb8e21..435a95b407a70 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlanesImpl.java @@ -10,8 +10,11 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlanesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCoreControlPlaneInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlanes; public final class PacketCoreControlPlanesImpl implements PacketCoreControlPlanes { @@ -82,6 +85,74 @@ public PagedIterable listByResourceGroup(String resource return Utils.mapPage(inner, inner1 -> new PacketCoreControlPlaneImpl(inner1, this.manager())); } + public AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName) { + AsyncOperationStatusInner inner = this.serviceClient().rollback(resourceGroupName, packetCoreControlPlaneName); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context) { + AsyncOperationStatusInner inner = + this.serviceClient().rollback(resourceGroupName, packetCoreControlPlaneName, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName) { + AsyncOperationStatusInner inner = this.serviceClient().reinstall(resourceGroupName, packetCoreControlPlaneName); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus reinstall( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + AsyncOperationStatusInner inner = + this.serviceClient().reinstall(resourceGroupName, packetCoreControlPlaneName, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus collectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters) { + AsyncOperationStatusInner inner = + this.serviceClient().collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus collectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context) { + AsyncOperationStatusInner inner = + this + .serviceClient() + .collectDiagnosticsPackage(resourceGroupName, packetCoreControlPlaneName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + public PacketCoreControlPlane getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimOperationsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimOperationsClientImpl.java deleted file mode 100644 index 000688eb1a442..0000000000000 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimOperationsClientImpl.java +++ /dev/null @@ -1,930 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mobilenetwork.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.mobilenetwork.fluent.SimOperationsClient; -import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; -import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; -import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; -import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SimOperationsClient. */ -public final class SimOperationsClientImpl implements SimOperationsClient { - /** The proxy service used to perform REST calls. */ - private final SimOperationsService service; - - /** The service client containing this operation class. */ - private final MobileNetworkManagementClientImpl client; - - /** - * Initializes an instance of SimOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SimOperationsClientImpl(MobileNetworkManagementClientImpl client) { - this.service = - RestProxy.create(SimOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for MobileNetworkManagementClientSimOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "MobileNetworkManagem") - public interface SimOperationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/uploadSims") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> bulkUpload( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("simGroupName") String simGroupName, - @BodyParam("application/json") SimUploadList parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/deleteSims") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> bulkDelete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("simGroupName") String simGroupName, - @BodyParam("application/json") SimDeleteList parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/uploadEncryptedSims") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> bulkUploadEncrypted( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("simGroupName") String simGroupName, - @BodyParam("application/json") EncryptedSimUploadList parameters, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> bulkUploadWithResponseAsync( - String resourceGroupName, String simGroupName, SimUploadList parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (simGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .bulkUpload( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - simGroupName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> bulkUploadWithResponseAsync( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (simGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .bulkUpload( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - simGroupName, - parameters, - accept, - context); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginBulkUploadAsync( - String resourceGroupName, String simGroupName, SimUploadList parameters) { - Mono>> mono = - bulkUploadWithResponseAsync(resourceGroupName, simGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - this.client.getContext()); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginBulkUploadAsync( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - bulkUploadWithResponseAsync(resourceGroupName, simGroupName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - context); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginBulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters) { - return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginBulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { - return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bulkUploadAsync( - String resourceGroupName, String simGroupName, SimUploadList parameters) { - return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bulkUploadAsync( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { - return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner bulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters) { - return bulkUploadAsync(resourceGroupName, simGroupName, parameters).block(); - } - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner bulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { - return bulkUploadAsync(resourceGroupName, simGroupName, parameters, context).block(); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> bulkDeleteWithResponseAsync( - String resourceGroupName, String simGroupName, SimDeleteList parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (simGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .bulkDelete( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - simGroupName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> bulkDeleteWithResponseAsync( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (simGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .bulkDelete( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - simGroupName, - parameters, - accept, - context); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginBulkDeleteAsync( - String resourceGroupName, String simGroupName, SimDeleteList parameters) { - Mono>> mono = - bulkDeleteWithResponseAsync(resourceGroupName, simGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - this.client.getContext()); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginBulkDeleteAsync( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - bulkDeleteWithResponseAsync(resourceGroupName, simGroupName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - context); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginBulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters) { - return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginBulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { - return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bulkDeleteAsync( - String resourceGroupName, String simGroupName, SimDeleteList parameters) { - return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bulkDeleteAsync( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { - return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner bulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters) { - return bulkDeleteAsync(resourceGroupName, simGroupName, parameters).block(); - } - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner bulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { - return bulkDeleteAsync(resourceGroupName, simGroupName, parameters, context).block(); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> bulkUploadEncryptedWithResponseAsync( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (simGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .bulkUploadEncrypted( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - simGroupName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> bulkUploadEncryptedWithResponseAsync( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (simGroupName == null) { - return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .bulkUploadEncrypted( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - simGroupName, - parameters, - accept, - context); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginBulkUploadEncryptedAsync( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { - Mono>> mono = - bulkUploadEncryptedWithResponseAsync(resourceGroupName, simGroupName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - this.client.getContext()); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AsyncOperationStatusInner> beginBulkUploadEncryptedAsync( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - bulkUploadEncryptedWithResponseAsync(resourceGroupName, simGroupName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - AsyncOperationStatusInner.class, - AsyncOperationStatusInner.class, - context); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { - return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { - return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bulkUploadEncryptedAsync( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { - return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bulkUploadEncryptedAsync( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { - return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner bulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { - return bulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters).block(); - } - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AsyncOperationStatusInner bulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { - return bulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context).block(); - } -} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimOperationsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimOperationsImpl.java deleted file mode 100644 index b2a37f38c8433..0000000000000 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimOperationsImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mobilenetwork.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mobilenetwork.fluent.SimOperationsClient; -import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; -import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; -import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; -import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; -import com.azure.resourcemanager.mobilenetwork.models.SimOperations; -import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; - -public final class SimOperationsImpl implements SimOperations { - private static final ClientLogger LOGGER = new ClientLogger(SimOperationsImpl.class); - - private final SimOperationsClient innerClient; - - private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; - - public SimOperationsImpl( - SimOperationsClient innerClient, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public AsyncOperationStatus bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters) { - AsyncOperationStatusInner inner = this.serviceClient().bulkUpload(resourceGroupName, simGroupName, parameters); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus bulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { - AsyncOperationStatusInner inner = - this.serviceClient().bulkUpload(resourceGroupName, simGroupName, parameters, context); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters) { - AsyncOperationStatusInner inner = this.serviceClient().bulkDelete(resourceGroupName, simGroupName, parameters); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus bulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { - AsyncOperationStatusInner inner = - this.serviceClient().bulkDelete(resourceGroupName, simGroupName, parameters, context); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus bulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { - AsyncOperationStatusInner inner = - this.serviceClient().bulkUploadEncrypted(resourceGroupName, simGroupName, parameters); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public AsyncOperationStatus bulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { - AsyncOperationStatusInner inner = - this.serviceClient().bulkUploadEncrypted(resourceGroupName, simGroupName, parameters, context); - if (inner != null) { - return new AsyncOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - private SimOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsClientImpl.java index 24ef576560926..5de283e75d5c7 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -32,8 +33,12 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mobilenetwork.fluent.SimsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; import com.azure.resourcemanager.mobilenetwork.models.SimListResult; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -127,6 +132,54 @@ Mono> listByGroup( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" + + "/simGroups/{simGroupName}/uploadSims") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> bulkUpload( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") SimUploadList parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" + + "/simGroups/{simGroupName}/deleteSims") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> bulkDelete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") SimDeleteList parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" + + "/simGroups/{simGroupName}/uploadEncryptedSims") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> bulkUploadEncrypted( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("simGroupName") String simGroupName, + @BodyParam("application/json") EncryptedSimUploadList parameters, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1001,6 +1054,825 @@ public PagedIterable listByGroup(String resourceGroupName, String simG return new PagedIterable<>(listByGroupAsync(resourceGroupName, simGroupName, context)); } + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkUploadWithResponseAsync( + String resourceGroupName, String simGroupName, SimUploadList parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .bulkUpload( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + simGroupName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkUploadWithResponseAsync( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .bulkUpload( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + simGroupName, + parameters, + accept, + context); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginBulkUploadAsync( + String resourceGroupName, String simGroupName, SimUploadList parameters) { + Mono>> mono = + bulkUploadWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginBulkUploadAsync( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + bulkUploadWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + context); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginBulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters) { + return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginBulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { + return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkUploadAsync( + String resourceGroupName, String simGroupName, SimUploadList parameters) { + return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkUploadAsync( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { + return beginBulkUploadAsync(resourceGroupName, simGroupName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters) { + return bulkUploadAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { + return bulkUploadAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkDeleteWithResponseAsync( + String resourceGroupName, String simGroupName, SimDeleteList parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .bulkDelete( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + simGroupName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkDeleteWithResponseAsync( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .bulkDelete( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + simGroupName, + parameters, + accept, + context); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginBulkDeleteAsync( + String resourceGroupName, String simGroupName, SimDeleteList parameters) { + Mono>> mono = + bulkDeleteWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginBulkDeleteAsync( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + bulkDeleteWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + context); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginBulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters) { + return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginBulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { + return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkDeleteAsync( + String resourceGroupName, String simGroupName, SimDeleteList parameters) { + return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkDeleteAsync( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { + return beginBulkDeleteAsync(resourceGroupName, simGroupName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters) { + return bulkDeleteAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { + return bulkDeleteAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkUploadEncryptedWithResponseAsync( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .bulkUploadEncrypted( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + simGroupName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> bulkUploadEncryptedWithResponseAsync( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (simGroupName == null) { + return Mono.error(new IllegalArgumentException("Parameter simGroupName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .bulkUploadEncrypted( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + simGroupName, + parameters, + accept, + context); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginBulkUploadEncryptedAsync( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { + Mono>> mono = + bulkUploadEncryptedWithResponseAsync(resourceGroupName, simGroupName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AsyncOperationStatusInner> beginBulkUploadEncryptedAsync( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + bulkUploadEncryptedWithResponseAsync(resourceGroupName, simGroupName, parameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + context); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { + return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AsyncOperationStatusInner> beginBulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { + return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkUploadEncryptedAsync( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { + return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono bulkUploadEncryptedAsync( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { + return beginBulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { + return bulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters).block(); + } + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AsyncOperationStatusInner bulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { + return bulkUploadEncryptedAsync(resourceGroupName, simGroupName, parameters, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsImpl.java index 2a6bca1096d21..8f852aa004ed7 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimsImpl.java @@ -10,8 +10,13 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mobilenetwork.fluent.SimsClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; import com.azure.resourcemanager.mobilenetwork.fluent.models.SimInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; import com.azure.resourcemanager.mobilenetwork.models.Sim; +import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; import com.azure.resourcemanager.mobilenetwork.models.Sims; public final class SimsImpl implements Sims { @@ -69,6 +74,68 @@ public PagedIterable listByGroup(String resourceGroupName, String simGroupN return Utils.mapPage(inner, inner1 -> new SimImpl(inner1, this.manager())); } + public AsyncOperationStatus bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters) { + AsyncOperationStatusInner inner = this.serviceClient().bulkUpload(resourceGroupName, simGroupName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context) { + AsyncOperationStatusInner inner = + this.serviceClient().bulkUpload(resourceGroupName, simGroupName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters) { + AsyncOperationStatusInner inner = this.serviceClient().bulkDelete(resourceGroupName, simGroupName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context) { + AsyncOperationStatusInner inner = + this.serviceClient().bulkDelete(resourceGroupName, simGroupName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters) { + AsyncOperationStatusInner inner = + this.serviceClient().bulkUploadEncrypted(resourceGroupName, simGroupName, parameters); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus bulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context) { + AsyncOperationStatusInner inner = + this.serviceClient().bulkUploadEncrypted(resourceGroupName, simGroupName, parameters, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + public Sim getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlane.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlane.java index 189ac894ee360..3ad49c143bb34 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlane.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlane.java @@ -430,4 +430,74 @@ interface WithTags { * @return the refreshed resource. */ PacketCoreControlPlane refresh(Context context); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus rollback(); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus rollback(Context context); + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus reinstall(); + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus reinstall(Context context); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus collectDiagnosticsPackage(PacketCoreControlPlaneCollectDiagnosticsPackage parameters); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus collectDiagnosticsPackage( + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, Context context); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneOperations.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneOperations.java deleted file mode 100644 index 065a8c6f0a70b..0000000000000 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneOperations.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mobilenetwork.models; - -import com.azure.core.util.Context; - -/** Resource collection API of PacketCoreControlPlaneOperations. */ -public interface PacketCoreControlPlaneOperations { - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName); - - /** - * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple - * consecutive rollbacks are not possible. This action may cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context); - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName); - - /** - * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet - * core to return it to a known state. This action will cause a service outage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName, Context context); - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus collectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters); - - /** - * Collect a diagnostics package for the specified packet core control plane. This action will upload the - * diagnostics to a storage account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param packetCoreControlPlaneName The name of the packet core control plane. - * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus collectDiagnosticsPackage( - String resourceGroupName, - String packetCoreControlPlaneName, - PacketCoreControlPlaneCollectDiagnosticsPackage parameters, - Context context); -} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlanes.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlanes.java index 80b1e4e6e834f..791ce53777ca6 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlanes.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlanes.java @@ -106,6 +106,96 @@ Response getByResourceGroupWithResponse( */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Roll back the specified packet core control plane to the previous version, "rollbackVersion". Multiple + * consecutive rollbacks are not possible. This action may cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus rollback(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Reinstall the specified packet core control plane. This action will remove any transaction state from the packet + * core to return it to a known state. This action will cause a service outage. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus reinstall(String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus collectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters); + + /** + * Collect a diagnostics package for the specified packet core control plane. This action will upload the + * diagnostics to a storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param parameters Parameters supplied to the packet core control plane collect diagnostics package operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus collectDiagnosticsPackage( + String resourceGroupName, + String packetCoreControlPlaneName, + PacketCoreControlPlaneCollectDiagnosticsPackage parameters, + Context context); + /** * Gets information about the specified packet core control plane. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimOperations.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimOperations.java deleted file mode 100644 index 480abd5900775..0000000000000 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimOperations.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mobilenetwork.models; - -import com.azure.core.util.Context; - -/** Resource collection API of SimOperations. */ -public interface SimOperations { - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters); - - /** - * Bulk upload SIMs to a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus bulkUpload( - String resourceGroupName, String simGroupName, SimUploadList parameters, Context context); - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters); - - /** - * Bulk delete SIMs from a SIM group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the bulk SIM delete operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus bulkDelete( - String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context); - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus bulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters); - - /** - * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param simGroupName The name of the SIM Group. - * @param parameters Parameters supplied to the encrypted SIMs upload operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current status of an async operation. - */ - AsyncOperationStatus bulkUploadEncrypted( - String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context); -} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sims.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sims.java index becfe3268b540..229ddb5e8a7a9 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sims.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sims.java @@ -87,6 +87,91 @@ public interface Sims { */ PagedIterable listByGroup(String resourceGroupName, String simGroupName, Context context); + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkUpload(String resourceGroupName, String simGroupName, SimUploadList parameters); + + /** + * Bulk upload SIMs to a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkUpload( + String resourceGroupName, String simGroupName, SimUploadList parameters, Context context); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkDelete(String resourceGroupName, String simGroupName, SimDeleteList parameters); + + /** + * Bulk delete SIMs from a SIM group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the bulk SIM delete operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkDelete( + String resourceGroupName, String simGroupName, SimDeleteList parameters, Context context); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters); + + /** + * Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param simGroupName The name of the SIM Group. + * @param parameters Parameters supplied to the encrypted SIMs upload operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current status of an async operation. + */ + AsyncOperationStatus bulkUploadEncrypted( + String resourceGroupName, String simGroupName, EncryptedSimUploadList parameters, Context context); + /** * Gets information about the specified SIM. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationCollectDiagnosticsPackageSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java similarity index 85% rename from sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationCollectDiagnosticsPackageSamples.java rename to sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java index dd0dc1c373974..0930f69d20f17 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationCollectDiagnosticsPackageSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java @@ -7,8 +7,8 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneCollectDiagnosticsPackage; -/** Samples for PacketCoreControlPlaneOperation CollectDiagnosticsPackage. */ -public final class PacketCoreControlPlaneOperationCollectDiagnosticsPackageSamples { +/** Samples for PacketCoreControlPlanes CollectDiagnosticsPackage. */ +public final class PacketCoreControlPlanesCollectDiagnosticsPackageSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json */ @@ -20,7 +20,7 @@ public final class PacketCoreControlPlaneOperationCollectDiagnosticsPackageSampl public static void collectDiagnosticsPackageFromPacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .packetCoreControlPlaneOperations() + .packetCoreControlPlanes() .collectDiagnosticsPackage( "rg1", "TestPacketCoreCP", diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationReinstallSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java similarity index 75% rename from sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationReinstallSamples.java rename to sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java index abde11c02420f..07d98f10c2199 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationReinstallSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java @@ -6,8 +6,8 @@ import com.azure.core.util.Context; -/** Samples for PacketCoreControlPlaneOperation Reinstall. */ -public final class PacketCoreControlPlaneOperationReinstallSamples { +/** Samples for PacketCoreControlPlanes Reinstall. */ +public final class PacketCoreControlPlanesReinstallSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneReinstall.json */ @@ -18,6 +18,6 @@ public final class PacketCoreControlPlaneOperationReinstallSamples { */ public static void reinstallPacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlaneOperations().reinstall("rg1", "TestPacketCoreCP", Context.NONE); + manager.packetCoreControlPlanes().reinstall("rg1", "TestPacketCoreCP", Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationRollbackSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java similarity index 75% rename from sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationRollbackSamples.java rename to sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java index 58af06a51373c..22f58f8c62895 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneOperationRollbackSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java @@ -6,8 +6,8 @@ import com.azure.core.util.Context; -/** Samples for PacketCoreControlPlaneOperation Rollback. */ -public final class PacketCoreControlPlaneOperationRollbackSamples { +/** Samples for PacketCoreControlPlanes Rollback. */ +public final class PacketCoreControlPlanesRollbackSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneRollback.json */ @@ -18,6 +18,6 @@ public final class PacketCoreControlPlaneOperationRollbackSamples { */ public static void rollbackPacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlaneOperations().rollback("rg1", "TestPacketCoreCP", Context.NONE); + manager.packetCoreControlPlanes().rollback("rg1", "TestPacketCoreCP", Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java similarity index 89% rename from sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkDeleteSamples.java rename to sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java index bae7131b07b46..477539f68d1d8 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java @@ -8,8 +8,8 @@ import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; import java.util.Arrays; -/** Samples for SimOperation BulkDelete. */ -public final class SimOperationBulkDeleteSamples { +/** Samples for Sims BulkDelete. */ +public final class SimsBulkDeleteSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json */ @@ -21,7 +21,7 @@ public final class SimOperationBulkDeleteSamples { public static void bulkDeleteSIMsFromASIMGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkDelete( "testResourceGroupName", "testSimGroup", diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkUploadEncryptedSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java similarity index 97% rename from sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkUploadEncryptedSamples.java rename to sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java index d1101312e4acd..91108fc9a4906 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkUploadEncryptedSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java @@ -14,8 +14,8 @@ import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; import java.util.Arrays; -/** Samples for SimOperation BulkUploadEncrypted. */ -public final class SimOperationBulkUploadEncryptedSamples { +/** Samples for Sims BulkUploadEncrypted. */ +public final class SimsBulkUploadEncryptedSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUploadEncrypted.json */ @@ -27,7 +27,7 @@ public final class SimOperationBulkUploadEncryptedSamples { public static void bulkUploadEncryptedSIMsToASIMGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkUploadEncrypted( "rg1", "testSimGroup", diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkUploadSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java similarity index 97% rename from sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkUploadSamples.java rename to sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java index 1dcf89eb698f2..3762d8ee7b02e 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimOperationBulkUploadSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java @@ -14,8 +14,8 @@ import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; import java.util.Arrays; -/** Samples for SimOperation BulkUpload. */ -public final class SimOperationBulkUploadSamples { +/** Samples for Sims BulkUpload. */ +public final class SimsBulkUploadSamples { /* * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json */ @@ -26,7 +26,7 @@ public final class SimOperationBulkUploadSamples { */ public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkUpload( "rg1", "testSimGroup",