diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/CHANGELOG.md index 0a85367f0c2f..ed3b01b4b783 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.6 (Unreleased) +## 1.0.0-beta.1 (2023-06-25) + +- 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-2023-06. 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 0fff04743357..427add90ccca 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/README.md @@ -2,7 +2,7 @@ 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). +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-2023-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mobilenetwork - 1.0.0-beta.5 + 1.0.0-beta.6 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md index f5c256932a95..bcc9abb7c1b3 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/SAMPLE.md @@ -17,6 +17,13 @@ - [ListByMobileNetwork](#datanetworks_listbymobilenetwork) - [UpdateTags](#datanetworks_updatetags) +## DiagnosticsPackages + +- [CreateOrUpdate](#diagnosticspackages_createorupdate) +- [Delete](#diagnosticspackages_delete) +- [Get](#diagnosticspackages_get) +- [ListByPacketCoreControlPlane](#diagnosticspackages_listbypacketcorecontrolplane) + ## MobileNetworks - [CreateOrUpdate](#mobilenetworks_createorupdate) @@ -30,10 +37,20 @@ - [List](#operations_list) +## PacketCaptures + +- [CreateOrUpdate](#packetcaptures_createorupdate) +- [Delete](#packetcaptures_delete) +- [Get](#packetcaptures_get) +- [ListByPacketCoreControlPlane](#packetcaptures_listbypacketcorecontrolplane) +- [Stop](#packetcaptures_stop) + ## PacketCoreControlPlaneVersions - [Get](#packetcorecontrolplaneversions_get) +- [GetBySubscription](#packetcorecontrolplaneversions_getbysubscription) - [List](#packetcorecontrolplaneversions_list) +- [ListBySubscription](#packetcorecontrolplaneversions_listbysubscription) ## PacketCoreControlPlanes @@ -94,6 +111,7 @@ - [CreateOrUpdate](#sites_createorupdate) - [Delete](#sites_delete) +- [DeletePacketCore](#sites_deletepacketcore) - [Get](#sites_get) - [ListByMobileNetwork](#sites_listbymobilenetwork) - [UpdateTags](#sites_updatetags) @@ -119,7 +137,7 @@ import java.util.Arrays; /** Samples for AttachedDataNetworks CreateOrUpdate. */ public final class AttachedDataNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkCreate.json */ /** * Sample code: Create attached data network. @@ -154,7 +172,7 @@ public final class AttachedDataNetworksCreateOrUpdateSamples { /** Samples for AttachedDataNetworks Delete. */ public final class AttachedDataNetworksDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkDelete.json */ /** * Sample code: Delete attached data network resource. @@ -181,7 +199,7 @@ public final class AttachedDataNetworksDeleteSamples { /** Samples for AttachedDataNetworks Get. */ public final class AttachedDataNetworksGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkGet.json */ /** * Sample code: Get attached data network. @@ -207,7 +225,7 @@ public final class AttachedDataNetworksGetSamples { /** Samples for AttachedDataNetworks ListByPacketCoreDataPlane. */ public final class AttachedDataNetworksListByPacketCoreDataPlaneSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json */ /** * Sample code: List attached data networks in a data plane. @@ -233,7 +251,7 @@ import java.util.Map; /** Samples for AttachedDataNetworks UpdateTags. */ public final class AttachedDataNetworksUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkUpdateTags.json */ /** * Sample code: Update attached data network tags. @@ -274,7 +292,7 @@ public final class AttachedDataNetworksUpdateTagsSamples { /** Samples for DataNetworks CreateOrUpdate. */ public final class DataNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkCreate.json */ /** * Sample code: Create data network. @@ -299,7 +317,7 @@ public final class DataNetworksCreateOrUpdateSamples { /** Samples for DataNetworks Delete. */ public final class DataNetworksDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkDelete.json */ /** * Sample code: Delete data network. @@ -318,7 +336,7 @@ public final class DataNetworksDeleteSamples { /** Samples for DataNetworks Get. */ public final class DataNetworksGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkGet.json */ /** * Sample code: Get data network. @@ -339,7 +357,7 @@ public final class DataNetworksGetSamples { /** Samples for DataNetworks ListByMobileNetwork. */ public final class DataNetworksListByMobileNetworkSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkListByMobileNetwork.json */ /** * Sample code: List data networks in a mobile network. @@ -363,7 +381,7 @@ import java.util.Map; /** Samples for DataNetworks UpdateTags. */ public final class DataNetworksUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkUpdateTags.json */ /** * Sample code: Update data network tags. @@ -392,6 +410,89 @@ public final class DataNetworksUpdateTagsSamples { } ``` +### DiagnosticsPackages_CreateOrUpdate + +```java +/** Samples for DiagnosticsPackages CreateOrUpdate. */ +public final class DiagnosticsPackagesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageCreate.json + */ + /** + * Sample code: Create diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .diagnosticsPackages() + .createOrUpdate("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticsPackages_Delete + +```java +/** Samples for DiagnosticsPackages Delete. */ +public final class DiagnosticsPackagesDeleteSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageDelete.json + */ + /** + * Sample code: Delete diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages().delete("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticsPackages_Get + +```java +/** Samples for DiagnosticsPackages Get. */ +public final class DiagnosticsPackagesGetSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageGet.json + */ + /** + * Sample code: Get diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .diagnosticsPackages() + .getWithResponse("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} +``` + +### DiagnosticsPackages_ListByPacketCoreControlPlane + +```java +/** Samples for DiagnosticsPackages ListByPacketCoreControlPlane. */ +public final class DiagnosticsPackagesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageListByPacketCoreControlPlane.json + */ + /** + * Sample code: List diagnostics packages under a packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listDiagnosticsPackagesUnderAPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .diagnosticsPackages() + .listByPacketCoreControlPlane("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + ### MobileNetworks_CreateOrUpdate ```java @@ -400,7 +501,7 @@ import com.azure.resourcemanager.mobilenetwork.models.PlmnId; /** Samples for MobileNetworks CreateOrUpdate. */ public final class MobileNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkCreate.json */ /** * Sample code: Create mobile network. @@ -425,7 +526,7 @@ public final class MobileNetworksCreateOrUpdateSamples { /** Samples for MobileNetworks Delete. */ public final class MobileNetworksDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkDelete.json */ /** * Sample code: Delete mobile network. @@ -444,7 +545,7 @@ public final class MobileNetworksDeleteSamples { /** Samples for MobileNetworks GetByResourceGroup. */ public final class MobileNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkGet.json */ /** * Sample code: Get mobile network. @@ -465,7 +566,7 @@ public final class MobileNetworksGetByResourceGroupSamples { /** Samples for MobileNetworks List. */ public final class MobileNetworksListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkListBySubscription.json */ /** * Sample code: List mobile networks in a subscription. @@ -485,7 +586,7 @@ public final class MobileNetworksListSamples { /** Samples for MobileNetworks ListByResourceGroup. */ public final class MobileNetworksListByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkListByResourceGroup.json */ /** * Sample code: List mobile networks in resource group. @@ -509,7 +610,7 @@ import java.util.Map; /** Samples for MobileNetworks UpdateTags. */ public final class MobileNetworksUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkUpdateTags.json */ /** * Sample code: Update mobile network tags. @@ -544,7 +645,7 @@ public final class MobileNetworksUpdateTagsSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/OperationList.json */ /** * Sample code: Get Registration Operations. @@ -557,13 +658,126 @@ public final class OperationsListSamples { } ``` +### PacketCaptures_CreateOrUpdate + +```java +import java.util.Arrays; + +/** Samples for PacketCaptures CreateOrUpdate. */ +public final class PacketCapturesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureCreate.json + */ + /** + * Sample code: Create packet capture. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createPacketCapture(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .packetCaptures() + .define("pc1") + .withExistingPacketCoreControlPlane("rg1", "TestPacketCoreCP") + .withNetworkInterfaces( + Arrays + .asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")) + .withBytesToCapturePerPacket(10000L) + .withTotalBytesPerSession(100000L) + .withTimeLimitInSeconds(100) + .create(); + } +} +``` + +### PacketCaptures_Delete + +```java +/** Samples for PacketCaptures Delete. */ +public final class PacketCapturesDeleteSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureDelete.json + */ + /** + * Sample code: Delete packet capture. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deletePacketCapture(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().delete("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCaptures_Get + +```java +/** Samples for PacketCaptures Get. */ +public final class PacketCapturesGetSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureGet.json + */ + /** + * Sample code: Get packet capture session. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCaptureSession(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().getWithResponse("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCaptures_ListByPacketCoreControlPlane + +```java +/** Samples for PacketCaptures ListByPacketCoreControlPlane. */ +public final class PacketCapturesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureListByPacketCoreControlPlane.json + */ + /** + * Sample code: List packet capture sessions under a packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listPacketCaptureSessionsUnderAPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .packetCaptures() + .listByPacketCoreControlPlane("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE); + } +} +``` + +### PacketCaptures_Stop + +```java +/** Samples for PacketCaptures Stop. */ +public final class PacketCapturesStopSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureStop.json + */ + /** + * Sample code: Stop packet capture session. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void stopPacketCaptureSession(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().stop("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} +``` + ### PacketCoreControlPlaneVersions_Get ```java /** Samples for PacketCoreControlPlaneVersions Get. */ public final class PacketCoreControlPlaneVersionsGetSamples { /* - * 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/2023-06-01/examples/PacketCoreControlPlaneVersionGet.json */ /** * Sample code: Get packet core control plane version. @@ -577,13 +791,35 @@ public final class PacketCoreControlPlaneVersionsGetSamples { } ``` +### PacketCoreControlPlaneVersions_GetBySubscription + +```java +/** Samples for PacketCoreControlPlaneVersions GetBySubscription. */ +public final class PacketCoreControlPlaneVersionsGetBySubscriptionSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneVersionGetBySubscription.json + */ + /** + * Sample code: Get packet core control plane version by subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCoreControlPlaneVersionBySubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .packetCoreControlPlaneVersions() + .getBySubscriptionWithResponse("PMN-4-11-1", com.azure.core.util.Context.NONE); + } +} +``` + ### PacketCoreControlPlaneVersions_List ```java /** Samples for PacketCoreControlPlaneVersions List. */ public final class PacketCoreControlPlaneVersionsListSamples { /* - * 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/2023-06-01/examples/PacketCoreControlPlaneVersionList.json */ /** * Sample code: Get supported packet core control plane versions. @@ -597,6 +833,26 @@ public final class PacketCoreControlPlaneVersionsListSamples { } ``` +### PacketCoreControlPlaneVersions_ListBySubscription + +```java +/** Samples for PacketCoreControlPlaneVersions ListBySubscription. */ +public final class PacketCoreControlPlaneVersionsListBySubscriptionSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneVersionListBySubscription.json + */ + /** + * Sample code: Get supported packet core control plane versions by subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSupportedPacketCoreControlPlaneVersionsBySubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions().listBySubscription(com.azure.core.util.Context.NONE); + } +} +``` + ### PacketCoreControlPlanes_CollectDiagnosticsPackage ```java @@ -605,7 +861,7 @@ import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneColl /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json */ /** * Sample code: Collect diagnostics package from packet core control plane. @@ -636,7 +892,9 @@ import com.azure.resourcemanager.mobilenetwork.models.BillingSku; import com.azure.resourcemanager.mobilenetwork.models.ConnectedClusterResourceId; import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; import com.azure.resourcemanager.mobilenetwork.models.CustomLocationResourceId; +import com.azure.resourcemanager.mobilenetwork.models.DesiredInstallationState; import com.azure.resourcemanager.mobilenetwork.models.HttpsServerCertificate; +import com.azure.resourcemanager.mobilenetwork.models.Installation; import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; @@ -647,7 +905,7 @@ import java.util.Arrays; /** Samples for PacketCoreControlPlanes CreateOrUpdate. */ public final class PacketCoreControlPlanesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneCreate.json */ /** * Sample code: Create packet core control plane. @@ -666,22 +924,22 @@ public final class PacketCoreControlPlanesCreateOrUpdateSamples { .asList( new SiteResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"))) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"))) .withPlatform( new PlatformConfiguration() .withType(PlatformType.AKS_HCI) .withAzureStackEdgeDevice( new AzureStackEdgeDeviceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice")) .withConnectedCluster( new ConnectedClusterResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster")) .withCustomLocation( new CustomLocationResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"))) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"))) .withControlPlaneAccessInterface(new InterfaceProperties().withName("N2")) .withSku(BillingSku.G0) .withLocalDiagnosticsAccess( @@ -690,6 +948,7 @@ public final class PacketCoreControlPlanesCreateOrUpdateSamples { .withHttpsServerCertificate( new HttpsServerCertificate() .withCertificateUrl("https://contosovault.vault.azure.net/certificates/ingress"))) + .withInstallation(new Installation().withDesiredState(DesiredInstallationState.INSTALLED)) .withCoreNetworkTechnology(CoreNetworkType.FIVE_GC) .withVersion("0.2.0") .withUeMtu(1600) @@ -704,7 +963,7 @@ public final class PacketCoreControlPlanesCreateOrUpdateSamples { /** Samples for PacketCoreControlPlanes Delete. */ public final class PacketCoreControlPlanesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneDelete.json */ /** * Sample code: Delete packet core control plane. @@ -724,7 +983,7 @@ public final class PacketCoreControlPlanesDeleteSamples { /** Samples for PacketCoreControlPlanes GetByResourceGroup. */ public final class PacketCoreControlPlanesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneGet.json */ /** * Sample code: Get packet core control plane. @@ -745,7 +1004,7 @@ public final class PacketCoreControlPlanesGetByResourceGroupSamples { /** Samples for PacketCoreControlPlanes List. */ public final class PacketCoreControlPlanesListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneListBySubscription.json */ /** * Sample code: List packet core control planes in a subscription. @@ -765,7 +1024,7 @@ public final class PacketCoreControlPlanesListSamples { /** Samples for PacketCoreControlPlanes ListByResourceGroup. */ public final class PacketCoreControlPlanesListByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneListByResourceGroup.json */ /** * Sample code: List packet core control planes in resource group. @@ -785,7 +1044,7 @@ public final class PacketCoreControlPlanesListByResourceGroupSamples { /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneReinstall.json */ /** * Sample code: Reinstall packet core control plane. @@ -805,7 +1064,7 @@ public final class PacketCoreControlPlanesReinstallSamples { /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneRollback.json */ /** * Sample code: Rollback packet core control plane. @@ -822,28 +1081,41 @@ public final class PacketCoreControlPlanesRollbackSamples { ### PacketCoreControlPlanes_UpdateTags ```java +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; /** Samples for PacketCoreControlPlanes UpdateTags. */ public final class PacketCoreControlPlanesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlanePatch.json */ /** - * Sample code: Update packet core control plane tags. + * Sample code: Patch packet core control plane. * * @param manager Entry point to MobileNetworkManager. */ - public static void updatePacketCoreControlPlaneTags( + public static void patchPacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { PacketCoreControlPlane resource = manager .packetCoreControlPlanes() .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .apply(); } @SuppressWarnings("unchecked") @@ -867,7 +1139,7 @@ import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; /** Samples for PacketCoreDataPlanes CreateOrUpdate. */ public final class PacketCoreDataPlanesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneCreate.json */ /** * Sample code: Create packet core data plane. @@ -892,7 +1164,7 @@ public final class PacketCoreDataPlanesCreateOrUpdateSamples { /** Samples for PacketCoreDataPlanes Delete. */ public final class PacketCoreDataPlanesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneDelete.json */ /** * Sample code: Delete packet core data plane. @@ -913,7 +1185,7 @@ public final class PacketCoreDataPlanesDeleteSamples { /** Samples for PacketCoreDataPlanes Get. */ public final class PacketCoreDataPlanesGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneGet.json */ /** * Sample code: Get packet core data plane. @@ -934,7 +1206,7 @@ public final class PacketCoreDataPlanesGetSamples { /** Samples for PacketCoreDataPlanes ListByPacketCoreControlPlane. */ public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json */ /** * Sample code: List packet core data planes in a control plane. @@ -960,7 +1232,7 @@ import java.util.Map; /** Samples for PacketCoreDataPlanes UpdateTags. */ public final class PacketCoreDataPlanesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneUpdateTags.json */ /** * Sample code: Update packet core data plane tags. @@ -1007,7 +1279,7 @@ import java.util.Arrays; /** Samples for Services CreateOrUpdate. */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceCreate.json */ /** * Sample code: Create service. @@ -1062,7 +1334,7 @@ public final class ServicesCreateOrUpdateSamples { /** Samples for Services Delete. */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceDelete.json */ /** * Sample code: Delete service. @@ -1081,7 +1353,7 @@ public final class ServicesDeleteSamples { /** Samples for Services Get. */ public final class ServicesGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceGet.json */ /** * Sample code: Get service. @@ -1100,7 +1372,7 @@ public final class ServicesGetSamples { /** Samples for Services ListByMobileNetwork. */ public final class ServicesListByMobileNetworkSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceListByMobileNetwork.json */ /** * Sample code: List services in a mobile network. @@ -1126,7 +1398,7 @@ import java.util.Map; /** Samples for Services UpdateTags. */ public final class ServicesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceUpdateTags.json */ /** * Sample code: Update service tags. @@ -1169,7 +1441,7 @@ import java.util.Map; /** Samples for SimGroups CreateOrUpdate. */ public final class SimGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupCreate.json */ /** * Sample code: Create SIM group. @@ -1187,13 +1459,13 @@ public final class SimGroupsCreateOrUpdateSamples { .withType(ManagedServiceIdentityType.USER_ASSIGNED) .withUserAssignedIdentities( mapOf( - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", new UserAssignedIdentity()))) .withEncryptionKey(new KeyVaultKey().withKeyUrl("fakeTokenPlaceholder")) .withMobileNetwork( new MobileNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork")) .create(); } @@ -1216,7 +1488,7 @@ public final class SimGroupsCreateOrUpdateSamples { /** Samples for SimGroups Delete. */ public final class SimGroupsDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupDelete.json */ /** * Sample code: Delete SIM group. @@ -1235,7 +1507,7 @@ public final class SimGroupsDeleteSamples { /** Samples for SimGroups GetByResourceGroup. */ public final class SimGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupGet.json */ /** * Sample code: Get SIM group. @@ -1257,7 +1529,7 @@ public final class SimGroupsGetByResourceGroupSamples { /** Samples for SimGroups List. */ public final class SimGroupsListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupListBySubscription.json */ /** * Sample code: List SIM groups in a subscription. @@ -1277,7 +1549,7 @@ public final class SimGroupsListSamples { /** Samples for SimGroups ListByResourceGroup. */ public final class SimGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupListByResourceGroup.json */ /** * Sample code: List SIM groups in a resource group. @@ -1294,27 +1566,40 @@ public final class SimGroupsListByResourceGroupSamples { ### SimGroups_UpdateTags ```java +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; import com.azure.resourcemanager.mobilenetwork.models.SimGroup; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; /** Samples for SimGroups UpdateTags. */ public final class SimGroupsUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupPatch.json */ /** - * Sample code: Update SIM group tags. + * Sample code: Patch SIM group. * * @param manager Entry point to MobileNetworkManager. */ - public static void updateSIMGroupTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + public static void patchSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { SimGroup resource = manager .simGroups() .getByResourceGroupWithResponse("rg1", "testSimGroup", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .apply(); } @SuppressWarnings("unchecked") @@ -1347,7 +1632,7 @@ 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyCreate.json */ /** * Sample code: Create SIM policy. @@ -1364,7 +1649,7 @@ public final class SimPoliciesCreateOrUpdateSamples { .withDefaultSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withSliceConfigurations( Arrays .asList( @@ -1372,11 +1657,11 @@ public final class SimPoliciesCreateOrUpdateSamples { .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withDefaultDataNetwork( new DataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) .withDataNetworkConfigurations( Arrays .asList( @@ -1384,7 +1669,7 @@ public final class SimPoliciesCreateOrUpdateSamples { .withDataNetwork( new DataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) .withSessionAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) .withFiveQi(9) .withAllocationAndRetentionPriorityLevel(9) @@ -1397,7 +1682,7 @@ public final class SimPoliciesCreateOrUpdateSamples { .asList( new ServiceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"))) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"))) .withMaximumNumberOfBufferedPackets(200))))) .withRegistrationTimer(3240) .create(); @@ -1411,7 +1696,7 @@ public final class SimPoliciesCreateOrUpdateSamples { /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyDelete.json */ /** * Sample code: Delete SIM policy. @@ -1430,7 +1715,7 @@ public final class SimPoliciesDeleteSamples { /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyGet.json */ /** * Sample code: Get SIM policy. @@ -1451,7 +1736,7 @@ public final class SimPoliciesGetSamples { /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyListByMobileNetwork.json */ /** * Sample code: List SIM policies in a mobile network. @@ -1477,7 +1762,7 @@ 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyUpdateTags.json */ /** * Sample code: Update SIM policy tags. @@ -1515,7 +1800,7 @@ 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimBulkDelete.json */ /** * Sample code: Bulk delete SIMs from a SIM group. @@ -1550,7 +1835,7 @@ 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimBulkUpload.json */ /** * Sample code: Bulk upload SIMs in a SIM group. @@ -1577,7 +1862,7 @@ public final class SimsBulkUploadSamples { .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -1585,11 +1870,11 @@ public final class SimsBulkUploadSamples { .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.1")))), @@ -1603,7 +1888,7 @@ public final class SimsBulkUploadSamples { .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -1611,11 +1896,11 @@ public final class SimsBulkUploadSamples { .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.2")))))), @@ -1639,7 +1924,7 @@ import java.util.Arrays; /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimBulkUploadEncrypted.json */ /** * Sample code: Bulk upload encrypted SIMs to a SIM group. @@ -1671,7 +1956,7 @@ public final class SimsBulkUploadEncryptedSamples { .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -1679,11 +1964,11 @@ public final class SimsBulkUploadEncryptedSamples { .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.1")))), @@ -1696,7 +1981,7 @@ public final class SimsBulkUploadEncryptedSamples { .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -1704,11 +1989,11 @@ public final class SimsBulkUploadEncryptedSamples { .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.2")))))), @@ -1730,7 +2015,7 @@ import java.util.Arrays; /** Samples for Sims CreateOrUpdate. */ public final class SimsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimCreate.json */ /** * Sample code: Create SIM. @@ -1750,7 +2035,7 @@ public final class SimsCreateOrUpdateSamples { .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -1758,11 +2043,11 @@ public final class SimsCreateOrUpdateSamples { .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.1")))) .create(); } @@ -1775,7 +2060,7 @@ public final class SimsCreateOrUpdateSamples { /** Samples for Sims Delete. */ public final class SimsDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimDelete.json */ /** * Sample code: Delete SIM. @@ -1794,7 +2079,7 @@ public final class SimsDeleteSamples { /** Samples for Sims Get. */ public final class SimsGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGet.json */ /** * Sample code: Get SIM. @@ -1815,7 +2100,7 @@ public final class SimsGetSamples { /** Samples for Sims ListByGroup. */ public final class SimsListByGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimListBySimGroup.json */ /** * Sample code: List SIMs in a SIM group. @@ -1834,7 +2119,7 @@ public final class SimsListByGroupSamples { /** Samples for Sites CreateOrUpdate. */ public final class SitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteCreate.json */ /** * Sample code: Create mobile network site. @@ -1858,7 +2143,7 @@ public final class SitesCreateOrUpdateSamples { /** Samples for Sites Delete. */ public final class SitesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteDelete.json */ /** * Sample code: Delete mobile network site. @@ -1871,13 +2156,47 @@ public final class SitesDeleteSamples { } ``` +### Sites_DeletePacketCore + +```java +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; + +/** Samples for Sites DeletePacketCore. */ +public final class SitesDeletePacketCoreSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteDeletePacketCore.json + */ + /** + * Sample code: Delete packet core in mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deletePacketCoreInMobileNetworkSite( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .sites() + .deletePacketCore( + "rg1", + "testMobileNetwork", + "testSite", + new SiteDeletePacketCore() + .withPacketCore( + new PacketCoreControlPlaneResourceId() + .withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP")), + com.azure.core.util.Context.NONE); + } +} +``` + ### Sites_Get ```java /** Samples for Sites Get. */ public final class SitesGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteGet.json */ /** * Sample code: Get mobile network site. @@ -1896,7 +2215,7 @@ public final class SitesGetSamples { /** Samples for Sites ListByMobileNetwork. */ public final class SitesListByMobileNetworkSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteListByMobileNetwork.json */ /** * Sample code: List mobile network sites in a mobile network. @@ -1920,7 +2239,7 @@ import java.util.Map; /** Samples for Sites UpdateTags. */ public final class SitesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteUpdateTags.json */ /** * Sample code: Update mobile network site tags. @@ -1958,7 +2277,7 @@ import com.azure.resourcemanager.mobilenetwork.models.Snssai; /** Samples for Slices CreateOrUpdate. */ public final class SlicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceCreate.json */ /** * Sample code: Create network slice. @@ -1984,7 +2303,7 @@ public final class SlicesCreateOrUpdateSamples { /** Samples for Slices Delete. */ public final class SlicesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceDelete.json */ /** * Sample code: Delete network slice. @@ -2003,7 +2322,7 @@ public final class SlicesDeleteSamples { /** Samples for Slices Get. */ public final class SlicesGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceGet.json */ /** * Sample code: Get network slice. @@ -2022,7 +2341,7 @@ public final class SlicesGetSamples { /** Samples for Slices ListByMobileNetwork. */ public final class SlicesListByMobileNetworkSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceListByMobileNetwork.json */ /** * Sample code: List network slices in a mobile network. @@ -2046,7 +2365,7 @@ import java.util.Map; /** Samples for Slices UpdateTags. */ public final class SlicesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceUpdateTags.json */ /** * Sample code: Update network slice tags. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml index d4fd00078825..da60ef339c22 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for MobileNetwork Management - This package contains Microsoft Azure SDK for MobileNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. 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. + This package contains Microsoft Azure SDK for MobileNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. 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-2023-06. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 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 0826fa226b78..a921b590bd1f 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 @@ -26,9 +26,11 @@ import com.azure.resourcemanager.mobilenetwork.fluent.MobileNetworkManagementClient; import com.azure.resourcemanager.mobilenetwork.implementation.AttachedDataNetworksImpl; import com.azure.resourcemanager.mobilenetwork.implementation.DataNetworksImpl; +import com.azure.resourcemanager.mobilenetwork.implementation.DiagnosticsPackagesImpl; 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.PacketCapturesImpl; import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlaneVersionsImpl; import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreControlPlanesImpl; import com.azure.resourcemanager.mobilenetwork.implementation.PacketCoreDataPlanesImpl; @@ -40,8 +42,10 @@ import com.azure.resourcemanager.mobilenetwork.implementation.SlicesImpl; import com.azure.resourcemanager.mobilenetwork.models.AttachedDataNetworks; import com.azure.resourcemanager.mobilenetwork.models.DataNetworks; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackages; import com.azure.resourcemanager.mobilenetwork.models.MobileNetworks; import com.azure.resourcemanager.mobilenetwork.models.Operations; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptures; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneVersions; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlanes; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreDataPlanes; @@ -67,10 +71,14 @@ public final class MobileNetworkManager { private DataNetworks dataNetworks; + private DiagnosticsPackages diagnosticsPackages; + private MobileNetworks mobileNetworks; private Operations operations; + private PacketCaptures packetCaptures; + private PacketCoreControlPlanes packetCoreControlPlanes; private PacketCoreControlPlaneVersions packetCoreControlPlaneVersions; @@ -254,7 +262,7 @@ public MobileNetworkManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.mobilenetwork") .append("/") - .append("1.0.0-beta.5"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -335,6 +343,18 @@ public DataNetworks dataNetworks() { return dataNetworks; } + /** + * Gets the resource collection API of DiagnosticsPackages. + * + * @return Resource collection API of DiagnosticsPackages. + */ + public DiagnosticsPackages diagnosticsPackages() { + if (this.diagnosticsPackages == null) { + this.diagnosticsPackages = new DiagnosticsPackagesImpl(clientObject.getDiagnosticsPackages(), this); + } + return diagnosticsPackages; + } + /** * Gets the resource collection API of MobileNetworks. It manages MobileNetwork. * @@ -359,6 +379,18 @@ public Operations operations() { return operations; } + /** + * Gets the resource collection API of PacketCaptures. It manages PacketCapture. + * + * @return Resource collection API of PacketCaptures. + */ + public PacketCaptures packetCaptures() { + if (this.packetCaptures == null) { + this.packetCaptures = new PacketCapturesImpl(clientObject.getPacketCaptures(), this); + } + return packetCaptures; + } + /** * Gets the resource collection API of PacketCoreControlPlanes. It manages PacketCoreControlPlane. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DiagnosticsPackagesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DiagnosticsPackagesClient.java new file mode 100644 index 000000000000..f7cbfd5a3fa4 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/DiagnosticsPackagesClient.java @@ -0,0 +1,198 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +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.DiagnosticsPackageInner; + +/** An instance of this class provides access to all the operations defined in DiagnosticsPackagesClient. */ +public interface DiagnosticsPackagesClient { + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DiagnosticsPackageInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DiagnosticsPackageInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsPackageInner createOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsPackageInner createOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsPackageInner get( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName, Context context); +} 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 ed392138d570..f54ea636bd3b 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 @@ -10,7 +10,7 @@ /** The interface for MobileNetworkManagementClient class. */ public interface MobileNetworkManagementClient { /** - * Gets The ID of the target subscription. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -58,6 +58,13 @@ public interface MobileNetworkManagementClient { */ DataNetworksClient getDataNetworks(); + /** + * Gets the DiagnosticsPackagesClient object to access its operations. + * + * @return the DiagnosticsPackagesClient object. + */ + DiagnosticsPackagesClient getDiagnosticsPackages(); + /** * Gets the MobileNetworksClient object to access its operations. * @@ -72,6 +79,13 @@ public interface MobileNetworkManagementClient { */ OperationsClient getOperations(); + /** + * Gets the PacketCapturesClient object to access its operations. + * + * @return the PacketCapturesClient object. + */ + PacketCapturesClient getPacketCaptures(); + /** * Gets the PacketCoreControlPlanesClient object to access its operations. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCapturesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCapturesClient.java new file mode 100644 index 000000000000..15aad7ac98cd --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCapturesClient.java @@ -0,0 +1,277 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +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.PacketCaptureInner; + +/** An instance of this class provides access to all the operations defined in PacketCapturesClient. */ +public interface PacketCapturesClient { + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PacketCaptureInner> beginCreateOrUpdate( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters); + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PacketCaptureInner> beginCreateOrUpdate( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters, + Context context); + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCaptureInner createOrUpdate( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters); + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCaptureInner createOrUpdate( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters, + Context context); + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCaptureInner get(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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> beginStop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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> beginStop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 stop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 stop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneVersionsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneVersionsClient.java index eaa31e396900..5592f4a53e40 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneVersionsClient.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/PacketCoreControlPlaneVersionsClient.java @@ -61,4 +61,53 @@ public interface PacketCoreControlPlaneVersionsClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBySubscriptionWithResponse(String versionName, Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PacketCoreControlPlaneVersionInner getBySubscription(String versionName); + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscription(); + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySubscription(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 173e5b91fc02..4df1a5d532d3 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 @@ -13,8 +13,8 @@ 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.IdentityAndTagsObject; 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. */ public interface PacketCoreControlPlanesClient { @@ -168,11 +168,11 @@ PacketCoreControlPlaneInner createOrUpdate( Context context); /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @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. @@ -181,14 +181,14 @@ PacketCoreControlPlaneInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateTagsWithResponse( - String resourceGroupName, String packetCoreControlPlaneName, TagsObject parameters, Context context); + String resourceGroupName, String packetCoreControlPlaneName, IdentityAndTagsObject parameters, Context context); /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @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. @@ -196,7 +196,7 @@ Response updateTagsWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) PacketCoreControlPlaneInner updateTags( - String resourceGroupName, String packetCoreControlPlaneName, TagsObject parameters); + String resourceGroupName, String packetCoreControlPlaneName, IdentityAndTagsObject parameters); /** * Lists all the packet core control planes in a subscription. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimGroupsClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimGroupsClient.java index e16286f165c3..7fed75af24f8 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimGroupsClient.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SimGroupsClient.java @@ -12,7 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; -import com.azure.resourcemanager.mobilenetwork.models.TagsObject; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; /** An instance of this class provides access to all the operations defined in SimGroupsClient. */ public interface SimGroupsClient { @@ -158,11 +158,11 @@ SimGroupInner createOrUpdate( String resourceGroupName, String simGroupName, SimGroupInner parameters, Context context); /** - * Updates SIM group tags. + * Patch SIM group resource. * * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @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. @@ -171,21 +171,21 @@ SimGroupInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateTagsWithResponse( - String resourceGroupName, String simGroupName, TagsObject parameters, Context context); + String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters, Context context); /** - * Updates SIM group tags. + * Patch SIM group resource. * * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @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 sIM group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - SimGroupInner updateTags(String resourceGroupName, String simGroupName, TagsObject parameters); + SimGroupInner updateTags(String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters); /** * Gets all the SIM groups in a subscription. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SitesClient.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SitesClient.java index 11051a559ac9..38855ed351ad 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SitesClient.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/SitesClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; import com.azure.resourcemanager.mobilenetwork.models.TagsObject; /** An instance of this class provides access to all the operations defined in SitesClient. */ @@ -230,4 +231,76 @@ Response updateTagsWithResponse( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeletePacketCore( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeletePacketCore( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deletePacketCore( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deletePacketCore( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackageInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackageInner.java new file mode 100644 index 000000000000..e0f61d74700e --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackageInner.java @@ -0,0 +1,99 @@ +// 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.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Diagnostics package resource. */ +@Immutable +public final class DiagnosticsPackageInner extends ProxyResource { + /* + * Diagnostics package properties. A diagnostics package file derived from the name of this resource will be + * uploaded to the Storage Account Container URL in the packet core control plane properties + */ + @JsonProperty(value = "properties", required = true) + private DiagnosticsPackagePropertiesFormat innerProperties = new DiagnosticsPackagePropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of DiagnosticsPackageInner class. */ + public DiagnosticsPackageInner() { + } + + /** + * Get the innerProperties property: Diagnostics package properties. A diagnostics package file derived from the + * name of this resource will be uploaded to the Storage Account Container URL in the packet core control plane + * properties. + * + * @return the innerProperties value. + */ + private DiagnosticsPackagePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the diagnostics package resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: The status of the diagnostics package collection. + * + * @return the status value. + */ + public DiagnosticsPackageStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the reason property: The reason for the current state of the diagnostics package collection. + * + * @return the reason value. + */ + public String reason() { + return this.innerProperties() == null ? null : this.innerProperties().reason(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model DiagnosticsPackageInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsPackageInner.class); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackagePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackagePropertiesFormat.java new file mode 100644 index 000000000000..51084e98aef5 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/DiagnosticsPackagePropertiesFormat.java @@ -0,0 +1,71 @@ +// 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.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Diagnostics package properties. */ +@Immutable +public final class DiagnosticsPackagePropertiesFormat { + /* + * The provisioning state of the diagnostics package resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The status of the diagnostics package collection. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private DiagnosticsPackageStatus status; + + /* + * The reason for the current state of the diagnostics package collection. + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + private String reason; + + /** Creates an instance of DiagnosticsPackagePropertiesFormat class. */ + public DiagnosticsPackagePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the diagnostics package resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The status of the diagnostics package collection. + * + * @return the status value. + */ + public DiagnosticsPackageStatus status() { + return this.status; + } + + /** + * Get the reason property: The reason for the current state of the diagnostics package collection. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCaptureInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCaptureInner.java new file mode 100644 index 000000000000..23e6bfb4152b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCaptureInner.java @@ -0,0 +1,204 @@ +// 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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Packet capture session resource. */ +@Fluent +public final class PacketCaptureInner extends ProxyResource { + /* + * Packet capture session properties. Packet capture file(s) derived from the name of this session will be uploaded + * to the Storage Account Container URL in the packet core control plane properties + */ + @JsonProperty(value = "properties", required = true) + private PacketCapturePropertiesFormat innerProperties = new PacketCapturePropertiesFormat(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of PacketCaptureInner class. */ + public PacketCaptureInner() { + } + + /** + * Get the innerProperties property: Packet capture session properties. Packet capture file(s) derived from the name + * of this session will be uploaded to the Storage Account Container URL in the packet core control plane + * properties. + * + * @return the innerProperties value. + */ + private PacketCapturePropertiesFormat innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the packet capture session resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: The status of the packet capture session. + * + * @return the status value. + */ + public PacketCaptureStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the reason property: The reason the current packet capture session state. + * + * @return the reason value. + */ + public String reason() { + return this.innerProperties() == null ? null : this.innerProperties().reason(); + } + + /** + * Get the captureStartTime property: The start time of the packet capture session. + * + * @return the captureStartTime value. + */ + public OffsetDateTime captureStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().captureStartTime(); + } + + /** + * Get the networkInterfaces property: List of network interfaces to capture on. + * + * @return the networkInterfaces value. + */ + public List networkInterfaces() { + return this.innerProperties() == null ? null : this.innerProperties().networkInterfaces(); + } + + /** + * Set the networkInterfaces property: List of network interfaces to capture on. + * + * @param networkInterfaces the networkInterfaces value to set. + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withNetworkInterfaces(List networkInterfaces) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCapturePropertiesFormat(); + } + this.innerProperties().withNetworkInterfaces(networkInterfaces); + return this; + } + + /** + * Get the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * + * @return the bytesToCapturePerPacket value. + */ + public Long bytesToCapturePerPacket() { + return this.innerProperties() == null ? null : this.innerProperties().bytesToCapturePerPacket(); + } + + /** + * Set the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * + * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set. + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withBytesToCapturePerPacket(Long bytesToCapturePerPacket) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCapturePropertiesFormat(); + } + this.innerProperties().withBytesToCapturePerPacket(bytesToCapturePerPacket); + return this; + } + + /** + * Get the totalBytesPerSession property: Maximum size of the capture output. + * + * @return the totalBytesPerSession value. + */ + public Long totalBytesPerSession() { + return this.innerProperties() == null ? null : this.innerProperties().totalBytesPerSession(); + } + + /** + * Set the totalBytesPerSession property: Maximum size of the capture output. + * + * @param totalBytesPerSession the totalBytesPerSession value to set. + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withTotalBytesPerSession(Long totalBytesPerSession) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCapturePropertiesFormat(); + } + this.innerProperties().withTotalBytesPerSession(totalBytesPerSession); + return this; + } + + /** + * Get the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value. + */ + public Integer timeLimitInSeconds() { + return this.innerProperties() == null ? null : this.innerProperties().timeLimitInSeconds(); + } + + /** + * Set the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @param timeLimitInSeconds the timeLimitInSeconds value to set. + * @return the PacketCaptureInner object itself. + */ + public PacketCaptureInner withTimeLimitInSeconds(Integer timeLimitInSeconds) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCapturePropertiesFormat(); + } + this.innerProperties().withTimeLimitInSeconds(timeLimitInSeconds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model PacketCaptureInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCaptureInner.class); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCapturePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCapturePropertiesFormat.java new file mode 100644 index 000000000000..36b2ab42396c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCapturePropertiesFormat.java @@ -0,0 +1,195 @@ +// 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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Packet capture session properties. */ +@Fluent +public final class PacketCapturePropertiesFormat { + /* + * The provisioning state of the packet capture session resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The status of the packet capture session. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private PacketCaptureStatus status; + + /* + * The reason the current packet capture session state. + */ + @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) + private String reason; + + /* + * The start time of the packet capture session. + */ + @JsonProperty(value = "captureStartTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime captureStartTime; + + /* + * List of network interfaces to capture on. + */ + @JsonProperty(value = "networkInterfaces") + private List networkInterfaces; + + /* + * Number of bytes captured per packet, the remaining bytes are truncated. The default "0" means the entire packet + * is captured. + */ + @JsonProperty(value = "bytesToCapturePerPacket") + private Long bytesToCapturePerPacket; + + /* + * Maximum size of the capture output. + */ + @JsonProperty(value = "totalBytesPerSession") + private Long totalBytesPerSession; + + /* + * Maximum duration of the capture session in seconds. + */ + @JsonProperty(value = "timeLimitInSeconds") + private Integer timeLimitInSeconds; + + /** Creates an instance of PacketCapturePropertiesFormat class. */ + public PacketCapturePropertiesFormat() { + } + + /** + * Get the provisioningState property: The provisioning state of the packet capture session resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The status of the packet capture session. + * + * @return the status value. + */ + public PacketCaptureStatus status() { + return this.status; + } + + /** + * Get the reason property: The reason the current packet capture session state. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Get the captureStartTime property: The start time of the packet capture session. + * + * @return the captureStartTime value. + */ + public OffsetDateTime captureStartTime() { + return this.captureStartTime; + } + + /** + * Get the networkInterfaces property: List of network interfaces to capture on. + * + * @return the networkInterfaces value. + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Set the networkInterfaces property: List of network interfaces to capture on. + * + * @param networkInterfaces the networkInterfaces value to set. + * @return the PacketCapturePropertiesFormat object itself. + */ + public PacketCapturePropertiesFormat withNetworkInterfaces(List networkInterfaces) { + this.networkInterfaces = networkInterfaces; + return this; + } + + /** + * Get the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * + * @return the bytesToCapturePerPacket value. + */ + public Long bytesToCapturePerPacket() { + return this.bytesToCapturePerPacket; + } + + /** + * Set the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * + * @param bytesToCapturePerPacket the bytesToCapturePerPacket value to set. + * @return the PacketCapturePropertiesFormat object itself. + */ + public PacketCapturePropertiesFormat withBytesToCapturePerPacket(Long bytesToCapturePerPacket) { + this.bytesToCapturePerPacket = bytesToCapturePerPacket; + return this; + } + + /** + * Get the totalBytesPerSession property: Maximum size of the capture output. + * + * @return the totalBytesPerSession value. + */ + public Long totalBytesPerSession() { + return this.totalBytesPerSession; + } + + /** + * Set the totalBytesPerSession property: Maximum size of the capture output. + * + * @param totalBytesPerSession the totalBytesPerSession value to set. + * @return the PacketCapturePropertiesFormat object itself. + */ + public PacketCapturePropertiesFormat withTotalBytesPerSession(Long totalBytesPerSession) { + this.totalBytesPerSession = totalBytesPerSession; + return this; + } + + /** + * Get the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value. + */ + public Integer timeLimitInSeconds() { + return this.timeLimitInSeconds; + } + + /** + * Set the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @param timeLimitInSeconds the timeLimitInSeconds value to set. + * @return the PacketCapturePropertiesFormat object itself. + */ + public PacketCapturePropertiesFormat withTimeLimitInSeconds(Integer timeLimitInSeconds) { + this.timeLimitInSeconds = timeLimitInSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneInner.java index 494ba161f1d6..c5e720e96c8f 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneInner.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlaneInner.java @@ -10,6 +10,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mobilenetwork.models.BillingSku; import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsUploadConfiguration; import com.azure.resourcemanager.mobilenetwork.models.Installation; import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; @@ -116,6 +117,20 @@ public Installation installation() { return this.innerProperties() == null ? null : this.innerProperties().installation(); } + /** + * Set the installation property: The installation state of the packet core control plane resource. + * + * @param installation the installation value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withInstallation(Installation installation) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withInstallation(installation); + return this; + } + /** * Get the sites property: Site(s) under which this packet core control plane should be deployed. The sites must be * in the same location as the packet core control plane. @@ -188,7 +203,7 @@ public PacketCoreControlPlaneInner withCoreNetworkTechnology(CoreNetworkType cor } /** - * Get the version property: The version of the packet core software that is deployed. + * Get the version property: The desired version of the packet core software. * * @return the version value. */ @@ -197,7 +212,7 @@ public String version() { } /** - * Set the version property: The version of the packet core software that is deployed. + * Set the version property: The desired version of the packet core software. * * @param version the version value to set. * @return the PacketCoreControlPlaneInner object itself. @@ -210,6 +225,15 @@ public PacketCoreControlPlaneInner withVersion(String version) { return this; } + /** + * Get the installedVersion property: The currently installed version of the packet core software. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.innerProperties() == null ? null : this.innerProperties().installedVersion(); + } + /** * Get the rollbackVersion property: The previous version of the packet core software that was deployed. Used when * performing the rollback action. @@ -324,6 +348,29 @@ public PacketCoreControlPlaneInner withLocalDiagnosticsAccess( return this; } + /** + * Get the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @return the diagnosticsUpload value. + */ + public DiagnosticsUploadConfiguration diagnosticsUpload() { + return this.innerProperties() == null ? null : this.innerProperties().diagnosticsUpload(); + } + + /** + * Set the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @param diagnosticsUpload the diagnosticsUpload value to set. + * @return the PacketCoreControlPlaneInner object itself. + */ + public PacketCoreControlPlaneInner withDiagnosticsUpload(DiagnosticsUploadConfiguration diagnosticsUpload) { + if (this.innerProperties() == null) { + this.innerProperties = new PacketCoreControlPlanePropertiesFormat(); + } + this.innerProperties().withDiagnosticsUpload(diagnosticsUpload); + return this; + } + /** * Get the interopSettings property: Settings to allow interoperability with third party components e.g. RANs and * UEs. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlanePropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlanePropertiesFormat.java index 03ee6c4f8c4b..65aab567ce28 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlanePropertiesFormat.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/PacketCoreControlPlanePropertiesFormat.java @@ -8,6 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mobilenetwork.models.BillingSku; import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsUploadConfiguration; import com.azure.resourcemanager.mobilenetwork.models.Installation; import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; @@ -29,7 +30,7 @@ public final class PacketCoreControlPlanePropertiesFormat { /* * The installation state of the packet core control plane resource. */ - @JsonProperty(value = "installation", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "installation") private Installation installation; /* @@ -52,11 +53,17 @@ public final class PacketCoreControlPlanePropertiesFormat { private CoreNetworkType coreNetworkTechnology; /* - * The version of the packet core software that is deployed. + * The desired version of the packet core software. */ @JsonProperty(value = "version") private String version; + /* + * The currently installed version of the packet core software. + */ + @JsonProperty(value = "installedVersion", access = JsonProperty.Access.WRITE_ONLY) + private String installedVersion; + /* * The previous version of the packet core software that was deployed. Used when performing the rollback action. */ @@ -90,6 +97,12 @@ public final class PacketCoreControlPlanePropertiesFormat { @JsonProperty(value = "localDiagnosticsAccess", required = true) private LocalDiagnosticsAccessConfiguration localDiagnosticsAccess; + /* + * Configuration for uploading packet core diagnostics + */ + @JsonProperty(value = "diagnosticsUpload") + private DiagnosticsUploadConfiguration diagnosticsUpload; + /* * Settings to allow interoperability with third party components e.g. RANs and UEs. */ @@ -118,6 +131,17 @@ public Installation installation() { return this.installation; } + /** + * Set the installation property: The installation state of the packet core control plane resource. + * + * @param installation the installation value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withInstallation(Installation installation) { + this.installation = installation; + return this; + } + /** * Get the sites property: Site(s) under which this packet core control plane should be deployed. The sites must be * in the same location as the packet core control plane. @@ -181,7 +205,7 @@ public PacketCoreControlPlanePropertiesFormat withCoreNetworkTechnology(CoreNetw } /** - * Get the version property: The version of the packet core software that is deployed. + * Get the version property: The desired version of the packet core software. * * @return the version value. */ @@ -190,7 +214,7 @@ public String version() { } /** - * Set the version property: The version of the packet core software that is deployed. + * Set the version property: The desired version of the packet core software. * * @param version the version value to set. * @return the PacketCoreControlPlanePropertiesFormat object itself. @@ -200,6 +224,15 @@ public PacketCoreControlPlanePropertiesFormat withVersion(String version) { return this; } + /** + * Get the installedVersion property: The currently installed version of the packet core software. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.installedVersion; + } + /** * Get the rollbackVersion property: The previous version of the packet core software that was deployed. Used when * performing the rollback action. @@ -302,6 +335,27 @@ public PacketCoreControlPlanePropertiesFormat withLocalDiagnosticsAccess( return this; } + /** + * Get the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @return the diagnosticsUpload value. + */ + public DiagnosticsUploadConfiguration diagnosticsUpload() { + return this.diagnosticsUpload; + } + + /** + * Set the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @param diagnosticsUpload the diagnosticsUpload value to set. + * @return the PacketCoreControlPlanePropertiesFormat object itself. + */ + public PacketCoreControlPlanePropertiesFormat withDiagnosticsUpload( + DiagnosticsUploadConfiguration diagnosticsUpload) { + this.diagnosticsUpload = diagnosticsUpload; + return this; + } + /** * Get the interopSettings property: Settings to allow interoperability with third party components e.g. RANs and * UEs. @@ -373,6 +427,9 @@ public void validate() { } else { localDiagnosticsAccess().validate(); } + if (diagnosticsUpload() != null) { + diagnosticsUpload().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlanePropertiesFormat.class); diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyInner.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyInner.java index 5d503612b83b..8f514be7225d 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyInner.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyInner.java @@ -163,7 +163,8 @@ public SimPolicyInner withRfspIndex(Integer rfspIndex) { } /** - * Get the registrationTimer property: Interval for the UE periodic registration update procedure, in seconds. + * Get the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. * * @return the registrationTimer value. */ @@ -172,7 +173,8 @@ public Integer registrationTimer() { } /** - * Set the registrationTimer property: Interval for the UE periodic registration update procedure, in seconds. + * Set the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. * * @param registrationTimer the registrationTimer value to set. * @return the SimPolicyInner object itself. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyPropertiesFormat.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyPropertiesFormat.java index d627970dc1ab..2ed0c17cf861 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyPropertiesFormat.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/fluent/models/SimPolicyPropertiesFormat.java @@ -54,7 +54,7 @@ public final class SimPolicyPropertiesFormat { private Integer rfspIndex; /* - * Interval for the UE periodic registration update procedure, in seconds. + * UE periodic registration update timer (5G) or UE periodic tracking area update timer (4G), in seconds. */ @JsonProperty(value = "registrationTimer") private Integer registrationTimer; @@ -156,7 +156,8 @@ public SimPolicyPropertiesFormat withRfspIndex(Integer rfspIndex) { } /** - * Get the registrationTimer property: Interval for the UE periodic registration update procedure, in seconds. + * Get the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. * * @return the registrationTimer value. */ @@ -165,7 +166,8 @@ public Integer registrationTimer() { } /** - * Set the registrationTimer property: Interval for the UE periodic registration update procedure, in seconds. + * Set the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. * * @param registrationTimer the registrationTimer value to set. * @return the SimPolicyPropertiesFormat object itself. 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 b3cf66daa640..705c26c90891 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 @@ -69,9 +69,7 @@ public final class AttachedDataNetworksClientImpl implements AttachedDataNetwork public interface AttachedDataNetworksService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" - + "/attachedDataNetworks/{attachedDataNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -87,9 +85,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" - + "/attachedDataNetworks/{attachedDataNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -105,9 +101,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" - + "/attachedDataNetworks/{attachedDataNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -124,9 +118,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" - + "/attachedDataNetworks/{attachedDataNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -143,9 +135,7 @@ Mono> updateTags( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" - + "/attachedDataNetworks") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPacketCoreDataPlane( 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 e4d121bedc91..e8239faa0008 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 @@ -68,8 +68,7 @@ public final class DataNetworksClientImpl implements DataNetworksClient { public interface DataNetworksService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -84,8 +83,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -100,8 +98,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -117,8 +114,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -134,8 +130,7 @@ Mono> updateTags( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/dataNetworks") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByMobileNetwork( diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackageImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackageImpl.java new file mode 100644 index 000000000000..9330e86db0a9 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackageImpl.java @@ -0,0 +1,60 @@ +// 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.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackage; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; + +public final class DiagnosticsPackageImpl implements DiagnosticsPackage { + private DiagnosticsPackageInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + DiagnosticsPackageImpl( + DiagnosticsPackageInner innerObject, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public DiagnosticsPackageStatus status() { + return this.innerModel().status(); + } + + public String reason() { + return this.innerModel().reason(); + } + + public DiagnosticsPackageInner innerModel() { + return this.innerObject; + } + + 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/DiagnosticsPackagesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesClientImpl.java new file mode 100644 index 000000000000..2e0c9fe5ad25 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesClientImpl.java @@ -0,0 +1,1128 @@ +// 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.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +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.Put; +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.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +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.DiagnosticsPackagesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackageListResult; +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 DiagnosticsPackagesClient. */ +public final class DiagnosticsPackagesClientImpl implements DiagnosticsPackagesClient { + /** The proxy service used to perform REST calls. */ + private final DiagnosticsPackagesService service; + + /** The service client containing this operation class. */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of DiagnosticsPackagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DiagnosticsPackagesClientImpl(MobileNetworkManagementClientImpl client) { + this.service = + RestProxy.create(DiagnosticsPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientDiagnosticsPackages to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface DiagnosticsPackagesService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("diagnosticsPackageName") String diagnosticsPackageName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("diagnosticsPackageName") String diagnosticsPackageName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages/{diagnosticsPackageName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("diagnosticsPackageName") String diagnosticsPackageName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/diagnosticsPackages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlane( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlaneNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (diagnosticsPackageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (diagnosticsPackageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DiagnosticsPackageInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DiagnosticsPackageInner.class, + DiagnosticsPackageInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DiagnosticsPackageInner> beginCreateOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + DiagnosticsPackageInner.class, + DiagnosticsPackageInner.class, + context); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DiagnosticsPackageInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName) + .getSyncPoller(); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DiagnosticsPackageInner> beginCreateOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .getSyncPoller(); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsPackageInner createOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName).block(); + } + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsPackageInner createOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .block(); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (diagnosticsPackageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (diagnosticsPackageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .block(); + } + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsPackageInner get( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + return getWithResponse(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, Context.NONE) + .getValue(); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (diagnosticsPackageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (diagnosticsPackageName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter diagnosticsPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + diagnosticsPackageName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + return this + .beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName) + .getSyncPoller(); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .getSyncPoller(); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName).block(); + } + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context).block(); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneSinglePageAsync( + 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByPacketCoreControlPlane( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneSinglePageAsync( + 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPacketCoreControlPlane( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync( + String resourceGroupName, String packetCoreControlPlaneName) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName, context), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName) { + return new PagedIterable<>(listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName)); + } + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return new PagedIterable<>( + listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 response for diagnostics package API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service.listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 response for diagnostics package API service call along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesImpl.java new file mode 100644 index 000000000000..8a630f85c112 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DiagnosticsPackagesImpl.java @@ -0,0 +1,113 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.DiagnosticsPackagesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackage; +import com.azure.resourcemanager.mobilenetwork.models.DiagnosticsPackages; + +public final class DiagnosticsPackagesImpl implements DiagnosticsPackages { + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsPackagesImpl.class); + + private final DiagnosticsPackagesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public DiagnosticsPackagesImpl( + DiagnosticsPackagesClient innerClient, + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public DiagnosticsPackage createOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + DiagnosticsPackageInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + if (inner != null) { + return new DiagnosticsPackageImpl(inner, this.manager()); + } else { + return null; + } + } + + public DiagnosticsPackage createOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + DiagnosticsPackageInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + if (inner != null) { + return new DiagnosticsPackageImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticsPackageImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticsPackage get( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + DiagnosticsPackageInner inner = + this.serviceClient().get(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + if (inner != null) { + return new DiagnosticsPackageImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName); + } + + public void delete( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName, context); + } + + public PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName) { + PagedIterable inner = + this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName); + return Utils.mapPage(inner, inner1 -> new DiagnosticsPackageImpl(inner1, this.manager())); + } + + public PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + PagedIterable inner = + this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName, context); + return Utils.mapPage(inner, inner1 -> new DiagnosticsPackageImpl(inner1, this.manager())); + } + + private DiagnosticsPackagesClient 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/MobileNetworkManagementClientBuilder.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientBuilder.java index 48e694955f56..89dd86b2a22c 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientBuilder.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/MobileNetworkManagementClientBuilder.java @@ -18,12 +18,12 @@ @ServiceClientBuilder(serviceClients = {MobileNetworkManagementClientImpl.class}) public final class MobileNetworkManagementClientBuilder { /* - * The ID of the target subscription. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The ID of the target subscription. + * Sets The ID of the target subscription. The value must be an UUID. * * @param subscriptionId the subscriptionId value. * @return the MobileNetworkManagementClientBuilder. 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 2d2eb71ed85e..518aa46863d7 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 @@ -24,9 +24,11 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.mobilenetwork.fluent.AttachedDataNetworksClient; import com.azure.resourcemanager.mobilenetwork.fluent.DataNetworksClient; +import com.azure.resourcemanager.mobilenetwork.fluent.DiagnosticsPackagesClient; 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.PacketCapturesClient; import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlaneVersionsClient; import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreControlPlanesClient; import com.azure.resourcemanager.mobilenetwork.fluent.PacketCoreDataPlanesClient; @@ -48,11 +50,11 @@ /** Initializes a new instance of the MobileNetworkManagementClientImpl type. */ @ServiceClient(builder = MobileNetworkManagementClientBuilder.class) public final class MobileNetworkManagementClientImpl implements MobileNetworkManagementClient { - /** The ID of the target subscription. */ + /** The ID of the target subscription. The value must be an UUID. */ private final String subscriptionId; /** - * Gets The ID of the target subscription. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -144,6 +146,18 @@ public DataNetworksClient getDataNetworks() { return this.dataNetworks; } + /** The DiagnosticsPackagesClient object to access its operations. */ + private final DiagnosticsPackagesClient diagnosticsPackages; + + /** + * Gets the DiagnosticsPackagesClient object to access its operations. + * + * @return the DiagnosticsPackagesClient object. + */ + public DiagnosticsPackagesClient getDiagnosticsPackages() { + return this.diagnosticsPackages; + } + /** The MobileNetworksClient object to access its operations. */ private final MobileNetworksClient mobileNetworks; @@ -168,6 +182,18 @@ public OperationsClient getOperations() { return this.operations; } + /** The PacketCapturesClient object to access its operations. */ + private final PacketCapturesClient packetCaptures; + + /** + * Gets the PacketCapturesClient object to access its operations. + * + * @return the PacketCapturesClient object. + */ + public PacketCapturesClient getPacketCaptures() { + return this.packetCaptures; + } + /** The PacketCoreControlPlanesClient object to access its operations. */ private final PacketCoreControlPlanesClient packetCoreControlPlanes; @@ -283,7 +309,7 @@ public SlicesClient getSlices() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ MobileNetworkManagementClientImpl( @@ -298,11 +324,13 @@ public SlicesClient getSlices() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-11-01"; + this.apiVersion = "2023-06-01"; this.attachedDataNetworks = new AttachedDataNetworksClientImpl(this); this.dataNetworks = new DataNetworksClientImpl(this); + this.diagnosticsPackages = new DiagnosticsPackagesClientImpl(this); this.mobileNetworks = new MobileNetworksClientImpl(this); this.operations = new OperationsClientImpl(this); + this.packetCaptures = new PacketCapturesClientImpl(this); this.packetCoreControlPlanes = new PacketCoreControlPlanesClientImpl(this); this.packetCoreControlPlaneVersions = new PacketCoreControlPlaneVersionsClientImpl(this); this.packetCoreDataPlanes = new PacketCoreDataPlanesClientImpl(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 acec93c7403c..a1157096c6a3 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 @@ -68,8 +68,7 @@ public final class MobileNetworksClientImpl implements MobileNetworksClient { public interface MobileNetworksService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -83,8 +82,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -98,8 +96,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -114,8 +111,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -141,8 +137,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCaptureImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCaptureImpl.java new file mode 100644 index 000000000000..1f0657726f16 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCaptureImpl.java @@ -0,0 +1,209 @@ +// 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.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import com.azure.resourcemanager.mobilenetwork.models.PacketCapture; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureStatus; +import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class PacketCaptureImpl implements PacketCapture, PacketCapture.Definition, PacketCapture.Update { + private PacketCaptureInner innerObject; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PacketCaptureStatus status() { + return this.innerModel().status(); + } + + public String reason() { + return this.innerModel().reason(); + } + + public OffsetDateTime captureStartTime() { + return this.innerModel().captureStartTime(); + } + + public List networkInterfaces() { + List inner = this.innerModel().networkInterfaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Long bytesToCapturePerPacket() { + return this.innerModel().bytesToCapturePerPacket(); + } + + public Long totalBytesPerSession() { + return this.innerModel().totalBytesPerSession(); + } + + public Integer timeLimitInSeconds() { + return this.innerModel().timeLimitInSeconds(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PacketCaptureInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String packetCoreControlPlaneName; + + private String packetCaptureName; + + public PacketCaptureImpl withExistingPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName) { + this.resourceGroupName = resourceGroupName; + this.packetCoreControlPlaneName = packetCoreControlPlaneName; + return this; + } + + public PacketCapture create() { + this.innerObject = + serviceManager + .serviceClient() + .getPacketCaptures() + .createOrUpdate( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.innerModel(), Context.NONE); + return this; + } + + public PacketCapture create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPacketCaptures() + .createOrUpdate( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.innerModel(), context); + return this; + } + + PacketCaptureImpl(String name, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = new PacketCaptureInner(); + this.serviceManager = serviceManager; + this.packetCaptureName = name; + } + + public PacketCaptureImpl update() { + return this; + } + + public PacketCapture apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPacketCaptures() + .createOrUpdate( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.innerModel(), Context.NONE); + return this; + } + + public PacketCapture apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPacketCaptures() + .createOrUpdate( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, this.innerModel(), context); + return this; + } + + PacketCaptureImpl( + PacketCaptureInner innerObject, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.packetCoreControlPlaneName = Utils.getValueFromIdByName(innerObject.id(), "packetCoreControlPlanes"); + this.packetCaptureName = Utils.getValueFromIdByName(innerObject.id(), "packetCaptures"); + } + + public PacketCapture refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getPacketCaptures() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, Context.NONE) + .getValue(); + return this; + } + + public PacketCapture refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPacketCaptures() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context) + .getValue(); + return this; + } + + public AsyncOperationStatus stop() { + return serviceManager.packetCaptures().stop(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + } + + public AsyncOperationStatus stop(Context context) { + return serviceManager + .packetCaptures() + .stop(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + } + + public PacketCaptureImpl withNetworkInterfaces(List networkInterfaces) { + this.innerModel().withNetworkInterfaces(networkInterfaces); + return this; + } + + public PacketCaptureImpl withBytesToCapturePerPacket(Long bytesToCapturePerPacket) { + this.innerModel().withBytesToCapturePerPacket(bytesToCapturePerPacket); + return this; + } + + public PacketCaptureImpl withTotalBytesPerSession(Long totalBytesPerSession) { + this.innerModel().withTotalBytesPerSession(totalBytesPerSession); + return this; + } + + public PacketCaptureImpl withTimeLimitInSeconds(Integer timeLimitInSeconds) { + this.innerModel().withTimeLimitInSeconds(timeLimitInSeconds); + return this; + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesClientImpl.java new file mode 100644 index 000000000000..aafef56354b6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesClientImpl.java @@ -0,0 +1,1474 @@ +// 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.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +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.Put; +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.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +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.PacketCapturesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptureListResult; +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 PacketCapturesClient. */ +public final class PacketCapturesClientImpl implements PacketCapturesClient { + /** The proxy service used to perform REST calls. */ + private final PacketCapturesService service; + + /** The service client containing this operation class. */ + private final MobileNetworkManagementClientImpl client; + + /** + * Initializes an instance of PacketCapturesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PacketCapturesClientImpl(MobileNetworkManagementClientImpl client) { + this.service = + RestProxy.create(PacketCapturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MobileNetworkManagementClientPacketCaptures to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "MobileNetworkManagem") + public interface PacketCapturesService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCaptureName") String packetCaptureName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PacketCaptureInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCaptureName") String packetCaptureName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCaptureName") String packetCaptureName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures/{packetCaptureName}/stop") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stop( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @PathParam("packetCaptureName") String packetCaptureName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCaptures") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlane( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPacketCoreControlPlaneNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName 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 + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName 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 + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PacketCaptureInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PacketCaptureInner.class, + PacketCaptureInner.class, + this.client.getContext()); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PacketCaptureInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), PacketCaptureInner.class, PacketCaptureInner.class, context); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PacketCaptureInner> beginCreateOrUpdate( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PacketCaptureInner> beginCreateOrUpdate( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters, + Context context) { + return this + .beginCreateOrUpdateAsync( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCaptureInner createOrUpdate( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters) { + return createOrUpdateAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters) + .block(); + } + + /** + * Creates or updates a packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @param parameters Parameters supplied to the create or update packet capture 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 packet capture session resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCaptureInner createOrUpdate( + String resourceGroupName, + String packetCoreControlPlaneName, + String packetCaptureName, + PacketCaptureInner parameters, + Context context) { + return createOrUpdateAsync( + resourceGroupName, packetCoreControlPlaneName, packetCaptureName, parameters, context) + .block(); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + return getWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context).block(); + } + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCaptureInner get( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + return getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, Context.NONE) + .getValue(); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + return this.beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).getSyncPoller(); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context) + .getSyncPoller(); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + return beginDeleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).block(); + } + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + deleteAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context).block(); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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>> stopWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .stop( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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>> stopWithResponseAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (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 (packetCaptureName == null) { + return Mono + .error(new IllegalArgumentException("Parameter packetCaptureName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .stop( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + packetCaptureName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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> beginStopAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + Mono>> mono = + stopWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + this.client.getContext()); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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> beginStopAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + stopWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AsyncOperationStatusInner.class, + AsyncOperationStatusInner.class, + context); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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> beginStop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + return this.beginStopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).getSyncPoller(); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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> beginStop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + return this + .beginStopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context) + .getSyncPoller(); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 stopAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + return beginStopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 stopAsync( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + return beginStopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 stop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + return stopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName).block(); + } + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 stop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + return stopAsync(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context).block(); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneSinglePageAsync( + 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByPacketCoreControlPlane( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneSinglePageAsync( + 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPacketCoreControlPlane( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + packetCoreControlPlaneName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync( + String resourceGroupName, String packetCoreControlPlaneName) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPacketCoreControlPlaneAsync( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return new PagedFlux<>( + () -> listByPacketCoreControlPlaneSinglePageAsync(resourceGroupName, packetCoreControlPlaneName, context), + nextLink -> listByPacketCoreControlPlaneNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName) { + return new PagedIterable<>(listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName)); + } + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + return new PagedIterable<>( + listByPacketCoreControlPlaneAsync(resourceGroupName, packetCoreControlPlaneName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 response for packet capture API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service.listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 response for packet capture API service call along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPacketCoreControlPlaneNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPacketCoreControlPlaneNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesImpl.java new file mode 100644 index 000000000000..7f7ac064b5df --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCapturesImpl.java @@ -0,0 +1,237 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mobilenetwork.fluent.PacketCapturesClient; +import com.azure.resourcemanager.mobilenetwork.fluent.models.AsyncOperationStatusInner; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import com.azure.resourcemanager.mobilenetwork.models.AsyncOperationStatus; +import com.azure.resourcemanager.mobilenetwork.models.PacketCapture; +import com.azure.resourcemanager.mobilenetwork.models.PacketCaptures; + +public final class PacketCapturesImpl implements PacketCaptures { + private static final ClientLogger LOGGER = new ClientLogger(PacketCapturesImpl.class); + + private final PacketCapturesClient innerClient; + + private final com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager; + + public PacketCapturesImpl( + PacketCapturesClient innerClient, com.azure.resourcemanager.mobilenetwork.MobileNetworkManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PacketCaptureImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PacketCapture get(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + PacketCaptureInner inner = + this.serviceClient().get(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + if (inner != null) { + return new PacketCaptureImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + } + + public void delete( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + this.serviceClient().delete(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + } + + public AsyncOperationStatus stop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName) { + AsyncOperationStatusInner inner = + this.serviceClient().stop(resourceGroupName, packetCoreControlPlaneName, packetCaptureName); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public AsyncOperationStatus stop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context) { + AsyncOperationStatusInner inner = + this.serviceClient().stop(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + if (inner != null) { + return new AsyncOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName) { + PagedIterable inner = + this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName); + return Utils.mapPage(inner, inner1 -> new PacketCaptureImpl(inner1, this.manager())); + } + + public PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName, Context context) { + PagedIterable inner = + this.serviceClient().listByPacketCoreControlPlane(resourceGroupName, packetCoreControlPlaneName, context); + return Utils.mapPage(inner, inner1 -> new PacketCaptureImpl(inner1, this.manager())); + } + + public PacketCapture getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = Utils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", + id))); + } + String packetCaptureName = Utils.getValueFromIdByName(id, "packetCaptures"); + if (packetCaptureName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCaptures'.", id))); + } + return this + .getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = Utils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", + id))); + } + String packetCaptureName = Utils.getValueFromIdByName(id, "packetCaptures"); + if (packetCaptureName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCaptures'.", id))); + } + return this.getWithResponse(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = Utils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", + id))); + } + String packetCaptureName = Utils.getValueFromIdByName(id, "packetCaptures"); + if (packetCaptureName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCaptures'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String packetCoreControlPlaneName = Utils.getValueFromIdByName(id, "packetCoreControlPlanes"); + if (packetCoreControlPlaneName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'packetCoreControlPlanes'.", + id))); + } + String packetCaptureName = Utils.getValueFromIdByName(id, "packetCaptures"); + if (packetCaptureName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'packetCaptures'.", id))); + } + this.delete(resourceGroupName, packetCoreControlPlaneName, packetCaptureName, context); + } + + private PacketCapturesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { + return this.serviceManager; + } + + public PacketCaptureImpl define(String name) { + return new PacketCaptureImpl(name, this.manager()); + } +} 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 25593b521174..db87d97ae445 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 @@ -11,6 +11,8 @@ 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.DiagnosticsUploadConfiguration; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; import com.azure.resourcemanager.mobilenetwork.models.Installation; import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; @@ -20,7 +22,6 @@ import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; import com.azure.resourcemanager.mobilenetwork.models.SiteResourceId; -import com.azure.resourcemanager.mobilenetwork.models.TagsObject; import java.util.Collections; import java.util.List; import java.util.Map; @@ -93,6 +94,10 @@ public String version() { return this.innerModel().version(); } + public String installedVersion() { + return this.innerModel().installedVersion(); + } + public String rollbackVersion() { return this.innerModel().rollbackVersion(); } @@ -113,6 +118,10 @@ public LocalDiagnosticsAccessConfiguration localDiagnosticsAccess() { return this.innerModel().localDiagnosticsAccess(); } + public DiagnosticsUploadConfiguration diagnosticsUpload() { + return this.innerModel().diagnosticsUpload(); + } + public Object interopSettings() { return this.innerModel().interopSettings(); } @@ -141,7 +150,7 @@ private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { private String packetCoreControlPlaneName; - private TagsObject updateParameters; + private IdentityAndTagsObject updateParameters; public PacketCoreControlPlaneImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -174,7 +183,7 @@ public PacketCoreControlPlane create(Context context) { } public PacketCoreControlPlaneImpl update() { - this.updateParameters = new TagsObject(); + this.updateParameters = new IdentityAndTagsObject(); return this; } @@ -307,7 +316,17 @@ public PacketCoreControlPlaneImpl withTags(Map tags) { } public PacketCoreControlPlaneImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } + } + + public PacketCoreControlPlaneImpl withInstallation(Installation installation) { + this.innerModel().withInstallation(installation); return this; } @@ -326,6 +345,11 @@ public PacketCoreControlPlaneImpl withUeMtu(Integer ueMtu) { return this; } + public PacketCoreControlPlaneImpl withDiagnosticsUpload(DiagnosticsUploadConfiguration diagnosticsUpload) { + this.innerModel().withDiagnosticsUpload(diagnosticsUpload); + return this; + } + public PacketCoreControlPlaneImpl withInteropSettings(Object interopSettings) { this.innerModel().withInteropSettings(interopSettings); return this; diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsClientImpl.java index 83d0934236a4..904b49531d23 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsClientImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsClientImpl.java @@ -81,6 +81,30 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/{versionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getBySubscription( + @HostParam("$host") String endpoint, + @PathParam("versionName") String versionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscription( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -90,6 +114,16 @@ Mono> listNext( @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -315,6 +349,282 @@ public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBySubscriptionWithResponseAsync(String versionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName 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 + .getBySubscription( + this.client.getEndpoint(), + versionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBySubscriptionWithResponseAsync( + String versionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName 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 + .getBySubscription( + this.client.getEndpoint(), + versionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBySubscriptionAsync(String versionName) { + return getBySubscriptionWithResponseAsync(versionName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBySubscriptionWithResponse( + String versionName, Context context) { + return getBySubscriptionWithResponseAsync(versionName, context).block(); + } + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PacketCoreControlPlaneVersionInner getBySubscription(String versionName) { + return getBySubscriptionWithResponse(versionName, Context.NONE).getValue(); + } + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 + .listBySubscription( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 + .listBySubscription( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySubscriptionAsync() { + return new PagedFlux<>( + () -> listBySubscriptionSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySubscriptionAsync(Context context) { + return new PagedFlux<>( + () -> listBySubscriptionSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscription() { + return new PagedIterable<>(listBySubscriptionAsync()); + } + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySubscription(Context context) { + return new PagedIterable<>(listBySubscriptionAsync(context)); + } + /** * Get the next page of items. * @@ -390,4 +700,82 @@ private Mono> listNextSinglePa res.getValue().nextLink(), null)); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 response for packet core control plane version API service call along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsImpl.java index 4b9069ee4366..1a6bedf3e0b9 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/PacketCoreControlPlaneVersionsImpl.java @@ -60,6 +60,39 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new PacketCoreControlPlaneVersionImpl(inner1, this.manager())); } + public Response getBySubscriptionWithResponse(String versionName, Context context) { + Response inner = + this.serviceClient().getBySubscriptionWithResponse(versionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PacketCoreControlPlaneVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PacketCoreControlPlaneVersion getBySubscription(String versionName) { + PacketCoreControlPlaneVersionInner inner = this.serviceClient().getBySubscription(versionName); + if (inner != null) { + return new PacketCoreControlPlaneVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listBySubscription() { + PagedIterable inner = this.serviceClient().listBySubscription(); + return Utils.mapPage(inner, inner1 -> new PacketCoreControlPlaneVersionImpl(inner1, this.manager())); + } + + public PagedIterable listBySubscription(Context context) { + PagedIterable inner = this.serviceClient().listBySubscription(context); + return Utils.mapPage(inner, inner1 -> new PacketCoreControlPlaneVersionImpl(inner1, this.manager())); + } + private PacketCoreControlPlaneVersionsClient serviceClient() { return this.innerClient; } 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 cafd1ba36ab5..838a28c07ce3 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 @@ -36,9 +36,9 @@ 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.IdentityAndTagsObject; 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; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -72,8 +72,7 @@ public final class PacketCoreControlPlanesClientImpl implements PacketCoreContro public interface PacketCoreControlPlanesService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -87,8 +86,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -102,8 +100,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -118,8 +115,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -128,7 +124,7 @@ Mono> updateTags( @PathParam("packetCoreControlPlaneName") String packetCoreControlPlaneName, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") TagsObject parameters, + @BodyParam("application/json") IdentityAndTagsObject parameters, @HeaderParam("Accept") String accept, Context context); @@ -145,8 +141,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -159,8 +154,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> rollback( @@ -174,8 +168,7 @@ Mono>> rollback( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> reinstall( @@ -189,8 +182,7 @@ Mono>> reinstall( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> collectDiagnosticsPackage( @@ -908,11 +900,11 @@ public PacketCoreControlPlaneInner createOrUpdate( } /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @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. @@ -920,7 +912,7 @@ public PacketCoreControlPlaneInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String packetCoreControlPlaneName, TagsObject parameters) { + String resourceGroupName, String packetCoreControlPlaneName, IdentityAndTagsObject parameters) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -966,11 +958,11 @@ private Mono> updateTagsWithResponseAsync( } /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @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. @@ -979,7 +971,10 @@ private Mono> updateTagsWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String packetCoreControlPlaneName, TagsObject parameters, Context context) { + String resourceGroupName, + String packetCoreControlPlaneName, + IdentityAndTagsObject parameters, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1022,11 +1017,11 @@ private Mono> updateTagsWithResponseAsync( } /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @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. @@ -1034,17 +1029,17 @@ private Mono> updateTagsWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateTagsAsync( - String resourceGroupName, String packetCoreControlPlaneName, TagsObject parameters) { + String resourceGroupName, String packetCoreControlPlaneName, IdentityAndTagsObject parameters) { return updateTagsWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @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. @@ -1053,16 +1048,19 @@ private Mono updateTagsAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateTagsWithResponse( - String resourceGroupName, String packetCoreControlPlaneName, TagsObject parameters, Context context) { + String resourceGroupName, + String packetCoreControlPlaneName, + IdentityAndTagsObject parameters, + Context context) { return updateTagsWithResponseAsync(resourceGroupName, packetCoreControlPlaneName, parameters, context).block(); } /** - * Updates packet core control planes tags. + * Patch packet core control plane resource. * * @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 update packet core control plane tags. + * @param parameters Parameters supplied to patch packet core control plane resource. * @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. @@ -1070,7 +1068,7 @@ public Response updateTagsWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public PacketCoreControlPlaneInner updateTags( - String resourceGroupName, String packetCoreControlPlaneName, TagsObject parameters) { + String resourceGroupName, String packetCoreControlPlaneName, IdentityAndTagsObject parameters) { return updateTagsWithResponse(resourceGroupName, packetCoreControlPlaneName, parameters, Context.NONE) .getValue(); } 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 987cf7d58234..e8e25d72bba6 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 @@ -69,9 +69,7 @@ public final class PacketCoreDataPlanesClientImpl implements PacketCoreDataPlane public interface PacketCoreDataPlanesService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes" - + "/{packetCoreDataPlaneName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -86,9 +84,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes" - + "/{packetCoreDataPlaneName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -103,9 +99,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes" - + "/{packetCoreDataPlaneName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -121,9 +115,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes" - + "/{packetCoreDataPlaneName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -139,8 +131,7 @@ Mono> updateTags( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPacketCoreControlPlane( 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 10cd772eca0f..121bb8b46b87 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 @@ -67,8 +67,7 @@ public final class ServicesClientImpl implements ServicesClient { public interface ServicesService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/services/{serviceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -83,8 +82,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/services/{serviceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,8 +97,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/services/{serviceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -116,8 +113,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/services/{serviceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -133,8 +129,7 @@ Mono> updateTags( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/services") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByMobileNetwork( diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupImpl.java index 1a00e5d449b2..cd87285de9d4 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SimGroupImpl.java @@ -8,12 +8,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; import com.azure.resourcemanager.mobilenetwork.models.KeyVaultKey; import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; import com.azure.resourcemanager.mobilenetwork.models.MobileNetworkResourceId; import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; import com.azure.resourcemanager.mobilenetwork.models.SimGroup; -import com.azure.resourcemanager.mobilenetwork.models.TagsObject; import java.util.Collections; import java.util.Map; @@ -91,7 +91,7 @@ private com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager() { private String simGroupName; - private TagsObject updateParameters; + private IdentityAndTagsObject updateParameters; public SimGroupImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -123,7 +123,7 @@ public SimGroup create(Context context) { } public SimGroupImpl update() { - this.updateParameters = new TagsObject(); + this.updateParameters = new IdentityAndTagsObject(); return this; } @@ -196,8 +196,13 @@ public SimGroupImpl withTags(Map tags) { } public SimGroupImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } } public SimGroupImpl withEncryptionKey(KeyVaultKey encryptionKey) { 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 b45f2fd47b71..e184516b0270 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 @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mobilenetwork.fluent.SimGroupsClient; import com.azure.resourcemanager.mobilenetwork.fluent.models.SimGroupInner; +import com.azure.resourcemanager.mobilenetwork.models.IdentityAndTagsObject; import com.azure.resourcemanager.mobilenetwork.models.SimGroupListResult; -import com.azure.resourcemanager.mobilenetwork.models.TagsObject; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,8 +68,7 @@ public final class SimGroupsClientImpl implements SimGroupsClient { public interface SimGroupsService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -83,8 +82,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -98,8 +96,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -114,8 +111,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -124,7 +120,7 @@ Mono> updateTags( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("simGroupName") String simGroupName, - @BodyParam("application/json") TagsObject parameters, + @BodyParam("application/json") IdentityAndTagsObject parameters, @HeaderParam("Accept") String accept, Context context); @@ -141,8 +137,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -812,11 +807,11 @@ public SimGroupInner createOrUpdate( } /** - * Updates SIM group tags. + * Patch SIM group resource. * * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @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. @@ -824,7 +819,7 @@ public SimGroupInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String simGroupName, TagsObject parameters) { + String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -867,11 +862,11 @@ private Mono> updateTagsWithResponseAsync( } /** - * Updates SIM group tags. + * Patch SIM group resource. * * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @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. @@ -880,7 +875,7 @@ private Mono> updateTagsWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String simGroupName, TagsObject parameters, Context context) { + String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -920,28 +915,29 @@ private Mono> updateTagsWithResponseAsync( } /** - * Updates SIM group tags. + * Patch SIM group resource. * * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @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 sIM group resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String simGroupName, TagsObject parameters) { + private Mono updateTagsAsync( + String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters) { return updateTagsWithResponseAsync(resourceGroupName, simGroupName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates SIM group tags. + * Patch SIM group resource. * * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @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. @@ -950,23 +946,23 @@ private Mono updateTagsAsync(String resourceGroupName, String sim */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateTagsWithResponse( - String resourceGroupName, String simGroupName, TagsObject parameters, Context context) { + String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters, Context context) { return updateTagsWithResponseAsync(resourceGroupName, simGroupName, parameters, context).block(); } /** - * Updates SIM group tags. + * Patch SIM group resource. * * @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 update SIM group tags. + * @param parameters Parameters supplied to patch SIM group resource. * @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 sIM group resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SimGroupInner updateTags(String resourceGroupName, String simGroupName, TagsObject parameters) { + public SimGroupInner updateTags(String resourceGroupName, String simGroupName, IdentityAndTagsObject parameters) { return updateTagsWithResponse(resourceGroupName, simGroupName, parameters, Context.NONE).getValue(); } 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 3de0e9cd9197..72ad144774aa 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 @@ -68,8 +68,7 @@ public final class SimPoliciesClientImpl implements SimPoliciesClient { public interface SimPoliciesService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -84,8 +83,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -100,8 +98,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -117,8 +114,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -134,8 +130,7 @@ Mono> updateTags( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/simPolicies") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByMobileNetwork( 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 b65a70cda940..3874ba161d7a 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 @@ -70,8 +70,7 @@ public final class SimsClientImpl implements SimsClient { public interface SimsService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/sims/{simName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -86,8 +85,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/sims/{simName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -102,8 +100,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/sims/{simName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -119,8 +116,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/sims") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByGroup( @@ -134,8 +130,7 @@ Mono> listByGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/uploadSims") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> bulkUpload( @@ -150,8 +145,7 @@ Mono>> bulkUpload( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/deleteSims") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> bulkDelete( @@ -166,8 +160,7 @@ Mono>> bulkDelete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/simGroups/{simGroupName}/uploadEncryptedSims") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> bulkUploadEncrypted( diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SiteImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SiteImpl.java index 1daa8a3c7bc3..1f8cd6814b77 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SiteImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SiteImpl.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; import com.azure.resourcemanager.mobilenetwork.models.ProvisioningState; import com.azure.resourcemanager.mobilenetwork.models.Site; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; import com.azure.resourcemanager.mobilenetwork.models.TagsObject; import java.util.Collections; import java.util.List; @@ -174,6 +175,14 @@ public Site refresh(Context context) { return this; } + public void deletePacketCore(SiteDeletePacketCore parameters) { + serviceManager.sites().deletePacketCore(resourceGroupName, mobileNetworkName, siteName, parameters); + } + + public void deletePacketCore(SiteDeletePacketCore parameters, Context context) { + serviceManager.sites().deletePacketCore(resourceGroupName, mobileNetworkName, siteName, parameters, context); + } + public SiteImpl 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/SitesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesClientImpl.java index 14538768456d..06b880f8e23c 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 @@ -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; @@ -34,6 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mobilenetwork.fluent.SitesClient; import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; import com.azure.resourcemanager.mobilenetwork.models.SiteListResult; import com.azure.resourcemanager.mobilenetwork.models.TagsObject; import java.nio.ByteBuffer; @@ -67,8 +69,7 @@ public final class SitesClientImpl implements SitesClient { public interface SitesService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/sites/{siteName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -83,8 +84,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/sites/{siteName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,8 +99,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/sites/{siteName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -116,8 +115,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/sites/{siteName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -133,8 +131,7 @@ Mono> updateTags( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/sites") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByMobileNetwork( @@ -146,6 +143,22 @@ Mono> listByMobileNetwork( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}/deletePacketCore") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deletePacketCore( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("mobileNetworkName") String mobileNetworkName, + @PathParam("siteName") String siteName, + @BodyParam("application/json") SiteDeletePacketCore parameters, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1228,6 +1241,310 @@ public PagedIterable listByMobileNetwork( return new PagedIterable<>(listByMobileNetworkAsync(resourceGroupName, mobileNetworkName, context)); } + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePacketCoreWithResponseAsync( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName 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 + .deletePacketCore( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + mobileNetworkName, + siteName, + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePacketCoreWithResponseAsync( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (mobileNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter mobileNetworkName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName 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 + .deletePacketCore( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + mobileNetworkName, + siteName, + parameters, + accept, + context); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeletePacketCoreAsync( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters) { + Mono>> mono = + deletePacketCoreWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeletePacketCoreAsync( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deletePacketCoreWithResponseAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeletePacketCore( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters) { + return this + .beginDeletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters) + .getSyncPoller(); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeletePacketCore( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context) { + return this + .beginDeletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context) + .getSyncPoller(); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePacketCoreAsync( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters) { + return beginDeletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePacketCoreAsync( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context) { + return beginDeletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePacketCore( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters) { + deletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, parameters).block(); + } + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePacketCore( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context) { + deletePacketCoreAsync(resourceGroupName, mobileNetworkName, siteName, 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/SitesImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesImpl.java index e58b92328325..1d729731c58c 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesImpl.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SitesImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.mobilenetwork.fluent.SitesClient; import com.azure.resourcemanager.mobilenetwork.fluent.models.SiteInner; import com.azure.resourcemanager.mobilenetwork.models.Site; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; import com.azure.resourcemanager.mobilenetwork.models.Sites; public final class SitesImpl implements Sites { @@ -71,6 +72,20 @@ public PagedIterable listByMobileNetwork( return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); } + public void deletePacketCore( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters) { + this.serviceClient().deletePacketCore(resourceGroupName, mobileNetworkName, siteName, parameters); + } + + public void deletePacketCore( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context) { + this.serviceClient().deletePacketCore(resourceGroupName, mobileNetworkName, siteName, parameters, context); + } + public Site 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/SlicesClientImpl.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/SlicesClientImpl.java index a49d89404c4b..f45a2b3828c2 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 @@ -67,8 +67,7 @@ public final class SlicesClientImpl implements SlicesClient { public interface SlicesService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -83,8 +82,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,8 +97,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -116,8 +113,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateTags( @@ -133,8 +129,7 @@ Mono> updateTags( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork" - + "/mobileNetworks/{mobileNetworkName}/slices") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByMobileNetwork( diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/BillingSku.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/BillingSku.java index 525d81984a9c..7ac42c30e9e8 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/BillingSku.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/BillingSku.java @@ -22,12 +22,6 @@ public final class BillingSku extends ExpandableStringEnum { /** Static value G2 for BillingSku. */ public static final BillingSku G2 = fromString("G2"); - /** Static value G3 for BillingSku. */ - public static final BillingSku G3 = fromString("G3"); - - /** Static value G4 for BillingSku. */ - public static final BillingSku G4 = fromString("G4"); - /** Static value G5 for BillingSku. */ public static final BillingSku G5 = fromString("G5"); diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CoreNetworkType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CoreNetworkType.java index d9339eb3b760..6499bb8672a9 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CoreNetworkType.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/CoreNetworkType.java @@ -7,13 +7,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The core network technology generation (5G core or EPC / 4G core). */ +/** The core network technology generation (5G core, EPC / 4G core or EPC / 4G + 5G core). */ public enum CoreNetworkType { /** Enum value 5GC. */ FIVE_GC("5GC"), /** Enum value EPC. */ - EPC("EPC"); + EPC("EPC"), + + /** Enum value EPC + 5GC. */ + EPC_5GC("EPC + 5GC"); /** The actual serialized value for a CoreNetworkType instance. */ private final String value; diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkConfiguration.java index ef82f1c18567..95a8f865ac01 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkConfiguration.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DataNetworkConfiguration.java @@ -27,11 +27,9 @@ public final class DataNetworkConfiguration { private Ambr sessionAmbr; /* - * Default QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided - * to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) QoS Flow. The - * illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP - * TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition of - * which are the GBR 5QI values. + * Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a + * flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the + * definition the 5QI values. */ @JsonProperty(value = "5qi") private Integer fiveQi; @@ -137,11 +135,9 @@ public DataNetworkConfiguration withSessionAmbr(Ambr sessionAmbr) { } /** - * Get the fiveQi property: Default QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding - * treatment to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed - * bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, - * and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the - * definition of which are the GBR 5QI values. + * Get the fiveQi property: Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding + * treatment to be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI + * parameter, and table 5.7.4-1 for the definition the 5QI values. * * @return the fiveQi value. */ @@ -150,11 +146,9 @@ public Integer fiveQi() { } /** - * Set the fiveQi property: Default QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding - * treatment to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed - * bit rate) QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, - * and 85. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the - * definition of which are the GBR 5QI values. + * Set the fiveQi property: Default 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding + * treatment to be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI + * parameter, and table 5.7.4-1 for the definition the 5QI values. * * @param fiveQi the fiveQi value to set. * @return the DataNetworkConfiguration object itself. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DesiredInstallationState.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DesiredInstallationState.java new file mode 100644 index 000000000000..b8514f886433 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DesiredInstallationState.java @@ -0,0 +1,47 @@ +// 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.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The desired installation state of the packet core. */ +public final class DesiredInstallationState extends ExpandableStringEnum { + /** Static value Uninstalled for DesiredInstallationState. */ + public static final DesiredInstallationState UNINSTALLED = fromString("Uninstalled"); + + /** Static value Installed for DesiredInstallationState. */ + public static final DesiredInstallationState INSTALLED = fromString("Installed"); + + /** + * Creates a new instance of DesiredInstallationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DesiredInstallationState() { + } + + /** + * Creates or finds a DesiredInstallationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DesiredInstallationState. + */ + @JsonCreator + public static DesiredInstallationState fromString(String name) { + return fromString(name, DesiredInstallationState.class); + } + + /** + * Gets known DesiredInstallationState values. + * + * @return known DesiredInstallationState values. + */ + public static Collection values() { + return values(DesiredInstallationState.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackage.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackage.java new file mode 100644 index 000000000000..d6599bf4ec7c --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackage.java @@ -0,0 +1,67 @@ +// 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.management.SystemData; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; + +/** An immutable client-side representation of DiagnosticsPackage. */ +public interface DiagnosticsPackage { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the diagnostics package resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: The status of the diagnostics package collection. + * + * @return the status value. + */ + DiagnosticsPackageStatus status(); + + /** + * Gets the reason property: The reason for the current state of the diagnostics package collection. + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner object. + * + * @return the inner object. + */ + DiagnosticsPackageInner innerModel(); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageListResult.java new file mode 100644 index 000000000000..d13439dd5117 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageListResult.java @@ -0,0 +1,70 @@ +// 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.annotation.Fluent; +import com.azure.resourcemanager.mobilenetwork.fluent.models.DiagnosticsPackageInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Response for diagnostics package API service call. */ +@Fluent +public final class DiagnosticsPackageListResult { + /* + * A list of diagnostics packages under a packet core control plane. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of DiagnosticsPackageListResult class. */ + public DiagnosticsPackageListResult() { + } + + /** + * Get the value property: A list of diagnostics packages under a packet core control plane. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of diagnostics packages under a packet core control plane. + * + * @param value the value value to set. + * @return the DiagnosticsPackageListResult object itself. + */ + public DiagnosticsPackageListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageStatus.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageStatus.java new file mode 100644 index 000000000000..da6be4bf0e44 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackageStatus.java @@ -0,0 +1,53 @@ +// 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.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The status of the diagnostics package collection. */ +public final class DiagnosticsPackageStatus extends ExpandableStringEnum { + /** Static value NotStarted for DiagnosticsPackageStatus. */ + public static final DiagnosticsPackageStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value Collecting for DiagnosticsPackageStatus. */ + public static final DiagnosticsPackageStatus COLLECTING = fromString("Collecting"); + + /** Static value Collected for DiagnosticsPackageStatus. */ + public static final DiagnosticsPackageStatus COLLECTED = fromString("Collected"); + + /** Static value Error for DiagnosticsPackageStatus. */ + public static final DiagnosticsPackageStatus ERROR = fromString("Error"); + + /** + * Creates a new instance of DiagnosticsPackageStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiagnosticsPackageStatus() { + } + + /** + * Creates or finds a DiagnosticsPackageStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiagnosticsPackageStatus. + */ + @JsonCreator + public static DiagnosticsPackageStatus fromString(String name) { + return fromString(name, DiagnosticsPackageStatus.class); + } + + /** + * Gets known DiagnosticsPackageStatus values. + * + * @return known DiagnosticsPackageStatus values. + */ + public static Collection values() { + return values(DiagnosticsPackageStatus.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackages.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackages.java new file mode 100644 index 000000000000..f13577bfaf43 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsPackages.java @@ -0,0 +1,122 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of DiagnosticsPackages. */ +public interface DiagnosticsPackages { + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + DiagnosticsPackage createOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Creates or updates a diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 diagnostics package resource. + */ + DiagnosticsPackage createOrUpdate( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Gets information about the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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 information about the specified diagnostics package. + */ + DiagnosticsPackage get(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName); + + /** + * Deletes the specified diagnostics package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param diagnosticsPackageName The name of the diagnostics package. + * @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. + */ + void delete( + String resourceGroupName, String packetCoreControlPlaneName, String diagnosticsPackageName, Context context); + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Lists all the diagnostics packages under a packet core control plane. + * + * @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 response for diagnostics package API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName, Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsUploadConfiguration.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsUploadConfiguration.java new file mode 100644 index 000000000000..37f81897f1cf --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/DiagnosticsUploadConfiguration.java @@ -0,0 +1,60 @@ +// 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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration for uploading packet core diagnostics. */ +@Fluent +public final class DiagnosticsUploadConfiguration { + /* + * The Storage Account Container URL to upload diagnostics to. + */ + @JsonProperty(value = "storageAccountContainerUrl", required = true) + private String storageAccountContainerUrl; + + /** Creates an instance of DiagnosticsUploadConfiguration class. */ + public DiagnosticsUploadConfiguration() { + } + + /** + * Get the storageAccountContainerUrl property: The Storage Account Container URL to upload diagnostics to. + * + * @return the storageAccountContainerUrl value. + */ + public String storageAccountContainerUrl() { + return this.storageAccountContainerUrl; + } + + /** + * Set the storageAccountContainerUrl property: The Storage Account Container URL to upload diagnostics to. + * + * @param storageAccountContainerUrl the storageAccountContainerUrl value to set. + * @return the DiagnosticsUploadConfiguration object itself. + */ + public DiagnosticsUploadConfiguration withStorageAccountContainerUrl(String storageAccountContainerUrl) { + this.storageAccountContainerUrl = storageAccountContainerUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccountContainerUrl() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property storageAccountContainerUrl in model" + + " DiagnosticsUploadConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsUploadConfiguration.class); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/IdentityAndTagsObject.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/IdentityAndTagsObject.java new file mode 100644 index 000000000000..750ee955fc8b --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/IdentityAndTagsObject.java @@ -0,0 +1,82 @@ +// 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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Identity and Tags object for patch operations. */ +@Fluent +public final class IdentityAndTagsObject { + /* + * The managed service identity associated with this resource. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of IdentityAndTagsObject class. */ + public IdentityAndTagsObject() { + } + + /** + * Get the identity property: The managed service identity associated with this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identity associated with this resource. + * + * @param identity the identity value to set. + * @return the IdentityAndTagsObject object itself. + */ + public IdentityAndTagsObject withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the IdentityAndTagsObject object itself. + */ + public IdentityAndTagsObject withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Installation.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Installation.java index 03b471947667..1700f0845ba4 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Installation.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Installation.java @@ -6,26 +6,65 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** The installation state of the packet core. */ @Fluent public final class Installation { + /* + * The desired installation state + */ + @JsonProperty(value = "desiredState") + private DesiredInstallationState desiredState; + /* * Installation state */ - @JsonProperty(value = "state") + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private InstallationState state; + /* + * Whether a reinstall of the packet core is required to pick up the latest configuration changes. + */ + @JsonProperty(value = "reinstallRequired", access = JsonProperty.Access.WRITE_ONLY) + private ReinstallRequired reinstallRequired; + + /* + * Reason(s) for the current installation state of the packet core. + */ + @JsonProperty(value = "reasons", access = JsonProperty.Access.WRITE_ONLY) + private List reasons; + /* * A reference to an in-progress installation operation */ - @JsonProperty(value = "operation") + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private AsyncOperationId operation; /** Creates an instance of Installation class. */ public Installation() { } + /** + * Get the desiredState property: The desired installation state. + * + * @return the desiredState value. + */ + public DesiredInstallationState desiredState() { + return this.desiredState; + } + + /** + * Set the desiredState property: The desired installation state. + * + * @param desiredState the desiredState value to set. + * @return the Installation object itself. + */ + public Installation withDesiredState(DesiredInstallationState desiredState) { + this.desiredState = desiredState; + return this; + } + /** * Get the state property: Installation state. * @@ -36,34 +75,31 @@ public InstallationState state() { } /** - * Set the state property: Installation state. + * Get the reinstallRequired property: Whether a reinstall of the packet core is required to pick up the latest + * configuration changes. * - * @param state the state value to set. - * @return the Installation object itself. + * @return the reinstallRequired value. */ - public Installation withState(InstallationState state) { - this.state = state; - return this; + public ReinstallRequired reinstallRequired() { + return this.reinstallRequired; } /** - * Get the operation property: A reference to an in-progress installation operation. + * Get the reasons property: Reason(s) for the current installation state of the packet core. * - * @return the operation value. + * @return the reasons value. */ - public AsyncOperationId operation() { - return this.operation; + public List reasons() { + return this.reasons; } /** - * Set the operation property: A reference to an in-progress installation operation. + * Get the operation property: A reference to an in-progress installation operation. * - * @param operation the operation value to set. - * @return the Installation object itself. + * @return the operation value. */ - public Installation withOperation(AsyncOperationId operation) { - this.operation = operation; - return this; + public AsyncOperationId operation() { + return this.operation; } /** diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationReason.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationReason.java new file mode 100644 index 000000000000..1e795296d51f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/InstallationReason.java @@ -0,0 +1,50 @@ +// 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.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The reason for the installation state of the packet core. */ +public final class InstallationReason extends ExpandableStringEnum { + /** Static value NoSlices for InstallationReason. */ + public static final InstallationReason NO_SLICES = fromString("NoSlices"); + + /** Static value NoPacketCoreDataPlane for InstallationReason. */ + public static final InstallationReason NO_PACKET_CORE_DATA_PLANE = fromString("NoPacketCoreDataPlane"); + + /** Static value NoAttachedDataNetworks for InstallationReason. */ + public static final InstallationReason NO_ATTACHED_DATA_NETWORKS = fromString("NoAttachedDataNetworks"); + + /** + * Creates a new instance of InstallationReason value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InstallationReason() { + } + + /** + * Creates or finds a InstallationReason from its string representation. + * + * @param name a name to look for. + * @return the corresponding InstallationReason. + */ + @JsonCreator + public static InstallationReason fromString(String name) { + return fromString(name, InstallationReason.class); + } + + /** + * Gets known InstallationReason values. + * + * @return known InstallationReason values. + */ + public static Collection values() { + return values(InstallationReason.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentity.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentity.java index 3a9489c432ef..98c1b7f26048 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentity.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentity.java @@ -9,27 +9,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -import java.util.UUID; -/** Managed service identity (system assigned and/or user assigned identities). */ +/** Managed service identity (User assigned identity). */ @Fluent -public class ManagedServiceIdentity { +public final class ManagedServiceIdentity { /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private UUID principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private UUID tenantId; - - /* - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + * Type of managed service identity (currently only UserAssigned allowed). */ @JsonProperty(value = "type", required = true) private ManagedServiceIdentityType type; @@ -49,28 +34,7 @@ public ManagedServiceIdentity() { } /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: Type of managed service identity (currently only UserAssigned allowed). * * @return the type value. */ @@ -79,8 +43,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: Type of managed service identity (currently only UserAssigned allowed). * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentityType.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentityType.java index 6d0795a87759..51c1ae4ccab8 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentityType.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ManagedServiceIdentityType.java @@ -8,21 +8,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ +/** Type of managed service identity (currently only UserAssigned allowed). */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** Static value None for ManagedServiceIdentityType. */ public static final ManagedServiceIdentityType NONE = fromString("None"); - /** Static value SystemAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for ManagedServiceIdentityType. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = - fromString("SystemAssigned,UserAssigned"); - /** * Creates a new instance of ManagedServiceIdentityType value. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCapture.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCapture.java new file mode 100644 index 000000000000..a3937d7dc217 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCapture.java @@ -0,0 +1,308 @@ +// 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.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of PacketCapture. */ +public interface PacketCapture { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the packet capture session resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: The status of the packet capture session. + * + * @return the status value. + */ + PacketCaptureStatus status(); + + /** + * Gets the reason property: The reason the current packet capture session state. + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the captureStartTime property: The start time of the packet capture session. + * + * @return the captureStartTime value. + */ + OffsetDateTime captureStartTime(); + + /** + * Gets the networkInterfaces property: List of network interfaces to capture on. + * + * @return the networkInterfaces value. + */ + List networkInterfaces(); + + /** + * Gets the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes are + * truncated. The default "0" means the entire packet is captured. + * + * @return the bytesToCapturePerPacket value. + */ + Long bytesToCapturePerPacket(); + + /** + * Gets the totalBytesPerSession property: Maximum size of the capture output. + * + * @return the totalBytesPerSession value. + */ + Long totalBytesPerSession(); + + /** + * Gets the timeLimitInSeconds property: Maximum duration of the capture session in seconds. + * + * @return the timeLimitInSeconds value. + */ + Integer timeLimitInSeconds(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner object. + * + * @return the inner object. + */ + PacketCaptureInner innerModel(); + + /** The entirety of the PacketCapture definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The PacketCapture definition stages. */ + interface DefinitionStages { + /** The first stage of the PacketCapture definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PacketCapture definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, packetCoreControlPlaneName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @return the next definition stage. + */ + WithCreate withExistingPacketCoreControlPlane(String resourceGroupName, String packetCoreControlPlaneName); + } + /** + * The stage of the PacketCapture definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithNetworkInterfaces, + DefinitionStages.WithBytesToCapturePerPacket, + DefinitionStages.WithTotalBytesPerSession, + DefinitionStages.WithTimeLimitInSeconds { + /** + * Executes the create request. + * + * @return the created resource. + */ + PacketCapture create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PacketCapture create(Context context); + } + /** The stage of the PacketCapture definition allowing to specify networkInterfaces. */ + interface WithNetworkInterfaces { + /** + * Specifies the networkInterfaces property: List of network interfaces to capture on.. + * + * @param networkInterfaces List of network interfaces to capture on. + * @return the next definition stage. + */ + WithCreate withNetworkInterfaces(List networkInterfaces); + } + /** The stage of the PacketCapture definition allowing to specify bytesToCapturePerPacket. */ + interface WithBytesToCapturePerPacket { + /** + * Specifies the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes + * are truncated. The default "0" means the entire packet is captured.. + * + * @param bytesToCapturePerPacket Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * @return the next definition stage. + */ + WithCreate withBytesToCapturePerPacket(Long bytesToCapturePerPacket); + } + /** The stage of the PacketCapture definition allowing to specify totalBytesPerSession. */ + interface WithTotalBytesPerSession { + /** + * Specifies the totalBytesPerSession property: Maximum size of the capture output.. + * + * @param totalBytesPerSession Maximum size of the capture output. + * @return the next definition stage. + */ + WithCreate withTotalBytesPerSession(Long totalBytesPerSession); + } + /** The stage of the PacketCapture definition allowing to specify timeLimitInSeconds. */ + interface WithTimeLimitInSeconds { + /** + * Specifies the timeLimitInSeconds property: Maximum duration of the capture session in seconds.. + * + * @param timeLimitInSeconds Maximum duration of the capture session in seconds. + * @return the next definition stage. + */ + WithCreate withTimeLimitInSeconds(Integer timeLimitInSeconds); + } + } + /** + * Begins update for the PacketCapture resource. + * + * @return the stage of resource update. + */ + PacketCapture.Update update(); + + /** The template for PacketCapture update. */ + interface Update + extends UpdateStages.WithNetworkInterfaces, + UpdateStages.WithBytesToCapturePerPacket, + UpdateStages.WithTotalBytesPerSession, + UpdateStages.WithTimeLimitInSeconds { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PacketCapture apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PacketCapture apply(Context context); + } + /** The PacketCapture update stages. */ + interface UpdateStages { + /** The stage of the PacketCapture update allowing to specify networkInterfaces. */ + interface WithNetworkInterfaces { + /** + * Specifies the networkInterfaces property: List of network interfaces to capture on.. + * + * @param networkInterfaces List of network interfaces to capture on. + * @return the next definition stage. + */ + Update withNetworkInterfaces(List networkInterfaces); + } + /** The stage of the PacketCapture update allowing to specify bytesToCapturePerPacket. */ + interface WithBytesToCapturePerPacket { + /** + * Specifies the bytesToCapturePerPacket property: Number of bytes captured per packet, the remaining bytes + * are truncated. The default "0" means the entire packet is captured.. + * + * @param bytesToCapturePerPacket Number of bytes captured per packet, the remaining bytes are truncated. + * The default "0" means the entire packet is captured. + * @return the next definition stage. + */ + Update withBytesToCapturePerPacket(Long bytesToCapturePerPacket); + } + /** The stage of the PacketCapture update allowing to specify totalBytesPerSession. */ + interface WithTotalBytesPerSession { + /** + * Specifies the totalBytesPerSession property: Maximum size of the capture output.. + * + * @param totalBytesPerSession Maximum size of the capture output. + * @return the next definition stage. + */ + Update withTotalBytesPerSession(Long totalBytesPerSession); + } + /** The stage of the PacketCapture update allowing to specify timeLimitInSeconds. */ + interface WithTimeLimitInSeconds { + /** + * Specifies the timeLimitInSeconds property: Maximum duration of the capture session in seconds.. + * + * @param timeLimitInSeconds Maximum duration of the capture session in seconds. + * @return the next definition stage. + */ + Update withTimeLimitInSeconds(Integer timeLimitInSeconds); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PacketCapture refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PacketCapture refresh(Context context); + + /** + * Stop a packet capture session. + * + * @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 stop(); + + /** + * Stop a packet capture session. + * + * @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 stop(Context context); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureListResult.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureListResult.java new file mode 100644 index 000000000000..01a819aa1ecb --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureListResult.java @@ -0,0 +1,70 @@ +// 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.annotation.Fluent; +import com.azure.resourcemanager.mobilenetwork.fluent.models.PacketCaptureInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Response for packet capture API service call. */ +@Fluent +public final class PacketCaptureListResult { + /* + * A list of packet capture sessions under a packet core control plane. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of PacketCaptureListResult class. */ + public PacketCaptureListResult() { + } + + /** + * Get the value property: A list of packet capture sessions under a packet core control plane. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A list of packet capture sessions under a packet core control plane. + * + * @param value the value value to set. + * @return the PacketCaptureListResult object itself. + */ + public PacketCaptureListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureStatus.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureStatus.java new file mode 100644 index 000000000000..6eb052273b24 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptureStatus.java @@ -0,0 +1,53 @@ +// 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.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The status of the packet capture session. */ +public final class PacketCaptureStatus extends ExpandableStringEnum { + /** Static value NotStarted for PacketCaptureStatus. */ + public static final PacketCaptureStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value Running for PacketCaptureStatus. */ + public static final PacketCaptureStatus RUNNING = fromString("Running"); + + /** Static value Stopped for PacketCaptureStatus. */ + public static final PacketCaptureStatus STOPPED = fromString("Stopped"); + + /** Static value Error for PacketCaptureStatus. */ + public static final PacketCaptureStatus ERROR = fromString("Error"); + + /** + * Creates a new instance of PacketCaptureStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PacketCaptureStatus() { + } + + /** + * Creates or finds a PacketCaptureStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PacketCaptureStatus. + */ + @JsonCreator + public static PacketCaptureStatus fromString(String name) { + return fromString(name, PacketCaptureStatus.class); + } + + /** + * Gets known PacketCaptureStatus values. + * + * @return known PacketCaptureStatus values. + */ + public static Collection values() { + return values(PacketCaptureStatus.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptures.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptures.java new file mode 100644 index 000000000000..5f981700a792 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCaptures.java @@ -0,0 +1,172 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PacketCaptures. */ +public interface PacketCaptures { + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Gets information about the specified packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 information about the specified packet capture session. + */ + PacketCapture get(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Deletes the specified packet capture. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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. + */ + void delete(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 stop(String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName); + + /** + * Stop a packet capture session. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param packetCoreControlPlaneName The name of the packet core control plane. + * @param packetCaptureName The name of the packet capture session. + * @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 stop( + String resourceGroupName, String packetCoreControlPlaneName, String packetCaptureName, Context context); + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName); + + /** + * Lists all the packet capture sessions under a packet core control plane. + * + * @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 response for packet capture API service call as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPacketCoreControlPlane( + String resourceGroupName, String packetCoreControlPlaneName, Context context); + + /** + * Gets information about the specified packet capture session. + * + * @param id the resource ID. + * @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 information about the specified packet capture session along with {@link Response}. + */ + PacketCapture getById(String id); + + /** + * Gets information about the specified packet capture session. + * + * @param id the resource ID. + * @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 information about the specified packet capture session along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified packet capture. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Deletes the specified packet capture. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PacketCapture resource. + * + * @param name resource name. + * @return the first stage of the new PacketCapture definition. + */ + PacketCapture.DefinitionStages.Blank define(String name); +} 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 3ad49c143bb3..26064bf7bbe8 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 @@ -99,12 +99,19 @@ public interface PacketCoreControlPlane { CoreNetworkType coreNetworkTechnology(); /** - * Gets the version property: The version of the packet core software that is deployed. + * Gets the version property: The desired version of the packet core software. * * @return the version value. */ String version(); + /** + * Gets the installedVersion property: The currently installed version of the packet core software. + * + * @return the installedVersion value. + */ + String installedVersion(); + /** * Gets the rollbackVersion property: The previous version of the packet core software that was deployed. Used when * performing the rollback action. @@ -146,6 +153,13 @@ public interface PacketCoreControlPlane { */ LocalDiagnosticsAccessConfiguration localDiagnosticsAccess(); + /** + * Gets the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @return the diagnosticsUpload value. + */ + DiagnosticsUploadConfiguration diagnosticsUpload(); + /** * Gets the interopSettings property: Settings to allow interoperability with third party components e.g. RANs and * UEs. @@ -292,9 +306,11 @@ interface WithLocalDiagnosticsAccess { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithInstallation, DefinitionStages.WithCoreNetworkTechnology, DefinitionStages.WithVersion, DefinitionStages.WithUeMtu, + DefinitionStages.WithDiagnosticsUpload, DefinitionStages.WithInteropSettings { /** * Executes the create request. @@ -332,6 +348,16 @@ interface WithIdentity { */ WithCreate withIdentity(ManagedServiceIdentity identity); } + /** The stage of the PacketCoreControlPlane definition allowing to specify installation. */ + interface WithInstallation { + /** + * Specifies the installation property: The installation state of the packet core control plane resource.. + * + * @param installation The installation state of the packet core control plane resource. + * @return the next definition stage. + */ + WithCreate withInstallation(Installation installation); + } /** The stage of the PacketCoreControlPlane definition allowing to specify coreNetworkTechnology. */ interface WithCoreNetworkTechnology { /** @@ -346,9 +372,9 @@ interface WithCoreNetworkTechnology { /** The stage of the PacketCoreControlPlane definition allowing to specify version. */ interface WithVersion { /** - * Specifies the version property: The version of the packet core software that is deployed.. + * Specifies the version property: The desired version of the packet core software.. * - * @param version The version of the packet core software that is deployed. + * @param version The desired version of the packet core software. * @return the next definition stage. */ WithCreate withVersion(String version); @@ -367,6 +393,16 @@ interface WithUeMtu { */ WithCreate withUeMtu(Integer ueMtu); } + /** The stage of the PacketCoreControlPlane definition allowing to specify diagnosticsUpload. */ + interface WithDiagnosticsUpload { + /** + * Specifies the diagnosticsUpload property: Configuration for uploading packet core diagnostics. + * + * @param diagnosticsUpload Configuration for uploading packet core diagnostics. + * @return the next definition stage. + */ + WithCreate withDiagnosticsUpload(DiagnosticsUploadConfiguration diagnosticsUpload); + } /** The stage of the PacketCoreControlPlane definition allowing to specify interopSettings. */ interface WithInteropSettings { /** @@ -387,7 +423,7 @@ interface WithInteropSettings { PacketCoreControlPlane.Update update(); /** The template for PacketCoreControlPlane update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { /** * Executes the update request. * @@ -415,6 +451,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the PacketCoreControlPlane update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identity associated with this resource.. + * + * @param identity The managed service identity associated with this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneResourceId.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneResourceId.java new file mode 100644 index 000000000000..80ec2325b539 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneResourceId.java @@ -0,0 +1,59 @@ +// 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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Reference to an packet core control plane resource. */ +@Fluent +public final class PacketCoreControlPlaneResourceId { + /* + * Packet core control plane resource ID. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** Creates an instance of PacketCoreControlPlaneResourceId class. */ + public PacketCoreControlPlaneResourceId() { + } + + /** + * Get the id property: Packet core control plane resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Packet core control plane resource ID. + * + * @param id the id value to set. + * @return the PacketCoreControlPlaneResourceId object itself. + */ + public PacketCoreControlPlaneResourceId withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property id in model PacketCoreControlPlaneResourceId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PacketCoreControlPlaneResourceId.class); +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersions.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersions.java index b08cc547859f..f88c528dc899 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersions.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/PacketCoreControlPlaneVersions.java @@ -54,4 +54,49 @@ public interface PacketCoreControlPlaneVersions { * PagedIterable}. */ PagedIterable list(Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version along with {@link Response}. + */ + Response getBySubscriptionWithResponse(String versionName, Context context); + + /** + * Gets information about the specified packet core control plane version. + * + * @param versionName The name of the packet core control plane version. + * @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 information about the specified packet core control plane version. + */ + PacketCoreControlPlaneVersion getBySubscription(String versionName); + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listBySubscription(); + + /** + * Lists all supported packet core control planes versions. + * + * @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 response for packet core control plane version API service call as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listBySubscription(Context context); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/QosPolicy.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/QosPolicy.java index 6f4399695781..b8068397c665 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/QosPolicy.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/QosPolicy.java @@ -12,11 +12,9 @@ @Fluent public class QosPolicy { /* - * QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a - * flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) QoS Flow. The - * illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See 3GPP - * TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition of - * which are the GBR 5QI values. + * 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to be provided to a flow. + * See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the + * definition the 5QI values. */ @JsonProperty(value = "5qi") private Integer fiveQi; @@ -57,11 +55,9 @@ public QosPolicy() { } /** - * Get the fiveQi property: QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment - * to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) - * QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See - * 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition - * of which are the GBR 5QI values. + * Get the fiveQi property: 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to + * be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table + * 5.7.4-1 for the definition the 5QI values. * * @return the fiveQi value. */ @@ -70,11 +66,9 @@ public Integer fiveQi() { } /** - * Set the fiveQi property: QoS Flow 5G QoS Indicator value. The 5QI identifies a specific QoS forwarding treatment - * to be provided to a flow. This must not be a standardized 5QI value corresponding to a GBR (guaranteed bit rate) - * QoS Flow. The illegal GBR 5QI values are: 1, 2, 3, 4, 65, 66, 67, 71, 72, 73, 74, 75, 76, 82, 83, 84, and 85. See - * 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table 5.7.4-1 for the definition - * of which are the GBR 5QI values. + * Set the fiveQi property: 5G QoS Flow Indicator value. The 5QI identifies a specific QoS forwarding treatment to + * be provided to a flow. See 3GPP TS23.501 section 5.7.2.1 for a full description of the 5QI parameter, and table + * 5.7.4-1 for the definition the 5QI values. * * @param fiveQi the fiveQi value to set. * @return the QosPolicy object itself. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ReinstallRequired.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ReinstallRequired.java new file mode 100644 index 000000000000..816db9d503c6 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/ReinstallRequired.java @@ -0,0 +1,47 @@ +// 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.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Whether a reinstall of the packet core is required to pick up the latest configuration changes. */ +public final class ReinstallRequired extends ExpandableStringEnum { + /** Static value Required for ReinstallRequired. */ + public static final ReinstallRequired REQUIRED = fromString("Required"); + + /** Static value NotRequired for ReinstallRequired. */ + public static final ReinstallRequired NOT_REQUIRED = fromString("NotRequired"); + + /** + * Creates a new instance of ReinstallRequired value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReinstallRequired() { + } + + /** + * Creates or finds a ReinstallRequired from its string representation. + * + * @param name a name to look for. + * @return the corresponding ReinstallRequired. + */ + @JsonCreator + public static ReinstallRequired fromString(String name) { + return fromString(name, ReinstallRequired.class); + } + + /** + * Gets known ReinstallRequired values. + * + * @return known ReinstallRequired values. + */ + public static Collection values() { + return values(ReinstallRequired.class); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroup.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroup.java index 99b004509137..3999d406eaa0 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroup.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimGroup.java @@ -226,7 +226,7 @@ interface WithMobileNetwork { SimGroup.Update update(); /** The template for SimGroup update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { /** * Executes the update request. * @@ -254,6 +254,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the SimGroup update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identity associated with this resource.. + * + * @param identity The managed service identity associated with this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicy.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicy.java index 0ff7c6632fac..2883fde66e23 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicy.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SimPolicy.java @@ -95,7 +95,8 @@ public interface SimPolicy { Integer rfspIndex(); /** - * Gets the registrationTimer property: Interval for the UE periodic registration update procedure, in seconds. + * Gets the registrationTimer property: UE periodic registration update timer (5G) or UE periodic tracking area + * update timer (4G), in seconds. * * @return the registrationTimer value. */ @@ -264,10 +265,11 @@ interface WithRfspIndex { /** The stage of the SimPolicy definition allowing to specify registrationTimer. */ interface WithRegistrationTimer { /** - * Specifies the registrationTimer property: Interval for the UE periodic registration update procedure, in - * seconds.. + * Specifies the registrationTimer property: UE periodic registration update timer (5G) or UE periodic + * tracking area update timer (4G), in seconds.. * - * @param registrationTimer Interval for the UE periodic registration update procedure, in seconds. + * @param registrationTimer UE periodic registration update timer (5G) or UE periodic tracking area update + * timer (4G), in seconds. * @return the next definition stage. */ WithCreate withRegistrationTimer(Integer registrationTimer); diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Site.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Site.java index 03dae42be9fe..7bc7fe6064c3 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Site.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Site.java @@ -222,4 +222,25 @@ interface WithTags { * @return the refreshed resource. */ Site refresh(Context context); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param parameters Parameters supplied to delete a packet core under a site. + * @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. + */ + void deletePacketCore(SiteDeletePacketCore parameters); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param parameters Parameters supplied to delete a packet core under a site. + * @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. + */ + void deletePacketCore(SiteDeletePacketCore parameters, Context context); } diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteDeletePacketCore.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteDeletePacketCore.java new file mode 100644 index 000000000000..a8b7f891b516 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/SiteDeletePacketCore.java @@ -0,0 +1,53 @@ +// 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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The packet core to delete under a site. */ +@Fluent +public final class SiteDeletePacketCore { + /* + * Reference to an packet core control plane resource. + */ + @JsonProperty(value = "packetCore") + private PacketCoreControlPlaneResourceId packetCore; + + /** Creates an instance of SiteDeletePacketCore class. */ + public SiteDeletePacketCore() { + } + + /** + * Get the packetCore property: Reference to an packet core control plane resource. + * + * @return the packetCore value. + */ + public PacketCoreControlPlaneResourceId packetCore() { + return this.packetCore; + } + + /** + * Set the packetCore property: Reference to an packet core control plane resource. + * + * @param packetCore the packetCore value to set. + * @return the SiteDeletePacketCore object itself. + */ + public SiteDeletePacketCore withPacketCore(PacketCoreControlPlaneResourceId packetCore) { + this.packetCore = packetCore; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packetCore() != null) { + packetCore().validate(); + } + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sites.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sites.java index c5d9f52755a7..b6a7d4c50fc2 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sites.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/Sites.java @@ -90,6 +90,39 @@ Response getWithResponse( */ PagedIterable listByMobileNetwork(String resourceGroupName, String mobileNetworkName, Context context); + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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. + */ + void deletePacketCore( + String resourceGroupName, String mobileNetworkName, String siteName, SiteDeletePacketCore parameters); + + /** + * Deletes a packet core under the specified mobile network site. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param mobileNetworkName The name of the mobile network. + * @param siteName The name of the mobile network site. + * @param parameters Parameters supplied to delete a packet core under a site. + * @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. + */ + void deletePacketCore( + String resourceGroupName, + String mobileNetworkName, + String siteName, + SiteDeletePacketCore parameters, + Context context); + /** * Gets information about the specified mobile network site. * diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserAssignedIdentity.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserAssignedIdentity.java index 766a12581cfd..16a3586e1341 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserAssignedIdentity.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/models/UserAssignedIdentity.java @@ -10,7 +10,7 @@ /** User assigned identity properties. */ @Immutable -public class UserAssignedIdentity { +public final class UserAssignedIdentity { /* * The principal ID of the assigned identity. */ diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateSamples.java index 90cd6ade3bae..0d1b64ebc605 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/AttachedDataNetworksCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for AttachedDataNetworks CreateOrUpdate. */ public final class AttachedDataNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkCreate.json */ /** * Sample code: Create attached data network. 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 3812c68ffc23..682342288fc9 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 @@ -7,7 +7,7 @@ /** Samples for AttachedDataNetworks Delete. */ public final class AttachedDataNetworksDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkDelete.json */ /** * Sample code: Delete attached data network resource. 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 89b3b5369c87..28f3b15384e9 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 @@ -7,7 +7,7 @@ /** Samples for AttachedDataNetworks Get. */ public final class AttachedDataNetworksGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkGet.json */ /** * Sample code: Get attached data network. 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 466c8d50a2a3..d83096835b2f 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 @@ -7,7 +7,7 @@ /** Samples for AttachedDataNetworks ListByPacketCoreDataPlane. */ public final class AttachedDataNetworksListByPacketCoreDataPlaneSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json */ /** * Sample code: List attached data networks in a data plane. 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 6e9e8312b69c..89f0ce1b44e1 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 @@ -11,7 +11,7 @@ /** Samples for AttachedDataNetworks UpdateTags. */ public final class AttachedDataNetworksUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/AttachedDataNetworkUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/AttachedDataNetworkUpdateTags.json */ /** * Sample code: Update attached data network tags. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateSamples.java index c4be45d462dc..050ce6bb988b 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DataNetworksCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for DataNetworks CreateOrUpdate. */ public final class DataNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkCreate.json */ /** * Sample code: Create data network. 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 b55cd7c257f5..3ffdee372b11 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 @@ -7,7 +7,7 @@ /** Samples for DataNetworks Delete. */ public final class DataNetworksDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkDelete.json */ /** * Sample code: Delete data network. 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 6a5c82021e3a..bfc6ad9737f8 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 @@ -7,7 +7,7 @@ /** Samples for DataNetworks Get. */ public final class DataNetworksGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkGet.json */ /** * Sample code: Get data network. 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 95690549353f..ac0d29e517be 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 @@ -7,7 +7,7 @@ /** Samples for DataNetworks ListByMobileNetwork. */ public final class DataNetworksListByMobileNetworkSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkListByMobileNetwork.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkListByMobileNetwork.json */ /** * Sample code: List data networks in a mobile network. 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 0f70aed1e9bf..35778e0b2b3b 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 @@ -11,7 +11,7 @@ /** Samples for DataNetworks UpdateTags. */ public final class DataNetworksUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/DataNetworkUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DataNetworkUpdateTags.json */ /** * Sample code: Update data network tags. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..7fa1fcd39327 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesCreateOrUpdateSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +/** Samples for DiagnosticsPackages CreateOrUpdate. */ +public final class DiagnosticsPackagesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageCreate.json + */ + /** + * Sample code: Create diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .diagnosticsPackages() + .createOrUpdate("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteSamples.java new file mode 100644 index 000000000000..39f49bf5265f --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesDeleteSamples.java @@ -0,0 +1,20 @@ +// 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.generated; + +/** Samples for DiagnosticsPackages Delete. */ +public final class DiagnosticsPackagesDeleteSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageDelete.json + */ + /** + * Sample code: Delete diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deleteDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.diagnosticsPackages().delete("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetSamples.java new file mode 100644 index 000000000000..beae9e600a86 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesGetSamples.java @@ -0,0 +1,22 @@ +// 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.generated; + +/** Samples for DiagnosticsPackages Get. */ +public final class DiagnosticsPackagesGetSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageGet.json + */ + /** + * Sample code: Get diagnostics package. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getDiagnosticsPackage(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .diagnosticsPackages() + .getWithResponse("rg1", "TestPacketCoreCP", "dp1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneSamples.java new file mode 100644 index 000000000000..0769ce5521bc --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/DiagnosticsPackagesListByPacketCoreControlPlaneSamples.java @@ -0,0 +1,23 @@ +// 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.generated; + +/** Samples for DiagnosticsPackages ListByPacketCoreControlPlane. */ +public final class DiagnosticsPackagesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/DiagnosticsPackageListByPacketCoreControlPlane.json + */ + /** + * Sample code: List diagnostics packages under a packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listDiagnosticsPackagesUnderAPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .diagnosticsPackages() + .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/MobileNetworksCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksCreateOrUpdateSamples.java index 073674a2aa8f..def1a3895107 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/MobileNetworksCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for MobileNetworks CreateOrUpdate. */ public final class MobileNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkCreate.json */ /** * Sample code: Create mobile network. 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 fae0860206a7..9ca30f48bcb4 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 @@ -7,7 +7,7 @@ /** Samples for MobileNetworks Delete. */ public final class MobileNetworksDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkDelete.json */ /** * Sample code: Delete mobile network. 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 c19edd7bc3ae..80a1639ba7de 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 @@ -7,7 +7,7 @@ /** Samples for MobileNetworks GetByResourceGroup. */ public final class MobileNetworksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkGet.json */ /** * Sample code: Get mobile network. 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 7be54736a13b..29578636f057 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 @@ -7,7 +7,7 @@ /** Samples for MobileNetworks ListByResourceGroup. */ public final class MobileNetworksListByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListByResourceGroup.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkListByResourceGroup.json */ /** * Sample code: List mobile networks in resource group. 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 ba8db6ffb2ef..870a034e4d59 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 @@ -7,7 +7,7 @@ /** Samples for MobileNetworks List. */ public final class MobileNetworksListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkListBySubscription.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkListBySubscription.json */ /** * Sample code: List mobile networks in a subscription. 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 ed155e7eea85..5a4cb256f149 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 @@ -11,7 +11,7 @@ /** Samples for MobileNetworks UpdateTags. */ public final class MobileNetworksUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/MobileNetworkUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/MobileNetworkUpdateTags.json */ /** * Sample code: Update mobile network tags. 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 ce809526af95..2255f2d60871 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 @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/OperationList.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/OperationList.json */ /** * Sample code: Get Registration Operations. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..2e84d9c51dee --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesCreateOrUpdateSamples.java @@ -0,0 +1,35 @@ +// 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.generated; + +import java.util.Arrays; + +/** Samples for PacketCaptures CreateOrUpdate. */ +public final class PacketCapturesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureCreate.json + */ + /** + * Sample code: Create packet capture. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void createPacketCapture(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .packetCaptures() + .define("pc1") + .withExistingPacketCoreControlPlane("rg1", "TestPacketCoreCP") + .withNetworkInterfaces( + Arrays + .asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN")) + .withBytesToCapturePerPacket(10000L) + .withTotalBytesPerSession(100000L) + .withTimeLimitInSeconds(100) + .create(); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteSamples.java new file mode 100644 index 000000000000..68a5c670c0ad --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesDeleteSamples.java @@ -0,0 +1,20 @@ +// 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.generated; + +/** Samples for PacketCaptures Delete. */ +public final class PacketCapturesDeleteSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureDelete.json + */ + /** + * Sample code: Delete packet capture. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deletePacketCapture(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().delete("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetSamples.java new file mode 100644 index 000000000000..2c99d0a943de --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesGetSamples.java @@ -0,0 +1,20 @@ +// 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.generated; + +/** Samples for PacketCaptures Get. */ +public final class PacketCapturesGetSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureGet.json + */ + /** + * Sample code: Get packet capture session. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCaptureSession(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().getWithResponse("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneSamples.java new file mode 100644 index 000000000000..6a6678bd2b88 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesListByPacketCoreControlPlaneSamples.java @@ -0,0 +1,23 @@ +// 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.generated; + +/** Samples for PacketCaptures ListByPacketCoreControlPlane. */ +public final class PacketCapturesListByPacketCoreControlPlaneSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureListByPacketCoreControlPlane.json + */ + /** + * Sample code: List packet capture sessions under a packet core control plane. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void listPacketCaptureSessionsUnderAPacketCoreControlPlane( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .packetCaptures() + .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/PacketCapturesStopSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesStopSamples.java new file mode 100644 index 000000000000..49ba1afebf77 --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCapturesStopSamples.java @@ -0,0 +1,20 @@ +// 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.generated; + +/** Samples for PacketCaptures Stop. */ +public final class PacketCapturesStopSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCaptureStop.json + */ + /** + * Sample code: Stop packet capture session. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void stopPacketCaptureSession(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCaptures().stop("rg1", "TestPacketCoreCP", "pc1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionSamples.java new file mode 100644 index 000000000000..08ccd1b751bf --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetBySubscriptionSamples.java @@ -0,0 +1,23 @@ +// 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.generated; + +/** Samples for PacketCoreControlPlaneVersions GetBySubscription. */ +public final class PacketCoreControlPlaneVersionsGetBySubscriptionSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneVersionGetBySubscription.json + */ + /** + * Sample code: Get packet core control plane version by subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getPacketCoreControlPlaneVersionBySubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .packetCoreControlPlaneVersions() + .getBySubscriptionWithResponse("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/PacketCoreControlPlaneVersionsGetSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsGetSamples.java index ae17e4fbf404..7923f93a7fd8 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreControlPlaneVersions Get. */ public final class PacketCoreControlPlaneVersionsGetSamples { /* - * 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/2023-06-01/examples/PacketCoreControlPlaneVersionGet.json */ /** * Sample code: Get packet core control plane version. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionSamples.java new file mode 100644 index 000000000000..50cbd4e5123d --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlaneVersionsListBySubscriptionSamples.java @@ -0,0 +1,21 @@ +// 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.generated; + +/** Samples for PacketCoreControlPlaneVersions ListBySubscription. */ +public final class PacketCoreControlPlaneVersionsListBySubscriptionSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneVersionListBySubscription.json + */ + /** + * Sample code: Get supported packet core control plane versions by subscription. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void getSupportedPacketCoreControlPlaneVersionsBySubscription( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager.packetCoreControlPlaneVersions().listBySubscription(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 5a88c9914706..d44c5495678a 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreControlPlaneVersions List. */ public final class PacketCoreControlPlaneVersionsListSamples { /* - * 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/2023-06-01/examples/PacketCoreControlPlaneVersionList.json */ /** * Sample code: Get supported packet core control plane versions. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java index 1edc63d5432a..deb5c3f35892 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCollectDiagnosticsPackageSamples.java @@ -9,7 +9,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json */ /** * Sample code: Collect diagnostics package from packet core control plane. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCreateOrUpdateSamples.java index 91e9ecf7f8f6..8971fa5a32e8 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesCreateOrUpdateSamples.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.mobilenetwork.models.ConnectedClusterResourceId; import com.azure.resourcemanager.mobilenetwork.models.CoreNetworkType; import com.azure.resourcemanager.mobilenetwork.models.CustomLocationResourceId; +import com.azure.resourcemanager.mobilenetwork.models.DesiredInstallationState; import com.azure.resourcemanager.mobilenetwork.models.HttpsServerCertificate; +import com.azure.resourcemanager.mobilenetwork.models.Installation; import com.azure.resourcemanager.mobilenetwork.models.InterfaceProperties; import com.azure.resourcemanager.mobilenetwork.models.LocalDiagnosticsAccessConfiguration; import com.azure.resourcemanager.mobilenetwork.models.PlatformConfiguration; @@ -21,7 +23,7 @@ /** Samples for PacketCoreControlPlanes CreateOrUpdate. */ public final class PacketCoreControlPlanesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneCreate.json */ /** * Sample code: Create packet core control plane. @@ -40,22 +42,22 @@ public static void createPacketCoreControlPlane( .asList( new SiteResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"))) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"))) .withPlatform( new PlatformConfiguration() .withType(PlatformType.AKS_HCI) .withAzureStackEdgeDevice( new AzureStackEdgeDeviceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice")) .withConnectedCluster( new ConnectedClusterResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster")) .withCustomLocation( new CustomLocationResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"))) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"))) .withControlPlaneAccessInterface(new InterfaceProperties().withName("N2")) .withSku(BillingSku.G0) .withLocalDiagnosticsAccess( @@ -64,6 +66,7 @@ public static void createPacketCoreControlPlane( .withHttpsServerCertificate( new HttpsServerCertificate() .withCertificateUrl("https://contosovault.vault.azure.net/certificates/ingress"))) + .withInstallation(new Installation().withDesiredState(DesiredInstallationState.INSTALLED)) .withCoreNetworkTechnology(CoreNetworkType.FIVE_GC) .withVersion("0.2.0") .withUeMtu(1600) 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 1a28faa81c31..dbd43848c171 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreControlPlanes Delete. */ public final class PacketCoreControlPlanesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneDelete.json */ /** * Sample code: Delete packet core control plane. 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 66318db96046..2ce5ea1e2bb9 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreControlPlanes GetByResourceGroup. */ public final class PacketCoreControlPlanesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneGet.json */ /** * Sample code: Get packet core control plane. 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 efa73e764173..06daddf30ce8 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreControlPlanes ListByResourceGroup. */ public final class PacketCoreControlPlanesListByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListByResourceGroup.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneListByResourceGroup.json */ /** * Sample code: List packet core control planes in resource group. 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 4608bec0b4e8..c4b1ec3f364f 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreControlPlanes List. */ public final class PacketCoreControlPlanesListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneListBySubscription.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneListBySubscription.json */ /** * Sample code: List packet core control planes in a subscription. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java index c8e540b39ab2..1781cbd25644 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesReinstallSamples.java @@ -7,7 +7,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneReinstall.json */ /** * Sample code: Reinstall packet core control plane. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java index 9e9d196e0d00..fea0eb67a5a4 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreControlPlanesRollbackSamples.java @@ -7,7 +7,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlaneRollback.json */ /** * Sample code: Rollback packet core control plane. 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 937a1d1f346c..501cdd0bb08f 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,28 +4,41 @@ package com.azure.resourcemanager.mobilenetwork.generated; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlane; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; /** Samples for PacketCoreControlPlanes UpdateTags. */ public final class PacketCoreControlPlanesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreControlPlaneUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreControlPlanePatch.json */ /** - * Sample code: Update packet core control plane tags. + * Sample code: Patch packet core control plane. * * @param manager Entry point to MobileNetworkManager. */ - public static void updatePacketCoreControlPlaneTags( + public static void patchPacketCoreControlPlane( com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { PacketCoreControlPlane resource = manager .packetCoreControlPlanes() .getByResourceGroupWithResponse("rg1", "TestPacketCoreCP", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateSamples.java index ac90a64493ae..987cd8a401ee 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/PacketCoreDataPlanesCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for PacketCoreDataPlanes CreateOrUpdate. */ public final class PacketCoreDataPlanesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneCreate.json */ /** * Sample code: Create packet core data plane. 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 6cbe52db4372..754ccea2fe82 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreDataPlanes Delete. */ public final class PacketCoreDataPlanesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneDelete.json */ /** * Sample code: Delete packet core data plane. 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 5031bd6cb08f..a04bb3f1d959 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreDataPlanes Get. */ public final class PacketCoreDataPlanesGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneGet.json */ /** * Sample code: Get packet core data plane. 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 0888e9cef717..6f5622f5fad4 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 @@ -7,7 +7,7 @@ /** Samples for PacketCoreDataPlanes ListByPacketCoreControlPlane. */ public final class PacketCoreDataPlanesListByPacketCoreControlPlaneSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json */ /** * Sample code: List packet core data planes in a control plane. 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 eeb1254ae849..7b0ff8c96e8e 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 @@ -11,7 +11,7 @@ /** Samples for PacketCoreDataPlanes UpdateTags. */ public final class PacketCoreDataPlanesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/PacketCoreDataPlaneUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/PacketCoreDataPlaneUpdateTags.json */ /** * Sample code: Update packet core data plane tags. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateSamples.java index 730be450d8fc..f117d84ec434 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/ServicesCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ /** Samples for Services CreateOrUpdate. */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceCreate.json */ /** * Sample code: Create service. 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 0c522dfe5e9f..2d1626d86632 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 @@ -7,7 +7,7 @@ /** Samples for Services Delete. */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceDelete.json */ /** * Sample code: Delete service. 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 1316b7b95d06..8d4639557624 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 @@ -7,7 +7,7 @@ /** Samples for Services Get. */ public final class ServicesGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceGet.json */ /** * Sample code: Get service. 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 81dc8c0e9c83..84d18eec1648 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 @@ -7,7 +7,7 @@ /** Samples for Services ListByMobileNetwork. */ public final class ServicesListByMobileNetworkSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceListByMobileNetwork.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceListByMobileNetwork.json */ /** * Sample code: List services in a mobile network. 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 be3014a3876c..05590957168c 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 @@ -11,7 +11,7 @@ /** Samples for Services UpdateTags. */ public final class ServicesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/ServiceUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/ServiceUpdateTags.json */ /** * Sample code: Update service tags. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsCreateOrUpdateSamples.java index e79b82fbc31f..ae0f3009163a 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimGroupsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for SimGroups CreateOrUpdate. */ public final class SimGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupCreate.json */ /** * Sample code: Create SIM group. @@ -33,13 +33,13 @@ public static void createSIMGroup(com.azure.resourcemanager.mobilenetwork.Mobile .withType(ManagedServiceIdentityType.USER_ASSIGNED) .withUserAssignedIdentities( mapOf( - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", new UserAssignedIdentity()))) .withEncryptionKey(new KeyVaultKey().withKeyUrl("fakeTokenPlaceholder")) .withMobileNetwork( new MobileNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork")) .create(); } 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 05813ef31658..a4539ebe54e6 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 @@ -7,7 +7,7 @@ /** Samples for SimGroups Delete. */ public final class SimGroupsDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupDelete.json */ /** * Sample code: Delete SIM group. 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 a8b618848279..0d092519c481 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 @@ -7,7 +7,7 @@ /** Samples for SimGroups GetByResourceGroup. */ public final class SimGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupGet.json */ /** * Sample code: Get SIM group. 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 97efa0eda786..2df6e9fadf29 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 @@ -7,7 +7,7 @@ /** Samples for SimGroups ListByResourceGroup. */ public final class SimGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListByResourceGroup.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupListByResourceGroup.json */ /** * Sample code: List SIM groups in a resource group. 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 4e79785b9a11..d4a7da3f630d 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 @@ -7,7 +7,7 @@ /** Samples for SimGroups List. */ public final class SimGroupsListSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupListBySubscription.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupListBySubscription.json */ /** * Sample code: List SIM groups in a subscription. 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 21fcdb870ab2..15ae63214d30 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,27 +4,40 @@ package com.azure.resourcemanager.mobilenetwork.generated; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentity; +import com.azure.resourcemanager.mobilenetwork.models.ManagedServiceIdentityType; import com.azure.resourcemanager.mobilenetwork.models.SimGroup; +import com.azure.resourcemanager.mobilenetwork.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; /** Samples for SimGroups UpdateTags. */ public final class SimGroupsUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGroupUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGroupPatch.json */ /** - * Sample code: Update SIM group tags. + * Sample code: Patch SIM group. * * @param manager Entry point to MobileNetworkManager. */ - public static void updateSIMGroupTags(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + public static void patchSIMGroup(com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { SimGroup resource = manager .simGroups() .getByResourceGroupWithResponse("rg1", "testSimGroup", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity", + new UserAssignedIdentity()))) + .apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateSamples.java index a221aa32a3f2..8b356220220e 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimPoliciesCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyCreate.json */ /** * Sample code: Create SIM policy. @@ -35,7 +35,7 @@ public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.Mobil .withDefaultSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withSliceConfigurations( Arrays .asList( @@ -43,11 +43,11 @@ public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.Mobil .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withDefaultDataNetwork( new DataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) .withDataNetworkConfigurations( Arrays .asList( @@ -55,7 +55,7 @@ public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.Mobil .withDataNetwork( new DataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/dataNetworks/testdataNetwork")) .withSessionAmbr(new Ambr().withUplink("500 Mbps").withDownlink("1 Gbps")) .withFiveQi(9) .withAllocationAndRetentionPriorityLevel(9) @@ -68,7 +68,7 @@ public static void createSIMPolicy(com.azure.resourcemanager.mobilenetwork.Mobil .asList( new ServiceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"))) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/services/testService"))) .withMaximumNumberOfBufferedPackets(200))))) .withRegistrationTimer(3240) .create(); 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 dde3abd9013d..b86f7a6efb8d 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 @@ -7,7 +7,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyDelete.json */ /** * Sample code: Delete SIM policy. 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 f8d6e675d76e..dde41b191b40 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 @@ -7,7 +7,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyGet.json */ /** * Sample code: Get SIM policy. 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 a6d9a45465a0..31f8094fa230 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 @@ -7,7 +7,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyListByMobileNetwork.json */ /** * Sample code: List SIM policies in a mobile network. 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 ffd906bb331f..210e01e011b3 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 @@ -11,7 +11,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimPolicyUpdateTags.json */ /** * Sample code: Update SIM policy tags. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java index 187c8a8fd6e8..5e6cbba27dfa 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkDeleteSamples.java @@ -10,7 +10,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimBulkDelete.json */ /** * Sample code: Bulk delete SIMs from a SIM group. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java index b7afc28dbfd2..40f02272bc50 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadEncryptedSamples.java @@ -16,7 +16,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimBulkUploadEncrypted.json */ /** * Sample code: Bulk upload encrypted SIMs to a SIM group. @@ -48,7 +48,7 @@ public static void bulkUploadEncryptedSIMsToASIMGroup( .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -56,11 +56,11 @@ public static void bulkUploadEncryptedSIMsToASIMGroup( .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.1")))), @@ -73,7 +73,7 @@ public static void bulkUploadEncryptedSIMsToASIMGroup( .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -81,11 +81,11 @@ public static void bulkUploadEncryptedSIMsToASIMGroup( .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.2")))))), diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java index 078de4aee85e..d11cbcb6973e 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsBulkUploadSamples.java @@ -16,7 +16,7 @@ /** 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 + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimBulkUpload.json */ /** * Sample code: Bulk upload SIMs in a SIM group. @@ -43,7 +43,7 @@ public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenet .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -51,11 +51,11 @@ public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenet .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.1")))), @@ -69,7 +69,7 @@ public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenet .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -77,11 +77,11 @@ public static void bulkUploadSIMsInASIMGroup(com.azure.resourcemanager.mobilenet .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp( new SimStaticIpPropertiesStaticIp() .withIpv4Address("2.4.0.2")))))), diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCreateOrUpdateSamples.java index ae73a92c7e54..6d64d6274b04 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SimsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ /** Samples for Sims CreateOrUpdate. */ public final class SimsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimCreate.json */ /** * Sample code: Create SIM. @@ -34,7 +34,7 @@ public static void createSIM(com.azure.resourcemanager.mobilenetwork.MobileNetwo .withSimPolicy( new SimPolicyResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/simPolicies/MySimPolicy")) .withStaticIpConfiguration( Arrays .asList( @@ -42,11 +42,11 @@ public static void createSIM(com.azure.resourcemanager.mobilenetwork.MobileNetwo .withAttachedDataNetwork( new AttachedDataNetworkResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestAttachedDataNetwork")) .withSlice( new SliceResourceId() .withId( - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/slices/testSlice")) .withStaticIp(new SimStaticIpPropertiesStaticIp().withIpv4Address("2.4.0.1")))) .create(); } 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 884e815a7fdf..38cfb581d3cc 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 @@ -7,7 +7,7 @@ /** Samples for Sims Delete. */ public final class SimsDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimDelete.json */ /** * Sample code: Delete SIM. 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 9c6451ef932a..cf5c4c6484c3 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 @@ -7,7 +7,7 @@ /** Samples for Sims Get. */ public final class SimsGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimGet.json */ /** * Sample code: Get SIM. 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 6df1ca8fdfea..9c4f6c3fd56e 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 @@ -7,7 +7,7 @@ /** Samples for Sims ListByGroup. */ public final class SimsListByGroupSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SimListBySimGroup.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SimListBySimGroup.json */ /** * Sample code: List SIMs in a SIM group. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateSamples.java index b3b5f8fc3ad0..6141ea3ae4d4 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for Sites CreateOrUpdate. */ public final class SitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteCreate.json */ /** * Sample code: Create mobile network site. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreSamples.java new file mode 100644 index 000000000000..f1f858a8479a --- /dev/null +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SitesDeletePacketCoreSamples.java @@ -0,0 +1,35 @@ +// 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.generated; + +import com.azure.resourcemanager.mobilenetwork.models.PacketCoreControlPlaneResourceId; +import com.azure.resourcemanager.mobilenetwork.models.SiteDeletePacketCore; + +/** Samples for Sites DeletePacketCore. */ +public final class SitesDeletePacketCoreSamples { + /* + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteDeletePacketCore.json + */ + /** + * Sample code: Delete packet core in mobile network site. + * + * @param manager Entry point to MobileNetworkManager. + */ + public static void deletePacketCoreInMobileNetworkSite( + com.azure.resourcemanager.mobilenetwork.MobileNetworkManager manager) { + manager + .sites() + .deletePacketCore( + "rg1", + "testMobileNetwork", + "testSite", + new SiteDeletePacketCore() + .withPacketCore( + new PacketCoreControlPlaneResourceId() + .withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP")), + 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 98558c0a1100..a566d7c9f02a 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 @@ -7,7 +7,7 @@ /** Samples for Sites Delete. */ public final class SitesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteDelete.json */ /** * Sample code: Delete mobile network site. 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 71171d7fd917..ff7635c76cfe 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 @@ -7,7 +7,7 @@ /** Samples for Sites Get. */ public final class SitesGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteGet.json */ /** * Sample code: Get mobile network site. 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 24b43e96e2cc..5f5a74557d6e 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 @@ -7,7 +7,7 @@ /** Samples for Sites ListByMobileNetwork. */ public final class SitesListByMobileNetworkSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteListByMobileNetwork.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteListByMobileNetwork.json */ /** * Sample code: List mobile network sites in a mobile network. 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 f035026b4cd9..29750f729c6e 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 @@ -11,7 +11,7 @@ /** Samples for Sites UpdateTags. */ public final class SitesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SiteUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SiteUpdateTags.json */ /** * Sample code: Update mobile network site tags. diff --git a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateSamples.java b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateSamples.java index 0fd0a67f47d2..4c8f59072dca 100644 --- a/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateSamples.java +++ b/sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/samples/java/com/azure/resourcemanager/mobilenetwork/generated/SlicesCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Slices CreateOrUpdate. */ public final class SlicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceCreate.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceCreate.json */ /** * Sample code: Create network slice. 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 04941a317cc1..e319c610e5a8 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 @@ -7,7 +7,7 @@ /** Samples for Slices Delete. */ public final class SlicesDeleteSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceDelete.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceDelete.json */ /** * Sample code: Delete network slice. 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 cdd104547680..f7781c41e95b 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 @@ -7,7 +7,7 @@ /** Samples for Slices Get. */ public final class SlicesGetSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceGet.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceGet.json */ /** * Sample code: Get network slice. 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 cf4c6bf4763c..23596a00d233 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 @@ -7,7 +7,7 @@ /** Samples for Slices ListByMobileNetwork. */ public final class SlicesListByMobileNetworkSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceListByMobileNetwork.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceListByMobileNetwork.json */ /** * Sample code: List network slices in a mobile network. 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 2327e0805f2d..a4264d8a578c 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 @@ -11,7 +11,7 @@ /** Samples for Slices UpdateTags. */ public final class SlicesUpdateTagsSamples { /* - * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2022-11-01/examples/SliceUpdateTags.json + * x-ms-original-file: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2023-06-01/examples/SliceUpdateTags.json */ /** * Sample code: Update network slice tags.