diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md
index d56bf5bf99e98..37b02ace175f5 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-09-15)
+- Azure Resource Manager WebPubSub client library for Java. This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2021-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-07-09)
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md
index e089e46a7680e..2935dd01c54b1 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager WebPubSub client library for Java.
-This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2021-06-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2021-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-webpubsub
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
-[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md)
## Troubleshooting
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml b/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml
index 09e20f8d4c760..287d0ecbcf286 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml
@@ -13,7 +13,7 @@
jar
Microsoft Azure SDK for WebPubSub Management
- This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package tag package-2021-06-01-preview.
+ This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package tag package-2021-10-01.
https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/WebPubSubManager.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/WebPubSubManager.java
index 22b9b86989ddc..4c994bcb2a56f 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/WebPubSubManager.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/WebPubSubManager.java
@@ -23,6 +23,8 @@
import com.azure.resourcemanager.webpubsub.fluent.WebPubSubManagementClient;
import com.azure.resourcemanager.webpubsub.implementation.OperationsImpl;
import com.azure.resourcemanager.webpubsub.implementation.UsagesImpl;
+import com.azure.resourcemanager.webpubsub.implementation.WebPubSubEventHandlersImpl;
+import com.azure.resourcemanager.webpubsub.implementation.WebPubSubHubsImpl;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubManagementClientBuilder;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateEndpointConnectionsImpl;
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateLinkResourcesImpl;
@@ -30,6 +32,8 @@
import com.azure.resourcemanager.webpubsub.implementation.WebPubSubsImpl;
import com.azure.resourcemanager.webpubsub.models.Operations;
import com.azure.resourcemanager.webpubsub.models.Usages;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubEventHandlers;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubHubs;
import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateEndpointConnections;
import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateLinkResources;
import com.azure.resourcemanager.webpubsub.models.WebPubSubSharedPrivateLinkResources;
@@ -48,6 +52,10 @@ public final class WebPubSubManager {
private Usages usages;
+ private WebPubSubHubs webPubSubHubs;
+
+ private WebPubSubEventHandlers webPubSubEventHandlers;
+
private WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections;
private WebPubSubPrivateLinkResources webPubSubPrivateLinkResources;
@@ -253,6 +261,23 @@ public Usages usages() {
return usages;
}
+ /** @return Resource collection API of WebPubSubHubs. */
+ public WebPubSubHubs webPubSubHubs() {
+ if (this.webPubSubHubs == null) {
+ this.webPubSubHubs = new WebPubSubHubsImpl(clientObject.getWebPubSubHubs(), this);
+ }
+ return webPubSubHubs;
+ }
+
+ /** @return Resource collection API of WebPubSubEventHandlers. */
+ public WebPubSubEventHandlers webPubSubEventHandlers() {
+ if (this.webPubSubEventHandlers == null) {
+ this.webPubSubEventHandlers =
+ new WebPubSubEventHandlersImpl(clientObject.getWebPubSubEventHandlers(), this);
+ }
+ return webPubSubEventHandlers;
+ }
+
/** @return Resource collection API of WebPubSubPrivateEndpointConnections. */
public WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections() {
if (this.webPubSubPrivateEndpointConnections == null) {
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubEventHandlersClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubEventHandlersClient.java
new file mode 100644
index 0000000000000..6cd5dad2d9f69
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubEventHandlersClient.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.webpubsub.fluent.models.EventHandlerInner;
+
+/** An instance of this class provides access to all the operations defined in WebPubSubEventHandlersClient. */
+public interface WebPubSubEventHandlersClient {
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String hubName, String resourceGroupName, String resourceName);
+
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String hubName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, EventHandlerInner> beginCreateOrUpdate(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters);
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, EventHandlerInner> beginCreateOrUpdate(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters,
+ Context context);
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventHandlerInner createOrUpdate(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters);
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventHandlerInner createOrUpdate(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters,
+ Context context);
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName);
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String hubName, String eventHandlerName, String resourceGroupName, String resourceName);
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventHandlerInner get(String hubName, String eventHandlerName, String resourceGroupName, String resourceName);
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context);
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubHubsClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubHubsClient.java
new file mode 100644
index 0000000000000..356dcf0cf1027
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubHubsClient.java
@@ -0,0 +1,209 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner;
+
+/** An instance of this class provides access to all the operations defined in WebPubSubHubsClient. */
+public interface WebPubSubHubsClient {
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String resourceName);
+
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, WebPubSubHubInner> beginCreateOrUpdate(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters);
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, WebPubSubHubInner> beginCreateOrUpdate(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context);
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WebPubSubHubInner createOrUpdate(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters);
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WebPubSubHubInner createOrUpdate(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context);
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String hubName, String resourceGroupName, String resourceName);
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String hubName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String hubName, String resourceGroupName, String resourceName);
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String hubName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WebPubSubHubInner get(String hubName, String resourceGroupName, String resourceName);
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String hubName, String resourceGroupName, String resourceName, Context context);
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubManagementClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubManagementClient.java
index 0f8b665fe69f2..a16cc06196b4e 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubManagementClient.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubManagementClient.java
@@ -66,6 +66,20 @@ public interface WebPubSubManagementClient {
*/
UsagesClient getUsages();
+ /**
+ * Gets the WebPubSubHubsClient object to access its operations.
+ *
+ * @return the WebPubSubHubsClient object.
+ */
+ WebPubSubHubsClient getWebPubSubHubs();
+
+ /**
+ * Gets the WebPubSubEventHandlersClient object to access its operations.
+ *
+ * @return the WebPubSubEventHandlersClient object.
+ */
+ WebPubSubEventHandlersClient getWebPubSubEventHandlers();
+
/**
* Gets the WebPubSubPrivateEndpointConnectionsClient object to access its operations.
*
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubsClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubsClient.java
index 7992f1cbeea3c..866f0b49ab707 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubsClient.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubsClient.java
@@ -12,6 +12,7 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.webpubsub.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner;
import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubKeysInner;
import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubResourceInner;
import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters;
@@ -462,4 +463,33 @@ WebPubSubKeysInner regenerateKey(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void restart(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SkuListInner listSkus(String resourceGroupName, String resourceName);
+
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context);
}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/EventHandlerInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/EventHandlerInner.java
new file mode 100644
index 0000000000000..271d2b4cfb6b2
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/EventHandlerInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.webpubsub.models.EventHandlerProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An event handler. */
+@Fluent
+public final class EventHandlerInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHandlerInner.class);
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Properties of the event handler.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private EventHandlerProperties properties;
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the properties property: Properties of the event handler.
+ *
+ * @return the properties value.
+ */
+ public EventHandlerProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the event handler.
+ *
+ * @param properties the properties value to set.
+ * @return the EventHandlerInner object itself.
+ */
+ public EventHandlerInner withProperties(EventHandlerProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property properties in model EventHandlerInner"));
+ } else {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateEndpointConnectionInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateEndpointConnectionInner.java
index c291e17adda77..0aedb2d8f5324 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateEndpointConnectionInner.java
@@ -14,6 +14,7 @@
import com.azure.resourcemanager.webpubsub.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
/** A private endpoint connection to an azure resource. */
@JsonFlatten
@@ -39,6 +40,12 @@ public class PrivateEndpointConnectionInner extends ProxyResource {
@JsonProperty(value = "properties.privateEndpoint")
private PrivateEndpoint privateEndpoint;
+ /*
+ * Group IDs
+ */
+ @JsonProperty(value = "properties.groupIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List groupIds;
+
/*
* Connection state
*/
@@ -83,6 +90,15 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat
return this;
}
+ /**
+ * Get the groupIds property: Group IDs.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
/**
* Get the privateLinkServiceConnectionState property: Connection state.
*
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SkuListInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SkuListInner.java
new file mode 100644
index 0000000000000..813099f28052b
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SkuListInner.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.webpubsub.models.Sku;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The list skus operation response. */
+@Immutable
+public final class SkuListInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuListInner.class);
+
+ /*
+ * The list of skus available for the resource.
+ */
+ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
+ private List value;
+
+ /*
+ * The URL the client should use to fetch the next page (per server side
+ * paging).
+ * It's null for now, added for future use.
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /**
+ * Get the value property: The list of skus available for the resource.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's
+ * null for now, added for future use.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubHubInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubHubInner.java
new file mode 100644
index 0000000000000..b215c9b9132f9
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubHubInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A hub setting. */
+@Fluent
+public final class WebPubSubHubInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubHubInner.class);
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Properties of the hub setting.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private WebPubSubHubProperties properties;
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the properties property: Properties of the hub setting.
+ *
+ * @return the properties value.
+ */
+ public WebPubSubHubProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the hub setting.
+ *
+ * @param properties the properties value to set.
+ * @return the WebPubSubHubInner object itself.
+ */
+ public WebPubSubHubInner withProperties(WebPubSubHubProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property properties in model WebPubSubHubInner"));
+ } else {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubResourceInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubResourceInner.java
index b6598cb0cd44e..15e93fc1ee76f 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubResourceInner.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubResourceInner.java
@@ -9,10 +9,10 @@
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.webpubsub.models.DiagnosticConfiguration;
-import com.azure.resourcemanager.webpubsub.models.EventHandlerSettings;
+import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration;
import com.azure.resourcemanager.webpubsub.models.ManagedIdentity;
import com.azure.resourcemanager.webpubsub.models.ProvisioningState;
+import com.azure.resourcemanager.webpubsub.models.ResourceLogConfiguration;
import com.azure.resourcemanager.webpubsub.models.ResourceSku;
import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs;
import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings;
@@ -103,17 +103,20 @@ public class WebPubSubResourceInner extends Resource {
private WebPubSubTlsSettings tls;
/*
- * Diagnostic configuration of a Microsoft.SignalRService resource. Used
- * together with Azure monitor DiagnosticSettings.
+ * Live trace configuration of a Microsoft.SignalRService resource.
*/
- @JsonProperty(value = "properties.diagnosticConfiguration")
- private DiagnosticConfiguration diagnosticConfiguration;
+ @JsonProperty(value = "properties.liveTraceConfiguration")
+ private LiveTraceConfiguration liveTraceConfiguration;
/*
- * The settings for event handler in webpubsub service.
+ * Resource log configuration of a Microsoft.SignalRService resource.
+ * If resourceLogConfiguration isn't null or empty, it will override
+ * options "EnableConnectivityLog" and "EnableMessagingLogs" in features.
+ * Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs"
+ * in features.
*/
- @JsonProperty(value = "properties.eventHandler")
- private EventHandlerSettings eventHandler;
+ @JsonProperty(value = "properties.resourceLogConfiguration")
+ private ResourceLogConfiguration resourceLogConfiguration;
/*
* Network ACLs
@@ -290,44 +293,48 @@ public WebPubSubResourceInner withTls(WebPubSubTlsSettings tls) {
}
/**
- * Get the diagnosticConfiguration property: Diagnostic configuration of a Microsoft.SignalRService resource. Used
- * together with Azure monitor DiagnosticSettings.
+ * Get the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService resource.
*
- * @return the diagnosticConfiguration value.
+ * @return the liveTraceConfiguration value.
*/
- public DiagnosticConfiguration diagnosticConfiguration() {
- return this.diagnosticConfiguration;
+ public LiveTraceConfiguration liveTraceConfiguration() {
+ return this.liveTraceConfiguration;
}
/**
- * Set the diagnosticConfiguration property: Diagnostic configuration of a Microsoft.SignalRService resource. Used
- * together with Azure monitor DiagnosticSettings.
+ * Set the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService resource.
*
- * @param diagnosticConfiguration the diagnosticConfiguration value to set.
+ * @param liveTraceConfiguration the liveTraceConfiguration value to set.
* @return the WebPubSubResourceInner object itself.
*/
- public WebPubSubResourceInner withDiagnosticConfiguration(DiagnosticConfiguration diagnosticConfiguration) {
- this.diagnosticConfiguration = diagnosticConfiguration;
+ public WebPubSubResourceInner withLiveTraceConfiguration(LiveTraceConfiguration liveTraceConfiguration) {
+ this.liveTraceConfiguration = liveTraceConfiguration;
return this;
}
/**
- * Get the eventHandler property: The settings for event handler in webpubsub service.
+ * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If
+ * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and
+ * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in
+ * features.
*
- * @return the eventHandler value.
+ * @return the resourceLogConfiguration value.
*/
- public EventHandlerSettings eventHandler() {
- return this.eventHandler;
+ public ResourceLogConfiguration resourceLogConfiguration() {
+ return this.resourceLogConfiguration;
}
/**
- * Set the eventHandler property: The settings for event handler in webpubsub service.
+ * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If
+ * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and
+ * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in
+ * features.
*
- * @param eventHandler the eventHandler value to set.
+ * @param resourceLogConfiguration the resourceLogConfiguration value to set.
* @return the WebPubSubResourceInner object itself.
*/
- public WebPubSubResourceInner withEventHandler(EventHandlerSettings eventHandler) {
- this.eventHandler = eventHandler;
+ public WebPubSubResourceInner withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration) {
+ this.resourceLogConfiguration = resourceLogConfiguration;
return this;
}
@@ -454,11 +461,11 @@ public void validate() {
if (tls() != null) {
tls().validate();
}
- if (diagnosticConfiguration() != null) {
- diagnosticConfiguration().validate();
+ if (liveTraceConfiguration() != null) {
+ liveTraceConfiguration().validate();
}
- if (eventHandler() != null) {
- eventHandler().validate();
+ if (resourceLogConfiguration() != null) {
+ resourceLogConfiguration().validate();
}
if (networkACLs() != null) {
networkACLs().validate();
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/EventHandlerImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/EventHandlerImpl.java
new file mode 100644
index 0000000000000..6277f3cd51eae
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/EventHandlerImpl.java
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.webpubsub.fluent.models.EventHandlerInner;
+import com.azure.resourcemanager.webpubsub.models.EventHandler;
+import com.azure.resourcemanager.webpubsub.models.EventHandlerProperties;
+
+public final class EventHandlerImpl implements EventHandler, EventHandler.Definition, EventHandler.Update {
+ private EventHandlerInner innerObject;
+
+ private final com.azure.resourcemanager.webpubsub.WebPubSubManager 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 EventHandlerProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public EventHandlerInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() {
+ return this.serviceManager;
+ }
+
+ private String hubName;
+
+ private String eventHandlerName;
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ public EventHandlerImpl withExistingHub(String hubName, String resourceGroupName, String resourceName) {
+ this.hubName = hubName;
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ public EventHandler create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWebPubSubEventHandlers()
+ .createOrUpdate(
+ hubName, eventHandlerName, resourceGroupName, resourceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public EventHandler create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWebPubSubEventHandlers()
+ .createOrUpdate(hubName, eventHandlerName, resourceGroupName, resourceName, this.innerModel(), context);
+ return this;
+ }
+
+ EventHandlerImpl(String name, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) {
+ this.innerObject = new EventHandlerInner();
+ this.serviceManager = serviceManager;
+ this.eventHandlerName = name;
+ }
+
+ public EventHandlerImpl update() {
+ return this;
+ }
+
+ public EventHandler apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWebPubSubEventHandlers()
+ .createOrUpdate(
+ hubName, eventHandlerName, resourceGroupName, resourceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public EventHandler apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWebPubSubEventHandlers()
+ .createOrUpdate(hubName, eventHandlerName, resourceGroupName, resourceName, this.innerModel(), context);
+ return this;
+ }
+
+ EventHandlerImpl(
+ EventHandlerInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.hubName = Utils.getValueFromIdByName(innerObject.id(), "hubs");
+ this.eventHandlerName = Utils.getValueFromIdByName(innerObject.id(), "eventHandlers");
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "webPubSub");
+ }
+
+ public EventHandlerImpl withProperties(EventHandlerProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateEndpointConnectionImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateEndpointConnectionImpl.java
index 84e224a344aad..6012837566a03 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateEndpointConnectionImpl.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateEndpointConnectionImpl.java
@@ -10,6 +10,8 @@
import com.azure.resourcemanager.webpubsub.models.PrivateEndpointConnection;
import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState;
import com.azure.resourcemanager.webpubsub.models.ProvisioningState;
+import java.util.Collections;
+import java.util.List;
public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection {
private PrivateEndpointConnectionInner innerObject;
@@ -47,6 +49,15 @@ public PrivateEndpoint privateEndpoint() {
return this.innerModel().privateEndpoint();
}
+ public List groupIds() {
+ List inner = this.innerModel().groupIds();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
return this.innerModel().privateLinkServiceConnectionState();
}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SkuListImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SkuListImpl.java
new file mode 100644
index 0000000000000..4fbe13dceab76
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SkuListImpl.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.implementation;
+
+import com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner;
+import com.azure.resourcemanager.webpubsub.models.Sku;
+import com.azure.resourcemanager.webpubsub.models.SkuList;
+import java.util.Collections;
+import java.util.List;
+
+public final class SkuListImpl implements SkuList {
+ private SkuListInner innerObject;
+
+ private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager;
+
+ SkuListImpl(SkuListInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String nextLink() {
+ return this.innerModel().nextLink();
+ }
+
+ public SkuListInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubEventHandlersClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubEventHandlersClientImpl.java
new file mode 100644
index 0000000000000..d7dd0b107be04
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubEventHandlersClientImpl.java
@@ -0,0 +1,1248 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.webpubsub.fluent.WebPubSubEventHandlersClient;
+import com.azure.resourcemanager.webpubsub.fluent.models.EventHandlerInner;
+import com.azure.resourcemanager.webpubsub.models.EventHandlerList;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in WebPubSubEventHandlersClient. */
+public final class WebPubSubEventHandlersClientImpl implements WebPubSubEventHandlersClient {
+ private final ClientLogger logger = new ClientLogger(WebPubSubEventHandlersClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final WebPubSubEventHandlersService service;
+
+ /** The service client containing this operation class. */
+ private final WebPubSubManagementClientImpl client;
+
+ /**
+ * Initializes an instance of WebPubSubEventHandlersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ WebPubSubEventHandlersClientImpl(WebPubSubManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(WebPubSubEventHandlersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for WebPubSubManagementClientWebPubSubEventHandlers to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "WebPubSubManagementC")
+ private interface WebPubSubEventHandlersService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/hubs/{hubName}/eventHandlers")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("hubName") String hubName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/hubs/{hubName}/eventHandlers/{eventHandlerName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("hubName") String hubName,
+ @PathParam("eventHandlerName") String eventHandlerName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @BodyParam("application/json") EventHandlerInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/hubs/{hubName}/eventHandlers/{eventHandlerName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("hubName") String hubName,
+ @PathParam("eventHandlerName") String eventHandlerName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/hubs/{hubName}/eventHandlers/eventHandlerName")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("hubName") String hubName,
+ @QueryParam("eventHandlerName") String eventHandlerName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @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);
+ }
+
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String hubName, String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ hubName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ 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 event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ hubName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String hubName, String resourceGroupName, String resourceName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(hubName, resourceGroupName, resourceName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(hubName, resourceGroupName, resourceName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String hubName, String resourceGroupName, String resourceName) {
+ return new PagedIterable<>(listAsync(hubName, resourceGroupName, resourceName));
+ }
+
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ return new PagedIterable<>(listAsync(hubName, resourceGroupName, resourceName, context));
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null."));
+ }
+ if (eventHandlerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventHandlerName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ hubName,
+ eventHandlerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @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 an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null."));
+ }
+ if (eventHandlerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventHandlerName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ hubName,
+ eventHandlerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, EventHandlerInner> beginCreateOrUpdateAsync(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(hubName, eventHandlerName, resourceGroupName, resourceName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), EventHandlerInner.class, EventHandlerInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @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 an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, EventHandlerInner> beginCreateOrUpdateAsync(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ hubName, eventHandlerName, resourceGroupName, resourceName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), EventHandlerInner.class, EventHandlerInner.class, context);
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, EventHandlerInner> beginCreateOrUpdate(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters) {
+ return beginCreateOrUpdateAsync(hubName, eventHandlerName, resourceGroupName, resourceName, parameters)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @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 an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, EventHandlerInner> beginCreateOrUpdate(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(hubName, eventHandlerName, resourceGroupName, resourceName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters) {
+ return beginCreateOrUpdateAsync(hubName, eventHandlerName, resourceGroupName, resourceName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @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 an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(hubName, eventHandlerName, resourceGroupName, resourceName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EventHandlerInner createOrUpdate(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters) {
+ return createOrUpdateAsync(hubName, eventHandlerName, resourceGroupName, resourceName, parameters).block();
+ }
+
+ /**
+ * Create or update an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of EventHandler and its properties.
+ * @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 an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EventHandlerInner createOrUpdate(
+ String hubName,
+ String eventHandlerName,
+ String resourceGroupName,
+ String resourceName,
+ EventHandlerInner parameters,
+ Context context) {
+ return createOrUpdateAsync(hubName, eventHandlerName, resourceGroupName, resourceName, parameters, context)
+ .block();
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null."));
+ }
+ if (eventHandlerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventHandlerName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ hubName,
+ eventHandlerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null."));
+ }
+ if (eventHandlerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventHandlerName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ hubName,
+ eventHandlerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ Mono>> mono =
+ deleteWithResponseAsync(hubName, eventHandlerName, resourceGroupName, resourceName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(hubName, eventHandlerName, resourceGroupName, resourceName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ return beginDeleteAsync(hubName, eventHandlerName, resourceGroupName, resourceName).getSyncPoller();
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ return beginDeleteAsync(hubName, eventHandlerName, resourceGroupName, resourceName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ return beginDeleteAsync(hubName, eventHandlerName, resourceGroupName, resourceName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ return beginDeleteAsync(hubName, eventHandlerName, resourceGroupName, resourceName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ deleteAsync(hubName, eventHandlerName, resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ deleteAsync(hubName, eventHandlerName, resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null."));
+ }
+ if (eventHandlerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventHandlerName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ hubName,
+ eventHandlerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null."));
+ }
+ if (eventHandlerName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter eventHandlerName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ hubName,
+ eventHandlerName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ return getWithResponseAsync(hubName, eventHandlerName, resourceGroupName, resourceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EventHandlerInner get(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ return getAsync(hubName, eventHandlerName, resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ return getWithResponseAsync(hubName, eventHandlerName, resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink 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 event handlers.
+ */
+ @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 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 event handlers.
+ */
+ @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/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubEventHandlersImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubEventHandlersImpl.java
new file mode 100644
index 0000000000000..31bd332d7d4a6
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubEventHandlersImpl.java
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.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.webpubsub.fluent.WebPubSubEventHandlersClient;
+import com.azure.resourcemanager.webpubsub.fluent.models.EventHandlerInner;
+import com.azure.resourcemanager.webpubsub.models.EventHandler;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubEventHandlers;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class WebPubSubEventHandlersImpl implements WebPubSubEventHandlers {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubEventHandlersImpl.class);
+
+ private final WebPubSubEventHandlersClient innerClient;
+
+ private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager;
+
+ public WebPubSubEventHandlersImpl(
+ WebPubSubEventHandlersClient innerClient, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String hubName, String resourceGroupName, String resourceName) {
+ PagedIterable inner = this.serviceClient().list(hubName, resourceGroupName, resourceName);
+ return Utils.mapPage(inner, inner1 -> new EventHandlerImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(hubName, resourceGroupName, resourceName, context);
+ return Utils.mapPage(inner, inner1 -> new EventHandlerImpl(inner1, this.manager()));
+ }
+
+ public void delete(String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ this.serviceClient().delete(hubName, eventHandlerName, resourceGroupName, resourceName);
+ }
+
+ public void delete(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ this.serviceClient().delete(hubName, eventHandlerName, resourceGroupName, resourceName, context);
+ }
+
+ public EventHandler get(String hubName, String eventHandlerName, String resourceGroupName, String resourceName) {
+ EventHandlerInner inner = this.serviceClient().get(hubName, eventHandlerName, resourceGroupName, resourceName);
+ if (inner != null) {
+ return new EventHandlerImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(hubName, eventHandlerName, resourceGroupName, resourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EventHandlerImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteById(String id) {
+ String hubName = Utils.getValueFromIdByName(id, "hubs");
+ if (hubName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id)));
+ }
+ String eventHandlerName = Utils.getValueFromIdByName(id, "eventHandlers");
+ if (eventHandlerName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'eventHandlers'.", 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 resourceName = Utils.getValueFromIdByName(id, "webPubSub");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id)));
+ }
+ this.delete(hubName, eventHandlerName, resourceGroupName, resourceName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String hubName = Utils.getValueFromIdByName(id, "hubs");
+ if (hubName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id)));
+ }
+ String eventHandlerName = Utils.getValueFromIdByName(id, "eventHandlers");
+ if (eventHandlerName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'eventHandlers'.", 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 resourceName = Utils.getValueFromIdByName(id, "webPubSub");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id)));
+ }
+ this.delete(hubName, eventHandlerName, resourceGroupName, resourceName, context);
+ }
+
+ private WebPubSubEventHandlersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() {
+ return this.serviceManager;
+ }
+
+ public EventHandlerImpl define(String name) {
+ return new EventHandlerImpl(name, this.manager());
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubImpl.java
new file mode 100644
index 0000000000000..3d01f8a9de80e
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubImpl.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubHub;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties;
+
+public final class WebPubSubHubImpl implements WebPubSubHub, WebPubSubHub.Definition, WebPubSubHub.Update {
+ private WebPubSubHubInner innerObject;
+
+ private final com.azure.resourcemanager.webpubsub.WebPubSubManager 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 WebPubSubHubProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public WebPubSubHubInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() {
+ return this.serviceManager;
+ }
+
+ private String hubName;
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ public WebPubSubHubImpl withExistingWebPubSub(String resourceGroupName, String resourceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ public WebPubSubHub create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWebPubSubHubs()
+ .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public WebPubSubHub create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWebPubSubHubs()
+ .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), context);
+ return this;
+ }
+
+ WebPubSubHubImpl(String name, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) {
+ this.innerObject = new WebPubSubHubInner();
+ this.serviceManager = serviceManager;
+ this.hubName = name;
+ }
+
+ public WebPubSubHubImpl update() {
+ return this;
+ }
+
+ public WebPubSubHub apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWebPubSubHubs()
+ .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public WebPubSubHub apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getWebPubSubHubs()
+ .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), context);
+ return this;
+ }
+
+ WebPubSubHubImpl(
+ WebPubSubHubInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.hubName = Utils.getValueFromIdByName(innerObject.id(), "hubs");
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "webPubSub");
+ }
+
+ public WebPubSubHubImpl withProperties(WebPubSubHubProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsClientImpl.java
new file mode 100644
index 0000000000000..650d68f551e7b
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsClientImpl.java
@@ -0,0 +1,1115 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.webpubsub.fluent.WebPubSubHubsClient;
+import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubHubList;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in WebPubSubHubsClient. */
+public final class WebPubSubHubsClientImpl implements WebPubSubHubsClient {
+ private final ClientLogger logger = new ClientLogger(WebPubSubHubsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final WebPubSubHubsService service;
+
+ /** The service client containing this operation class. */
+ private final WebPubSubManagementClientImpl client;
+
+ /**
+ * Initializes an instance of WebPubSubHubsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ WebPubSubHubsClientImpl(WebPubSubManagementClientImpl client) {
+ this.service =
+ RestProxy.create(WebPubSubHubsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for WebPubSubManagementClientWebPubSubHubs to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "WebPubSubManagementC")
+ private interface WebPubSubHubsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/hubs")
+ @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("resourceName") String resourceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/hubs/{hubName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("hubName") String hubName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @BodyParam("application/json") WebPubSubHubInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/hubs/{hubName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("hubName") String hubName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/hubs/hubName")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("hubName") String hubName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @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);
+ }
+
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String resourceName) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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,
+ resourceName,
+ 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 hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String resourceName, 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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,
+ resourceName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String resourceName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, resourceName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String resourceName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, resourceName));
+ }
+
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String resourceName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context));
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ hubName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ hubName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, WebPubSubHubInner> beginCreateOrUpdateAsync(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(hubName, resourceGroupName, resourceName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), WebPubSubHubInner.class, WebPubSubHubInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, WebPubSubHubInner> beginCreateOrUpdateAsync(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(hubName, resourceGroupName, resourceName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), WebPubSubHubInner.class, WebPubSubHubInner.class, context);
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, WebPubSubHubInner> beginCreateOrUpdate(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) {
+ return beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, WebPubSubHubInner> beginCreateOrUpdate(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) {
+ return beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public WebPubSubHubInner createOrUpdate(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) {
+ return createOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters).block();
+ }
+
+ /**
+ * Create or update a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param parameters The resource of WebPubSubHub and its properties.
+ * @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 hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public WebPubSubHubInner createOrUpdate(
+ String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) {
+ return createOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters, context).block();
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String hubName, String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ hubName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ hubName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String hubName, String resourceGroupName, String resourceName) {
+ Mono>> mono = deleteWithResponseAsync(hubName, resourceGroupName, resourceName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(hubName, resourceGroupName, resourceName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String hubName, String resourceGroupName, String resourceName) {
+ return beginDeleteAsync(hubName, resourceGroupName, resourceName).getSyncPoller();
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ return beginDeleteAsync(hubName, resourceGroupName, resourceName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String hubName, String resourceGroupName, String resourceName) {
+ return beginDeleteAsync(hubName, resourceGroupName, resourceName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String hubName, String resourceGroupName, String resourceName, Context context) {
+ return beginDeleteAsync(hubName, resourceGroupName, resourceName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String hubName, String resourceGroupName, String resourceName) {
+ deleteAsync(hubName, resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String hubName, String resourceGroupName, String resourceName, Context context) {
+ deleteAsync(hubName, resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String hubName, String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ hubName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (hubName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter hubName 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ hubName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String hubName, String resourceGroupName, String resourceName) {
+ return getWithResponseAsync(hubName, resourceGroupName, resourceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public WebPubSubHubInner get(String hubName, String resourceGroupName, String resourceName) {
+ return getAsync(hubName, resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ return getWithResponseAsync(hubName, resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink 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 hub setting list.
+ */
+ @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 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 hub setting list.
+ */
+ @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/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsImpl.java
new file mode 100644
index 0000000000000..9a2ab6b5c486e
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsImpl.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.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.webpubsub.fluent.WebPubSubHubsClient;
+import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubHub;
+import com.azure.resourcemanager.webpubsub.models.WebPubSubHubs;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class WebPubSubHubsImpl implements WebPubSubHubs {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubHubsImpl.class);
+
+ private final WebPubSubHubsClient innerClient;
+
+ private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager;
+
+ public WebPubSubHubsImpl(
+ WebPubSubHubsClient innerClient, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String resourceName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName);
+ return Utils.mapPage(inner, inner1 -> new WebPubSubHubImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String resourceName, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName, context);
+ return Utils.mapPage(inner, inner1 -> new WebPubSubHubImpl(inner1, this.manager()));
+ }
+
+ public void delete(String hubName, String resourceGroupName, String resourceName) {
+ this.serviceClient().delete(hubName, resourceGroupName, resourceName);
+ }
+
+ public void delete(String hubName, String resourceGroupName, String resourceName, Context context) {
+ this.serviceClient().delete(hubName, resourceGroupName, resourceName, context);
+ }
+
+ public WebPubSubHub get(String hubName, String resourceGroupName, String resourceName) {
+ WebPubSubHubInner inner = this.serviceClient().get(hubName, resourceGroupName, resourceName);
+ if (inner != null) {
+ return new WebPubSubHubImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String hubName, String resourceGroupName, String resourceName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(hubName, resourceGroupName, resourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new WebPubSubHubImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteById(String id) {
+ String hubName = Utils.getValueFromIdByName(id, "hubs");
+ if (hubName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", 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 resourceName = Utils.getValueFromIdByName(id, "webPubSub");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id)));
+ }
+ this.delete(hubName, resourceGroupName, resourceName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String hubName = Utils.getValueFromIdByName(id, "hubs");
+ if (hubName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", 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 resourceName = Utils.getValueFromIdByName(id, "webPubSub");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id)));
+ }
+ this.delete(hubName, resourceGroupName, resourceName, context);
+ }
+
+ private WebPubSubHubsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() {
+ return this.serviceManager;
+ }
+
+ public WebPubSubHubImpl define(String name) {
+ return new WebPubSubHubImpl(name, this.manager());
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubManagementClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubManagementClientImpl.java
index c27755c2cbd64..deb6c245b6cdc 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubManagementClientImpl.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubManagementClientImpl.java
@@ -23,6 +23,8 @@
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.webpubsub.fluent.OperationsClient;
import com.azure.resourcemanager.webpubsub.fluent.UsagesClient;
+import com.azure.resourcemanager.webpubsub.fluent.WebPubSubEventHandlersClient;
+import com.azure.resourcemanager.webpubsub.fluent.WebPubSubHubsClient;
import com.azure.resourcemanager.webpubsub.fluent.WebPubSubManagementClient;
import com.azure.resourcemanager.webpubsub.fluent.WebPubSubPrivateEndpointConnectionsClient;
import com.azure.resourcemanager.webpubsub.fluent.WebPubSubPrivateLinkResourcesClient;
@@ -155,6 +157,30 @@ public UsagesClient getUsages() {
return this.usages;
}
+ /** The WebPubSubHubsClient object to access its operations. */
+ private final WebPubSubHubsClient webPubSubHubs;
+
+ /**
+ * Gets the WebPubSubHubsClient object to access its operations.
+ *
+ * @return the WebPubSubHubsClient object.
+ */
+ public WebPubSubHubsClient getWebPubSubHubs() {
+ return this.webPubSubHubs;
+ }
+
+ /** The WebPubSubEventHandlersClient object to access its operations. */
+ private final WebPubSubEventHandlersClient webPubSubEventHandlers;
+
+ /**
+ * Gets the WebPubSubEventHandlersClient object to access its operations.
+ *
+ * @return the WebPubSubEventHandlersClient object.
+ */
+ public WebPubSubEventHandlersClient getWebPubSubEventHandlers() {
+ return this.webPubSubEventHandlers;
+ }
+
/** The WebPubSubPrivateEndpointConnectionsClient object to access its operations. */
private final WebPubSubPrivateEndpointConnectionsClient webPubSubPrivateEndpointConnections;
@@ -214,10 +240,12 @@ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkRe
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-06-01-preview";
+ this.apiVersion = "2021-10-01";
this.operations = new OperationsClientImpl(this);
this.webPubSubs = new WebPubSubsClientImpl(this);
this.usages = new UsagesClientImpl(this);
+ this.webPubSubHubs = new WebPubSubHubsClientImpl(this);
+ this.webPubSubEventHandlers = new WebPubSubEventHandlersClientImpl(this);
this.webPubSubPrivateEndpointConnections = new WebPubSubPrivateEndpointConnectionsClientImpl(this);
this.webPubSubPrivateLinkResources = new WebPubSubPrivateLinkResourcesClientImpl(this);
this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesClientImpl(this);
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubResourceImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubResourceImpl.java
index c08fd00b8170e..97e5d406bba81 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubResourceImpl.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubResourceImpl.java
@@ -11,12 +11,12 @@
import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner;
import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubResourceInner;
-import com.azure.resourcemanager.webpubsub.models.DiagnosticConfiguration;
-import com.azure.resourcemanager.webpubsub.models.EventHandlerSettings;
+import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration;
import com.azure.resourcemanager.webpubsub.models.ManagedIdentity;
import com.azure.resourcemanager.webpubsub.models.PrivateEndpointConnection;
import com.azure.resourcemanager.webpubsub.models.ProvisioningState;
import com.azure.resourcemanager.webpubsub.models.RegenerateKeyParameters;
+import com.azure.resourcemanager.webpubsub.models.ResourceLogConfiguration;
import com.azure.resourcemanager.webpubsub.models.ResourceSku;
import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResource;
import com.azure.resourcemanager.webpubsub.models.WebPubSubKeys;
@@ -127,12 +127,12 @@ public WebPubSubTlsSettings tls() {
return this.innerModel().tls();
}
- public DiagnosticConfiguration diagnosticConfiguration() {
- return this.innerModel().diagnosticConfiguration();
+ public LiveTraceConfiguration liveTraceConfiguration() {
+ return this.innerModel().liveTraceConfiguration();
}
- public EventHandlerSettings eventHandler() {
- return this.innerModel().eventHandler();
+ public ResourceLogConfiguration resourceLogConfiguration() {
+ return this.innerModel().resourceLogConfiguration();
}
public WebPubSubNetworkACLs networkACLs() {
@@ -304,13 +304,13 @@ public WebPubSubResourceImpl withTls(WebPubSubTlsSettings tls) {
return this;
}
- public WebPubSubResourceImpl withDiagnosticConfiguration(DiagnosticConfiguration diagnosticConfiguration) {
- this.innerModel().withDiagnosticConfiguration(diagnosticConfiguration);
+ public WebPubSubResourceImpl withLiveTraceConfiguration(LiveTraceConfiguration liveTraceConfiguration) {
+ this.innerModel().withLiveTraceConfiguration(liveTraceConfiguration);
return this;
}
- public WebPubSubResourceImpl withEventHandler(EventHandlerSettings eventHandler) {
- this.innerModel().withEventHandler(eventHandler);
+ public WebPubSubResourceImpl withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration) {
+ this.innerModel().withResourceLogConfiguration(resourceLogConfiguration);
return this;
}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsClientImpl.java
index 1f66be11c891f..aa5d916a7b858 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsClientImpl.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsClientImpl.java
@@ -36,6 +36,7 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.webpubsub.fluent.WebPubSubsClient;
import com.azure.resourcemanager.webpubsub.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner;
import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubKeysInner;
import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubResourceInner;
import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters;
@@ -221,6 +222,21 @@ Mono>> restart(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService"
+ + "/webPubSub/{resourceName}/skus")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listSkus(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -2318,6 +2334,158 @@ public void restart(String resourceGroupName, String resourceName, Context conte
restartAsync(resourceGroupName, resourceName, context).block();
}
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSkusWithResponseAsync(String resourceGroupName, String resourceName) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listSkus(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSkusWithResponseAsync(
+ String resourceGroupName, String resourceName, 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listSkus(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context);
+ }
+
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listSkusAsync(String resourceGroupName, String resourceName) {
+ return listSkusWithResponseAsync(resourceGroupName, resourceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SkuListInner listSkus(String resourceGroupName, String resourceName) {
+ return listSkusAsync(resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context) {
+ return listSkusWithResponseAsync(resourceGroupName, resourceName, context).block();
+ }
+
/**
* Get the next page of items.
*
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsImpl.java
index 3caa5d201d90a..5ebeb7dad1b35 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsImpl.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsImpl.java
@@ -11,11 +11,13 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.webpubsub.fluent.WebPubSubsClient;
import com.azure.resourcemanager.webpubsub.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner;
import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubKeysInner;
import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubResourceInner;
import com.azure.resourcemanager.webpubsub.models.NameAvailability;
import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters;
import com.azure.resourcemanager.webpubsub.models.RegenerateKeyParameters;
+import com.azure.resourcemanager.webpubsub.models.SkuList;
import com.azure.resourcemanager.webpubsub.models.WebPubSubKeys;
import com.azure.resourcemanager.webpubsub.models.WebPubSubResource;
import com.azure.resourcemanager.webpubsub.models.WebPubSubs;
@@ -164,6 +166,29 @@ public void restart(String resourceGroupName, String resourceName, Context conte
this.serviceClient().restart(resourceGroupName, resourceName, context);
}
+ public SkuList listSkus(String resourceGroupName, String resourceName) {
+ SkuListInner inner = this.serviceClient().listSkus(resourceGroupName, resourceName);
+ if (inner != null) {
+ return new SkuListImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context) {
+ Response inner =
+ this.serviceClient().listSkusWithResponse(resourceGroupName, resourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new SkuListImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
public WebPubSubResource getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/DiagnosticConfiguration.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/DiagnosticConfiguration.java
deleted file mode 100644
index fca4f1036d4cf..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/DiagnosticConfiguration.java
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Diagnostic configuration of a Microsoft.SignalRService resource. Used together with Azure monitor DiagnosticSettings.
- */
-@Fluent
-public final class DiagnosticConfiguration {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticConfiguration.class);
-
- /*
- * Indicate whether or not enable Connectivity logs.
- * Available values: Enabled, Disabled.
- * Case insensitive.
- */
- @JsonProperty(value = "enableConnectivityLogs")
- private String enableConnectivityLogs;
-
- /*
- * Indicate whether or not enable Messaging logs.
- * Available values: Enabled, Disabled.
- * Case insensitive.
- */
- @JsonProperty(value = "enableMessagingLogs")
- private String enableMessagingLogs;
-
- /*
- * Indicate whether or not enable Live Trace.
- * Available values: Enabled, Disabled.
- * Case insensitive.
- * Live Trace allows you to know what's happening inside Azure SignalR
- * service, it will give you live traces in real time, it will be helpful
- * when you developing your own Azure SignalR based web application or
- * self-troubleshooting some issues.
- */
- @JsonProperty(value = "enableLiveTrace")
- private String enableLiveTrace;
-
- /**
- * Get the enableConnectivityLogs property: Indicate whether or not enable Connectivity logs. Available values:
- * Enabled, Disabled. Case insensitive.
- *
- * @return the enableConnectivityLogs value.
- */
- public String enableConnectivityLogs() {
- return this.enableConnectivityLogs;
- }
-
- /**
- * Set the enableConnectivityLogs property: Indicate whether or not enable Connectivity logs. Available values:
- * Enabled, Disabled. Case insensitive.
- *
- * @param enableConnectivityLogs the enableConnectivityLogs value to set.
- * @return the DiagnosticConfiguration object itself.
- */
- public DiagnosticConfiguration withEnableConnectivityLogs(String enableConnectivityLogs) {
- this.enableConnectivityLogs = enableConnectivityLogs;
- return this;
- }
-
- /**
- * Get the enableMessagingLogs property: Indicate whether or not enable Messaging logs. Available values: Enabled,
- * Disabled. Case insensitive.
- *
- * @return the enableMessagingLogs value.
- */
- public String enableMessagingLogs() {
- return this.enableMessagingLogs;
- }
-
- /**
- * Set the enableMessagingLogs property: Indicate whether or not enable Messaging logs. Available values: Enabled,
- * Disabled. Case insensitive.
- *
- * @param enableMessagingLogs the enableMessagingLogs value to set.
- * @return the DiagnosticConfiguration object itself.
- */
- public DiagnosticConfiguration withEnableMessagingLogs(String enableMessagingLogs) {
- this.enableMessagingLogs = enableMessagingLogs;
- return this;
- }
-
- /**
- * Get the enableLiveTrace property: Indicate whether or not enable Live Trace. Available values: Enabled, Disabled.
- * Case insensitive. Live Trace allows you to know what's happening inside Azure SignalR service, it will give you
- * live traces in real time, it will be helpful when you developing your own Azure SignalR based web application or
- * self-troubleshooting some issues.
- *
- * @return the enableLiveTrace value.
- */
- public String enableLiveTrace() {
- return this.enableLiveTrace;
- }
-
- /**
- * Set the enableLiveTrace property: Indicate whether or not enable Live Trace. Available values: Enabled, Disabled.
- * Case insensitive. Live Trace allows you to know what's happening inside Azure SignalR service, it will give you
- * live traces in real time, it will be helpful when you developing your own Azure SignalR based web application or
- * self-troubleshooting some issues.
- *
- * @param enableLiveTrace the enableLiveTrace value to set.
- * @return the DiagnosticConfiguration object itself.
- */
- public DiagnosticConfiguration withEnableLiveTrace(String enableLiveTrace) {
- this.enableLiveTrace = enableLiveTrace;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandler.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandler.java
new file mode 100644
index 0000000000000..917f0cc1e7f1a
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandler.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.webpubsub.fluent.models.EventHandlerInner;
+
+/** An immutable client-side representation of EventHandler. */
+public interface EventHandler {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the properties property: Properties of the event handler.
+ *
+ * @return the properties value.
+ */
+ EventHandlerProperties properties();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.EventHandlerInner object.
+ *
+ * @return the inner object.
+ */
+ EventHandlerInner innerModel();
+
+ /** The entirety of the EventHandler definition. */
+ interface Definition
+ extends DefinitionStages.Blank,
+ DefinitionStages.WithParentResource,
+ DefinitionStages.WithProperties,
+ DefinitionStages.WithCreate {
+ }
+ /** The EventHandler definition stages. */
+ interface DefinitionStages {
+ /** The first stage of the EventHandler definition. */
+ interface Blank extends WithParentResource {
+ }
+ /** The stage of the EventHandler definition allowing to specify parent resource. */
+ interface WithParentResource {
+ /**
+ * Specifies hubName, resourceGroupName, resourceName.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @return the next definition stage.
+ */
+ WithProperties withExistingHub(String hubName, String resourceGroupName, String resourceName);
+ }
+ /** The stage of the EventHandler definition allowing to specify properties. */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: Properties of the event handler..
+ *
+ * @param properties Properties of the event handler.
+ * @return the next definition stage.
+ */
+ WithCreate withProperties(EventHandlerProperties properties);
+ }
+ /**
+ * The stage of the EventHandler definition which contains all the minimum required properties for the resource
+ * to be created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ EventHandler create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ EventHandler create(Context context);
+ }
+ }
+ /**
+ * Begins update for the EventHandler resource.
+ *
+ * @return the stage of resource update.
+ */
+ EventHandler.Update update();
+
+ /** The template for EventHandler update. */
+ interface Update extends UpdateStages.WithProperties {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ EventHandler apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ EventHandler apply(Context context);
+ }
+ /** The EventHandler update stages. */
+ interface UpdateStages {
+ /** The stage of the EventHandler update allowing to specify properties. */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: Properties of the event handler..
+ *
+ * @param properties Properties of the event handler.
+ * @return the next definition stage.
+ */
+ Update withProperties(EventHandlerProperties properties);
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerList.java
new file mode 100644
index 0000000000000..ba6a385cb9951
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerList.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.webpubsub.fluent.models.EventHandlerInner;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** List of event handlers. */
+@Fluent
+public final class EventHandlerList {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHandlerList.class);
+
+ /*
+ * List of event handlers to this hub.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * The URL the client should use to fetch the next page (per server side
+ * paging).
+ * It's null for now, added for future use.
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /**
+ * Get the value property: List of event handlers to this hub.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: List of event handlers to this hub.
+ *
+ * @param value the value value to set.
+ * @return the EventHandlerList object itself.
+ */
+ public EventHandlerList withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's
+ * null for now, added for future use.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerTemplate.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerProperties.java
similarity index 70%
rename from sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerTemplate.java
rename to sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerProperties.java
index acbc1d29f24e2..3db6017b72b78 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerTemplate.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerProperties.java
@@ -8,11 +8,12 @@
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
-/** EventHandler template item settings. */
+/** Properties of event handler. */
@Fluent
-public final class EventHandlerTemplate {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHandlerTemplate.class);
+public final class EventHandlerProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHandlerProperties.class);
/*
* Gets or sets the EventHandler URL template. You can use a predefined
@@ -37,14 +38,10 @@ public final class EventHandlerTemplate {
private String userEventPattern;
/*
- * Gets ot sets the system event pattern.
- * There are 2 kind of patterns supported:
- * 1. The single event name, for example, "connect", it matches "connect"
- * 2. Combine multiple events with ",", for example "connect,disconnected",
- * it matches event "connect" and "disconnected"
+ * Gets ot sets the list of system events.
*/
- @JsonProperty(value = "systemEventPattern")
- private String systemEventPattern;
+ @JsonProperty(value = "systemEvents")
+ private List systemEvents;
/*
* Gets or sets the auth settings for an event handler. If not set, no auth
@@ -72,9 +69,9 @@ public String urlTemplate() {
* can't contains parameters.
*
* @param urlTemplate the urlTemplate value to set.
- * @return the EventHandlerTemplate object itself.
+ * @return the EventHandlerProperties object itself.
*/
- public EventHandlerTemplate withUrlTemplate(String urlTemplate) {
+ public EventHandlerProperties withUrlTemplate(String urlTemplate) {
this.urlTemplate = urlTemplate;
return this;
}
@@ -98,34 +95,30 @@ public String userEventPattern() {
* matches "event1".
*
* @param userEventPattern the userEventPattern value to set.
- * @return the EventHandlerTemplate object itself.
+ * @return the EventHandlerProperties object itself.
*/
- public EventHandlerTemplate withUserEventPattern(String userEventPattern) {
+ public EventHandlerProperties withUserEventPattern(String userEventPattern) {
this.userEventPattern = userEventPattern;
return this;
}
/**
- * Get the systemEventPattern property: Gets ot sets the system event pattern. There are 2 kind of patterns
- * supported: 1. The single event name, for example, "connect", it matches "connect" 2. Combine multiple events with
- * ",", for example "connect,disconnected", it matches event "connect" and "disconnected".
+ * Get the systemEvents property: Gets ot sets the list of system events.
*
- * @return the systemEventPattern value.
+ * @return the systemEvents value.
*/
- public String systemEventPattern() {
- return this.systemEventPattern;
+ public List systemEvents() {
+ return this.systemEvents;
}
/**
- * Set the systemEventPattern property: Gets ot sets the system event pattern. There are 2 kind of patterns
- * supported: 1. The single event name, for example, "connect", it matches "connect" 2. Combine multiple events with
- * ",", for example "connect,disconnected", it matches event "connect" and "disconnected".
+ * Set the systemEvents property: Gets ot sets the list of system events.
*
- * @param systemEventPattern the systemEventPattern value to set.
- * @return the EventHandlerTemplate object itself.
+ * @param systemEvents the systemEvents value to set.
+ * @return the EventHandlerProperties object itself.
*/
- public EventHandlerTemplate withSystemEventPattern(String systemEventPattern) {
- this.systemEventPattern = systemEventPattern;
+ public EventHandlerProperties withSystemEvents(List systemEvents) {
+ this.systemEvents = systemEvents;
return this;
}
@@ -142,9 +135,9 @@ public UpstreamAuthSettings auth() {
* Set the auth property: Gets or sets the auth settings for an event handler. If not set, no auth is used.
*
* @param auth the auth value to set.
- * @return the EventHandlerTemplate object itself.
+ * @return the EventHandlerProperties object itself.
*/
- public EventHandlerTemplate withAuth(UpstreamAuthSettings auth) {
+ public EventHandlerProperties withAuth(UpstreamAuthSettings auth) {
this.auth = auth;
return this;
}
@@ -159,7 +152,7 @@ public void validate() {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
- "Missing required property urlTemplate in model EventHandlerTemplate"));
+ "Missing required property urlTemplate in model EventHandlerProperties"));
}
if (auth() != null) {
auth().validate();
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerSettings.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerSettings.java
deleted file mode 100644
index b13d7eef71bf3..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandlerSettings.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-import java.util.Map;
-
-/** The settings for event handler in webpubsub service. */
-@Fluent
-public final class EventHandlerSettings {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHandlerSettings.class);
-
- /*
- * Get or set the EventHandler items. The key is the hub name and the value
- * is the corresponding EventHandlerTemplate.
- */
- @JsonProperty(value = "items")
- private Map> items;
-
- /**
- * Get the items property: Get or set the EventHandler items. The key is the hub name and the value is the
- * corresponding EventHandlerTemplate.
- *
- * @return the items value.
- */
- public Map> items() {
- return this.items;
- }
-
- /**
- * Set the items property: Get or set the EventHandler items. The key is the hub name and the value is the
- * corresponding EventHandlerTemplate.
- *
- * @param items the items value to set.
- * @return the EventHandlerSettings object itself.
- */
- public EventHandlerSettings withItems(Map> items) {
- this.items = items;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (items() != null) {
- items()
- .values()
- .forEach(
- e -> {
- if (e != null) {
- e.forEach(e1 -> e1.validate());
- }
- });
- }
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/KeyType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/KeyType.java
index d68aa7e99670c..7856f700522cf 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/KeyType.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/KeyType.java
@@ -16,6 +16,9 @@ public final class KeyType extends ExpandableStringEnum {
/** Static value Secondary for KeyType. */
public static final KeyType SECONDARY = fromString("Secondary");
+ /** Static value Salt for KeyType. */
+ public static final KeyType SALT = fromString("Salt");
+
/**
* Creates or finds a KeyType from its string representation.
*
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceCategory.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceCategory.java
new file mode 100644
index 0000000000000..6aa46f03bff62
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceCategory.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Live trace category configuration of a Microsoft.SignalRService resource. */
+@Fluent
+public final class LiveTraceCategory {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveTraceCategory.class);
+
+ /*
+ * Gets or sets the live trace category's name.
+ * Available values: ConnectivityLogs, MessagingLogs.
+ * Case insensitive.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Indicates whether or the live trace category is enabled.
+ * Available values: true, false.
+ * Case insensitive.
+ */
+ @JsonProperty(value = "enabled")
+ private String enabled;
+
+ /**
+ * Get the name property: Gets or sets the live trace category's name. Available values: ConnectivityLogs,
+ * MessagingLogs. Case insensitive.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Gets or sets the live trace category's name. Available values: ConnectivityLogs,
+ * MessagingLogs. Case insensitive.
+ *
+ * @param name the name value to set.
+ * @return the LiveTraceCategory object itself.
+ */
+ public LiveTraceCategory withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the enabled property: Indicates whether or the live trace category is enabled. Available values: true, false.
+ * Case insensitive.
+ *
+ * @return the enabled value.
+ */
+ public String enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Indicates whether or the live trace category is enabled. Available values: true, false.
+ * Case insensitive.
+ *
+ * @param enabled the enabled value to set.
+ * @return the LiveTraceCategory object itself.
+ */
+ public LiveTraceCategory withEnabled(String enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceConfiguration.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceConfiguration.java
new file mode 100644
index 0000000000000..1516641fc1606
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceConfiguration.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Live trace configuration of a Microsoft.SignalRService resource. */
+@Fluent
+public final class LiveTraceConfiguration {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveTraceConfiguration.class);
+
+ /*
+ * Indicates whether or not enable live trace.
+ * When it's set to true, live trace client can connect to the service.
+ * Otherwise, live trace client can't connect to the service, so that you
+ * are unable to receive any log, no matter what you configure in
+ * "categories".
+ * Available values: true, false.
+ * Case insensitive.
+ */
+ @JsonProperty(value = "enabled")
+ private String enabled;
+
+ /*
+ * Gets or sets the list of category configurations.
+ */
+ @JsonProperty(value = "categories")
+ private List categories;
+
+ /**
+ * Get the enabled property: Indicates whether or not enable live trace. When it's set to true, live trace client
+ * can connect to the service. Otherwise, live trace client can't connect to the service, so that you are unable to
+ * receive any log, no matter what you configure in "categories". Available values: true, false. Case insensitive.
+ *
+ * @return the enabled value.
+ */
+ public String enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Indicates whether or not enable live trace. When it's set to true, live trace client
+ * can connect to the service. Otherwise, live trace client can't connect to the service, so that you are unable to
+ * receive any log, no matter what you configure in "categories". Available values: true, false. Case insensitive.
+ *
+ * @param enabled the enabled value to set.
+ * @return the LiveTraceConfiguration object itself.
+ */
+ public LiveTraceConfiguration withEnabled(String enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the categories property: Gets or sets the list of category configurations.
+ *
+ * @return the categories value.
+ */
+ public List categories() {
+ return this.categories;
+ }
+
+ /**
+ * Set the categories property: Gets or sets the list of category configurations.
+ *
+ * @param categories the categories value to set.
+ * @return the LiveTraceConfiguration object itself.
+ */
+ public LiveTraceConfiguration withCategories(List categories) {
+ this.categories = categories;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (categories() != null) {
+ categories().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentity.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentity.java
index ddd4c23a2d9d8..a05fdad2fcf64 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentity.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentity.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -25,6 +26,7 @@ public class ManagedIdentity {
* Get or set the user assigned identities
*/
@JsonProperty(value = "userAssignedIdentities")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map userAssignedIdentities;
/*
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointConnection.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointConnection.java
index 98a9b13c76a60..8343c0515da7c 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointConnection.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointConnection.java
@@ -6,6 +6,7 @@
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner;
+import java.util.List;
/** An immutable client-side representation of PrivateEndpointConnection. */
public interface PrivateEndpointConnection {
@@ -51,6 +52,13 @@ public interface PrivateEndpointConnection {
*/
PrivateEndpoint privateEndpoint();
+ /**
+ * Gets the groupIds property: Group IDs.
+ *
+ * @return the groupIds value.
+ */
+ List groupIds();
+
/**
* Gets the privateLinkServiceConnectionState property: Connection state.
*
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogCategory.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogCategory.java
new file mode 100644
index 0000000000000..93928b7ae0ec2
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogCategory.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Resource log category configuration of a Microsoft.SignalRService resource. */
+@Fluent
+public final class ResourceLogCategory {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceLogCategory.class);
+
+ /*
+ * Gets or sets the resource log category's name.
+ * Available values: ConnectivityLogs, MessagingLogs.
+ * Case insensitive.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Indicates whether or the resource log category is enabled.
+ * Available values: true, false.
+ * Case insensitive.
+ */
+ @JsonProperty(value = "enabled")
+ private String enabled;
+
+ /**
+ * Get the name property: Gets or sets the resource log category's name. Available values: ConnectivityLogs,
+ * MessagingLogs. Case insensitive.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Gets or sets the resource log category's name. Available values: ConnectivityLogs,
+ * MessagingLogs. Case insensitive.
+ *
+ * @param name the name value to set.
+ * @return the ResourceLogCategory object itself.
+ */
+ public ResourceLogCategory withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the enabled property: Indicates whether or the resource log category is enabled. Available values: true,
+ * false. Case insensitive.
+ *
+ * @return the enabled value.
+ */
+ public String enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Indicates whether or the resource log category is enabled. Available values: true,
+ * false. Case insensitive.
+ *
+ * @param enabled the enabled value to set.
+ * @return the ResourceLogCategory object itself.
+ */
+ public ResourceLogCategory withEnabled(String enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogConfiguration.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogConfiguration.java
new file mode 100644
index 0000000000000..86042f56fb4f5
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogConfiguration.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Resource log configuration of a Microsoft.SignalRService resource. */
+@Fluent
+public final class ResourceLogConfiguration {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceLogConfiguration.class);
+
+ /*
+ * Gets or sets the list of category configurations.
+ */
+ @JsonProperty(value = "categories")
+ private List categories;
+
+ /**
+ * Get the categories property: Gets or sets the list of category configurations.
+ *
+ * @return the categories value.
+ */
+ public List categories() {
+ return this.categories;
+ }
+
+ /**
+ * Set the categories property: Gets or sets the list of category configurations.
+ *
+ * @param categories the categories value to set.
+ * @return the ResourceLogConfiguration object itself.
+ */
+ public ResourceLogConfiguration withCategories(List categories) {
+ this.categories = categories;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (categories() != null) {
+ categories().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ScaleType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ScaleType.java
new file mode 100644
index 0000000000000..a4254c8dd62d2
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ScaleType.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for ScaleType. */
+public final class ScaleType extends ExpandableStringEnum {
+ /** Static value None for ScaleType. */
+ public static final ScaleType NONE = fromString("None");
+
+ /** Static value Manual for ScaleType. */
+ public static final ScaleType MANUAL = fromString("Manual");
+
+ /** Static value Automatic for ScaleType. */
+ public static final ScaleType AUTOMATIC = fromString("Automatic");
+
+ /**
+ * Creates or finds a ScaleType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ScaleType.
+ */
+ @JsonCreator
+ public static ScaleType fromString(String name) {
+ return fromString(name, ScaleType.class);
+ }
+
+ /** @return known ScaleType values. */
+ public static Collection values() {
+ return values(ScaleType.class);
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Sku.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Sku.java
new file mode 100644
index 0000000000000..af3d5893653a3
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Sku.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes an available sku.". */
+@Immutable
+public final class Sku {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class);
+
+ /*
+ * The resource type that this object applies to
+ */
+ @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceType;
+
+ /*
+ * The exact set of keys that define this sku.
+ */
+ @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY)
+ private ResourceSku sku;
+
+ /*
+ * Specifies the unit of the resource.
+ */
+ @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuCapacity capacity;
+
+ /**
+ * Get the resourceType property: The resource type that this object applies to.
+ *
+ * @return the resourceType value.
+ */
+ public String resourceType() {
+ return this.resourceType;
+ }
+
+ /**
+ * Get the sku property: The exact set of keys that define this sku.
+ *
+ * @return the sku value.
+ */
+ public ResourceSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Get the capacity property: Specifies the unit of the resource.
+ *
+ * @return the capacity value.
+ */
+ public SkuCapacity capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (capacity() != null) {
+ capacity().validate();
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuCapacity.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuCapacity.java
new file mode 100644
index 0000000000000..29666a6b3a78a
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuCapacity.java
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Describes scaling information of a sku. */
+@Immutable
+public final class SkuCapacity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCapacity.class);
+
+ /*
+ * The lowest permitted capacity for this resource
+ */
+ @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer minimum;
+
+ /*
+ * The highest permitted capacity for this resource
+ */
+ @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer maximum;
+
+ /*
+ * The default capacity.
+ */
+ @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer defaultProperty;
+
+ /*
+ * Allows capacity value list.
+ */
+ @JsonProperty(value = "allowedValues", access = JsonProperty.Access.WRITE_ONLY)
+ private List allowedValues;
+
+ /*
+ * The scale type applicable to the sku.
+ */
+ @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY)
+ private ScaleType scaleType;
+
+ /**
+ * Get the minimum property: The lowest permitted capacity for this resource.
+ *
+ * @return the minimum value.
+ */
+ public Integer minimum() {
+ return this.minimum;
+ }
+
+ /**
+ * Get the maximum property: The highest permitted capacity for this resource.
+ *
+ * @return the maximum value.
+ */
+ public Integer maximum() {
+ return this.maximum;
+ }
+
+ /**
+ * Get the defaultProperty property: The default capacity.
+ *
+ * @return the defaultProperty value.
+ */
+ public Integer defaultProperty() {
+ return this.defaultProperty;
+ }
+
+ /**
+ * Get the allowedValues property: Allows capacity value list.
+ *
+ * @return the allowedValues value.
+ */
+ public List allowedValues() {
+ return this.allowedValues;
+ }
+
+ /**
+ * Get the scaleType property: The scale type applicable to the sku.
+ *
+ * @return the scaleType value.
+ */
+ public ScaleType scaleType() {
+ return this.scaleType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuList.java
new file mode 100644
index 0000000000000..43fe311e70ce5
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuList.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner;
+import java.util.List;
+
+/** An immutable client-side representation of SkuList. */
+public interface SkuList {
+ /**
+ * Gets the value property: The list of skus available for the resource.
+ *
+ * @return the value value.
+ */
+ List value();
+
+ /**
+ * Gets the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's
+ * null for now, added for future use.
+ *
+ * @return the nextLink value.
+ */
+ String nextLink();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner object.
+ *
+ * @return the inner object.
+ */
+ SkuListInner innerModel();
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubEventHandlers.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubEventHandlers.java
new file mode 100644
index 0000000000000..a2dd60657e8c3
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubEventHandlers.java
@@ -0,0 +1,132 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of WebPubSubEventHandlers. */
+public interface WebPubSubEventHandlers {
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ PagedIterable list(String hubName, String resourceGroupName, String resourceName);
+
+ /**
+ * List event handlers.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of event handlers.
+ */
+ PagedIterable list(String hubName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void delete(String hubName, String eventHandlerName, String resourceGroupName, String resourceName);
+
+ /**
+ * Delete an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void delete(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ EventHandler get(String hubName, String eventHandlerName, String resourceGroupName, String resourceName);
+
+ /**
+ * Get an event handler.
+ *
+ * @param hubName The hub name.
+ * @param eventHandlerName The event handler name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an event handler.
+ */
+ Response getWithResponse(
+ String hubName, String eventHandlerName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Delete an event handler.
+ *
+ * @param id the resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void deleteById(String id);
+
+ /**
+ * Delete an event handler.
+ *
+ * @param id the resource ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void deleteByIdWithResponse(String id, Context context);
+
+ /**
+ * Begins definition for a new EventHandler resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new EventHandler definition.
+ */
+ EventHandler.DefinitionStages.Blank define(String name);
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHub.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHub.java
new file mode 100644
index 0000000000000..2ddfe2dcc2df8
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHub.java
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner;
+
+/** An immutable client-side representation of WebPubSubHub. */
+public interface WebPubSubHub {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the properties property: Properties of the hub setting.
+ *
+ * @return the properties value.
+ */
+ WebPubSubHubProperties properties();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner object.
+ *
+ * @return the inner object.
+ */
+ WebPubSubHubInner innerModel();
+
+ /** The entirety of the WebPubSubHub definition. */
+ interface Definition
+ extends DefinitionStages.Blank,
+ DefinitionStages.WithParentResource,
+ DefinitionStages.WithProperties,
+ DefinitionStages.WithCreate {
+ }
+ /** The WebPubSubHub definition stages. */
+ interface DefinitionStages {
+ /** The first stage of the WebPubSubHub definition. */
+ interface Blank extends WithParentResource {
+ }
+ /** The stage of the WebPubSubHub definition allowing to specify parent resource. */
+ interface WithParentResource {
+ /**
+ * Specifies resourceGroupName, resourceName.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @return the next definition stage.
+ */
+ WithProperties withExistingWebPubSub(String resourceGroupName, String resourceName);
+ }
+ /** The stage of the WebPubSubHub definition allowing to specify properties. */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: Properties of the hub setting..
+ *
+ * @param properties Properties of the hub setting.
+ * @return the next definition stage.
+ */
+ WithCreate withProperties(WebPubSubHubProperties properties);
+ }
+ /**
+ * The stage of the WebPubSubHub definition which contains all the minimum required properties for the resource
+ * to be created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ WebPubSubHub create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ WebPubSubHub create(Context context);
+ }
+ }
+ /**
+ * Begins update for the WebPubSubHub resource.
+ *
+ * @return the stage of resource update.
+ */
+ WebPubSubHub.Update update();
+
+ /** The template for WebPubSubHub update. */
+ interface Update extends UpdateStages.WithProperties {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ WebPubSubHub apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ WebPubSubHub apply(Context context);
+ }
+ /** The WebPubSubHub update stages. */
+ interface UpdateStages {
+ /** The stage of the WebPubSubHub update allowing to specify properties. */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: Properties of the hub setting..
+ *
+ * @param properties Properties of the hub setting.
+ * @return the next definition stage.
+ */
+ Update withProperties(WebPubSubHubProperties properties);
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java
new file mode 100644
index 0000000000000..709277747b167
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Hub setting list. */
+@Fluent
+public final class WebPubSubHubList {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubHubList.class);
+
+ /*
+ * List of hub settings to this resource.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * The URL the client should use to fetch the next page (per server side
+ * paging).
+ * It's null for now, added for future use.
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /**
+ * Get the value property: List of hub settings to this resource.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: List of hub settings to this resource.
+ *
+ * @param value the value value to set.
+ * @return the WebPubSubHubList object itself.
+ */
+ public WebPubSubHubList withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's
+ * null for now, added for future use.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubProperties.java
new file mode 100644
index 0000000000000..158aa8f1b1ca8
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubProperties.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.webpubsub.fluent.models.EventHandlerInner;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a hub. */
+@Fluent
+public final class WebPubSubHubProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubHubProperties.class);
+
+ /*
+ * Event handler of a hub.
+ */
+ @JsonProperty(value = "eventHandlers")
+ private List eventHandlers;
+
+ /*
+ * The settings for configuring if anonymous connections are allowed for
+ * this hub: "allow" or "deny". Default to "deny".
+ */
+ @JsonProperty(value = "anonymousConnectPolicy")
+ private String anonymousConnectPolicy;
+
+ /**
+ * Get the eventHandlers property: Event handler of a hub.
+ *
+ * @return the eventHandlers value.
+ */
+ public List eventHandlers() {
+ return this.eventHandlers;
+ }
+
+ /**
+ * Set the eventHandlers property: Event handler of a hub.
+ *
+ * @param eventHandlers the eventHandlers value to set.
+ * @return the WebPubSubHubProperties object itself.
+ */
+ public WebPubSubHubProperties withEventHandlers(List eventHandlers) {
+ this.eventHandlers = eventHandlers;
+ return this;
+ }
+
+ /**
+ * Get the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for
+ * this hub: "allow" or "deny". Default to "deny".
+ *
+ * @return the anonymousConnectPolicy value.
+ */
+ public String anonymousConnectPolicy() {
+ return this.anonymousConnectPolicy;
+ }
+
+ /**
+ * Set the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for
+ * this hub: "allow" or "deny". Default to "deny".
+ *
+ * @param anonymousConnectPolicy the anonymousConnectPolicy value to set.
+ * @return the WebPubSubHubProperties object itself.
+ */
+ public WebPubSubHubProperties withAnonymousConnectPolicy(String anonymousConnectPolicy) {
+ this.anonymousConnectPolicy = anonymousConnectPolicy;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (eventHandlers() != null) {
+ eventHandlers().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubs.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubs.java
new file mode 100644
index 0000000000000..3799a2cece72d
--- /dev/null
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubs.java
@@ -0,0 +1,125 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.webpubsub.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of WebPubSubHubs. */
+public interface WebPubSubHubs {
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ PagedIterable list(String resourceGroupName, String resourceName);
+
+ /**
+ * List hub settings.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return hub setting list.
+ */
+ PagedIterable list(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void delete(String hubName, String resourceGroupName, String resourceName);
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void delete(String hubName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ WebPubSubHub get(String hubName, String resourceGroupName, String resourceName);
+
+ /**
+ * Get a hub setting.
+ *
+ * @param hubName The hub name.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a hub setting.
+ */
+ Response getWithResponse(
+ String hubName, String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param id the resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void deleteById(String id);
+
+ /**
+ * Delete a hub setting.
+ *
+ * @param id the resource ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void deleteByIdWithResponse(String id, Context context);
+
+ /**
+ * Begins definition for a new WebPubSubHub resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new WebPubSubHub definition.
+ */
+ WebPubSubHub.DefinitionStages.Blank define(String name);
+}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubResource.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubResource.java
index 3ca144cf05c1a..4e4a95f4094af 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubResource.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubResource.java
@@ -136,19 +136,21 @@ public interface WebPubSubResource {
WebPubSubTlsSettings tls();
/**
- * Gets the diagnosticConfiguration property: Diagnostic configuration of a Microsoft.SignalRService resource. Used
- * together with Azure monitor DiagnosticSettings.
+ * Gets the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService resource.
*
- * @return the diagnosticConfiguration value.
+ * @return the liveTraceConfiguration value.
*/
- DiagnosticConfiguration diagnosticConfiguration();
+ LiveTraceConfiguration liveTraceConfiguration();
/**
- * Gets the eventHandler property: The settings for event handler in webpubsub service.
+ * Gets the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If
+ * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and
+ * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in
+ * features.
*
- * @return the eventHandler value.
+ * @return the resourceLogConfiguration value.
*/
- EventHandlerSettings eventHandler();
+ ResourceLogConfiguration resourceLogConfiguration();
/**
* Gets the networkACLs property: Network ACLs.
@@ -253,8 +255,8 @@ interface WithCreate
DefinitionStages.WithSku,
DefinitionStages.WithIdentity,
DefinitionStages.WithTls,
- DefinitionStages.WithDiagnosticConfiguration,
- DefinitionStages.WithEventHandler,
+ DefinitionStages.WithLiveTraceConfiguration,
+ DefinitionStages.WithResourceLogConfiguration,
DefinitionStages.WithNetworkACLs,
DefinitionStages.WithPublicNetworkAccess,
DefinitionStages.WithDisableLocalAuth,
@@ -314,27 +316,32 @@ interface WithTls {
*/
WithCreate withTls(WebPubSubTlsSettings tls);
}
- /** The stage of the WebPubSubResource definition allowing to specify diagnosticConfiguration. */
- interface WithDiagnosticConfiguration {
+ /** The stage of the WebPubSubResource definition allowing to specify liveTraceConfiguration. */
+ interface WithLiveTraceConfiguration {
/**
- * Specifies the diagnosticConfiguration property: Diagnostic configuration of a Microsoft.SignalRService
- * resource. Used together with Azure monitor DiagnosticSettings..
+ * Specifies the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService
+ * resource..
*
- * @param diagnosticConfiguration Diagnostic configuration of a Microsoft.SignalRService resource. Used
- * together with Azure monitor DiagnosticSettings.
+ * @param liveTraceConfiguration Live trace configuration of a Microsoft.SignalRService resource.
* @return the next definition stage.
*/
- WithCreate withDiagnosticConfiguration(DiagnosticConfiguration diagnosticConfiguration);
+ WithCreate withLiveTraceConfiguration(LiveTraceConfiguration liveTraceConfiguration);
}
- /** The stage of the WebPubSubResource definition allowing to specify eventHandler. */
- interface WithEventHandler {
+ /** The stage of the WebPubSubResource definition allowing to specify resourceLogConfiguration. */
+ interface WithResourceLogConfiguration {
/**
- * Specifies the eventHandler property: The settings for event handler in webpubsub service..
+ * Specifies the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService
+ * resource. If resourceLogConfiguration isn't null or empty, it will override options
+ * "EnableConnectivityLog" and "EnableMessagingLogs" in features. Otherwise, use options
+ * "EnableConnectivityLog" and "EnableMessagingLogs" in features..
*
- * @param eventHandler The settings for event handler in webpubsub service.
+ * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. If
+ * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and
+ * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and
+ * "EnableMessagingLogs" in features.
* @return the next definition stage.
*/
- WithCreate withEventHandler(EventHandlerSettings eventHandler);
+ WithCreate withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration);
}
/** The stage of the WebPubSubResource definition allowing to specify networkACLs. */
interface WithNetworkACLs {
@@ -398,8 +405,8 @@ interface Update
UpdateStages.WithSku,
UpdateStages.WithIdentity,
UpdateStages.WithTls,
- UpdateStages.WithDiagnosticConfiguration,
- UpdateStages.WithEventHandler,
+ UpdateStages.WithLiveTraceConfiguration,
+ UpdateStages.WithResourceLogConfiguration,
UpdateStages.WithNetworkACLs,
UpdateStages.WithPublicNetworkAccess,
UpdateStages.WithDisableLocalAuth,
@@ -461,27 +468,32 @@ interface WithTls {
*/
Update withTls(WebPubSubTlsSettings tls);
}
- /** The stage of the WebPubSubResource update allowing to specify diagnosticConfiguration. */
- interface WithDiagnosticConfiguration {
+ /** The stage of the WebPubSubResource update allowing to specify liveTraceConfiguration. */
+ interface WithLiveTraceConfiguration {
/**
- * Specifies the diagnosticConfiguration property: Diagnostic configuration of a Microsoft.SignalRService
- * resource. Used together with Azure monitor DiagnosticSettings..
+ * Specifies the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService
+ * resource..
*
- * @param diagnosticConfiguration Diagnostic configuration of a Microsoft.SignalRService resource. Used
- * together with Azure monitor DiagnosticSettings.
+ * @param liveTraceConfiguration Live trace configuration of a Microsoft.SignalRService resource.
* @return the next definition stage.
*/
- Update withDiagnosticConfiguration(DiagnosticConfiguration diagnosticConfiguration);
+ Update withLiveTraceConfiguration(LiveTraceConfiguration liveTraceConfiguration);
}
- /** The stage of the WebPubSubResource update allowing to specify eventHandler. */
- interface WithEventHandler {
+ /** The stage of the WebPubSubResource update allowing to specify resourceLogConfiguration. */
+ interface WithResourceLogConfiguration {
/**
- * Specifies the eventHandler property: The settings for event handler in webpubsub service..
+ * Specifies the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService
+ * resource. If resourceLogConfiguration isn't null or empty, it will override options
+ * "EnableConnectivityLog" and "EnableMessagingLogs" in features. Otherwise, use options
+ * "EnableConnectivityLog" and "EnableMessagingLogs" in features..
*
- * @param eventHandler The settings for event handler in webpubsub service.
+ * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. If
+ * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and
+ * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and
+ * "EnableMessagingLogs" in features.
* @return the next definition stage.
*/
- Update withEventHandler(EventHandlerSettings eventHandler);
+ Update withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration);
}
/** The stage of the WebPubSubResource update allowing to specify networkACLs. */
interface WithNetworkACLs {
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubs.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubs.java
index 00fa5dbfdc1ad..b4d18322ac0b0 100644
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubs.java
+++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubs.java
@@ -216,6 +216,33 @@ WebPubSubKeys regenerateKey(
*/
void restart(String resourceGroupName, String resourceName, Context context);
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ SkuList listSkus(String resourceGroupName, String resourceName);
+
+ /**
+ * List all available skus of the resource.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
+ * from the Azure Resource Manager API or the portal.
+ * @param resourceName The name of the resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list skus operation response.
+ */
+ Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context);
+
/**
* Get the resource and its properties.
*
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/OperationsListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/OperationsListSamples.java
deleted file mode 100644
index 43fa6f97890f7..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/OperationsListSamples.java
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for Operations List. */
-public final class OperationsListSamples {
- /**
- * Sample code: Operations_List.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void operationsList(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager.operations().list(Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/UsagesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/UsagesListSamples.java
deleted file mode 100644
index 95284be8c3a0a..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/UsagesListSamples.java
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for Usages List. */
-public final class UsagesListSamples {
- /**
- * Sample code: Usages_List.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void usagesList(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager.usages().list("eastus", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubCheckNameAvailabilitySamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubCheckNameAvailabilitySamples.java
deleted file mode 100644
index e31a4d8da05d5..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubCheckNameAvailabilitySamples.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters;
-
-/** Samples for WebPubSub CheckNameAvailability. */
-public final class WebPubSubCheckNameAvailabilitySamples {
- /**
- * Sample code: WebPubSub_CheckNameAvailability.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubCheckNameAvailability(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubs()
- .checkNameAvailabilityWithResponse(
- "eastus",
- new NameAvailabilityParameters()
- .withType("Microsoft.SignalRService/WebPubSub")
- .withName("myWebPubSubService"),
- Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubCreateOrUpdateSamples.java
deleted file mode 100644
index 5ce9e2427361e..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.resourcemanager.webpubsub.models.AclAction;
-import com.azure.resourcemanager.webpubsub.models.DiagnosticConfiguration;
-import com.azure.resourcemanager.webpubsub.models.EventHandlerSettings;
-import com.azure.resourcemanager.webpubsub.models.EventHandlerTemplate;
-import com.azure.resourcemanager.webpubsub.models.ManagedIdentity;
-import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType;
-import com.azure.resourcemanager.webpubsub.models.NetworkAcl;
-import com.azure.resourcemanager.webpubsub.models.PrivateEndpointAcl;
-import com.azure.resourcemanager.webpubsub.models.ResourceSku;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for WebPubSub CreateOrUpdate. */
-public final class WebPubSubCreateOrUpdateSamples {
- /**
- * Sample code: WebPubSub_CreateOrUpdate.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubs()
- .define("myWebPubSubService")
- .withRegion("eastus")
- .withExistingResourceGroup("myResourceGroup")
- .withTags(mapOf("key1", "value1"))
- .withSku(new ResourceSku().withName("Standard_S1").withTier(WebPubSubSkuTier.STANDARD).withCapacity(1))
- .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED))
- .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false))
- .withDiagnosticConfiguration(
- new DiagnosticConfiguration()
- .withEnableConnectivityLogs("Disabled")
- .withEnableMessagingLogs("Disabled")
- .withEnableLiveTrace("Disabled"))
- .withEventHandler(
- new EventHandlerSettings()
- .withItems(
- mapOf(
- "hub1",
- Arrays
- .asList(
- new EventHandlerTemplate()
- .withUrlTemplate("https://example.com/chat/api/hub1")
- .withUserEventPattern("*")),
- "hub2",
- Arrays
- .asList(
- new EventHandlerTemplate()
- .withUrlTemplate("https://example.com/chat/api/hub2/example1")
- .withUserEventPattern("example1"),
- new EventHandlerTemplate()
- .withUrlTemplate("https://example.com/chat/api/hub2/example2")
- .withUserEventPattern("example2")))))
- .withNetworkACLs(
- new WebPubSubNetworkACLs()
- .withDefaultAction(AclAction.DENY)
- .withPublicNetwork(
- new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)))
- .withPrivateEndpoints(
- Arrays
- .asList(
- new PrivateEndpointAcl()
- .withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION))
- .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"))))
- .withPublicNetworkAccess("Enabled")
- .withDisableLocalAuth(false)
- .withDisableAadAuth(false)
- .create();
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubDeleteSamples.java
deleted file mode 100644
index 838fb24ce64ed..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubDeleteSamples.java
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSub Delete. */
-public final class WebPubSubDeleteSamples {
- /**
- * Sample code: WebPubSub_Delete.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager.webPubSubs().delete("myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubGetByResourceGroupSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubGetByResourceGroupSamples.java
deleted file mode 100644
index 3aaa9c18d4862..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubGetByResourceGroupSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSub GetByResourceGroup. */
-public final class WebPubSubGetByResourceGroupSamples {
- /**
- * Sample code: WebPubSub_Get.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubGet(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubs()
- .getByResourceGroupWithResponse("myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListByResourceGroupSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListByResourceGroupSamples.java
deleted file mode 100644
index 57fbce93d132b..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListByResourceGroupSamples.java
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSub ListByResourceGroup. */
-public final class WebPubSubListByResourceGroupSamples {
- /**
- * Sample code: WebPubSub_ListByResourceGroup.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubListByResourceGroup(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager.webPubSubs().listByResourceGroup("myResourceGroup", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListKeysSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListKeysSamples.java
deleted file mode 100644
index 981c804fd00e4..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListKeysSamples.java
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSub ListKeys. */
-public final class WebPubSubListKeysSamples {
- /**
- * Sample code: WebPubSub_ListKeys.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubListKeys(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager.webPubSubs().listKeysWithResponse("myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListSamples.java
deleted file mode 100644
index f60123009427e..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubListSamples.java
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSub List. */
-public final class WebPubSubListSamples {
- /**
- * Sample code: WebPubSub_ListBySubscription.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubListBySubscription(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager.webPubSubs().list(Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsDeleteSamples.java
deleted file mode 100644
index 36288c24f9a33..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsDeleteSamples.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSubPrivateEndpointConnections Delete. */
-public final class WebPubSubPrivateEndpointConnectionsDeleteSamples {
- /**
- * Sample code: WebPubSubPrivateEndpointConnections_Delete.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubPrivateEndpointConnectionsDelete(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubPrivateEndpointConnections()
- .delete(
- "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
- "myResourceGroup",
- "myWebPubSubService",
- Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsGetSamples.java
deleted file mode 100644
index 52a5aa6be21c4..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsGetSamples.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSubPrivateEndpointConnections Get. */
-public final class WebPubSubPrivateEndpointConnectionsGetSamples {
- /**
- * Sample code: WebPubSubPrivateEndpointConnections_Get.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubPrivateEndpointConnectionsGet(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubPrivateEndpointConnections()
- .getWithResponse(
- "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
- "myResourceGroup",
- "myWebPubSubService",
- Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsListSamples.java
deleted file mode 100644
index c40f5aee0a3da..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsListSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSubPrivateEndpointConnections List. */
-public final class WebPubSubPrivateEndpointConnectionsListSamples {
- /**
- * Sample code: WebPubSubPrivateEndpointConnections_List.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubPrivateEndpointConnectionsList(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubPrivateEndpointConnections()
- .list("myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsUpdateSamples.java
deleted file mode 100644
index 2e73a01091021..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateEndpointConnectionsUpdateSamples.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.webpubsub.models.PrivateEndpoint;
-import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState;
-import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus;
-
-/** Samples for WebPubSubPrivateEndpointConnections Update. */
-public final class WebPubSubPrivateEndpointConnectionsUpdateSamples {
- /**
- * Sample code: WebPubSubPrivateEndpointConnections_Update.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubPrivateEndpointConnectionsUpdate(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubPrivateEndpointConnections()
- .updateWithResponse(
- "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
- "myResourceGroup",
- "myWebPubSubService",
- new PrivateEndpointConnectionInner()
- .withPrivateEndpoint(
- new PrivateEndpoint()
- .withId(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"))
- .withPrivateLinkServiceConnectionState(
- new PrivateLinkServiceConnectionState()
- .withStatus(PrivateLinkServiceConnectionStatus.APPROVED)
- .withActionsRequired("None")),
- Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateLinkResourcesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateLinkResourcesListSamples.java
deleted file mode 100644
index 796c6514a7b71..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubPrivateLinkResourcesListSamples.java
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSubPrivateLinkResources List. */
-public final class WebPubSubPrivateLinkResourcesListSamples {
- /**
- * Sample code: WebPubSubPrivateLinkResources_List.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubPrivateLinkResourcesList(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager.webPubSubPrivateLinkResources().list("myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubRegenerateKeySamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubRegenerateKeySamples.java
deleted file mode 100644
index 75a6d5cee29bf..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubRegenerateKeySamples.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.webpubsub.models.KeyType;
-import com.azure.resourcemanager.webpubsub.models.RegenerateKeyParameters;
-
-/** Samples for WebPubSub RegenerateKey. */
-public final class WebPubSubRegenerateKeySamples {
- /**
- * Sample code: WebPubSub_RegenerateKey.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubRegenerateKey(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubs()
- .regenerateKey(
- "myResourceGroup",
- "myWebPubSubService",
- new RegenerateKeyParameters().withKeyType(KeyType.PRIMARY),
- Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubRestartSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubRestartSamples.java
deleted file mode 100644
index d901975d19a81..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubRestartSamples.java
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSub Restart. */
-public final class WebPubSubRestartSamples {
- /**
- * Sample code: WebPubSub_Restart.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubRestart(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager.webPubSubs().restart("myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java
deleted file mode 100644
index b9f68d8f1254c..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-/** Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. */
-public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples {
- /**
- * Sample code: WebPubSubSharedPrivateLinkResources_CreateOrUpdate.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubSharedPrivateLinkResourcesCreateOrUpdate(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubSharedPrivateLinkResources()
- .define("upstream")
- .withExistingWebPubSub("myResourceGroup", "myWebPubSubService")
- .withGroupId("sites")
- .withPrivateLinkResourceId(
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp")
- .withRequestMessage("Please approve")
- .create();
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java
deleted file mode 100644
index 36cb4678d00a4..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSubSharedPrivateLinkResources Delete. */
-public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples {
- /**
- * Sample code: WebPubSubSharedPrivateLinkResources_Delete.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubSharedPrivateLinkResourcesDelete(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubSharedPrivateLinkResources()
- .delete("upstream", "myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesGetSamples.java
deleted file mode 100644
index f63a2075a84cf..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesGetSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSubSharedPrivateLinkResources Get. */
-public final class WebPubSubSharedPrivateLinkResourcesGetSamples {
- /**
- * Sample code: WebPubSubSharedPrivateLinkResources_Get.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubSharedPrivateLinkResourcesGet(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubSharedPrivateLinkResources()
- .getWithResponse("upstream", "myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesListSamples.java
deleted file mode 100644
index 2ba107709056e..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubSharedPrivateLinkResourcesListSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-
-/** Samples for WebPubSubSharedPrivateLinkResources List. */
-public final class WebPubSubSharedPrivateLinkResourcesListSamples {
- /**
- * Sample code: WebPubSubSharedPrivateLinkResources_List.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubSharedPrivateLinkResourcesList(
- com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- webPubSubManager
- .webPubSubSharedPrivateLinkResources()
- .list("myResourceGroup", "myWebPubSubService", Context.NONE);
- }
-}
diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubUpdateSamples.java
deleted file mode 100644
index 7615d3d321556..0000000000000
--- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/WebPubSubUpdateSamples.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.webpubsub;
-
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.webpubsub.models.AclAction;
-import com.azure.resourcemanager.webpubsub.models.DiagnosticConfiguration;
-import com.azure.resourcemanager.webpubsub.models.EventHandlerSettings;
-import com.azure.resourcemanager.webpubsub.models.EventHandlerTemplate;
-import com.azure.resourcemanager.webpubsub.models.ManagedIdentity;
-import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType;
-import com.azure.resourcemanager.webpubsub.models.NetworkAcl;
-import com.azure.resourcemanager.webpubsub.models.PrivateEndpointAcl;
-import com.azure.resourcemanager.webpubsub.models.ResourceSku;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubResource;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier;
-import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/** Samples for WebPubSub Update. */
-public final class WebPubSubUpdateSamples {
- /**
- * Sample code: WebPubSub_Update.
- *
- * @param webPubSubManager Entry point to WebPubSubManager. REST API for Azure WebPubSub Service.
- */
- public static void webPubSubUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager webPubSubManager) {
- WebPubSubResource resource =
- webPubSubManager
- .webPubSubs()
- .getByResourceGroupWithResponse("myResourceGroup", "myWebPubSubService", Context.NONE)
- .getValue();
- resource
- .update()
- .withTags(mapOf("key1", "value1"))
- .withSku(new ResourceSku().withName("Standard_S1").withTier(WebPubSubSkuTier.STANDARD).withCapacity(1))
- .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED))
- .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false))
- .withDiagnosticConfiguration(
- new DiagnosticConfiguration()
- .withEnableConnectivityLogs("Disabled")
- .withEnableMessagingLogs("Disabled")
- .withEnableLiveTrace("Disabled"))
- .withEventHandler(
- new EventHandlerSettings()
- .withItems(
- mapOf(
- "hub1",
- Arrays
- .asList(
- new EventHandlerTemplate()
- .withUrlTemplate("https://example.com/chat/api/hub1")
- .withUserEventPattern("*")),
- "hub2",
- Arrays
- .asList(
- new EventHandlerTemplate()
- .withUrlTemplate("https://example.com/chat/api/hub2/example1")
- .withUserEventPattern("example1"),
- new EventHandlerTemplate()
- .withUrlTemplate("https://example.com/chat/api/hub2/example2")
- .withUserEventPattern("example2")))))
- .withNetworkACLs(
- new WebPubSubNetworkACLs()
- .withDefaultAction(AclAction.DENY)
- .withPublicNetwork(
- new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)))
- .withPrivateEndpoints(
- Arrays
- .asList(
- new PrivateEndpointAcl()
- .withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION))
- .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e"))))
- .withPublicNetworkAccess("Enabled")
- .withDisableLocalAuth(false)
- .withDisableAadAuth(false)
- .apply();
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}