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