diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md index 858d4a5db83d..8a91bbc6a568 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-11) + +- 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 c4379516b6bf..0fff04743357 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 3b844e2f2093..f5c256932a95 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) @@ -157,8 +151,6 @@ public final class AttachedDataNetworksCreateOrUpdateSamples { ### AttachedDataNetworks_Delete ```java -import com.azure.core.util.Context; - /** Samples for AttachedDataNetworks Delete. */ public final class AttachedDataNetworksDeleteSamples { /* @@ -173,7 +165,12 @@ public final class AttachedDataNetworksDeleteSamples { com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager .attachedDataNetworks() - .delete("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", Context.NONE); + .delete( + "rg1", + "TestPacketCoreCP", + "TestPacketCoreDP", + "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE); } } ``` @@ -181,8 +178,6 @@ public final class AttachedDataNetworksDeleteSamples { ### AttachedDataNetworks_Get ```java -import com.azure.core.util.Context; - /** Samples for AttachedDataNetworks Get. */ public final class AttachedDataNetworksGetSamples { /* @@ -196,7 +191,12 @@ public final class AttachedDataNetworksGetSamples { public static void getAttachedDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager .attachedDataNetworks() - .getWithResponse("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", Context.NONE); + .getWithResponse( + "rg1", + "TestPacketCoreCP", + "TestPacketCoreDP", + "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE); } } ``` @@ -204,8 +204,6 @@ public final class AttachedDataNetworksGetSamples { ### AttachedDataNetworks_ListByPacketCoreDataPlane ```java -import com.azure.core.util.Context; - /** Samples for AttachedDataNetworks ListByPacketCoreDataPlane. */ public final class AttachedDataNetworksListByPacketCoreDataPlaneSamples { /* @@ -220,7 +218,7 @@ public final class AttachedDataNetworksListByPacketCoreDataPlaneSamples { com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager .attachedDataNetworks() - .listByPacketCoreDataPlane("rg1", "TestPacketCoreCP", "TestPacketCoreDP", Context.NONE); + .listByPacketCoreDataPlane("rg1", "TestPacketCoreCP", "TestPacketCoreDP", com.azure.core.util.Context.NONE); } } ``` @@ -228,7 +226,6 @@ public final class AttachedDataNetworksListByPacketCoreDataPlaneSamples { ### AttachedDataNetworks_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; import java.util.HashMap; import java.util.Map; @@ -248,7 +245,12 @@ public final class AttachedDataNetworksUpdateTagsSamples { AttachedDataNetwork resource = manager .attachedDataNetworks() - .getWithResponse("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", Context.NONE) + .getWithResponse( + "rg1", + "TestPacketCoreCP", + "TestPacketCoreDP", + "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -294,8 +296,6 @@ public final class DataNetworksCreateOrUpdateSamples { ### DataNetworks_Delete ```java -import com.azure.core.util.Context; - /** Samples for DataNetworks Delete. */ public final class DataNetworksDeleteSamples { /* @@ -307,7 +307,7 @@ public final class DataNetworksDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.dataNetworks().delete("rg1", "testMobileNetwork", "testDataNetwork", Context.NONE); + manager.dataNetworks().delete("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -315,8 +315,6 @@ public final class DataNetworksDeleteSamples { ### DataNetworks_Get ```java -import com.azure.core.util.Context; - /** Samples for DataNetworks Get. */ public final class DataNetworksGetSamples { /* @@ -328,7 +326,9 @@ public final class DataNetworksGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.dataNetworks().getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", Context.NONE); + manager + .dataNetworks() + .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -336,8 +336,6 @@ public final class DataNetworksGetSamples { ### DataNetworks_ListByMobileNetwork ```java -import com.azure.core.util.Context; - /** Samples for DataNetworks ListByMobileNetwork. */ public final class DataNetworksListByMobileNetworkSamples { /* @@ -350,7 +348,7 @@ public final class DataNetworksListByMobileNetworkSamples { */ public static void listDataNetworksInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.dataNetworks().listByMobileNetwork("rg1", "testMobileNetwork", Context.NONE); + manager.dataNetworks().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -358,7 +356,6 @@ public final class DataNetworksListByMobileNetworkSamples { ### DataNetworks_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; import java.util.HashMap; import java.util.Map; @@ -377,7 +374,7 @@ public final class DataNetworksUpdateTagsSamples { DataNetwork resource = manager .dataNetworks() - .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", Context.NONE) + .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -425,8 +422,6 @@ public final class MobileNetworksCreateOrUpdateSamples { ### MobileNetworks_Delete ```java -import com.azure.core.util.Context; - /** Samples for MobileNetworks Delete. */ public final class MobileNetworksDeleteSamples { /* @@ -438,7 +433,7 @@ public final class MobileNetworksDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.mobileNetworks().delete("rg1", "testMobileNetwork", Context.NONE); + manager.mobileNetworks().delete("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -446,8 +441,6 @@ public final class MobileNetworksDeleteSamples { ### MobileNetworks_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for MobileNetworks GetByResourceGroup. */ public final class MobileNetworksGetByResourceGroupSamples { /* @@ -459,7 +452,9 @@ public final class MobileNetworksGetByResourceGroupSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.mobileNetworks().getByResourceGroupWithResponse("rg1", "testMobileNetwork", Context.NONE); + manager + .mobileNetworks() + .getByResourceGroupWithResponse("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -467,8 +462,6 @@ public final class MobileNetworksGetByResourceGroupSamples { ### MobileNetworks_List ```java -import com.azure.core.util.Context; - /** Samples for MobileNetworks List. */ public final class MobileNetworksListSamples { /* @@ -481,7 +474,7 @@ public final class MobileNetworksListSamples { */ public static void listMobileNetworksInASubscription( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.mobileNetworks().list(Context.NONE); + manager.mobileNetworks().list(com.azure.core.util.Context.NONE); } } ``` @@ -489,8 +482,6 @@ public final class MobileNetworksListSamples { ### MobileNetworks_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for MobileNetworks ListByResourceGroup. */ public final class MobileNetworksListByResourceGroupSamples { /* @@ -503,7 +494,7 @@ public final class MobileNetworksListByResourceGroupSamples { */ public static void listMobileNetworksInResourceGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.mobileNetworks().listByResourceGroup("rg1", Context.NONE); + manager.mobileNetworks().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); } } ``` @@ -511,7 +502,6 @@ public final class MobileNetworksListByResourceGroupSamples { ### MobileNetworks_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.MobileNetwork; import java.util.HashMap; import java.util.Map; @@ -530,7 +520,7 @@ public final class MobileNetworksUpdateTagsSamples { MobileNetwork resource = manager .mobileNetworks() - .getByResourceGroupWithResponse("rg1", "testMobileNetwork", Context.NONE) + .getByResourceGroupWithResponse("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -551,8 +541,6 @@ public final class MobileNetworksUpdateTagsSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* @@ -564,126 +552,77 @@ public final class OperationsListSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getRegistrationOperations(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.operations().list(Context.NONE); - } -} -``` - -### 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); + manager.operations().list(com.azure.core.util.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", com.azure.core.util.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(com.azure.core.util.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"), + com.azure.core.util.Context.NONE); } } ``` @@ -762,8 +701,6 @@ public final class PacketCoreControlPlanesCreateOrUpdateSamples { ### PacketCoreControlPlanes_Delete ```java -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlanes Delete. */ public final class PacketCoreControlPlanesDeleteSamples { /* @@ -776,7 +713,7 @@ public final class PacketCoreControlPlanesDeleteSamples { */ public static void deletePacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlanes().delete("rg1", "TestPacketCoreCP", Context.NONE); + manager.packetCoreControlPlanes().delete("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); } } ``` @@ -784,8 +721,6 @@ public final class PacketCoreControlPlanesDeleteSamples { ### PacketCoreControlPlanes_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlanes GetByResourceGroup. */ public final class PacketCoreControlPlanesGetByResourceGroupSamples { /* @@ -797,7 +732,9 @@ public final class PacketCoreControlPlanesGetByResourceGroupSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlanes().getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", Context.NONE); + manager + .packetCoreControlPlanes() + .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); } } ``` @@ -805,8 +742,6 @@ public final class PacketCoreControlPlanesGetByResourceGroupSamples { ### PacketCoreControlPlanes_List ```java -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlanes List. */ public final class PacketCoreControlPlanesListSamples { /* @@ -819,7 +754,7 @@ public final class PacketCoreControlPlanesListSamples { */ public static void listPacketCoreControlPlanesInASubscription( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlanes().list(Context.NONE); + manager.packetCoreControlPlanes().list(com.azure.core.util.Context.NONE); } } ``` @@ -827,8 +762,6 @@ public final class PacketCoreControlPlanesListSamples { ### PacketCoreControlPlanes_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlanes ListByResourceGroup. */ public final class PacketCoreControlPlanesListByResourceGroupSamples { /* @@ -841,7 +774,47 @@ public final class PacketCoreControlPlanesListByResourceGroupSamples { */ public static void listPacketCoreControlPlanesInResourceGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlanes().listByResourceGroup("rg1", Context.NONE); + manager.packetCoreControlPlanes().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_Reinstall + +```java +/** 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", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCoreControlPlanes_Rollback + +```java +/** 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", com.azure.core.util.Context.NONE); } } ``` @@ -849,7 +822,6 @@ public final class PacketCoreControlPlanesListByResourceGroupSamples { ### PacketCoreControlPlanes_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; import java.util.HashMap; import java.util.Map; @@ -869,7 +841,7 @@ public final class PacketCoreControlPlanesUpdateTagsSamples { PacketCoreControlPlane resource = manager .packetCoreControlPlanes() - .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", Context.NONE) + .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -917,8 +889,6 @@ public final class PacketCoreDataPlanesCreateOrUpdateSamples { ### PacketCoreDataPlanes_Delete ```java -import com.azure.core.util.Context; - /** Samples for PacketCoreDataPlanes Delete. */ public final class PacketCoreDataPlanesDeleteSamples { /* @@ -930,7 +900,9 @@ public final class PacketCoreDataPlanesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deletePacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreDataPlanes().delete("rg1", "testPacketCoreCP", "testPacketCoreDP", Context.NONE); + manager + .packetCoreDataPlanes() + .delete("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE); } } ``` @@ -938,8 +910,6 @@ public final class PacketCoreDataPlanesDeleteSamples { ### PacketCoreDataPlanes_Get ```java -import com.azure.core.util.Context; - /** Samples for PacketCoreDataPlanes Get. */ public final class PacketCoreDataPlanesGetSamples { /* @@ -951,7 +921,9 @@ public final class PacketCoreDataPlanesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getPacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreDataPlanes().getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", Context.NONE); + manager + .packetCoreDataPlanes() + .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE); } } ``` @@ -959,8 +931,6 @@ public final class PacketCoreDataPlanesGetSamples { ### PacketCoreDataPlanes_ListByPacketCoreControlPlane ```java -import com.azure.core.util.Context; - /** Samples for PacketCoreDataPlanes ListByPacketCoreControlPlane. */ public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { /* @@ -973,7 +943,9 @@ public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { */ public static void listPacketCoreDataPlanesInAControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreDataPlanes().listByPacketCoreControlPlane("rg1", "testPacketCoreCP", Context.NONE); + manager + .packetCoreDataPlanes() + .listByPacketCoreControlPlane("rg1", "testPacketCoreCP", com.azure.core.util.Context.NONE); } } ``` @@ -981,7 +953,6 @@ public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { ### PacketCoreDataPlanes_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; import java.util.HashMap; import java.util.Map; @@ -1001,7 +972,7 @@ public final class PacketCoreDataPlanesUpdateTagsSamples { PacketCoreDataPlane resource = manager .packetCoreDataPlanes() - .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", Context.NONE) + .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -1088,8 +1059,6 @@ public final class ServicesCreateOrUpdateSamples { ### Services_Delete ```java -import com.azure.core.util.Context; - /** Samples for Services Delete. */ public final class ServicesDeleteSamples { /* @@ -1101,7 +1070,7 @@ public final class ServicesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.services().delete("rg1", "testMobileNetwork", "TestService", Context.NONE); + manager.services().delete("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE); } } ``` @@ -1109,8 +1078,6 @@ public final class ServicesDeleteSamples { ### Services_Get ```java -import com.azure.core.util.Context; - /** Samples for Services Get. */ public final class ServicesGetSamples { /* @@ -1122,7 +1089,7 @@ public final class ServicesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.services().getWithResponse("rg1", "testMobileNetwork", "TestService", Context.NONE); + manager.services().getWithResponse("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE); } } ``` @@ -1130,8 +1097,6 @@ public final class ServicesGetSamples { ### Services_ListByMobileNetwork ```java -import com.azure.core.util.Context; - /** Samples for Services ListByMobileNetwork. */ public final class ServicesListByMobileNetworkSamples { /* @@ -1144,7 +1109,9 @@ public final class ServicesListByMobileNetworkSamples { */ public static void listServicesInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.services().listByMobileNetwork("testResourceGroupName", "testMobileNetwork", Context.NONE); + manager + .services() + .listByMobileNetwork("testResourceGroupName", "testMobileNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -1152,7 +1119,6 @@ public final class ServicesListByMobileNetworkSamples { ### Services_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.Service; import java.util.HashMap; import java.util.Map; @@ -1169,7 +1135,10 @@ public final class ServicesUpdateTagsSamples { */ public static void updateServiceTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { Service resource = - manager.services().getWithResponse("rg1", "testMobileNetwork", "TestService", Context.NONE).getValue(); + manager + .services() + .getWithResponse("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -1244,8 +1213,6 @@ public final class SimGroupsCreateOrUpdateSamples { ### SimGroups_Delete ```java -import com.azure.core.util.Context; - /** Samples for SimGroups Delete. */ public final class SimGroupsDeleteSamples { /* @@ -1257,7 +1224,7 @@ public final class SimGroupsDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simGroups().delete("testResourceGroupName", "testSimGroup", Context.NONE); + manager.simGroups().delete("testResourceGroupName", "testSimGroup", com.azure.core.util.Context.NONE); } } ``` @@ -1265,8 +1232,6 @@ public final class SimGroupsDeleteSamples { ### SimGroups_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for SimGroups GetByResourceGroup. */ public final class SimGroupsGetByResourceGroupSamples { /* @@ -1278,7 +1243,10 @@ public final class SimGroupsGetByResourceGroupSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simGroups().getByResourceGroupWithResponse("testResourceGroupName", "testSimGroupName", Context.NONE); + manager + .simGroups() + .getByResourceGroupWithResponse( + "testResourceGroupName", "testSimGroupName", com.azure.core.util.Context.NONE); } } ``` @@ -1286,8 +1254,6 @@ public final class SimGroupsGetByResourceGroupSamples { ### SimGroups_List ```java -import com.azure.core.util.Context; - /** Samples for SimGroups List. */ public final class SimGroupsListSamples { /* @@ -1300,7 +1266,7 @@ public final class SimGroupsListSamples { */ public static void listSIMGroupsInASubscription( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simGroups().list(Context.NONE); + manager.simGroups().list(com.azure.core.util.Context.NONE); } } ``` @@ -1308,8 +1274,6 @@ public final class SimGroupsListSamples { ### SimGroups_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for SimGroups ListByResourceGroup. */ public final class SimGroupsListByResourceGroupSamples { /* @@ -1322,7 +1286,7 @@ public final class SimGroupsListByResourceGroupSamples { */ public static void listSIMGroupsInAResourceGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simGroups().listByResourceGroup("rg1", Context.NONE); + manager.simGroups().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); } } ``` @@ -1330,7 +1294,6 @@ public final class SimGroupsListByResourceGroupSamples { ### SimGroups_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.SimGroup; import java.util.HashMap; import java.util.Map; @@ -1347,7 +1310,10 @@ public final class SimGroupsUpdateTagsSamples { */ public static void updateSIMGroupTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { SimGroup resource = - manager.simGroups().getByResourceGroupWithResponse("rg1", "testSimGroup", Context.NONE).getValue(); + manager + .simGroups() + .getByResourceGroupWithResponse("rg1", "testSimGroup", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -1364,63 +1330,237 @@ public final class SimGroupsUpdateTagsSamples { } ``` -### SimOperation_BulkDelete +### SimPolicies_CreateOrUpdate ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.mobilenetwork.models.SimDeleteList; +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 SimOperation BulkDelete. */ -public final class SimOperationBulkDeleteSamples { +/** Samples for SimPolicies CreateOrUpdate. */ +public final class SimPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyCreate.json */ /** - * Sample code: Bulk delete SIMs from a SIM group. + * Sample code: Create SIM policy. * * @param manager Entry point to MobileNetworkManager. */ - public static void bulkDeleteSIMsFromASIMGroup( - com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() - .bulkDelete( - "testResourceGroupName", - "testSimGroup", - new SimDeleteList().withSims(Arrays.asList("testSim", "testSim2")), - Context.NONE); + .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(); } } ``` -### SimOperation_BulkUpload +### SimPolicies_Delete ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; -import com.azure.resourcemanager.mobilenetwork.models.SimNameAndProperties; -import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; -import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; -import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; -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 SimPolicies Delete. */ +public final class SimPoliciesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimBulkUpload.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimPolicyDelete.json */ /** - * Sample code: Bulk upload SIMs in a SIM group. + * Sample code: Delete SIM policy. * * @param manager Entry point to MobileNetworkManager. */ - public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager - .simOperations() - .bulkUpload( + public static void deleteSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.simPolicies().delete("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE); + } +} +``` + +### SimPolicies_Get + +```java +/** 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", com.azure.core.util.Context.NONE); + } +} +``` + +### SimPolicies_ListByMobileNetwork + +```java +/** 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", com.azure.core.util.Context.NONE); + } +} +``` + +### SimPolicies_UpdateTags + +```java +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", com.azure.core.util.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.resourcemanager.mobilenetwork.models.SimDeleteList; +import java.util.Arrays; + +/** 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 + */ + /** + * Sample code: Bulk delete SIMs from a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void bulkDeleteSIMsFromASIMGroup( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .sims() + .bulkDelete( + "testResourceGroupName", + "testSimGroup", + new SimDeleteList().withSims(Arrays.asList("testSim", "testSim2")), + com.azure.core.util.Context.NONE); + } +} +``` + +### Sims_BulkUpload + +```java +import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimNameAndProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpProperties; +import com.azure.resourcemanager.mobilenetwork.models.SimStaticIpPropertiesStaticIp; +import com.azure.resourcemanager.mobilenetwork.models.SimUploadList; +import com.azure.resourcemanager.mobilenetwork.models.SliceResourceId; +import java.util.Arrays; + +/** 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 + */ + /** + * Sample code: Bulk upload SIMs in a SIM group. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .sims() + .bulkUpload( "rg1", "testSimGroup", new SimUploadList() @@ -1479,15 +1619,14 @@ public final class SimOperationBulkUploadSamples { .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.2")))))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` -### SimOperation_BulkUploadEncrypted +### Sims_BulkUploadEncrypted ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; import com.azure.resourcemanager.mobilenetwork.models.SimNameAndEncryptedProperties; @@ -1497,8 +1636,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 +1649,7 @@ public final class SimOperationBulkUploadEncryptedSamples { public static void bulkUploadEncryptedSIMsToASIMGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkUploadEncrypted( "rg1", "testSimGroup", @@ -1573,183 +1712,7 @@ public final class SimOperationBulkUploadEncryptedSamples { .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.2")))))), - Context.NONE); - } -} -``` - -### 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; + com.azure.core.util.Context.NONE); } } ``` @@ -1809,8 +1772,6 @@ public final class SimsCreateOrUpdateSamples { ### Sims_Delete ```java -import com.azure.core.util.Context; - /** Samples for Sims Delete. */ public final class SimsDeleteSamples { /* @@ -1822,7 +1783,7 @@ public final class SimsDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sims().delete("testResourceGroupName", "testSimGroup", "testSim", Context.NONE); + manager.sims().delete("testResourceGroupName", "testSimGroup", "testSim", com.azure.core.util.Context.NONE); } } ``` @@ -1830,8 +1791,6 @@ public final class SimsDeleteSamples { ### Sims_Get ```java -import com.azure.core.util.Context; - /** Samples for Sims Get. */ public final class SimsGetSamples { /* @@ -1843,7 +1802,9 @@ public final class SimsGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sims().getWithResponse("testResourceGroupName", "testSimGroup", "testSimName", Context.NONE); + manager + .sims() + .getWithResponse("testResourceGroupName", "testSimGroup", "testSimName", com.azure.core.util.Context.NONE); } } ``` @@ -1851,8 +1812,6 @@ public final class SimsGetSamples { ### Sims_ListByGroup ```java -import com.azure.core.util.Context; - /** Samples for Sims ListByGroup. */ public final class SimsListByGroupSamples { /* @@ -1864,7 +1823,7 @@ public final class SimsListByGroupSamples { * @param manager Entry point to MobileNetworkManager. */ public static void listSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sims().listByGroup("rg1", "testSimGroup", Context.NONE); + manager.sims().listByGroup("rg1", "testSimGroup", com.azure.core.util.Context.NONE); } } ``` @@ -1896,8 +1855,6 @@ public final class SitesCreateOrUpdateSamples { ### Sites_Delete ```java -import com.azure.core.util.Context; - /** Samples for Sites Delete. */ public final class SitesDeleteSamples { /* @@ -1909,7 +1866,7 @@ public final class SitesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sites().delete("rg1", "testMobileNetwork", "testSite", Context.NONE); + manager.sites().delete("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE); } } ``` @@ -1917,8 +1874,6 @@ public final class SitesDeleteSamples { ### Sites_Get ```java -import com.azure.core.util.Context; - /** Samples for Sites Get. */ public final class SitesGetSamples { /* @@ -1930,7 +1885,7 @@ public final class SitesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sites().getWithResponse("rg1", "testMobileNetwork", "testSite", Context.NONE); + manager.sites().getWithResponse("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE); } } ``` @@ -1938,8 +1893,6 @@ public final class SitesGetSamples { ### Sites_ListByMobileNetwork ```java -import com.azure.core.util.Context; - /** Samples for Sites ListByMobileNetwork. */ public final class SitesListByMobileNetworkSamples { /* @@ -1952,7 +1905,7 @@ public final class SitesListByMobileNetworkSamples { */ public static void listMobileNetworkSitesInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sites().listByMobileNetwork("rg1", "testMobileNetwork", Context.NONE); + manager.sites().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -1960,7 +1913,6 @@ public final class SitesListByMobileNetworkSamples { ### Sites_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.Site; import java.util.HashMap; import java.util.Map; @@ -1978,7 +1930,10 @@ public final class SitesUpdateTagsSamples { public static void updateMobileNetworkSiteTags( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { Site resource = - manager.sites().getWithResponse("rg1", "testMobileNetwork", "testSite", Context.NONE).getValue(); + manager + .sites() + .getWithResponse("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -2026,8 +1981,6 @@ public final class SlicesCreateOrUpdateSamples { ### Slices_Delete ```java -import com.azure.core.util.Context; - /** Samples for Slices Delete. */ public final class SlicesDeleteSamples { /* @@ -2039,7 +1992,7 @@ public final class SlicesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.slices().delete("rg1", "testMobileNetwork", "testSlice", Context.NONE); + manager.slices().delete("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE); } } ``` @@ -2047,8 +2000,6 @@ public final class SlicesDeleteSamples { ### Slices_Get ```java -import com.azure.core.util.Context; - /** Samples for Slices Get. */ public final class SlicesGetSamples { /* @@ -2060,7 +2011,7 @@ public final class SlicesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.slices().getWithResponse("rg1", "testMobileNetwork", "testSlice", Context.NONE); + manager.slices().getWithResponse("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE); } } ``` @@ -2068,8 +2019,6 @@ public final class SlicesGetSamples { ### Slices_ListByMobileNetwork ```java -import com.azure.core.util.Context; - /** Samples for Slices ListByMobileNetwork. */ public final class SlicesListByMobileNetworkSamples { /* @@ -2082,7 +2031,7 @@ public final class SlicesListByMobileNetworkSamples { */ public static void listNetworkSlicesInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.slices().listByMobileNetwork("rg1", "testMobileNetwork", Context.NONE); + manager.slices().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -2090,7 +2039,6 @@ public final class SlicesListByMobileNetworkSamples { ### Slices_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.Slice; import java.util.HashMap; import java.util.Map; @@ -2107,7 +2055,10 @@ public final class SlicesUpdateTagsSamples { */ public static void updateNetworkSliceTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { Slice resource = - manager.slices().getWithResponse("rg1", "testMobileNetwork", "testSlice", Context.NONE).getValue(); + manager + .slices() + .getWithResponse("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } 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 4c5acb560276..67acb256284f 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 e9667d014884..ed392138d570 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 0a7bdde51351..000000000000 --- 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 ff1d25a67485..173e5b91fc02 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 bcae3e1beada..000000000000 --- 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 89e967da74c0..c2bb2940ad27 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/AttachedDataNetworksClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksClientImpl.java index 9dc986b228f1..b3cf66daa640 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/AttachedDataNetworksClientImpl.java @@ -382,7 +382,8 @@ public SyncPoller, Void> beginDelete( String packetCoreControlPlaneName, String packetCoreDataPlaneName, String attachedDataNetworkName) { - return beginDeleteAsync( + return this + .beginDeleteAsync( resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName) .getSyncPoller(); } @@ -407,7 +408,8 @@ public SyncPoller, Void> beginDelete( String packetCoreDataPlaneName, String attachedDataNetworkName, Context context) { - return beginDeleteAsync( + return this + .beginDeleteAsync( resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, @@ -989,7 +991,8 @@ public SyncPoller, AttachedDataNetworkInner String packetCoreDataPlaneName, String attachedDataNetworkName, AttachedDataNetworkInner parameters) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, @@ -1021,7 +1024,8 @@ public SyncPoller, AttachedDataNetworkInner String attachedDataNetworkName, AttachedDataNetworkInner parameters, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java index c4bf42919d61..e4d121bedc91 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java @@ -325,7 +325,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String dataNetworkName) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName).getSyncPoller(); } /** @@ -343,7 +343,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String dataNetworkName, Context context) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, dataNetworkName, context).getSyncPoller(); } /** @@ -774,7 +774,8 @@ private PollerFlux, DataNetworkInner> beginCreateOr @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DataNetworkInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, String dataNetworkName, DataNetworkInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters) .getSyncPoller(); } @@ -798,7 +799,8 @@ public SyncPoller, DataNetworkInner> beginCreateOrU String dataNetworkName, DataNetworkInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, dataNetworkName, parameters, context) .getSyncPoller(); } 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 558e8ba55447..2d2eb71ed85e 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/MobileNetworksClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksClientImpl.java index 620b184300db..acec93c7403c 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworksClientImpl.java @@ -322,7 +322,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String mobileNetworkName) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName).getSyncPoller(); } /** @@ -339,7 +339,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, Context context) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, context).getSyncPoller(); } /** @@ -726,7 +726,7 @@ private PollerFlux, MobileNetworkInner> beginCrea @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MobileNetworkInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, MobileNetworkInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters).getSyncPoller(); } /** @@ -744,7 +744,7 @@ public SyncPoller, MobileNetworkInner> beginCreat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MobileNetworkInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, MobileNetworkInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, parameters, context).getSyncPoller(); } /** 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 eaaa37b38a5b..25593b521174 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 7afae43fba6a..000000000000 --- 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 fad3cbb9d72e..000000000000 --- 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 357872d66774..cafd1ba36ab5 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}) @@ -329,7 +378,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String packetCoreControlPlaneName) { - return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName).getSyncPoller(); } /** @@ -346,7 +395,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String packetCoreControlPlaneName, Context context) { - return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, context).getSyncPoller(); } /** @@ -752,7 +801,7 @@ private PollerFlux, PacketCoreControlPla @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PacketCoreControlPlaneInner> beginCreateOrUpdate( String resourceGroupName, String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters).getSyncPoller(); } /** @@ -773,7 +822,8 @@ public SyncPoller, PacketCoreControlPlan String packetCoreControlPlaneName, PacketCoreControlPlaneInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context) .getSyncPoller(); } @@ -1338,6 +1388,859 @@ 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 this.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 this.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 this.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 this.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 this + .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 this + .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 73b28b2eb8e2..435a95b407a7 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/PacketCoreDataPlanesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesClientImpl.java index 8d686e0566c5..987cf7d58234 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreDataPlanesClientImpl.java @@ -336,7 +336,9 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName) { - return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName).getSyncPoller(); + return this + .beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName) + .getSyncPoller(); } /** @@ -354,7 +356,8 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String packetCoreControlPlaneName, String packetCoreDataPlaneName, Context context) { - return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context) + return this + .beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, context) .getSyncPoller(); } @@ -823,7 +826,8 @@ public SyncPoller, PacketCoreDataPlaneInner String packetCoreControlPlaneName, String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters) .getSyncPoller(); } @@ -849,7 +853,8 @@ public SyncPoller, PacketCoreDataPlaneInner String packetCoreDataPlaneName, PacketCoreDataPlaneInner parameters, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, parameters, context) .getSyncPoller(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesClientImpl.java index a828ba346163..10cd772eca0f 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/ServicesClientImpl.java @@ -327,7 +327,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String serviceName) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, serviceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, serviceName).getSyncPoller(); } /** @@ -346,7 +346,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String serviceName, Context context) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, serviceName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, serviceName, context).getSyncPoller(); } /** @@ -782,7 +782,9 @@ private PollerFlux, ServiceInner> beginCreateOrUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServiceInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, String serviceName, ServiceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters) + .getSyncPoller(); } /** @@ -806,7 +808,8 @@ public SyncPoller, ServiceInner> beginCreateOrUpdate( String serviceName, ServiceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, serviceName, parameters, context) .getSyncPoller(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsClientImpl.java index 5d61a9ffbf9c..b45f2fd47b71 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupsClientImpl.java @@ -319,7 +319,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String simGroupName) { - return beginDeleteAsync(resourceGroupName, simGroupName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, simGroupName).getSyncPoller(); } /** @@ -336,7 +336,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String simGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, simGroupName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, simGroupName, context).getSyncPoller(); } /** @@ -717,7 +717,7 @@ private PollerFlux, SimGroupInner> beginCreateOrUpdate @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SimGroupInner> beginCreateOrUpdate( String resourceGroupName, String simGroupName, SimGroupInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, simGroupName, parameters).getSyncPoller(); } /** @@ -735,7 +735,7 @@ public SyncPoller, SimGroupInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SimGroupInner> beginCreateOrUpdate( String resourceGroupName, String simGroupName, SimGroupInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, simGroupName, parameters, context).getSyncPoller(); } /** 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 000688eb1a44..000000000000 --- 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 b2a37f38c843..000000000000 --- 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/SimPoliciesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesClientImpl.java index ecbfb62dc88a..3de0e9cd9197 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimPoliciesClientImpl.java @@ -323,7 +323,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String simPolicyName) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, simPolicyName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, simPolicyName).getSyncPoller(); } /** @@ -341,7 +341,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String simPolicyName, Context context) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, simPolicyName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, simPolicyName, context).getSyncPoller(); } /** @@ -767,7 +767,8 @@ private PollerFlux, SimPolicyInner> beginCreateOrUpda @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SimPolicyInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, String simPolicyName, SimPolicyInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters) .getSyncPoller(); } @@ -791,7 +792,8 @@ public SyncPoller, SimPolicyInner> beginCreateOrUpdat String simPolicyName, SimPolicyInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, simPolicyName, parameters, context) .getSyncPoller(); } 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 24ef57656092..b65a70cda940 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}) @@ -300,7 +353,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String simGroupName, String simName) { - return beginDeleteAsync(resourceGroupName, simGroupName, simName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, simGroupName, simName).getSyncPoller(); } /** @@ -318,7 +371,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String simGroupName, String simName, Context context) { - return beginDeleteAsync(resourceGroupName, simGroupName, simName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, simGroupName, simName, context).getSyncPoller(); } /** @@ -725,7 +778,7 @@ private PollerFlux, SimInner> beginCreateOrUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SimInner> beginCreateOrUpdate( String resourceGroupName, String simGroupName, String simName, SimInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters).getSyncPoller(); } /** @@ -744,7 +797,9 @@ public SyncPoller, SimInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SimInner> beginCreateOrUpdate( String resourceGroupName, String simGroupName, String simName, SimInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, simGroupName, simName, parameters, context) + .getSyncPoller(); } /** @@ -1001,6 +1056,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 this.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 this.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 this.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 this.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 this.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 this.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 2a6bca1096d2..8f852aa004ed 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/implementation/SitesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesClientImpl.java index 525a68dd2812..14538768456d 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesClientImpl.java @@ -326,7 +326,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String siteName) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, siteName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, siteName).getSyncPoller(); } /** @@ -345,7 +345,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String siteName, Context context) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, siteName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, siteName, context).getSyncPoller(); } /** @@ -763,7 +763,9 @@ private PollerFlux, SiteInner> beginCreateOrUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SiteInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, String siteName, SiteInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters) + .getSyncPoller(); } /** @@ -782,7 +784,8 @@ public SyncPoller, SiteInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SiteInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, String siteName, SiteInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context) .getSyncPoller(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java index 39560a053345..a49d89404c4b 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java @@ -322,7 +322,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String sliceName) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, sliceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, sliceName).getSyncPoller(); } /** @@ -340,7 +340,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String mobileNetworkName, String sliceName, Context context) { - return beginDeleteAsync(resourceGroupName, mobileNetworkName, sliceName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, mobileNetworkName, sliceName, context).getSyncPoller(); } /** @@ -754,7 +754,9 @@ private PollerFlux, SliceInner> beginCreateOrUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SliceInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, String sliceName, SliceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters) + .getSyncPoller(); } /** @@ -773,7 +775,8 @@ public SyncPoller, SliceInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SliceInner> beginCreateOrUpdate( String resourceGroupName, String mobileNetworkName, String sliceName, SliceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, mobileNetworkName, sliceName, parameters, context) .getSyncPoller(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AuthenticationType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AuthenticationType.java index 056faff4be0d..030c0612bb4d 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AuthenticationType.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/AuthenticationType.java @@ -16,6 +16,15 @@ public final class AuthenticationType extends ExpandableStringEnum { /** Static value G10 for BillingSku. */ public static final BillingSku G10 = fromString("G10"); + /** + * Creates a new instance of BillingSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BillingSku() { + } + /** * Creates or finds a BillingSku from its string representation. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioningState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioningState.java index bc9575a702b6..3ba99df9c2a7 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioningState.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CertificateProvisioningState.java @@ -19,6 +19,15 @@ public final class CertificateProvisioningState extends ExpandableStringEnum { /** Static value Disabled for NaptEnabled. */ public static final NaptEnabled DISABLED = fromString("Disabled"); + /** + * Creates a new instance of NaptEnabled value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NaptEnabled() { + } + /** * Creates or finds a NaptEnabled from its string representation. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ObsoleteVersion.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ObsoleteVersion.java index 5ef9e4786fe2..5b999a0c0211 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ObsoleteVersion.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ObsoleteVersion.java @@ -16,6 +16,15 @@ public final class ObsoleteVersion extends ExpandableStringEnum /** Static value NotObsolete for ObsoleteVersion. */ public static final ObsoleteVersion NOT_OBSOLETE = fromString("NotObsolete"); + /** + * Creates a new instance of ObsoleteVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ObsoleteVersion() { + } + /** * Creates or finds a ObsoleteVersion from its string representation. * 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 189ac894ee36..3ad49c143bb3 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 065a8c6f0a70..000000000000 --- 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 80b1e4e6e834..791ce53777ca 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/PduSessionType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PduSessionType.java index 6ef12586639d..c9ff674d970b 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PduSessionType.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PduSessionType.java @@ -16,6 +16,15 @@ public final class PduSessionType extends ExpandableStringEnum { /** Static value IPv6 for PduSessionType. */ public static final PduSessionType IPV6 = fromString("IPv6"); + /** + * Creates a new instance of PduSessionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PduSessionType() { + } + /** * Creates or finds a PduSessionType from its string representation. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformType.java index 0de3766ea1fe..63e3adeb4b24 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformType.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PlatformType.java @@ -16,6 +16,15 @@ public final class PlatformType extends ExpandableStringEnum { /** Static value 3P-AZURE-STACK-HCI for PlatformType. */ public static final PlatformType THREE_P_AZURE_STACK_HCI = fromString("3P-AZURE-STACK-HCI"); + /** + * Creates a new instance of PlatformType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PlatformType() { + } + /** * Creates or finds a PlatformType from its string representation. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionCapability.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionCapability.java index 8a4963ebf704..402ffa77eb22 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionCapability.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PreemptionCapability.java @@ -16,6 +16,15 @@ public final class PreemptionCapability extends ExpandableStringEnum { /** Static value Bidirectional for SdfDirection. */ public static final SdfDirection BIDIRECTIONAL = fromString("Bidirectional"); + /** + * Creates a new instance of SdfDirection value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SdfDirection() { + } + /** * Creates or finds a SdfDirection from its string representation. * 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 480abd590077..000000000000 --- 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/SimState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimState.java index 845f94e3ec25..72813dd49410 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimState.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimState.java @@ -19,6 +19,15 @@ public final class SimState extends ExpandableStringEnum { /** Static value Invalid for SimState. */ public static final SimState INVALID = fromString("Invalid"); + /** + * Creates a new instance of SimState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SimState() { + } + /** * Creates or finds a SimState from its string representation. * 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 becfe3268b54..229ddb5e8a7a 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/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteProvisioningState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteProvisioningState.java index 0730089bd321..e00f84ecf155 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteProvisioningState.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteProvisioningState.java @@ -28,6 +28,15 @@ public final class SiteProvisioningState extends ExpandableStringEnum { /** Static value Deprecated for VersionState. */ public static final VersionState DEPRECATED = fromString("Deprecated"); + /** + * Creates a new instance of VersionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VersionState() { + } + /** * Creates or finds a VersionState from its string representation. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteSamples.java index 4b55544e276d..3812c68ffc23 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for AttachedDataNetworks Delete. */ public final class AttachedDataNetworksDeleteSamples { /* @@ -20,6 +18,11 @@ public static void deleteAttachedDataNetworkResource( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager .attachedDataNetworks() - .delete("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", Context.NONE); + .delete( + "rg1", + "TestPacketCoreCP", + "TestPacketCoreDP", + "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetSamples.java index b93b6d18b1c8..89b3b5369c87 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for AttachedDataNetworks Get. */ public final class AttachedDataNetworksGetSamples { /* @@ -19,6 +17,11 @@ public final class AttachedDataNetworksGetSamples { public static void getAttachedDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager .attachedDataNetworks() - .getWithResponse("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", Context.NONE); + .getWithResponse( + "rg1", + "TestPacketCoreCP", + "TestPacketCoreDP", + "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneSamples.java index f907c2946266..466c8d50a2a3 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksListByPacketCoreDataPlaneSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for AttachedDataNetworks ListByPacketCoreDataPlane. */ public final class AttachedDataNetworksListByPacketCoreDataPlaneSamples { /* @@ -20,6 +18,6 @@ public static void listAttachedDataNetworksInADataPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager .attachedDataNetworks() - .listByPacketCoreDataPlane("rg1", "TestPacketCoreCP", "TestPacketCoreDP", Context.NONE); + .listByPacketCoreDataPlane("rg1", "TestPacketCoreCP", "TestPacketCoreDP", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksUpdateTagsSamples.java index 88420c7f69c3..6e9e8312b69c 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetwork; import java.util.HashMap; import java.util.Map; @@ -24,7 +23,12 @@ public static void updateAttachedDataNetworkTags( AttachedDataNetwork resource = manager .attachedDataNetworks() - .getWithResponse("rg1", "TestPacketCoreCP", "TestPacketCoreDP", "TestAttachedDataNetwork", Context.NONE) + .getWithResponse( + "rg1", + "TestPacketCoreCP", + "TestPacketCoreDP", + "TestAttachedDataNetwork", + com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteSamples.java index e0346d0c5ed5..b55cd7c257f5 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for DataNetworks Delete. */ public final class DataNetworksDeleteSamples { /* @@ -17,6 +15,6 @@ public final class DataNetworksDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.dataNetworks().delete("rg1", "testMobileNetwork", "testDataNetwork", Context.NONE); + manager.dataNetworks().delete("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetSamples.java index 1ca46c079492..6a5c82021e3a 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for DataNetworks Get. */ public final class DataNetworksGetSamples { /* @@ -17,6 +15,8 @@ public final class DataNetworksGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getDataNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.dataNetworks().getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", Context.NONE); + manager + .dataNetworks() + .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkSamples.java index 2ebc024c9a14..95690549353f 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksListByMobileNetworkSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for DataNetworks ListByMobileNetwork. */ public final class DataNetworksListByMobileNetworkSamples { /* @@ -18,6 +16,6 @@ public final class DataNetworksListByMobileNetworkSamples { */ public static void listDataNetworksInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.dataNetworks().listByMobileNetwork("rg1", "testMobileNetwork", Context.NONE); + manager.dataNetworks().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksUpdateTagsSamples.java index 7fc8107c1c3c..0f70aed1e9bf 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.DataNetwork; import java.util.HashMap; import java.util.Map; @@ -23,7 +22,7 @@ public static void updateDataNetworkTags(com.azure.resourcemanager.mobilenetwork DataNetwork resource = manager .dataNetworks() - .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", Context.NONE) + .getWithResponse("rg1", "testMobileNetwork", "testDataNetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteSamples.java index 9ee01d28e3a4..fae0860206a7 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for MobileNetworks Delete. */ public final class MobileNetworksDeleteSamples { /* @@ -17,6 +15,6 @@ public final class MobileNetworksDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.mobileNetworks().delete("rg1", "testMobileNetwork", Context.NONE); + manager.mobileNetworks().delete("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksGetByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksGetByResourceGroupSamples.java index fb35f2cfb9be..c19edd7bc3ae 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksGetByResourceGroupSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for MobileNetworks GetByResourceGroup. */ public final class MobileNetworksGetByResourceGroupSamples { /* @@ -17,6 +15,8 @@ public final class MobileNetworksGetByResourceGroupSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getMobileNetwork(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.mobileNetworks().getByResourceGroupWithResponse("rg1", "testMobileNetwork", Context.NONE); + manager + .mobileNetworks() + .getByResourceGroupWithResponse("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListByResourceGroupSamples.java index 99315f65fc97..7be54736a13b 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListByResourceGroupSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for MobileNetworks ListByResourceGroup. */ public final class MobileNetworksListByResourceGroupSamples { /* @@ -18,6 +16,6 @@ public final class MobileNetworksListByResourceGroupSamples { */ public static void listMobileNetworksInResourceGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.mobileNetworks().listByResourceGroup("rg1", Context.NONE); + manager.mobileNetworks().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSamples.java index 44695f9d7d03..ba8db6ffb2ef 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for MobileNetworks List. */ public final class MobileNetworksListSamples { /* @@ -18,6 +16,6 @@ public final class MobileNetworksListSamples { */ public static void listMobileNetworksInASubscription( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.mobileNetworks().list(Context.NONE); + manager.mobileNetworks().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksUpdateTagsSamples.java index 8576f9e9e5e8..ed155e7eea85 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.MobileNetwork; import java.util.HashMap; import java.util.Map; @@ -23,7 +22,7 @@ public static void updateMobileNetworkTags(com.azure.resourcemanager.mobilenetwo MobileNetwork resource = manager .mobileNetworks() - .getByResourceGroupWithResponse("rg1", "testMobileNetwork", Context.NONE) + .getByResourceGroupWithResponse("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListSamples.java index 6bae9523eca9..ce809526af95 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/OperationsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getRegistrationOperations(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java index 5daabbe12a72..ae17e4fbf404 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlaneVersions Get. */ public final class PacketCoreControlPlaneVersionsGetSamples { /* @@ -18,6 +16,6 @@ public final class PacketCoreControlPlaneVersionsGetSamples { */ public static void getPacketCoreControlPlaneVersion( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlaneVersions().getWithResponse("PMN-4-11-1", Context.NONE); + manager.packetCoreControlPlaneVersions().getWithResponse("PMN-4-11-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListSamples.java index 54489b0e7aee..5a88c9914706 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlaneVersions List. */ public final class PacketCoreControlPlaneVersionsListSamples { /* @@ -18,6 +16,6 @@ public final class PacketCoreControlPlaneVersionsListSamples { */ public static void getSupportedPacketCoreControlPlaneVersions( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlaneVersions().list(Context.NONE); + manager.packetCoreControlPlaneVersions().list(com.azure.core.util.Context.NONE); } } 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 80% 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 dd0dc1c37397..1edc63d5432a 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 @@ -4,11 +4,10 @@ package com.azure.resourcemanager.mobilenetwork.generated; -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,13 +19,13 @@ public final class PacketCoreControlPlaneOperationCollectDiagnosticsPackageSampl public static void collectDiagnosticsPackageFromPacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .packetCoreControlPlaneOperations() + .packetCoreControlPlanes() .collectDiagnosticsPackage( "rg1", "TestPacketCoreCP", new PacketCoreControlPlaneCollectDiagnosticsPackage() .withStorageAccountBlobUrl( "https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteSamples.java index 3e9a96636a0f..1a28faa81c31 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlanes Delete. */ public final class PacketCoreControlPlanesDeleteSamples { /* @@ -18,6 +16,6 @@ public final class PacketCoreControlPlanesDeleteSamples { */ public static void deletePacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlanes().delete("rg1", "TestPacketCoreCP", Context.NONE); + manager.packetCoreControlPlanes().delete("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesGetByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesGetByResourceGroupSamples.java index ab79609b04be..66318db96046 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesGetByResourceGroupSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlanes GetByResourceGroup. */ public final class PacketCoreControlPlanesGetByResourceGroupSamples { /* @@ -17,6 +15,8 @@ public final class PacketCoreControlPlanesGetByResourceGroupSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getPacketCoreControlPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlanes().getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", Context.NONE); + manager + .packetCoreControlPlanes() + .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListByResourceGroupSamples.java index a90521e47d89..efa73e764173 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListByResourceGroupSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlanes ListByResourceGroup. */ public final class PacketCoreControlPlanesListByResourceGroupSamples { /* @@ -18,6 +16,6 @@ public final class PacketCoreControlPlanesListByResourceGroupSamples { */ public static void listPacketCoreControlPlanesInResourceGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlanes().listByResourceGroup("rg1", Context.NONE); + manager.packetCoreControlPlanes().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListSamples.java index 652405b8cc69..4608bec0b4e8 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreControlPlanes List. */ public final class PacketCoreControlPlanesListSamples { /* @@ -18,6 +16,6 @@ public final class PacketCoreControlPlanesListSamples { */ public static void listPacketCoreControlPlanesInASubscription( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreControlPlanes().list(Context.NONE); + manager.packetCoreControlPlanes().list(com.azure.core.util.Context.NONE); } } 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 71% 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 abde11c02420..c8e540b39ab2 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 @@ -4,10 +4,8 @@ package com.azure.resourcemanager.mobilenetwork.generated; -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 +16,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", com.azure.core.util.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 71% 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 58af06a51373..9e9d196e0d00 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 @@ -4,10 +4,8 @@ package com.azure.resourcemanager.mobilenetwork.generated; -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 +16,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", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesUpdateTagsSamples.java index c3f9dbb08ecb..937a1d1f346c 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; import java.util.HashMap; import java.util.Map; @@ -24,7 +23,7 @@ public static void updatePacketCoreControlPlaneTags( PacketCoreControlPlane resource = manager .packetCoreControlPlanes() - .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", Context.NONE) + .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteSamples.java index 4d1d5d498760..6cbe52db4372 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreDataPlanes Delete. */ public final class PacketCoreDataPlanesDeleteSamples { /* @@ -17,6 +15,8 @@ public final class PacketCoreDataPlanesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deletePacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreDataPlanes().delete("rg1", "testPacketCoreCP", "testPacketCoreDP", Context.NONE); + manager + .packetCoreDataPlanes() + .delete("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetSamples.java index 58292a3bfa75..5031bd6cb08f 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreDataPlanes Get. */ public final class PacketCoreDataPlanesGetSamples { /* @@ -17,6 +15,8 @@ public final class PacketCoreDataPlanesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getPacketCoreDataPlane(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreDataPlanes().getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", Context.NONE); + manager + .packetCoreDataPlanes() + .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneSamples.java index 3c61f1c67fcd..0888e9cef717 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesListByPacketCoreControlPlaneSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for PacketCoreDataPlanes ListByPacketCoreControlPlane. */ public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { /* @@ -18,6 +16,8 @@ public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { */ public static void listPacketCoreDataPlanesInAControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.packetCoreDataPlanes().listByPacketCoreControlPlane("rg1", "testPacketCoreCP", Context.NONE); + manager + .packetCoreDataPlanes() + .listByPacketCoreControlPlane("rg1", "testPacketCoreCP", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesUpdateTagsSamples.java index b80efe7b8307..eeb1254ae849 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlane; import java.util.HashMap; import java.util.Map; @@ -24,7 +23,7 @@ public static void updatePacketCoreDataPlaneTags( PacketCoreDataPlane resource = manager .packetCoreDataPlanes() - .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", Context.NONE) + .getWithResponse("rg1", "testPacketCoreCP", "testPacketCoreDP", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteSamples.java index 01a42438d82c..0c522dfe5e9f 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Services Delete. */ public final class ServicesDeleteSamples { /* @@ -17,6 +15,6 @@ public final class ServicesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.services().delete("rg1", "testMobileNetwork", "TestService", Context.NONE); + manager.services().delete("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetSamples.java index 436a13cafd7d..1316b7b95d06 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Services Get. */ public final class ServicesGetSamples { /* @@ -17,6 +15,6 @@ public final class ServicesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getService(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.services().getWithResponse("rg1", "testMobileNetwork", "TestService", Context.NONE); + manager.services().getWithResponse("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkSamples.java index f500a2276092..81dc8c0e9c83 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesListByMobileNetworkSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Services ListByMobileNetwork. */ public final class ServicesListByMobileNetworkSamples { /* @@ -18,6 +16,8 @@ public final class ServicesListByMobileNetworkSamples { */ public static void listServicesInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.services().listByMobileNetwork("testResourceGroupName", "testMobileNetwork", Context.NONE); + manager + .services() + .listByMobileNetwork("testResourceGroupName", "testMobileNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesUpdateTagsSamples.java index 903227632a3c..be3014a3876c 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.Service; import java.util.HashMap; import java.util.Map; @@ -21,7 +20,10 @@ public final class ServicesUpdateTagsSamples { */ public static void updateServiceTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { Service resource = - manager.services().getWithResponse("rg1", "testMobileNetwork", "TestService", Context.NONE).getValue(); + manager + .services() + .getWithResponse("rg1", "testMobileNetwork", "TestService", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteSamples.java index 50e5e70bee67..05813ef31658 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for SimGroups Delete. */ public final class SimGroupsDeleteSamples { /* @@ -17,6 +15,6 @@ public final class SimGroupsDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simGroups().delete("testResourceGroupName", "testSimGroup", Context.NONE); + manager.simGroups().delete("testResourceGroupName", "testSimGroup", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsGetByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsGetByResourceGroupSamples.java index 060e63c53b18..a8b618848279 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsGetByResourceGroupSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for SimGroups GetByResourceGroup. */ public final class SimGroupsGetByResourceGroupSamples { /* @@ -17,6 +15,9 @@ public final class SimGroupsGetByResourceGroupSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simGroups().getByResourceGroupWithResponse("testResourceGroupName", "testSimGroupName", Context.NONE); + manager + .simGroups() + .getByResourceGroupWithResponse( + "testResourceGroupName", "testSimGroupName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListByResourceGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListByResourceGroupSamples.java index f3c4a75449ad..97efa0eda786 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListByResourceGroupSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for SimGroups ListByResourceGroup. */ public final class SimGroupsListByResourceGroupSamples { /* @@ -18,6 +16,6 @@ public final class SimGroupsListByResourceGroupSamples { */ public static void listSIMGroupsInAResourceGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simGroups().listByResourceGroup("rg1", Context.NONE); + manager.simGroups().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListSamples.java index acad63bc3579..4e79785b9a11 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for SimGroups List. */ public final class SimGroupsListSamples { /* @@ -18,6 +16,6 @@ public final class SimGroupsListSamples { */ public static void listSIMGroupsInASubscription( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simGroups().list(Context.NONE); + manager.simGroups().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsUpdateTagsSamples.java index b177fda0f640..21fcdb870ab2 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.SimGroup; import java.util.HashMap; import java.util.Map; @@ -21,7 +20,10 @@ public final class SimGroupsUpdateTagsSamples { */ public static void updateSIMGroupTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { SimGroup resource = - manager.simGroups().getByResourceGroupWithResponse("rg1", "testSimGroup", Context.NONE).getValue(); + manager + .simGroups() + .getByResourceGroupWithResponse("rg1", "testSimGroup", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteSamples.java index f90212539b76..dde3abd9013d 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for SimPolicies Delete. */ public final class SimPoliciesDeleteSamples { /* @@ -17,6 +15,6 @@ public final class SimPoliciesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simPolicies().delete("rg1", "testMobileNetwork", "testPolicy", Context.NONE); + manager.simPolicies().delete("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetSamples.java index 782aa8cc32fe..f8d6e675d76e 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for SimPolicies Get. */ public final class SimPoliciesGetSamples { /* @@ -17,6 +15,8 @@ public final class SimPoliciesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getSIMPolicy(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simPolicies().getWithResponse("rg1", "testMobileNetwork", "testPolicy", Context.NONE); + manager + .simPolicies() + .getWithResponse("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkSamples.java index 13fa51f88136..a6d9a45465a0 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesListByMobileNetworkSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for SimPolicies ListByMobileNetwork. */ public final class SimPoliciesListByMobileNetworkSamples { /* @@ -18,6 +16,8 @@ public final class SimPoliciesListByMobileNetworkSamples { */ public static void listSIMPoliciesInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.simPolicies().listByMobileNetwork("testResourceGroupName", "testMobileNetwork", Context.NONE); + manager + .simPolicies() + .listByMobileNetwork("testResourceGroupName", "testMobileNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesUpdateTagsSamples.java index d563fb9cc514..ffd906bb331f 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.SimPolicy; import java.util.HashMap; import java.util.Map; @@ -21,7 +20,10 @@ public final class SimPoliciesUpdateTagsSamples { */ public static void updateSIMPolicyTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { SimPolicy resource = - manager.simPolicies().getWithResponse("rg1", "testMobileNetwork", "testPolicy", Context.NONE).getValue(); + manager + .simPolicies() + .getWithResponse("rg1", "testMobileNetwork", "testPolicy", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } 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 83% 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 bae7131b07b4..187c8a8fd6e8 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 @@ -4,12 +4,11 @@ package com.azure.resourcemanager.mobilenetwork.generated; -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 */ @@ -21,11 +20,11 @@ public final class SimOperationBulkDeleteSamples { public static void bulkDeleteSIMsFromASIMGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkDelete( "testResourceGroupName", "testSimGroup", new SimDeleteList().withSims(Arrays.asList("testSim", "testSim2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 96% 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 d1101312e4ac..b7afc28dbfd2 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 @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; import com.azure.resourcemanager.mobilenetwork.models.EncryptedSimUploadList; import com.azure.resourcemanager.mobilenetwork.models.SimNameAndEncryptedProperties; @@ -14,8 +13,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 +26,7 @@ public final class SimOperationBulkUploadEncryptedSamples { public static void bulkUploadEncryptedSIMsToASIMGroup( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkUploadEncrypted( "rg1", "testSimGroup", @@ -90,6 +89,6 @@ public static void bulkUploadEncryptedSIMsToASIMGroup( .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.2")))))), - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 96% 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 1dcf89eb698f..078de4aee85e 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 @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworkResourceId; import com.azure.resourcemanager.mobilenetwork.models.SimNameAndProperties; import com.azure.resourcemanager.mobilenetwork.models.SimPolicyResourceId; @@ -14,8 +13,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 +25,7 @@ public final class SimOperationBulkUploadSamples { */ public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { manager - .simOperations() + .sims() .bulkUpload( "rg1", "testSimGroup", @@ -86,6 +85,6 @@ public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenet .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.2")))))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteSamples.java index cc173f3e454a..884e815a7fdf 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Sims Delete. */ public final class SimsDeleteSamples { /* @@ -17,6 +15,6 @@ public final class SimsDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sims().delete("testResourceGroupName", "testSimGroup", "testSim", Context.NONE); + manager.sims().delete("testResourceGroupName", "testSimGroup", "testSim", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsGetSamples.java index ac4488c27d63..9c6451ef932a 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Sims Get. */ public final class SimsGetSamples { /* @@ -17,6 +15,8 @@ public final class SimsGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getSIM(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sims().getWithResponse("testResourceGroupName", "testSimGroup", "testSimName", Context.NONE); + manager + .sims() + .getWithResponse("testResourceGroupName", "testSimGroup", "testSimName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsListByGroupSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsListByGroupSamples.java index ec30654aa67d..6df1ca8fdfea 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsListByGroupSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsListByGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Sims ListByGroup. */ public final class SimsListByGroupSamples { /* @@ -17,6 +15,6 @@ public final class SimsListByGroupSamples { * @param manager Entry point to MobileNetworkManager. */ public static void listSIMsInASIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sims().listByGroup("rg1", "testSimGroup", Context.NONE); + manager.sims().listByGroup("rg1", "testSimGroup", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteSamples.java index 212464a949d5..98558c0a1100 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Sites Delete. */ public final class SitesDeleteSamples { /* @@ -17,6 +15,6 @@ public final class SitesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sites().delete("rg1", "testMobileNetwork", "testSite", Context.NONE); + manager.sites().delete("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetSamples.java index 0a5bee4013d8..71171d7fd917 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Sites Get. */ public final class SitesGetSamples { /* @@ -17,6 +15,6 @@ public final class SitesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getMobileNetworkSite(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sites().getWithResponse("rg1", "testMobileNetwork", "testSite", Context.NONE); + manager.sites().getWithResponse("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkSamples.java index 1ea899b1b08a..24b43e96e2cc 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesListByMobileNetworkSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Sites ListByMobileNetwork. */ public final class SitesListByMobileNetworkSamples { /* @@ -18,6 +16,6 @@ public final class SitesListByMobileNetworkSamples { */ public static void listMobileNetworkSitesInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.sites().listByMobileNetwork("rg1", "testMobileNetwork", Context.NONE); + manager.sites().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesUpdateTagsSamples.java index 2c7c4c7a98a8..f035026b4cd9 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.Site; import java.util.HashMap; import java.util.Map; @@ -22,7 +21,10 @@ public final class SitesUpdateTagsSamples { public static void updateMobileNetworkSiteTags( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { Site resource = - manager.sites().getWithResponse("rg1", "testMobileNetwork", "testSite", Context.NONE).getValue(); + manager + .sites() + .getWithResponse("rg1", "testMobileNetwork", "testSite", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteSamples.java index cb36f139fd8d..04941a317cc1 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Slices Delete. */ public final class SlicesDeleteSamples { /* @@ -17,6 +15,6 @@ public final class SlicesDeleteSamples { * @param manager Entry point to MobileNetworkManager. */ public static void deleteNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.slices().delete("rg1", "testMobileNetwork", "testSlice", Context.NONE); + manager.slices().delete("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetSamples.java index b48ff9f452af..cdd104547680 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Slices Get. */ public final class SlicesGetSamples { /* @@ -17,6 +15,6 @@ public final class SlicesGetSamples { * @param manager Entry point to MobileNetworkManager. */ public static void getNetworkSlice(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.slices().getWithResponse("rg1", "testMobileNetwork", "testSlice", Context.NONE); + manager.slices().getWithResponse("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkSamples.java index 3c0873b41154..cf4c6bf4763c 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesListByMobileNetworkSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; - /** Samples for Slices ListByMobileNetwork. */ public final class SlicesListByMobileNetworkSamples { /* @@ -18,6 +16,6 @@ public final class SlicesListByMobileNetworkSamples { */ public static void listNetworkSlicesInAMobileNetwork( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { - manager.slices().listByMobileNetwork("rg1", "testMobileNetwork", Context.NONE); + manager.slices().listByMobileNetwork("rg1", "testMobileNetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesUpdateTagsSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesUpdateTagsSamples.java index c3488c7f3933..2327e0805f2d 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesUpdateTagsSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mobilenetwork.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.models.Slice; import java.util.HashMap; import java.util.Map; @@ -21,7 +20,10 @@ public final class SlicesUpdateTagsSamples { */ public static void updateNetworkSliceTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { Slice resource = - manager.slices().getWithResponse("rg1", "testMobileNetwork", "testSlice", Context.NONE).getValue(); + manager + .slices() + .getWithResponse("rg1", "testMobileNetwork", "testSlice", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); }