updateByHostPoolWithResponse(
+ String resourceGroupName,
+ String hostPoolName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnection connection,
+ Context context) {
+ return updateByHostPoolWithResponseAsync(
+ resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context)
+ .block();
+ }
+
+ /**
+ * Approve or reject a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param hostPoolName The name of the host pool within the specified resource group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param connection Object containing the updated connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionWithSystemDataInner updateByHostPool(
+ String resourceGroupName,
+ String hostPoolName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnection connection) {
+ return updateByHostPoolWithResponse(
+ resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * 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 list of private endpoint connection associated with the specified storage account along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceNextSinglePageAsync(
+ 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.listByWorkspaceNext(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 list of private endpoint connection associated with the specified storage account along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceNextSinglePageAsync(
+ 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
+ .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ 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 list of private endpoint connection associated with the specified storage account along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHostPoolNextSinglePageAsync(
+ 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.listByHostPoolNext(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 list of private endpoint connection associated with the specified storage account along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHostPoolNextSinglePageAsync(
+ 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
+ .listByHostPoolNext(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/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java
new file mode 100644
index 000000000000..9c1e1c9a0ca7
--- /dev/null
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java
@@ -0,0 +1,229 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.desktopvirtualization.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.desktopvirtualization.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner;
+import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData;
+import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnections;
+
+public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections {
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class);
+
+ private final PrivateEndpointConnectionsClient innerClient;
+
+ private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager;
+
+ public PrivateEndpointConnectionsImpl(
+ PrivateEndpointConnectionsClient innerClient,
+ com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByWorkspace(
+ String resourceGroupName, String workspaceName) {
+ PagedIterable inner =
+ this.serviceClient().listByWorkspace(resourceGroupName, workspaceName);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByWorkspace(
+ String resourceGroupName, String workspaceName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager()));
+ }
+
+ public Response getByWorkspaceWithResponse(
+ String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PrivateEndpointConnectionWithSystemData getByWorkspace(
+ String resourceGroupName, String workspaceName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionWithSystemDataInner inner =
+ this.serviceClient().getByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteByWorkspaceWithResponse(
+ String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) {
+ return this
+ .serviceClient()
+ .deleteByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context);
+ }
+
+ public void deleteByWorkspace(
+ String resourceGroupName, String workspaceName, String privateEndpointConnectionName) {
+ this.serviceClient().deleteByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName);
+ }
+
+ public Response updateByWorkspaceWithResponse(
+ String resourceGroupName,
+ String workspaceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnection connection,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .updateByWorkspaceWithResponse(
+ resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PrivateEndpointConnectionWithSystemData updateByWorkspace(
+ String resourceGroupName,
+ String workspaceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnection connection) {
+ PrivateEndpointConnectionWithSystemDataInner inner =
+ this
+ .serviceClient()
+ .updateByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName, connection);
+ if (inner != null) {
+ return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByHostPool(
+ String resourceGroupName, String hostPoolName) {
+ PagedIterable inner =
+ this.serviceClient().listByHostPool(resourceGroupName, hostPoolName);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByHostPool(
+ String resourceGroupName,
+ String hostPoolName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager()));
+ }
+
+ public Response getByHostPoolWithResponse(
+ String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PrivateEndpointConnectionWithSystemData getByHostPool(
+ String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionWithSystemDataInner inner =
+ this.serviceClient().getByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteByHostPoolWithResponse(
+ String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) {
+ return this
+ .serviceClient()
+ .deleteByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context);
+ }
+
+ public void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) {
+ this.serviceClient().deleteByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName);
+ }
+
+ public Response updateByHostPoolWithResponse(
+ String resourceGroupName,
+ String hostPoolName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnection connection,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .updateByHostPoolWithResponse(
+ resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PrivateEndpointConnectionWithSystemData updateByHostPool(
+ String resourceGroupName,
+ String hostPoolName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnection connection) {
+ PrivateEndpointConnectionWithSystemDataInner inner =
+ this
+ .serviceClient()
+ .updateByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection);
+ if (inner != null) {
+ return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private PrivateEndpointConnectionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java
new file mode 100644
index 000000000000..5719a5128e9e
--- /dev/null
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.desktopvirtualization.implementation;
+
+import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource;
+import java.util.Collections;
+import java.util.List;
+
+public final class PrivateLinkResourceImpl implements PrivateLinkResource {
+ private PrivateLinkResourceInner innerObject;
+
+ private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager;
+
+ PrivateLinkResourceImpl(
+ PrivateLinkResourceInner innerObject,
+ com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String groupId() {
+ return this.innerModel().groupId();
+ }
+
+ public List requiredMembers() {
+ List inner = this.innerModel().requiredMembers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List requiredZoneNames() {
+ List inner = this.innerModel().requiredZoneNames();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public PrivateLinkResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java
new file mode 100644
index 000000000000..7900ce2c695b
--- /dev/null
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java
@@ -0,0 +1,758 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.desktopvirtualization.implementation;
+
+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.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResourceListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient {
+ /** The proxy service used to perform REST calls. */
+ private final PrivateLinkResourcesService service;
+
+ /** The service client containing this operation class. */
+ private final DesktopVirtualizationApiClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateLinkResourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateLinkResourcesClientImpl(DesktopVirtualizationApiClientImpl client) {
+ this.service =
+ RestProxy
+ .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DesktopVirtualizationApiClientPrivateLinkResources to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DesktopVirtualizatio")
+ public interface PrivateLinkResourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByWorkspace(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @QueryParam("pageSize") Integer pageSize,
+ @QueryParam("isDescending") Boolean isDescending,
+ @QueryParam("initialSkip") Integer initialSkip,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByHostPool(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("hostPoolName") String hostPoolName,
+ @QueryParam("pageSize") Integer pageSize,
+ @QueryParam("isDescending") Boolean isDescending,
+ @QueryParam("initialSkip") Integer initialSkip,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByWorkspaceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByHostPoolNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List the private link resources available for this workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of private link resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceSinglePageAsync(
+ String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) {
+ 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByWorkspace(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ pageSize,
+ isDescending,
+ initialSkip,
+ 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()));
+ }
+
+ /**
+ * List the private link resources available for this workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 list of private link resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceSinglePageAsync(
+ String resourceGroupName,
+ String workspaceName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByWorkspace(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ pageSize,
+ isDescending,
+ initialSkip,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the private link resources available for this workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of private link resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listByWorkspaceAsync(
+ String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) {
+ return new PagedFlux<>(
+ () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip),
+ nextLink -> listByWorkspaceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the private link resources available for this workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of private link resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
+ final Integer pageSize = null;
+ final Boolean isDescending = null;
+ final Integer initialSkip = null;
+ return new PagedFlux<>(
+ () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip),
+ nextLink -> listByWorkspaceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the private link resources available for this workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 list of private link resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByWorkspaceAsync(
+ String resourceGroupName,
+ String workspaceName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ return new PagedFlux<>(
+ () ->
+ listByWorkspaceSinglePageAsync(
+ resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context),
+ nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the private link resources available for this workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of private link resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) {
+ final Integer pageSize = null;
+ final Boolean isDescending = null;
+ final Integer initialSkip = null;
+ return new PagedIterable<>(
+ listByWorkspaceAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip));
+ }
+
+ /**
+ * List the private link resources available for this workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 list of private link resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByWorkspace(
+ String resourceGroupName,
+ String workspaceName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ return new PagedIterable<>(
+ listByWorkspaceAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context));
+ }
+
+ /**
+ * List the private link resources available for this hostpool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param hostPoolName The name of the host pool within the specified resource group.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of private link resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHostPoolSinglePageAsync(
+ String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) {
+ 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 (hostPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByHostPool(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ hostPoolName,
+ pageSize,
+ isDescending,
+ initialSkip,
+ 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()));
+ }
+
+ /**
+ * List the private link resources available for this hostpool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param hostPoolName The name of the host pool within the specified resource group.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 list of private link resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHostPoolSinglePageAsync(
+ String resourceGroupName,
+ String hostPoolName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ 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 (hostPoolName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByHostPool(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ hostPoolName,
+ pageSize,
+ isDescending,
+ initialSkip,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List the private link resources available for this hostpool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param hostPoolName The name of the host pool within the specified resource group.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of private link resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listByHostPoolAsync(
+ String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) {
+ return new PagedFlux<>(
+ () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip),
+ nextLink -> listByHostPoolNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the private link resources available for this hostpool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param hostPoolName The name of the host pool within the specified resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of private link resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) {
+ final Integer pageSize = null;
+ final Boolean isDescending = null;
+ final Integer initialSkip = null;
+ return new PagedFlux<>(
+ () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip),
+ nextLink -> listByHostPoolNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the private link resources available for this hostpool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param hostPoolName The name of the host pool within the specified resource group.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 list of private link resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHostPoolAsync(
+ String resourceGroupName,
+ String hostPoolName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ return new PagedFlux<>(
+ () ->
+ listByHostPoolSinglePageAsync(
+ resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context),
+ nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the private link resources available for this hostpool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param hostPoolName The name of the host pool within the specified resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of private link resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) {
+ final Integer pageSize = null;
+ final Boolean isDescending = null;
+ final Integer initialSkip = null;
+ return new PagedIterable<>(
+ listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip));
+ }
+
+ /**
+ * List the private link resources available for this hostpool.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param hostPoolName The name of the host pool within the specified resource group.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 list of private link resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByHostPool(
+ String resourceGroupName,
+ String hostPoolName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ return new PagedIterable<>(
+ listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, 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 a list of private link resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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 a list of private link resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceNextSinglePageAsync(
+ 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
+ .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ 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 a list of private link resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHostPoolNextSinglePageAsync(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.listByHostPoolNext(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 a list of private link resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHostPoolNextSinglePageAsync(
+ 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
+ .listByHostPoolNext(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/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java
new file mode 100644
index 000000000000..bf1f3ace3c3a
--- /dev/null
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.desktopvirtualization.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource;
+import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResources;
+
+public final class PrivateLinkResourcesImpl implements PrivateLinkResources {
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class);
+
+ private final PrivateLinkResourcesClient innerClient;
+
+ private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager;
+
+ public PrivateLinkResourcesImpl(
+ PrivateLinkResourcesClient innerClient,
+ com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) {
+ PagedIterable inner =
+ this.serviceClient().listByWorkspace(resourceGroupName, workspaceName);
+ return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByWorkspace(
+ String resourceGroupName,
+ String workspaceName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .listByWorkspace(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) {
+ PagedIterable inner =
+ this.serviceClient().listByHostPool(resourceGroupName, hostPoolName);
+ return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByHostPool(
+ String resourceGroupName,
+ String hostPoolName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ PagedIterable inner =
+ this
+ .serviceClient()
+ .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ }
+
+ private PrivateLinkResourcesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java
new file mode 100644
index 000000000000..61281fff0eeb
--- /dev/null
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java
@@ -0,0 +1,536 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.desktopvirtualization.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner;
+import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek;
+import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule;
+import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch;
+import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation;
+import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect;
+import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior;
+import com.azure.resourcemanager.desktopvirtualization.models.Time;
+import java.util.Collections;
+import java.util.List;
+
+public final class ScalingPlanPersonalScheduleImpl
+ implements ScalingPlanPersonalSchedule, ScalingPlanPersonalSchedule.Definition, ScalingPlanPersonalSchedule.Update {
+ private ScalingPlanPersonalScheduleInner innerObject;
+
+ private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager 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 List daysOfWeek() {
+ List inner = this.innerModel().daysOfWeek();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Time rampUpStartTime() {
+ return this.innerModel().rampUpStartTime();
+ }
+
+ public StartupBehavior rampUpAutoStartHosts() {
+ return this.innerModel().rampUpAutoStartHosts();
+ }
+
+ public SetStartVMOnConnect rampUpStartVMOnConnect() {
+ return this.innerModel().rampUpStartVMOnConnect();
+ }
+
+ public SessionHandlingOperation rampUpActionOnDisconnect() {
+ return this.innerModel().rampUpActionOnDisconnect();
+ }
+
+ public Integer rampUpMinutesToWaitOnDisconnect() {
+ return this.innerModel().rampUpMinutesToWaitOnDisconnect();
+ }
+
+ public SessionHandlingOperation rampUpActionOnLogoff() {
+ return this.innerModel().rampUpActionOnLogoff();
+ }
+
+ public Integer rampUpMinutesToWaitOnLogoff() {
+ return this.innerModel().rampUpMinutesToWaitOnLogoff();
+ }
+
+ public Time peakStartTime() {
+ return this.innerModel().peakStartTime();
+ }
+
+ public SetStartVMOnConnect peakStartVMOnConnect() {
+ return this.innerModel().peakStartVMOnConnect();
+ }
+
+ public SessionHandlingOperation peakActionOnDisconnect() {
+ return this.innerModel().peakActionOnDisconnect();
+ }
+
+ public Integer peakMinutesToWaitOnDisconnect() {
+ return this.innerModel().peakMinutesToWaitOnDisconnect();
+ }
+
+ public SessionHandlingOperation peakActionOnLogoff() {
+ return this.innerModel().peakActionOnLogoff();
+ }
+
+ public Integer peakMinutesToWaitOnLogoff() {
+ return this.innerModel().peakMinutesToWaitOnLogoff();
+ }
+
+ public Time rampDownStartTime() {
+ return this.innerModel().rampDownStartTime();
+ }
+
+ public SetStartVMOnConnect rampDownStartVMOnConnect() {
+ return this.innerModel().rampDownStartVMOnConnect();
+ }
+
+ public SessionHandlingOperation rampDownActionOnDisconnect() {
+ return this.innerModel().rampDownActionOnDisconnect();
+ }
+
+ public Integer rampDownMinutesToWaitOnDisconnect() {
+ return this.innerModel().rampDownMinutesToWaitOnDisconnect();
+ }
+
+ public SessionHandlingOperation rampDownActionOnLogoff() {
+ return this.innerModel().rampDownActionOnLogoff();
+ }
+
+ public Integer rampDownMinutesToWaitOnLogoff() {
+ return this.innerModel().rampDownMinutesToWaitOnLogoff();
+ }
+
+ public Time offPeakStartTime() {
+ return this.innerModel().offPeakStartTime();
+ }
+
+ public SetStartVMOnConnect offPeakStartVMOnConnect() {
+ return this.innerModel().offPeakStartVMOnConnect();
+ }
+
+ public SessionHandlingOperation offPeakActionOnDisconnect() {
+ return this.innerModel().offPeakActionOnDisconnect();
+ }
+
+ public Integer offPeakMinutesToWaitOnDisconnect() {
+ return this.innerModel().offPeakMinutesToWaitOnDisconnect();
+ }
+
+ public SessionHandlingOperation offPeakActionOnLogoff() {
+ return this.innerModel().offPeakActionOnLogoff();
+ }
+
+ public Integer offPeakMinutesToWaitOnLogoff() {
+ return this.innerModel().offPeakMinutesToWaitOnLogoff();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ScalingPlanPersonalScheduleInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String scalingPlanName;
+
+ private String scalingPlanScheduleName;
+
+ private ScalingPlanPersonalSchedulePatch updateScalingPlanSchedule;
+
+ public ScalingPlanPersonalScheduleImpl withExistingScalingPlan(String resourceGroupName, String scalingPlanName) {
+ this.resourceGroupName = resourceGroupName;
+ this.scalingPlanName = scalingPlanName;
+ return this;
+ }
+
+ public ScalingPlanPersonalSchedule create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScalingPlanPersonalSchedules()
+ .createWithResponse(
+ resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ScalingPlanPersonalSchedule create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScalingPlanPersonalSchedules()
+ .createWithResponse(
+ resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ScalingPlanPersonalScheduleImpl(
+ String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) {
+ this.innerObject = new ScalingPlanPersonalScheduleInner();
+ this.serviceManager = serviceManager;
+ this.scalingPlanScheduleName = name;
+ }
+
+ public ScalingPlanPersonalScheduleImpl update() {
+ this.updateScalingPlanSchedule = new ScalingPlanPersonalSchedulePatch();
+ return this;
+ }
+
+ public ScalingPlanPersonalSchedule apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScalingPlanPersonalSchedules()
+ .updateWithResponse(
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ updateScalingPlanSchedule,
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ScalingPlanPersonalSchedule apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScalingPlanPersonalSchedules()
+ .updateWithResponse(
+ resourceGroupName, scalingPlanName, scalingPlanScheduleName, updateScalingPlanSchedule, context)
+ .getValue();
+ return this;
+ }
+
+ ScalingPlanPersonalScheduleImpl(
+ ScalingPlanPersonalScheduleInner innerObject,
+ com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.scalingPlanName = Utils.getValueFromIdByName(innerObject.id(), "scalingPlans");
+ this.scalingPlanScheduleName = Utils.getValueFromIdByName(innerObject.id(), "personalSchedules");
+ }
+
+ public ScalingPlanPersonalSchedule refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScalingPlanPersonalSchedules()
+ .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ScalingPlanPersonalSchedule refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getScalingPlanPersonalSchedules()
+ .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context)
+ .getValue();
+ return this;
+ }
+
+ public ScalingPlanPersonalScheduleImpl withDaysOfWeek(List daysOfWeek) {
+ if (isInCreateMode()) {
+ this.innerModel().withDaysOfWeek(daysOfWeek);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withDaysOfWeek(daysOfWeek);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampUpStartTime(Time rampUpStartTime) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampUpStartTime(rampUpStartTime);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampUpStartTime(rampUpStartTime);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampUpAutoStartHosts(rampUpAutoStartHosts);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampUpAutoStartHosts(rampUpAutoStartHosts);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampUpStartVMOnConnect(rampUpStartVMOnConnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampUpStartVMOnConnect(rampUpStartVMOnConnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampUpActionOnDisconnect(
+ SessionHandlingOperation rampUpActionOnDisconnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampUpActionOnDisconnect(rampUpActionOnDisconnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampUpActionOnDisconnect(rampUpActionOnDisconnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampUpMinutesToWaitOnDisconnect(
+ Integer rampUpMinutesToWaitOnDisconnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampUpMinutesToWaitOnDisconnect(rampUpMinutesToWaitOnDisconnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampUpMinutesToWaitOnDisconnect(rampUpMinutesToWaitOnDisconnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampUpActionOnLogoff(rampUpActionOnLogoff);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampUpActionOnLogoff(rampUpActionOnLogoff);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampUpMinutesToWaitOnLogoff(rampUpMinutesToWaitOnLogoff);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampUpMinutesToWaitOnLogoff(rampUpMinutesToWaitOnLogoff);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withPeakStartTime(Time peakStartTime) {
+ if (isInCreateMode()) {
+ this.innerModel().withPeakStartTime(peakStartTime);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withPeakStartTime(peakStartTime);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withPeakStartVMOnConnect(peakStartVMOnConnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withPeakStartVMOnConnect(peakStartVMOnConnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withPeakActionOnDisconnect(SessionHandlingOperation peakActionOnDisconnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withPeakActionOnDisconnect(peakActionOnDisconnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withPeakActionOnDisconnect(peakActionOnDisconnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withPeakMinutesToWaitOnDisconnect(peakMinutesToWaitOnDisconnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withPeakMinutesToWaitOnDisconnect(peakMinutesToWaitOnDisconnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff) {
+ if (isInCreateMode()) {
+ this.innerModel().withPeakActionOnLogoff(peakActionOnLogoff);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withPeakActionOnLogoff(peakActionOnLogoff);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff) {
+ if (isInCreateMode()) {
+ this.innerModel().withPeakMinutesToWaitOnLogoff(peakMinutesToWaitOnLogoff);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withPeakMinutesToWaitOnLogoff(peakMinutesToWaitOnLogoff);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampDownStartTime(Time rampDownStartTime) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampDownStartTime(rampDownStartTime);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampDownStartTime(rampDownStartTime);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampDownStartVMOnConnect(rampDownStartVMOnConnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampDownStartVMOnConnect(rampDownStartVMOnConnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampDownActionOnDisconnect(
+ SessionHandlingOperation rampDownActionOnDisconnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampDownActionOnDisconnect(rampDownActionOnDisconnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampDownActionOnDisconnect(rampDownActionOnDisconnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampDownMinutesToWaitOnDisconnect(
+ Integer rampDownMinutesToWaitOnDisconnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampDownMinutesToWaitOnDisconnect(rampDownMinutesToWaitOnDisconnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampDownMinutesToWaitOnDisconnect(rampDownMinutesToWaitOnDisconnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampDownActionOnLogoff(SessionHandlingOperation rampDownActionOnLogoff) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampDownActionOnLogoff(rampDownActionOnLogoff);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampDownActionOnLogoff(rampDownActionOnLogoff);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff) {
+ if (isInCreateMode()) {
+ this.innerModel().withRampDownMinutesToWaitOnLogoff(rampDownMinutesToWaitOnLogoff);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withRampDownMinutesToWaitOnLogoff(rampDownMinutesToWaitOnLogoff);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withOffPeakStartTime(Time offPeakStartTime) {
+ if (isInCreateMode()) {
+ this.innerModel().withOffPeakStartTime(offPeakStartTime);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withOffPeakStartTime(offPeakStartTime);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withOffPeakStartVMOnConnect(offPeakStartVMOnConnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withOffPeakStartVMOnConnect(offPeakStartVMOnConnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withOffPeakActionOnDisconnect(
+ SessionHandlingOperation offPeakActionOnDisconnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withOffPeakActionOnDisconnect(offPeakActionOnDisconnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withOffPeakActionOnDisconnect(offPeakActionOnDisconnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withOffPeakMinutesToWaitOnDisconnect(
+ Integer offPeakMinutesToWaitOnDisconnect) {
+ if (isInCreateMode()) {
+ this.innerModel().withOffPeakMinutesToWaitOnDisconnect(offPeakMinutesToWaitOnDisconnect);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withOffPeakMinutesToWaitOnDisconnect(offPeakMinutesToWaitOnDisconnect);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff) {
+ if (isInCreateMode()) {
+ this.innerModel().withOffPeakActionOnLogoff(offPeakActionOnLogoff);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withOffPeakActionOnLogoff(offPeakActionOnLogoff);
+ return this;
+ }
+ }
+
+ public ScalingPlanPersonalScheduleImpl withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff) {
+ if (isInCreateMode()) {
+ this.innerModel().withOffPeakMinutesToWaitOnLogoff(offPeakMinutesToWaitOnLogoff);
+ return this;
+ } else {
+ this.updateScalingPlanSchedule.withOffPeakMinutesToWaitOnLogoff(offPeakMinutesToWaitOnLogoff);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java
new file mode 100644
index 000000000000..9003c60dcb0e
--- /dev/null
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java
@@ -0,0 +1,1197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.desktopvirtualization.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.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.desktopvirtualization.fluent.ScalingPlanPersonalSchedulesClient;
+import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner;
+import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalScheduleList;
+import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ScalingPlanPersonalSchedulesClient. */
+public final class ScalingPlanPersonalSchedulesClientImpl implements ScalingPlanPersonalSchedulesClient {
+ /** The proxy service used to perform REST calls. */
+ private final ScalingPlanPersonalSchedulesService service;
+
+ /** The service client containing this operation class. */
+ private final DesktopVirtualizationApiClientImpl client;
+
+ /**
+ * Initializes an instance of ScalingPlanPersonalSchedulesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ScalingPlanPersonalSchedulesClientImpl(DesktopVirtualizationApiClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ ScalingPlanPersonalSchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DesktopVirtualizationApiClientScalingPlanPersonalSchedules to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DesktopVirtualizatio")
+ public interface ScalingPlanPersonalSchedulesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("scalingPlanName") String scalingPlanName,
+ @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> create(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("scalingPlanName") String scalingPlanName,
+ @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName,
+ @BodyParam("application/json") ScalingPlanPersonalScheduleInner scalingPlanSchedule,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("scalingPlanName") String scalingPlanName,
+ @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("scalingPlanName") String scalingPlanName,
+ @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName,
+ @BodyParam("application/json") ScalingPlanPersonalSchedulePatch scalingPlanSchedule,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("scalingPlanName") String scalingPlanName,
+ @QueryParam("pageSize") Integer pageSize,
+ @QueryParam("isDescending") Boolean isDescending,
+ @QueryParam("initialSkip") Integer initialSkip,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 ScalingPlanPersonalSchedule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getWithResponseAsync(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ if (scalingPlanScheduleName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @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 ScalingPlanPersonalSchedule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ if (scalingPlanScheduleName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 ScalingPlanPersonalSchedule on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getAsync(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @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 ScalingPlanPersonalSchedule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) {
+ return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context).block();
+ }
+
+ /**
+ * Get a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 ScalingPlanPersonalSchedule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ScalingPlanPersonalScheduleInner get(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ return getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create or update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createWithResponseAsync(
+ String resourceGroupName,
+ String scalingPlanName,
+ String scalingPlanScheduleName,
+ ScalingPlanPersonalScheduleInner scalingPlanSchedule) {
+ 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ if (scalingPlanScheduleName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null."));
+ }
+ if (scalingPlanSchedule == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanSchedule is required and cannot be null."));
+ } else {
+ scalingPlanSchedule.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ scalingPlanSchedule,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions.
+ * @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 represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName,
+ String scalingPlanName,
+ String scalingPlanScheduleName,
+ ScalingPlanPersonalScheduleInner scalingPlanSchedule,
+ 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ if (scalingPlanScheduleName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null."));
+ }
+ if (scalingPlanSchedule == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanSchedule is required and cannot be null."));
+ } else {
+ scalingPlanSchedule.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ scalingPlanSchedule,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createAsync(
+ String resourceGroupName,
+ String scalingPlanName,
+ String scalingPlanScheduleName,
+ ScalingPlanPersonalScheduleInner scalingPlanSchedule) {
+ return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Create or update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions.
+ * @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 represents a ScalingPlanPersonalSchedule definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createWithResponse(
+ String resourceGroupName,
+ String scalingPlanName,
+ String scalingPlanScheduleName,
+ ScalingPlanPersonalScheduleInner scalingPlanSchedule,
+ Context context) {
+ return createWithResponseAsync(
+ resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context)
+ .block();
+ }
+
+ /**
+ * Create or update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a ScalingPlanPersonalSchedule definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ScalingPlanPersonalScheduleInner create(
+ String resourceGroupName,
+ String scalingPlanName,
+ String scalingPlanScheduleName,
+ ScalingPlanPersonalScheduleInner scalingPlanSchedule) {
+ return createWithResponse(
+ resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Remove a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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)
+ public Mono> deleteWithResponseAsync(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ if (scalingPlanScheduleName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Remove a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @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 scalingPlanName, String scalingPlanScheduleName, 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ if (scalingPlanScheduleName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ accept,
+ context);
+ }
+
+ /**
+ * Remove a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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)
+ public Mono deleteAsync(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ return deleteWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Remove a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context).block();
+ }
+
+ /**
+ * Remove a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 scalingPlanName, String scalingPlanScheduleName) {
+ deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE);
+ }
+
+ /**
+ * Update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String scalingPlanName,
+ String scalingPlanScheduleName,
+ ScalingPlanPersonalSchedulePatch scalingPlanSchedule) {
+ 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ if (scalingPlanScheduleName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null."));
+ }
+ if (scalingPlanSchedule != null) {
+ scalingPlanSchedule.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ scalingPlanSchedule,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions.
+ * @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 represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String scalingPlanName,
+ String scalingPlanScheduleName,
+ ScalingPlanPersonalSchedulePatch scalingPlanSchedule,
+ 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ if (scalingPlanScheduleName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null."));
+ }
+ if (scalingPlanSchedule != null) {
+ scalingPlanSchedule.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ scalingPlanScheduleName,
+ scalingPlanSchedule,
+ accept,
+ context);
+ }
+
+ /**
+ * Update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono updateAsync(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ final ScalingPlanPersonalSchedulePatch scalingPlanSchedule = null;
+ return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions.
+ * @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 represents a ScalingPlanPersonalSchedule definition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String scalingPlanName,
+ String scalingPlanScheduleName,
+ ScalingPlanPersonalSchedulePatch scalingPlanSchedule,
+ Context context) {
+ return updateWithResponseAsync(
+ resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context)
+ .block();
+ }
+
+ /**
+ * Update a ScalingPlanPersonalSchedule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param scalingPlanScheduleName The name of the ScalingPlanSchedule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a ScalingPlanPersonalSchedule definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ScalingPlanPersonalScheduleInner update(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ final ScalingPlanPersonalSchedulePatch scalingPlanSchedule = null;
+ return updateWithResponse(
+ resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * List ScalingPlanPersonalSchedules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) {
+ 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ pageSize,
+ isDescending,
+ initialSkip,
+ 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()));
+ }
+
+ /**
+ * List ScalingPlanPersonalSchedules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName,
+ String scalingPlanName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ 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 (scalingPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ scalingPlanName,
+ pageSize,
+ isDescending,
+ initialSkip,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List ScalingPlanPersonalSchedules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listAsync(
+ String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List ScalingPlanPersonalSchedules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listAsync(String resourceGroupName, String scalingPlanName) {
+ final Integer pageSize = null;
+ final Boolean isDescending = null;
+ final Integer initialSkip = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List ScalingPlanPersonalSchedules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName,
+ String scalingPlanName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List ScalingPlanPersonalSchedules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String scalingPlanName) {
+ final Integer pageSize = null;
+ final Boolean isDescending = null;
+ final Integer initialSkip = null;
+ return new PagedIterable<>(listAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip));
+ }
+
+ /**
+ * List ScalingPlanPersonalSchedules.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param scalingPlanName The name of the scaling plan.
+ * @param pageSize Number of items per page.
+ * @param isDescending Indicates whether the collection is descending.
+ * @param initialSkip Initial number of items to skip.
+ * @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 scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName,
+ String scalingPlanName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ return new PagedIterable<>(
+ listAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, 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 scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.listNext(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 scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(
+ 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
+ .listNext(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/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java
new file mode 100644
index 000000000000..2624a4702113
--- /dev/null
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.desktopvirtualization.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.desktopvirtualization.fluent.ScalingPlanPersonalSchedulesClient;
+import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner;
+import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule;
+import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedules;
+
+public final class ScalingPlanPersonalSchedulesImpl implements ScalingPlanPersonalSchedules {
+ private static final ClientLogger LOGGER = new ClientLogger(ScalingPlanPersonalSchedulesImpl.class);
+
+ private final ScalingPlanPersonalSchedulesClient innerClient;
+
+ private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager;
+
+ public ScalingPlanPersonalSchedulesImpl(
+ ScalingPlanPersonalSchedulesClient innerClient,
+ com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ScalingPlanPersonalScheduleImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ScalingPlanPersonalSchedule get(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ ScalingPlanPersonalScheduleInner inner =
+ this.serviceClient().get(resourceGroupName, scalingPlanName, scalingPlanScheduleName);
+ if (inner != null) {
+ return new ScalingPlanPersonalScheduleImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) {
+ return this
+ .serviceClient()
+ .deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context);
+ }
+
+ public void delete(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) {
+ this.serviceClient().delete(resourceGroupName, scalingPlanName, scalingPlanScheduleName);
+ }
+
+ public PagedIterable list(String resourceGroupName, String scalingPlanName) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, scalingPlanName);
+ return Utils.mapPage(inner, inner1 -> new ScalingPlanPersonalScheduleImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName,
+ String scalingPlanName,
+ Integer pageSize,
+ Boolean isDescending,
+ Integer initialSkip,
+ Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, context);
+ return Utils.mapPage(inner, inner1 -> new ScalingPlanPersonalScheduleImpl(inner1, this.manager()));
+ }
+
+ public ScalingPlanPersonalSchedule 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 scalingPlanName = Utils.getValueFromIdByName(id, "scalingPlans");
+ if (scalingPlanName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id)));
+ }
+ String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules");
+ if (scalingPlanScheduleName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, 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 scalingPlanName = Utils.getValueFromIdByName(id, "scalingPlans");
+ if (scalingPlanName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id)));
+ }
+ String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules");
+ if (scalingPlanScheduleName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, 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 scalingPlanName = Utils.getValueFromIdByName(id, "scalingPlans");
+ if (scalingPlanName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id)));
+ }
+ String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules");
+ if (scalingPlanScheduleName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE);
+ }
+
+ public Response 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 scalingPlanName = Utils.getValueFromIdByName(id, "scalingPlans");
+ if (scalingPlanName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id)));
+ }
+ String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules");
+ if (scalingPlanScheduleName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context);
+ }
+
+ private ScalingPlanPersonalSchedulesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() {
+ return this.serviceManager;
+ }
+
+ public ScalingPlanPersonalScheduleImpl define(String name) {
+ return new ScalingPlanPersonalScheduleImpl(name, this.manager());
+ }
+}
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java
index 40c3c915ac96..a8176e9298ae 100644
--- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java
@@ -8,6 +8,8 @@
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceInner;
+import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess;
import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity;
import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan;
import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku;
@@ -100,6 +102,19 @@ public Boolean cloudPcResource() {
return this.innerModel().cloudPcResource();
}
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerModel().publicNetworkAccess();
+ }
+
+ public List privateEndpointConnections() {
+ List inner = this.innerModel().privateEndpointConnections();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -287,6 +302,16 @@ public WorkspaceImpl withApplicationGroupReferences(List applicationGrou
}
}
+ public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ if (isInCreateMode()) {
+ this.innerModel().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ } else {
+ this.updateWorkspace.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+ }
+
private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java
index c4065a3b7c51..56d9578bed4f 100644
--- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java
@@ -160,11 +160,13 @@ interface Definition
DefinitionStages.WithCommandLineSetting,
DefinitionStages.WithCreate {
}
+
/** The Application definition stages. */
interface DefinitionStages {
/** The first stage of the Application definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the Application definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -176,6 +178,7 @@ interface WithParentResource {
*/
WithCommandLineSetting withExistingApplicationGroup(String resourceGroupName, String applicationGroupName);
}
+
/** The stage of the Application definition allowing to specify commandLineSetting. */
interface WithCommandLineSetting {
/**
@@ -190,6 +193,7 @@ interface WithCommandLineSetting {
*/
WithCreate withCommandLineSetting(CommandLineSetting commandLineSetting);
}
+
/**
* The stage of the Application definition which contains all the minimum required properties for the resource
* to be created, but also allows for any other optional properties to be specified.
@@ -220,6 +224,7 @@ interface WithCreate
*/
Application create(Context context);
}
+
/** The stage of the Application definition allowing to specify description. */
interface WithDescription {
/**
@@ -230,6 +235,7 @@ interface WithDescription {
*/
WithCreate withDescription(String description);
}
+
/** The stage of the Application definition allowing to specify friendlyName. */
interface WithFriendlyName {
/**
@@ -240,6 +246,7 @@ interface WithFriendlyName {
*/
WithCreate withFriendlyName(String friendlyName);
}
+
/** The stage of the Application definition allowing to specify filePath. */
interface WithFilePath {
/**
@@ -250,6 +257,7 @@ interface WithFilePath {
*/
WithCreate withFilePath(String filePath);
}
+
/** The stage of the Application definition allowing to specify msixPackageFamilyName. */
interface WithMsixPackageFamilyName {
/**
@@ -260,6 +268,7 @@ interface WithMsixPackageFamilyName {
*/
WithCreate withMsixPackageFamilyName(String msixPackageFamilyName);
}
+
/** The stage of the Application definition allowing to specify msixPackageApplicationId. */
interface WithMsixPackageApplicationId {
/**
@@ -271,6 +280,7 @@ interface WithMsixPackageApplicationId {
*/
WithCreate withMsixPackageApplicationId(String msixPackageApplicationId);
}
+
/** The stage of the Application definition allowing to specify applicationType. */
interface WithApplicationType {
/**
@@ -281,6 +291,7 @@ interface WithApplicationType {
*/
WithCreate withApplicationType(RemoteApplicationType applicationType);
}
+
/** The stage of the Application definition allowing to specify commandLineArguments. */
interface WithCommandLineArguments {
/**
@@ -291,6 +302,7 @@ interface WithCommandLineArguments {
*/
WithCreate withCommandLineArguments(String commandLineArguments);
}
+
/** The stage of the Application definition allowing to specify showInPortal. */
interface WithShowInPortal {
/**
@@ -302,6 +314,7 @@ interface WithShowInPortal {
*/
WithCreate withShowInPortal(Boolean showInPortal);
}
+
/** The stage of the Application definition allowing to specify iconPath. */
interface WithIconPath {
/**
@@ -312,6 +325,7 @@ interface WithIconPath {
*/
WithCreate withIconPath(String iconPath);
}
+
/** The stage of the Application definition allowing to specify iconIndex. */
interface WithIconIndex {
/**
@@ -323,6 +337,7 @@ interface WithIconIndex {
WithCreate withIconIndex(Integer iconIndex);
}
}
+
/**
* Begins update for the Application resource.
*
@@ -359,6 +374,7 @@ interface Update
*/
Application apply(Context context);
}
+
/** The Application update stages. */
interface UpdateStages {
/** The stage of the Application update allowing to specify tags. */
@@ -371,6 +387,7 @@ interface WithTags {
*/
Update withTags(Map tags);
}
+
/** The stage of the Application update allowing to specify description. */
interface WithDescription {
/**
@@ -381,6 +398,7 @@ interface WithDescription {
*/
Update withDescription(String description);
}
+
/** The stage of the Application update allowing to specify friendlyName. */
interface WithFriendlyName {
/**
@@ -391,6 +409,7 @@ interface WithFriendlyName {
*/
Update withFriendlyName(String friendlyName);
}
+
/** The stage of the Application update allowing to specify filePath. */
interface WithFilePath {
/**
@@ -401,6 +420,7 @@ interface WithFilePath {
*/
Update withFilePath(String filePath);
}
+
/** The stage of the Application update allowing to specify commandLineSetting. */
interface WithCommandLineSetting {
/**
@@ -415,6 +435,7 @@ interface WithCommandLineSetting {
*/
Update withCommandLineSetting(CommandLineSetting commandLineSetting);
}
+
/** The stage of the Application update allowing to specify commandLineArguments. */
interface WithCommandLineArguments {
/**
@@ -425,6 +446,7 @@ interface WithCommandLineArguments {
*/
Update withCommandLineArguments(String commandLineArguments);
}
+
/** The stage of the Application update allowing to specify showInPortal. */
interface WithShowInPortal {
/**
@@ -436,6 +458,7 @@ interface WithShowInPortal {
*/
Update withShowInPortal(Boolean showInPortal);
}
+
/** The stage of the Application update allowing to specify iconPath. */
interface WithIconPath {
/**
@@ -446,6 +469,7 @@ interface WithIconPath {
*/
Update withIconPath(String iconPath);
}
+
/** The stage of the Application update allowing to specify iconIndex. */
interface WithIconIndex {
/**
@@ -456,6 +480,7 @@ interface WithIconIndex {
*/
Update withIconIndex(Integer iconIndex);
}
+
/** The stage of the Application update allowing to specify msixPackageFamilyName. */
interface WithMsixPackageFamilyName {
/**
@@ -466,6 +491,7 @@ interface WithMsixPackageFamilyName {
*/
Update withMsixPackageFamilyName(String msixPackageFamilyName);
}
+
/** The stage of the Application update allowing to specify msixPackageApplicationId. */
interface WithMsixPackageApplicationId {
/**
@@ -477,6 +503,7 @@ interface WithMsixPackageApplicationId {
*/
Update withMsixPackageApplicationId(String msixPackageApplicationId);
}
+
/** The stage of the Application update allowing to specify applicationType. */
interface WithApplicationType {
/**
@@ -488,6 +515,7 @@ interface WithApplicationType {
Update withApplicationType(RemoteApplicationType applicationType);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroup.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroup.java
index a82821fda101..5c8769c4ada6 100644
--- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroup.java
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroup.java
@@ -152,6 +152,13 @@ public interface ApplicationGroup {
*/
Boolean cloudPcResource();
+ /**
+ * Gets the showInFeed property: Boolean representing whether the applicationGroup is show in the feed.
+ *
+ * @return the showInFeed value.
+ */
+ Boolean showInFeed();
+
/**
* Gets the region of the resource.
*
@@ -189,11 +196,13 @@ interface Definition
DefinitionStages.WithApplicationGroupType,
DefinitionStages.WithCreate {
}
+
/** The ApplicationGroup definition stages. */
interface DefinitionStages {
/** The first stage of the ApplicationGroup definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the ApplicationGroup definition allowing to specify location. */
interface WithLocation {
/**
@@ -212,6 +221,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the ApplicationGroup definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -222,6 +232,7 @@ interface WithResourceGroup {
*/
WithHostPoolArmPath withExistingResourceGroup(String resourceGroupName);
}
+
/** The stage of the ApplicationGroup definition allowing to specify hostPoolArmPath. */
interface WithHostPoolArmPath {
/**
@@ -232,6 +243,7 @@ interface WithHostPoolArmPath {
*/
WithApplicationGroupType withHostPoolArmPath(String hostPoolArmPath);
}
+
/** The stage of the ApplicationGroup definition allowing to specify applicationGroupType. */
interface WithApplicationGroupType {
/**
@@ -242,6 +254,7 @@ interface WithApplicationGroupType {
*/
WithCreate withApplicationGroupType(ApplicationGroupType applicationGroupType);
}
+
/**
* The stage of the ApplicationGroup definition which contains all the minimum required properties for the
* resource to be created, but also allows for any other optional properties to be specified.
@@ -254,7 +267,8 @@ interface WithCreate
DefinitionStages.WithSku,
DefinitionStages.WithPlan,
DefinitionStages.WithDescription,
- DefinitionStages.WithFriendlyName {
+ DefinitionStages.WithFriendlyName,
+ DefinitionStages.WithShowInFeed {
/**
* Executes the create request.
*
@@ -270,6 +284,7 @@ interface WithCreate
*/
ApplicationGroup create(Context context);
}
+
/** The stage of the ApplicationGroup definition allowing to specify tags. */
interface WithTags {
/**
@@ -280,6 +295,7 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
/** The stage of the ApplicationGroup definition allowing to specify managedBy. */
interface WithManagedBy {
/**
@@ -295,6 +311,7 @@ interface WithManagedBy {
*/
WithCreate withManagedBy(String managedBy);
}
+
/** The stage of the ApplicationGroup definition allowing to specify kind. */
interface WithKind {
/**
@@ -309,6 +326,7 @@ interface WithKind {
*/
WithCreate withKind(String kind);
}
+
/** The stage of the ApplicationGroup definition allowing to specify identity. */
interface WithIdentity {
/**
@@ -319,6 +337,7 @@ interface WithIdentity {
*/
WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity);
}
+
/** The stage of the ApplicationGroup definition allowing to specify sku. */
interface WithSku {
/**
@@ -329,6 +348,7 @@ interface WithSku {
*/
WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku);
}
+
/** The stage of the ApplicationGroup definition allowing to specify plan. */
interface WithPlan {
/**
@@ -339,6 +359,7 @@ interface WithPlan {
*/
WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan);
}
+
/** The stage of the ApplicationGroup definition allowing to specify description. */
interface WithDescription {
/**
@@ -349,6 +370,7 @@ interface WithDescription {
*/
WithCreate withDescription(String description);
}
+
/** The stage of the ApplicationGroup definition allowing to specify friendlyName. */
interface WithFriendlyName {
/**
@@ -359,7 +381,20 @@ interface WithFriendlyName {
*/
WithCreate withFriendlyName(String friendlyName);
}
+
+ /** The stage of the ApplicationGroup definition allowing to specify showInFeed. */
+ interface WithShowInFeed {
+ /**
+ * Specifies the showInFeed property: Boolean representing whether the applicationGroup is show in the
+ * feed..
+ *
+ * @param showInFeed Boolean representing whether the applicationGroup is show in the feed.
+ * @return the next definition stage.
+ */
+ WithCreate withShowInFeed(Boolean showInFeed);
+ }
}
+
/**
* Begins update for the ApplicationGroup resource.
*
@@ -368,7 +403,11 @@ interface WithFriendlyName {
ApplicationGroup.Update update();
/** The template for ApplicationGroup update. */
- interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithFriendlyName {
+ interface Update
+ extends UpdateStages.WithTags,
+ UpdateStages.WithDescription,
+ UpdateStages.WithFriendlyName,
+ UpdateStages.WithShowInFeed {
/**
* Executes the update request.
*
@@ -384,6 +423,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, Up
*/
ApplicationGroup apply(Context context);
}
+
/** The ApplicationGroup update stages. */
interface UpdateStages {
/** The stage of the ApplicationGroup update allowing to specify tags. */
@@ -396,6 +436,7 @@ interface WithTags {
*/
Update withTags(Map tags);
}
+
/** The stage of the ApplicationGroup update allowing to specify description. */
interface WithDescription {
/**
@@ -406,6 +447,7 @@ interface WithDescription {
*/
Update withDescription(String description);
}
+
/** The stage of the ApplicationGroup update allowing to specify friendlyName. */
interface WithFriendlyName {
/**
@@ -416,7 +458,20 @@ interface WithFriendlyName {
*/
Update withFriendlyName(String friendlyName);
}
+
+ /** The stage of the ApplicationGroup update allowing to specify showInFeed. */
+ interface WithShowInFeed {
+ /**
+ * Specifies the showInFeed property: Boolean representing whether the applicationGroup is show in the
+ * feed..
+ *
+ * @param showInFeed Boolean representing whether the applicationGroup is show in the feed.
+ * @return the next definition stage.
+ */
+ Update withShowInFeed(Boolean showInFeed);
+ }
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java
index 61e0c0ad0f32..015db48e8ec1 100644
--- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java
@@ -106,6 +106,29 @@ public ApplicationGroupPatch withFriendlyName(String friendlyName) {
return this;
}
+ /**
+ * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed.
+ *
+ * @return the showInFeed value.
+ */
+ public Boolean showInFeed() {
+ return this.innerProperties() == null ? null : this.innerProperties().showInFeed();
+ }
+
+ /**
+ * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed.
+ *
+ * @param showInFeed the showInFeed value to set.
+ * @return the ApplicationGroupPatch object itself.
+ */
+ public ApplicationGroupPatch withShowInFeed(Boolean showInFeed) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ApplicationGroupPatchProperties();
+ }
+ this.innerProperties().withShowInFeed(showInFeed);
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java
index 01c3b5324d2d..2e2df0ffcb0b 100644
--- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java
@@ -248,6 +248,14 @@ public interface HostPool {
*/
Boolean cloudPcResource();
+ /**
+ * Gets the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private
+ * networks, Disabled allows this resource to only be accessed via private endpoints.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ HostpoolPublicNetworkAccess publicNetworkAccess();
+
/**
* Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack
* component.
@@ -256,6 +264,14 @@ public interface HostPool {
*/
AgentUpdateProperties agentUpdate();
+ /**
+ * Gets the privateEndpointConnections property: List of private endpoint connection associated with the specified
+ * resource.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ List privateEndpointConnections();
+
/**
* Gets the region of the resource.
*
@@ -294,11 +310,13 @@ interface Definition
DefinitionStages.WithPreferredAppGroupType,
DefinitionStages.WithCreate {
}
+
/** The HostPool definition stages. */
interface DefinitionStages {
/** The first stage of the HostPool definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the HostPool definition allowing to specify location. */
interface WithLocation {
/**
@@ -317,6 +335,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the HostPool definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -327,6 +346,7 @@ interface WithResourceGroup {
*/
WithHostPoolType withExistingResourceGroup(String resourceGroupName);
}
+
/** The stage of the HostPool definition allowing to specify hostPoolType. */
interface WithHostPoolType {
/**
@@ -337,6 +357,7 @@ interface WithHostPoolType {
*/
WithLoadBalancerType withHostPoolType(HostPoolType hostPoolType);
}
+
/** The stage of the HostPool definition allowing to specify loadBalancerType. */
interface WithLoadBalancerType {
/**
@@ -347,6 +368,7 @@ interface WithLoadBalancerType {
*/
WithPreferredAppGroupType withLoadBalancerType(LoadBalancerType loadBalancerType);
}
+
/** The stage of the HostPool definition allowing to specify preferredAppGroupType. */
interface WithPreferredAppGroupType {
/**
@@ -359,6 +381,7 @@ interface WithPreferredAppGroupType {
*/
WithCreate withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType);
}
+
/**
* The stage of the HostPool definition which contains all the minimum required properties for the resource to
* be created, but also allows for any other optional properties to be specified.
@@ -384,6 +407,7 @@ interface WithCreate
DefinitionStages.WithSsoClientSecretKeyVaultPath,
DefinitionStages.WithSsoSecretType,
DefinitionStages.WithStartVMOnConnect,
+ DefinitionStages.WithPublicNetworkAccess,
DefinitionStages.WithAgentUpdate {
/**
* Executes the create request.
@@ -400,6 +424,7 @@ interface WithCreate
*/
HostPool create(Context context);
}
+
/** The stage of the HostPool definition allowing to specify tags. */
interface WithTags {
/**
@@ -410,6 +435,7 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
/** The stage of the HostPool definition allowing to specify managedBy. */
interface WithManagedBy {
/**
@@ -425,6 +451,7 @@ interface WithManagedBy {
*/
WithCreate withManagedBy(String managedBy);
}
+
/** The stage of the HostPool definition allowing to specify kind. */
interface WithKind {
/**
@@ -439,6 +466,7 @@ interface WithKind {
*/
WithCreate withKind(String kind);
}
+
/** The stage of the HostPool definition allowing to specify identity. */
interface WithIdentity {
/**
@@ -449,6 +477,7 @@ interface WithIdentity {
*/
WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity);
}
+
/** The stage of the HostPool definition allowing to specify sku. */
interface WithSku {
/**
@@ -459,6 +488,7 @@ interface WithSku {
*/
WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku);
}
+
/** The stage of the HostPool definition allowing to specify plan. */
interface WithPlan {
/**
@@ -469,6 +499,7 @@ interface WithPlan {
*/
WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan);
}
+
/** The stage of the HostPool definition allowing to specify friendlyName. */
interface WithFriendlyName {
/**
@@ -479,6 +510,7 @@ interface WithFriendlyName {
*/
WithCreate withFriendlyName(String friendlyName);
}
+
/** The stage of the HostPool definition allowing to specify description. */
interface WithDescription {
/**
@@ -489,6 +521,7 @@ interface WithDescription {
*/
WithCreate withDescription(String description);
}
+
/** The stage of the HostPool definition allowing to specify personalDesktopAssignmentType. */
interface WithPersonalDesktopAssignmentType {
/**
@@ -499,6 +532,7 @@ interface WithPersonalDesktopAssignmentType {
*/
WithCreate withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType);
}
+
/** The stage of the HostPool definition allowing to specify customRdpProperty. */
interface WithCustomRdpProperty {
/**
@@ -509,6 +543,7 @@ interface WithCustomRdpProperty {
*/
WithCreate withCustomRdpProperty(String customRdpProperty);
}
+
/** The stage of the HostPool definition allowing to specify maxSessionLimit. */
interface WithMaxSessionLimit {
/**
@@ -519,6 +554,7 @@ interface WithMaxSessionLimit {
*/
WithCreate withMaxSessionLimit(Integer maxSessionLimit);
}
+
/** The stage of the HostPool definition allowing to specify ring. */
interface WithRing {
/**
@@ -529,6 +565,7 @@ interface WithRing {
*/
WithCreate withRing(Integer ring);
}
+
/** The stage of the HostPool definition allowing to specify validationEnvironment. */
interface WithValidationEnvironment {
/**
@@ -539,6 +576,7 @@ interface WithValidationEnvironment {
*/
WithCreate withValidationEnvironment(Boolean validationEnvironment);
}
+
/** The stage of the HostPool definition allowing to specify registrationInfo. */
interface WithRegistrationInfo {
/**
@@ -549,6 +587,7 @@ interface WithRegistrationInfo {
*/
WithCreate withRegistrationInfo(RegistrationInfoInner registrationInfo);
}
+
/** The stage of the HostPool definition allowing to specify vmTemplate. */
interface WithVmTemplate {
/**
@@ -559,6 +598,7 @@ interface WithVmTemplate {
*/
WithCreate withVmTemplate(String vmTemplate);
}
+
/** The stage of the HostPool definition allowing to specify ssoadfsAuthority. */
interface WithSsoadfsAuthority {
/**
@@ -569,6 +609,7 @@ interface WithSsoadfsAuthority {
*/
WithCreate withSsoadfsAuthority(String ssoadfsAuthority);
}
+
/** The stage of the HostPool definition allowing to specify ssoClientId. */
interface WithSsoClientId {
/**
@@ -580,6 +621,7 @@ interface WithSsoClientId {
*/
WithCreate withSsoClientId(String ssoClientId);
}
+
/** The stage of the HostPool definition allowing to specify ssoClientSecretKeyVaultPath. */
interface WithSsoClientSecretKeyVaultPath {
/**
@@ -592,6 +634,7 @@ interface WithSsoClientSecretKeyVaultPath {
*/
WithCreate withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVaultPath);
}
+
/** The stage of the HostPool definition allowing to specify ssoSecretType. */
interface WithSsoSecretType {
/**
@@ -602,6 +645,7 @@ interface WithSsoSecretType {
*/
WithCreate withSsoSecretType(SsoSecretType ssoSecretType);
}
+
/** The stage of the HostPool definition allowing to specify startVMOnConnect. */
interface WithStartVMOnConnect {
/**
@@ -612,6 +656,20 @@ interface WithStartVMOnConnect {
*/
WithCreate withStartVMOnConnect(Boolean startVMOnConnect);
}
+
+ /** The stage of the HostPool definition allowing to specify publicNetworkAccess. */
+ interface WithPublicNetworkAccess {
+ /**
+ * Specifies the publicNetworkAccess property: Enabled allows this resource to be accessed from both public
+ * and private networks, Disabled allows this resource to only be accessed via private endpoints.
+ *
+ * @param publicNetworkAccess Enabled allows this resource to be accessed from both public and private
+ * networks, Disabled allows this resource to only be accessed via private endpoints.
+ * @return the next definition stage.
+ */
+ WithCreate withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess);
+ }
+
/** The stage of the HostPool definition allowing to specify agentUpdate. */
interface WithAgentUpdate {
/**
@@ -625,6 +683,7 @@ interface WithAgentUpdate {
WithCreate withAgentUpdate(AgentUpdateProperties agentUpdate);
}
}
+
/**
* Begins update for the HostPool resource.
*
@@ -651,6 +710,7 @@ interface Update
UpdateStages.WithSsoSecretType,
UpdateStages.WithPreferredAppGroupType,
UpdateStages.WithStartVMOnConnect,
+ UpdateStages.WithPublicNetworkAccess,
UpdateStages.WithAgentUpdate {
/**
* Executes the update request.
@@ -667,6 +727,7 @@ interface Update
*/
HostPool apply(Context context);
}
+
/** The HostPool update stages. */
interface UpdateStages {
/** The stage of the HostPool update allowing to specify tags. */
@@ -679,6 +740,7 @@ interface WithTags {
*/
Update withTags(Map tags);
}
+
/** The stage of the HostPool update allowing to specify friendlyName. */
interface WithFriendlyName {
/**
@@ -689,6 +751,7 @@ interface WithFriendlyName {
*/
Update withFriendlyName(String friendlyName);
}
+
/** The stage of the HostPool update allowing to specify description. */
interface WithDescription {
/**
@@ -699,6 +762,7 @@ interface WithDescription {
*/
Update withDescription(String description);
}
+
/** The stage of the HostPool update allowing to specify customRdpProperty. */
interface WithCustomRdpProperty {
/**
@@ -709,6 +773,7 @@ interface WithCustomRdpProperty {
*/
Update withCustomRdpProperty(String customRdpProperty);
}
+
/** The stage of the HostPool update allowing to specify maxSessionLimit. */
interface WithMaxSessionLimit {
/**
@@ -719,6 +784,7 @@ interface WithMaxSessionLimit {
*/
Update withMaxSessionLimit(Integer maxSessionLimit);
}
+
/** The stage of the HostPool update allowing to specify personalDesktopAssignmentType. */
interface WithPersonalDesktopAssignmentType {
/**
@@ -729,6 +795,7 @@ interface WithPersonalDesktopAssignmentType {
*/
Update withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType);
}
+
/** The stage of the HostPool update allowing to specify loadBalancerType. */
interface WithLoadBalancerType {
/**
@@ -739,6 +806,7 @@ interface WithLoadBalancerType {
*/
Update withLoadBalancerType(LoadBalancerType loadBalancerType);
}
+
/** The stage of the HostPool update allowing to specify ring. */
interface WithRing {
/**
@@ -749,6 +817,7 @@ interface WithRing {
*/
Update withRing(Integer ring);
}
+
/** The stage of the HostPool update allowing to specify validationEnvironment. */
interface WithValidationEnvironment {
/**
@@ -759,6 +828,7 @@ interface WithValidationEnvironment {
*/
Update withValidationEnvironment(Boolean validationEnvironment);
}
+
/** The stage of the HostPool update allowing to specify registrationInfo. */
interface WithRegistrationInfo {
/**
@@ -769,6 +839,7 @@ interface WithRegistrationInfo {
*/
Update withRegistrationInfo(RegistrationInfoPatch registrationInfo);
}
+
/** The stage of the HostPool update allowing to specify vmTemplate. */
interface WithVmTemplate {
/**
@@ -779,6 +850,7 @@ interface WithVmTemplate {
*/
Update withVmTemplate(String vmTemplate);
}
+
/** The stage of the HostPool update allowing to specify ssoadfsAuthority. */
interface WithSsoadfsAuthority {
/**
@@ -789,6 +861,7 @@ interface WithSsoadfsAuthority {
*/
Update withSsoadfsAuthority(String ssoadfsAuthority);
}
+
/** The stage of the HostPool update allowing to specify ssoClientId. */
interface WithSsoClientId {
/**
@@ -800,6 +873,7 @@ interface WithSsoClientId {
*/
Update withSsoClientId(String ssoClientId);
}
+
/** The stage of the HostPool update allowing to specify ssoClientSecretKeyVaultPath. */
interface WithSsoClientSecretKeyVaultPath {
/**
@@ -812,6 +886,7 @@ interface WithSsoClientSecretKeyVaultPath {
*/
Update withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVaultPath);
}
+
/** The stage of the HostPool update allowing to specify ssoSecretType. */
interface WithSsoSecretType {
/**
@@ -822,6 +897,7 @@ interface WithSsoSecretType {
*/
Update withSsoSecretType(SsoSecretType ssoSecretType);
}
+
/** The stage of the HostPool update allowing to specify preferredAppGroupType. */
interface WithPreferredAppGroupType {
/**
@@ -834,6 +910,7 @@ interface WithPreferredAppGroupType {
*/
Update withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType);
}
+
/** The stage of the HostPool update allowing to specify startVMOnConnect. */
interface WithStartVMOnConnect {
/**
@@ -844,6 +921,19 @@ interface WithStartVMOnConnect {
*/
Update withStartVMOnConnect(Boolean startVMOnConnect);
}
+
+ /** The stage of the HostPool update allowing to specify publicNetworkAccess. */
+ interface WithPublicNetworkAccess {
+ /**
+ * Specifies the publicNetworkAccess property: Enabled to allow this resource to be access from the public
+ * network.
+ *
+ * @param publicNetworkAccess Enabled to allow this resource to be access from the public network.
+ * @return the next definition stage.
+ */
+ Update withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess);
+ }
+
/** The stage of the HostPool update allowing to specify agentUpdate. */
interface WithAgentUpdate {
/**
@@ -857,6 +947,7 @@ interface WithAgentUpdate {
Update withAgentUpdate(AgentUpdatePatchProperties agentUpdate);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java
index 275d159a9302..3732c02ff16f 100644
--- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java
@@ -433,6 +433,29 @@ public HostPoolPatch withStartVMOnConnect(Boolean startVMOnConnect) {
return this;
}
+ /**
+ * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public HostpoolPublicNetworkAccess publicNetworkAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess();
+ }
+
+ /**
+ * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the HostPoolPatch object itself.
+ */
+ public HostPoolPatch withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new HostPoolPatchProperties();
+ }
+ this.innerProperties().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+
/**
* Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack
* component.
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java
index 64e474a78172..e93b31ff7770 100644
--- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java
@@ -151,6 +151,14 @@ public interface HostPoolProperties {
*/
Boolean cloudPcResource();
+ /**
+ * Gets the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private
+ * networks, Disabled allows this resource to only be accessed via private endpoints.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ HostpoolPublicNetworkAccess publicNetworkAccess();
+
/**
* Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack
* component.
@@ -159,6 +167,14 @@ public interface HostPoolProperties {
*/
AgentUpdateProperties agentUpdate();
+ /**
+ * Gets the privateEndpointConnections property: List of private endpoint connection associated with the specified
+ * resource.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ List privateEndpointConnections();
+
/**
* Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPropertiesInner object.
*
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java
new file mode 100644
index 000000000000..57801eb24489
--- /dev/null
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.desktopvirtualization.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/**
+ * Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to
+ * only be accessed via private endpoints.
+ */
+public final class HostpoolPublicNetworkAccess extends ExpandableStringEnum {
+ /** Static value Enabled for HostpoolPublicNetworkAccess. */
+ public static final HostpoolPublicNetworkAccess ENABLED = fromString("Enabled");
+
+ /** Static value Disabled for HostpoolPublicNetworkAccess. */
+ public static final HostpoolPublicNetworkAccess DISABLED = fromString("Disabled");
+
+ /** Static value EnabledForSessionHostsOnly for HostpoolPublicNetworkAccess. */
+ public static final HostpoolPublicNetworkAccess ENABLED_FOR_SESSION_HOSTS_ONLY =
+ fromString("EnabledForSessionHostsOnly");
+
+ /** Static value EnabledForClientsOnly for HostpoolPublicNetworkAccess. */
+ public static final HostpoolPublicNetworkAccess ENABLED_FOR_CLIENTS_ONLY = fromString("EnabledForClientsOnly");
+
+ /**
+ * Creates a new instance of HostpoolPublicNetworkAccess value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public HostpoolPublicNetworkAccess() {
+ }
+
+ /**
+ * Creates or finds a HostpoolPublicNetworkAccess from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding HostpoolPublicNetworkAccess.
+ */
+ @JsonCreator
+ public static HostpoolPublicNetworkAccess fromString(String name) {
+ return fromString(name, HostpoolPublicNetworkAccess.class);
+ }
+
+ /**
+ * Gets known HostpoolPublicNetworkAccess values.
+ *
+ * @return known HostpoolPublicNetworkAccess values.
+ */
+ public static Collection values() {
+ return values(HostpoolPublicNetworkAccess.class);
+ }
+}
diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java
index b156407a4abc..e86c10a6d0e5 100644
--- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java
+++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java
@@ -136,11 +136,13 @@ public interface MsixPackage {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The MsixPackage definition stages. */
interface DefinitionStages {
/** The first stage of the MsixPackage definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the MsixPackage definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -152,6 +154,7 @@ interface WithParentResource {
*/
WithCreate withExistingHostPool(String resourceGroupName, String hostPoolName);
}
+
/**
* The stage of the MsixPackage definition which contains all the minimum required properties for the resource
* to be created, but also allows for any other optional properties to be specified.
@@ -183,6 +186,7 @@ interface WithCreate
*/
MsixPackage create(Context context);
}
+
/** The stage of the MsixPackage definition allowing to specify imagePath. */
interface WithImagePath {
/**
@@ -193,6 +197,7 @@ interface WithImagePath {
*/
WithCreate withImagePath(String imagePath);
}
+
/** The stage of the MsixPackage definition allowing to specify packageName. */
interface WithPackageName {
/**
@@ -203,6 +208,7 @@ interface WithPackageName {
*/
WithCreate withPackageName(String packageName);
}
+
/** The stage of the MsixPackage definition allowing to specify packageFamilyName. */
interface WithPackageFamilyName {
/**
@@ -215,6 +221,7 @@ interface WithPackageFamilyName {
*/
WithCreate withPackageFamilyName(String packageFamilyName);
}
+
/** The stage of the MsixPackage definition allowing to specify displayName. */
interface WithDisplayName {
/**
@@ -225,6 +232,7 @@ interface WithDisplayName {
*/
WithCreate withDisplayName(String displayName);
}
+
/** The stage of the MsixPackage definition allowing to specify packageRelativePath. */
interface WithPackageRelativePath {
/**
@@ -235,6 +243,7 @@ interface WithPackageRelativePath {
*/
WithCreate withPackageRelativePath(String packageRelativePath);
}
+
/** The stage of the MsixPackage definition allowing to specify isRegularRegistration. */
interface WithIsRegularRegistration {
/**
@@ -245,6 +254,7 @@ interface WithIsRegularRegistration {
*/
WithCreate withIsRegularRegistration(Boolean isRegularRegistration);
}
+
/** The stage of the MsixPackage definition allowing to specify isActive. */
interface WithIsActive {
/**
@@ -255,6 +265,7 @@ interface WithIsActive {
*/
WithCreate withIsActive(Boolean isActive);
}
+
/** The stage of the MsixPackage definition allowing to specify packageDependencies. */
interface WithPackageDependencies {
/**
@@ -265,6 +276,7 @@ interface WithPackageDependencies {
*/
WithCreate withPackageDependencies(List packageDependencies);
}
+
/** The stage of the MsixPackage definition allowing to specify version. */
interface WithVersion {
/**
@@ -275,6 +287,7 @@ interface WithVersion {
*/
WithCreate withVersion(String version);
}
+
/** The stage of the MsixPackage definition allowing to specify lastUpdated. */
interface WithLastUpdated {
/**
@@ -285,6 +298,7 @@ interface WithLastUpdated {
*/
WithCreate withLastUpdated(OffsetDateTime lastUpdated);
}
+
/** The stage of the MsixPackage definition allowing to specify packageApplications. */
interface WithPackageApplications {
/**
@@ -296,6 +310,7 @@ interface WithPackageApplications {
WithCreate withPackageApplications(List