diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md index ece5ef69f8b4..b62a442a54cd 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-06-06) + +- 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-2023-06-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md index 7502907475b4..89b831e62aad 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-2023-02-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2023-06-01-preview. 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 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md index a62945da4ad9..5c74826f0ddd 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md @@ -18,6 +18,7 @@ - [List](#webpubsub_list) - [ListByResourceGroup](#webpubsub_listbyresourcegroup) - [ListKeys](#webpubsub_listkeys) +- [ListReplicaSkus](#webpubsub_listreplicaskus) - [ListSkus](#webpubsub_listskus) - [RegenerateKey](#webpubsub_regeneratekey) - [Restart](#webpubsub_restart) @@ -55,6 +56,15 @@ - [List](#webpubsubprivatelinkresources_list) +## WebPubSubReplicas + +- [CreateOrUpdate](#webpubsubreplicas_createorupdate) +- [Delete](#webpubsubreplicas_delete) +- [Get](#webpubsubreplicas_get) +- [List](#webpubsubreplicas_list) +- [Restart](#webpubsubreplicas_restart) +- [Update](#webpubsubreplicas_update) + ## WebPubSubSharedPrivateLinkResources - [CreateOrUpdate](#webpubsubsharedprivatelinkresources_createorupdate) @@ -67,7 +77,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/Operations_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -86,7 +96,7 @@ public final class OperationsListSamples { /** Samples for Usages List. */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/Usages_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/Usages_List.json */ /** * Sample code: Usages_List. @@ -107,7 +117,7 @@ import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters; /** Samples for WebPubSub CheckNameAvailability. */ public final class WebPubSubCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_CheckNameAvailability.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_CheckNameAvailability.json */ /** * Sample code: WebPubSub_CheckNameAvailability. @@ -138,6 +148,7 @@ 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.ServiceKind; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; @@ -149,7 +160,7 @@ import java.util.Map; /** Samples for WebPubSub CreateOrUpdate. */ public final class WebPubSubCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_CreateOrUpdate.json */ /** * Sample code: WebPubSub_CreateOrUpdate. @@ -164,6 +175,7 @@ public final class WebPubSubCreateOrUpdateSamples { .withExistingResourceGroup("myResourceGroup") .withTags(mapOf("key1", "value1")) .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) + .withKind(ServiceKind.WEB_PUB_SUB) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) .withLiveTraceConfiguration( @@ -207,7 +219,7 @@ public final class WebPubSubCreateOrUpdateSamples { /** Samples for WebPubSub Delete. */ public final class WebPubSubDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_Delete.json */ /** * Sample code: WebPubSub_Delete. @@ -226,7 +238,7 @@ public final class WebPubSubDeleteSamples { /** Samples for WebPubSub GetByResourceGroup. */ public final class WebPubSubGetByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_Get.json */ /** * Sample code: WebPubSub_Get. @@ -247,7 +259,7 @@ public final class WebPubSubGetByResourceGroupSamples { /** Samples for WebPubSub List. */ public final class WebPubSubListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_ListBySubscription.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListBySubscription.json */ /** * Sample code: WebPubSub_ListBySubscription. @@ -266,7 +278,7 @@ public final class WebPubSubListSamples { /** Samples for WebPubSub ListByResourceGroup. */ public final class WebPubSubListByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_ListByResourceGroup.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListByResourceGroup.json */ /** * Sample code: WebPubSub_ListByResourceGroup. @@ -285,7 +297,7 @@ public final class WebPubSubListByResourceGroupSamples { /** Samples for WebPubSub ListKeys. */ public final class WebPubSubListKeysSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_ListKeys.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListKeys.json */ /** * Sample code: WebPubSub_ListKeys. @@ -300,13 +312,35 @@ public final class WebPubSubListKeysSamples { } ``` +### WebPubSub_ListReplicaSkus + +```java +/** Samples for WebPubSub ListReplicaSkus. */ +public final class WebPubSubListReplicaSkusSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListReplicaSkus.json + */ + /** + * Sample code: WebPubSub_ListReplicaSkus. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubListReplicaSkus(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubs() + .listReplicaSkusWithResponse( + "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", com.azure.core.util.Context.NONE); + } +} +``` + ### WebPubSub_ListSkus ```java /** Samples for WebPubSub ListSkus. */ public final class WebPubSubListSkusSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_ListSkus.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListSkus.json */ /** * Sample code: WebPubSub_ListSkus. @@ -330,7 +364,7 @@ import com.azure.resourcemanager.webpubsub.models.RegenerateKeyParameters; /** Samples for WebPubSub RegenerateKey. */ public final class WebPubSubRegenerateKeySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_RegenerateKey.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_RegenerateKey.json */ /** * Sample code: WebPubSub_RegenerateKey. @@ -355,7 +389,7 @@ public final class WebPubSubRegenerateKeySamples { /** Samples for WebPubSub Restart. */ public final class WebPubSubRestartSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_Restart.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_Restart.json */ /** * Sample code: WebPubSub_Restart. @@ -391,7 +425,7 @@ import java.util.Map; /** Samples for WebPubSub Update. */ public final class WebPubSubUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_Update.json */ /** * Sample code: WebPubSub_Update. @@ -452,7 +486,7 @@ public final class WebPubSubUpdateSamples { /** Samples for WebPubSubCustomCertificates CreateOrUpdate. */ public final class WebPubSubCustomCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomCertificates_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomCertificates_CreateOrUpdate.json */ /** * Sample code: WebPubSubCustomCertificates_CreateOrUpdate. @@ -479,7 +513,7 @@ public final class WebPubSubCustomCertificatesCreateOrUpdateSamples { /** Samples for WebPubSubCustomCertificates Delete. */ public final class WebPubSubCustomCertificatesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomCertificates_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomCertificates_Delete.json */ /** * Sample code: WebPubSubCustomCertificates_Delete. @@ -500,7 +534,7 @@ public final class WebPubSubCustomCertificatesDeleteSamples { /** Samples for WebPubSubCustomCertificates Get. */ public final class WebPubSubCustomCertificatesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomCertificates_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomCertificates_Get.json */ /** * Sample code: WebPubSubCustomCertificates_Get. @@ -521,7 +555,7 @@ public final class WebPubSubCustomCertificatesGetSamples { /** Samples for WebPubSubCustomCertificates List. */ public final class WebPubSubCustomCertificatesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomCertificates_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomCertificates_List.json */ /** * Sample code: WebPubSubCustomCertificates_List. @@ -544,7 +578,7 @@ import com.azure.resourcemanager.webpubsub.models.ResourceReference; /** Samples for WebPubSubCustomDomains CreateOrUpdate. */ public final class WebPubSubCustomDomainsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomDomains_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomDomains_CreateOrUpdate.json */ /** * Sample code: WebPubSubCustomDomains_CreateOrUpdate. @@ -573,7 +607,7 @@ public final class WebPubSubCustomDomainsCreateOrUpdateSamples { /** Samples for WebPubSubCustomDomains Delete. */ public final class WebPubSubCustomDomainsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomDomains_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomDomains_Delete.json */ /** * Sample code: WebPubSubCustomDomains_Delete. @@ -594,7 +628,7 @@ public final class WebPubSubCustomDomainsDeleteSamples { /** Samples for WebPubSubCustomDomains Get. */ public final class WebPubSubCustomDomainsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomDomains_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomDomains_Get.json */ /** * Sample code: WebPubSubCustomDomains_Get. @@ -615,7 +649,7 @@ public final class WebPubSubCustomDomainsGetSamples { /** Samples for WebPubSubCustomDomains List. */ public final class WebPubSubCustomDomainsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomDomains_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomDomains_List.json */ /** * Sample code: WebPubSubCustomDomains_List. @@ -646,7 +680,7 @@ import java.util.Arrays; /** Samples for WebPubSubHubs CreateOrUpdate. */ public final class WebPubSubHubsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubHubs_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubHubs_CreateOrUpdate.json */ /** * Sample code: WebPubSubHubs_CreateOrUpdate. @@ -695,7 +729,7 @@ public final class WebPubSubHubsCreateOrUpdateSamples { /** Samples for WebPubSubHubs Delete. */ public final class WebPubSubHubsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubHubs_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubHubs_Delete.json */ /** * Sample code: WebPubSubHubs_Delete. @@ -716,7 +750,7 @@ public final class WebPubSubHubsDeleteSamples { /** Samples for WebPubSubHubs Get. */ public final class WebPubSubHubsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubHubs_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubHubs_Get.json */ /** * Sample code: WebPubSubHubs_Get. @@ -737,7 +771,7 @@ public final class WebPubSubHubsGetSamples { /** Samples for WebPubSubHubs List. */ public final class WebPubSubHubsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubHubs_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubHubs_List.json */ /** * Sample code: WebPubSubHubs_List. @@ -756,7 +790,7 @@ public final class WebPubSubHubsListSamples { /** Samples for WebPubSubPrivateEndpointConnections Delete. */ public final class WebPubSubPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateEndpointConnections_Delete.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Delete. @@ -782,7 +816,7 @@ public final class WebPubSubPrivateEndpointConnectionsDeleteSamples { /** Samples for WebPubSubPrivateEndpointConnections Get. */ public final class WebPubSubPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateEndpointConnections_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateEndpointConnections_Get.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Get. @@ -808,7 +842,7 @@ public final class WebPubSubPrivateEndpointConnectionsGetSamples { /** Samples for WebPubSubPrivateEndpointConnections List. */ public final class WebPubSubPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateEndpointConnections_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateEndpointConnections_List.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_List. @@ -835,7 +869,7 @@ import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionSt /** Samples for WebPubSubPrivateEndpointConnections Update. */ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateEndpointConnections_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateEndpointConnections_Update.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Update. @@ -851,10 +885,7 @@ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { "myResourceGroup", "myWebPubSubService", new PrivateEndpointConnectionInner() - .withPrivateEndpoint( - new PrivateEndpoint() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint")) + .withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState( new PrivateLinkServiceConnectionState() .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) @@ -870,7 +901,7 @@ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { /** Samples for WebPubSubPrivateLinkResources List. */ public final class WebPubSubPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateLinkResources_List.json */ /** * Sample code: WebPubSubPrivateLinkResources_List. @@ -885,13 +916,189 @@ public final class WebPubSubPrivateLinkResourcesListSamples { } ``` +### WebPubSubReplicas_CreateOrUpdate + +```java +import com.azure.resourcemanager.webpubsub.models.ResourceSku; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for WebPubSubReplicas CreateOrUpdate. */ +public final class WebPubSubReplicasCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_CreateOrUpdate.json + */ + /** + * Sample code: WebPubSubReplicas_CreateOrUpdate. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubReplicas() + .define("myWebPubSubService-eastus") + .withRegion("eastus") + .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) + .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; + } +} +``` + +### WebPubSubReplicas_Delete + +```java +/** Samples for WebPubSubReplicas Delete. */ +public final class WebPubSubReplicasDeleteSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_Delete.json + */ + /** + * Sample code: WebPubSubReplicas_Delete. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubReplicas() + .deleteWithResponse( + "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### WebPubSubReplicas_Get + +```java +/** Samples for WebPubSubReplicas Get. */ +public final class WebPubSubReplicasGetSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_Get.json + */ + /** + * Sample code: WebPubSubReplicas_Get. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubReplicas() + .getWithResponse( + "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### WebPubSubReplicas_List + +```java +/** Samples for WebPubSubReplicas List. */ +public final class WebPubSubReplicasListSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_List.json + */ + /** + * Sample code: WebPubSubReplicas_List. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubReplicas().list("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); + } +} +``` + +### WebPubSubReplicas_Restart + +```java +/** Samples for WebPubSubReplicas Restart. */ +public final class WebPubSubReplicasRestartSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_Restart.json + */ + /** + * Sample code: WebPubSubReplicas_Restart. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasRestart(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubReplicas() + .restart( + "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### WebPubSubReplicas_Update + +```java +import com.azure.resourcemanager.webpubsub.models.Replica; +import com.azure.resourcemanager.webpubsub.models.ResourceSku; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for WebPubSubReplicas Update. */ +public final class WebPubSubReplicasUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_Update.json + */ + /** + * Sample code: WebPubSubReplicas_Update. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + Replica resource = + manager + .webPubSubReplicas() + .getWithResponse( + "myResourceGroup", + "myWebPubSubService", + "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) + .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; + } +} +``` + ### WebPubSubSharedPrivateLinkResources_CreateOrUpdate ```java /** Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. */ public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_CreateOrUpdate. @@ -919,7 +1126,7 @@ public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples { /** Samples for WebPubSubSharedPrivateLinkResources Delete. */ public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubSharedPrivateLinkResources_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubSharedPrivateLinkResources_Delete.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Delete. @@ -941,7 +1148,7 @@ public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples { /** Samples for WebPubSubSharedPrivateLinkResources Get. */ public final class WebPubSubSharedPrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubSharedPrivateLinkResources_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubSharedPrivateLinkResources_Get.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Get. @@ -963,7 +1170,7 @@ public final class WebPubSubSharedPrivateLinkResourcesGetSamples { /** Samples for WebPubSubSharedPrivateLinkResources List. */ public final class WebPubSubSharedPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubSharedPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubSharedPrivateLinkResources_List.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml b/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml index 542aca8853dc..d4dc56241033 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml @@ -18,7 +18,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-2023-02-01. + 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-2023-06-01-preview. 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 50a82d2a7f8c..30c35cbe4870 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 @@ -32,6 +32,7 @@ import com.azure.resourcemanager.webpubsub.implementation.WebPubSubManagementClientBuilder; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateEndpointConnectionsImpl; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateLinkResourcesImpl; +import com.azure.resourcemanager.webpubsub.implementation.WebPubSubReplicasImpl; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubSharedPrivateLinkResourcesImpl; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubsImpl; import com.azure.resourcemanager.webpubsub.models.Operations; @@ -41,6 +42,7 @@ 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.WebPubSubReplicas; import com.azure.resourcemanager.webpubsub.models.WebPubSubSharedPrivateLinkResources; import com.azure.resourcemanager.webpubsub.models.WebPubSubs; import java.time.Duration; @@ -68,6 +70,8 @@ public final class WebPubSubManager { private WebPubSubPrivateLinkResources webPubSubPrivateLinkResources; + private WebPubSubReplicas webPubSubReplicas; + private WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources; private final WebPubSubManagementClient clientObject; @@ -235,7 +239,7 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.webpubsub") .append("/") - .append("1.0.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -393,6 +397,18 @@ public WebPubSubPrivateLinkResources webPubSubPrivateLinkResources() { return webPubSubPrivateLinkResources; } + /** + * Gets the resource collection API of WebPubSubReplicas. It manages Replica. + * + * @return Resource collection API of WebPubSubReplicas. + */ + public WebPubSubReplicas webPubSubReplicas() { + if (this.webPubSubReplicas == null) { + this.webPubSubReplicas = new WebPubSubReplicasImpl(clientObject.getWebPubSubReplicas(), this); + } + return webPubSubReplicas; + } + /** * Gets the resource collection API of WebPubSubSharedPrivateLinkResources. It manages SharedPrivateLinkResource. * diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomCertificatesClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomCertificatesClient.java index c0cd71249b75..5dac2b46db40 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomCertificatesClient.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomCertificatesClient.java @@ -18,8 +18,7 @@ public interface WebPubSubCustomCertificatesClient { /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -32,8 +31,7 @@ public interface WebPubSubCustomCertificatesClient { /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,8 +45,7 @@ public interface WebPubSubCustomCertificatesClient { /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -64,8 +61,7 @@ Response getWithResponse( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,8 +75,7 @@ Response getWithResponse( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -96,8 +91,7 @@ SyncPoller, CustomCertificateInner> beginCrea /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -118,8 +112,7 @@ SyncPoller, CustomCertificateInner> beginCrea /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -135,8 +128,7 @@ CustomCertificateInner createOrUpdate( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -157,8 +149,7 @@ CustomCertificateInner createOrUpdate( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -174,8 +165,7 @@ Response deleteWithResponse( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomDomainsClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomDomainsClient.java index af355e4264c5..14ddbfbcb9ac 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomDomainsClient.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomDomainsClient.java @@ -18,8 +18,7 @@ public interface WebPubSubCustomDomainsClient { /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -32,8 +31,7 @@ public interface WebPubSubCustomDomainsClient { /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,8 +45,7 @@ public interface WebPubSubCustomDomainsClient { /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -64,8 +61,7 @@ Response getWithResponse( /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,8 +75,7 @@ Response getWithResponse( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -96,8 +91,7 @@ SyncPoller, CustomDomainInner> beginCreateOrUpdate /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -114,8 +108,7 @@ SyncPoller, CustomDomainInner> beginCreateOrUpdate /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -131,8 +124,7 @@ CustomDomainInner createOrUpdate( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -149,8 +141,7 @@ CustomDomainInner createOrUpdate( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,8 +155,7 @@ CustomDomainInner createOrUpdate( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -181,8 +171,7 @@ SyncPoller, Void> beginDelete( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,8 +184,7 @@ SyncPoller, Void> beginDelete( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. 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 index 52526a9e58d9..d3f7c561b72b 100644 --- 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 @@ -18,8 +18,7 @@ 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -32,8 +31,7 @@ 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -48,8 +46,7 @@ public interface WebPubSubHubsClient { * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,8 +62,7 @@ Response getWithResponse( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -80,8 +76,7 @@ Response getWithResponse( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,8 +92,7 @@ SyncPoller, WebPubSubHubInner> beginCreateOrUpdate * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -115,8 +109,7 @@ SyncPoller, WebPubSubHubInner> beginCreateOrUpdate * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -132,8 +125,7 @@ WebPubSubHubInner createOrUpdate( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -150,8 +142,7 @@ WebPubSubHubInner createOrUpdate( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -165,8 +156,7 @@ WebPubSubHubInner createOrUpdate( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,8 +172,7 @@ SyncPoller, Void> beginDelete( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -196,8 +185,7 @@ SyncPoller, Void> beginDelete( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 df4372194707..088e2053c105 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 @@ -10,8 +10,7 @@ /** The interface for WebPubSubManagementClient class. */ public interface WebPubSubManagementClient { /** - * Gets Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -101,6 +100,13 @@ public interface WebPubSubManagementClient { */ WebPubSubPrivateLinkResourcesClient getWebPubSubPrivateLinkResources(); + /** + * Gets the WebPubSubReplicasClient object to access its operations. + * + * @return the WebPubSubReplicasClient object. + */ + WebPubSubReplicasClient getWebPubSubReplicas(); + /** * Gets the WebPubSubSharedPrivateLinkResourcesClient object to access its operations. * diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateEndpointConnectionsClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateEndpointConnectionsClient.java index cdfa308ba81f..ca03028bf0c1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateEndpointConnectionsClient.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateEndpointConnectionsClient.java @@ -20,8 +20,7 @@ public interface WebPubSubPrivateEndpointConnectionsClient { /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -34,8 +33,7 @@ public interface WebPubSubPrivateEndpointConnectionsClient { /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,9 +47,9 @@ public interface WebPubSubPrivateEndpointConnectionsClient { /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,9 +64,9 @@ Response getWithResponse( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -82,9 +80,9 @@ PrivateEndpointConnectionInner get( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @param context The context to associate with this operation. @@ -104,9 +102,9 @@ Response updateWithResponse( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,9 +122,9 @@ PrivateEndpointConnectionInner update( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -140,9 +138,9 @@ SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -157,9 +155,9 @@ SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -171,9 +169,9 @@ SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateLinkResourcesClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateLinkResourcesClient.java index c013fef721e1..45bce5befa4d 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateLinkResourcesClient.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubPrivateLinkResourcesClient.java @@ -15,8 +15,7 @@ public interface WebPubSubPrivateLinkResourcesClient { /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -30,8 +29,7 @@ public interface WebPubSubPrivateLinkResourcesClient { /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubReplicasClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubReplicasClient.java new file mode 100644 index 000000000000..0e4898bdbb77 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubReplicasClient.java @@ -0,0 +1,291 @@ +// 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.ReplicaInner; + +/** An instance of this class provides access to all the operations defined in WebPubSubReplicasClient. */ +public interface WebPubSubReplicasClient { + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner get(String resourceGroupName, String resourceName, String replicaName); + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicaInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicaInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update 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 class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner createOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner createOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicaInner> beginUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicaInner> beginUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update 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 class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner update(String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner update( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestart( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 restart(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 restart(String resourceGroupName, String resourceName, String replicaName, Context context); +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubSharedPrivateLinkResourcesClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubSharedPrivateLinkResourcesClient.java index 5e97253d9b1d..ef55efb72aa1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubSharedPrivateLinkResourcesClient.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubSharedPrivateLinkResourcesClient.java @@ -20,8 +20,7 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -34,8 +33,7 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,8 +48,7 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,8 +64,7 @@ Response getWithResponse( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -83,8 +79,7 @@ SharedPrivateLinkResourceInner get( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,8 +98,7 @@ SyncPoller, SharedPrivateLinkResource * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -125,8 +119,7 @@ SyncPoller, SharedPrivateLinkResource * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -145,8 +138,7 @@ SharedPrivateLinkResourceInner createOrUpdate( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -167,8 +159,7 @@ SharedPrivateLinkResourceInner createOrUpdate( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -183,8 +174,7 @@ SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -200,8 +190,7 @@ SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -214,8 +203,7 @@ SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 be637643697f..b25a183ce80e 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 @@ -75,8 +75,7 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -89,8 +88,7 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -104,8 +102,7 @@ Response checkNameAvailabilityWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -120,8 +117,7 @@ Response getByResourceGroupWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -134,8 +130,7 @@ Response getByResourceGroupWithResponse( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,8 +145,7 @@ SyncPoller, WebPubSubResourceInner> beginCrea /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -167,8 +161,7 @@ SyncPoller, WebPubSubResourceInner> beginCrea /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -183,8 +176,7 @@ WebPubSubResourceInner createOrUpdate( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -200,8 +192,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -214,8 +205,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -229,8 +219,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -242,8 +231,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,8 +244,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -272,8 +259,7 @@ SyncPoller, WebPubSubResourceInner> beginUpda /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -289,8 +275,7 @@ SyncPoller, WebPubSubResourceInner> beginUpda /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -304,8 +289,7 @@ SyncPoller, WebPubSubResourceInner> beginUpda /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -321,8 +305,7 @@ WebPubSubResourceInner update( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -336,8 +319,7 @@ WebPubSubResourceInner update( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -350,8 +332,7 @@ WebPubSubResourceInner update( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -366,8 +347,7 @@ SyncPoller, WebPubSubKeysInner> beginRegenerateKe /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -383,8 +363,7 @@ SyncPoller, WebPubSubKeysInner> beginRegenerateKe /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -398,8 +377,7 @@ SyncPoller, WebPubSubKeysInner> beginRegenerateKe /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -412,11 +390,40 @@ SyncPoller, WebPubSubKeysInner> beginRegenerateKe WebPubSubKeysInner regenerateKey( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context); + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listReplicaSkusWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 listReplicaSkus(String resourceGroupName, String resourceName, String replicaName); + /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -429,8 +436,7 @@ WebPubSubKeysInner regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -444,8 +450,7 @@ WebPubSubKeysInner regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -457,8 +462,7 @@ WebPubSubKeysInner regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -471,8 +475,7 @@ WebPubSubKeysInner regenerateKey( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -486,8 +489,7 @@ WebPubSubKeysInner regenerateKey( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateInner.java index 6212dbe5bafb..2e88bdde3efd 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateInner.java @@ -14,38 +14,38 @@ /** A custom certificate. */ @Fluent public final class CustomCertificateInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Custom certificate properties. */ @JsonProperty(value = "properties", required = true) private CustomCertificateProperties innerProperties = new CustomCertificateProperties(); + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of CustomCertificateInner class. */ public CustomCertificateInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the innerProperties property: Custom certificate properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private CustomCertificateProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Custom certificate properties. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the innerProperties value. + * @return the systemData value. */ - private CustomCertificateProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainInner.java index 35f984be24c9..07a463571d27 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainInner.java @@ -15,38 +15,38 @@ /** A custom domain. */ @Fluent public final class CustomDomainInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Properties of a custom domain. */ @JsonProperty(value = "properties", required = true) private CustomDomainProperties innerProperties = new CustomDomainProperties(); + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of CustomDomainInner class. */ public CustomDomainInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the innerProperties property: Properties of a custom domain. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private CustomDomainProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of a custom domain. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the innerProperties value. + * @return the systemData value. */ - private CustomDomainProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** 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 794c183afb8f..fb737095aa3b 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 @@ -16,38 +16,38 @@ /** A private endpoint connection to an azure resource. */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Private endpoint connection properties */ @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of PrivateEndpointConnectionInner class. */ public PrivateEndpointConnectionInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the innerProperties property: Private endpoint connection properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Private endpoint connection properties. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the innerProperties value. + * @return the systemData value. */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceInner.java index 79297011189c..d26916a2123e 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceType; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -19,6 +20,12 @@ public final class PrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "properties") private PrivateLinkResourceProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of PrivateLinkResourceInner class. */ public PrivateLinkResourceInner() { } @@ -32,6 +39,15 @@ private PrivateLinkResourceProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the groupId property: Group Id of the private link resource. * diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/ReplicaInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/ReplicaInner.java new file mode 100644 index 000000000000..86d8bbcb9e4a --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/ReplicaInner.java @@ -0,0 +1,114 @@ +// 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.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.webpubsub.models.ProvisioningState; +import com.azure.resourcemanager.webpubsub.models.ResourceSku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A class represent a replica resource. */ +@Fluent +public final class ReplicaInner extends Resource { + /* + * The billing information of the resource. + */ + @JsonProperty(value = "sku") + private ResourceSku sku; + + /* + * The properties property. + */ + @JsonProperty(value = "properties") + private ReplicaProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ReplicaInner class. */ + public ReplicaInner() { + } + + /** + * Get the sku property: The billing information of the resource. + * + * @return the sku value. + */ + public ResourceSku sku() { + return this.sku; + } + + /** + * Set the sku property: The billing information of the resource. + * + * @param sku the sku value to set. + * @return the ReplicaInner object itself. + */ + public ReplicaInner withSku(ResourceSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the innerProperties property: The properties property. + * + * @return the innerProperties value. + */ + private ReplicaProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public ReplicaInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ReplicaInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/ReplicaProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/ReplicaProperties.java new file mode 100644 index 000000000000..f6bec2dba4c6 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/ReplicaProperties.java @@ -0,0 +1,40 @@ +// 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.resourcemanager.webpubsub.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ReplicaProperties model. */ +@Immutable +public final class ReplicaProperties { + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of ReplicaProperties class. */ + public ReplicaProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * 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/fluent/models/SharedPrivateLinkResourceInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SharedPrivateLinkResourceInner.java index 4782dea17814..5cd74f9ea568 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SharedPrivateLinkResourceInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SharedPrivateLinkResourceInner.java @@ -14,38 +14,38 @@ /** Describes a Shared Private Link Resource. */ @Fluent public final class SharedPrivateLinkResourceInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Describes the properties of an existing Shared Private Link Resource */ @JsonProperty(value = "properties") private SharedPrivateLinkResourceProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of SharedPrivateLinkResourceInner class. */ public SharedPrivateLinkResourceInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the innerProperties property: Describes the properties of an existing Shared Private Link Resource. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private SharedPrivateLinkResourceProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Describes the properties of an existing Shared Private Link Resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the innerProperties value. + * @return the systemData value. */ - private SharedPrivateLinkResourceProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** 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 index 54a397691b6d..cc999412a27a 100644 --- 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 @@ -14,31 +14,22 @@ /** A hub setting. */ @Fluent public final class WebPubSubHubInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Properties of a hub. */ @JsonProperty(value = "properties", required = true) private WebPubSubHubProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of WebPubSubHubInner class. */ public WebPubSubHubInner() { } - /** - * 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 a hub. * @@ -59,6 +50,15 @@ public WebPubSubHubInner withProperties(WebPubSubHubProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * 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 23e8bbcac758..269dd52ee348 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 @@ -12,6 +12,7 @@ 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.ServiceKind; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; import com.fasterxml.jackson.annotation.JsonProperty; @@ -33,6 +34,12 @@ public final class WebPubSubResourceInner extends Resource { @JsonProperty(value = "properties") private WebPubSubProperties innerProperties; + /* + * The kind of the service + */ + @JsonProperty(value = "kind") + private ServiceKind kind; + /* * A class represent managed identities used for request and response */ @@ -40,7 +47,7 @@ public final class WebPubSubResourceInner extends Resource { private ManagedIdentity identity; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -78,6 +85,26 @@ private WebPubSubProperties innerProperties() { return this.innerProperties; } + /** + * Get the kind property: The kind of the service. + * + * @return the kind value. + */ + public ServiceKind kind() { + return this.kind; + } + + /** + * Set the kind property: The kind of the service. + * + * @param kind the kind value to set. + * @return the WebPubSubResourceInner object itself. + */ + public WebPubSubResourceInner withKind(ServiceKind kind) { + this.kind = kind; + return this; + } + /** * Get the identity property: A class represent managed identities used for request and response. * @@ -99,7 +126,7 @@ public WebPubSubResourceInner withIdentity(ManagedIdentity identity) { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateLinkResourceImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateLinkResourceImpl.java index 8d7846eafab3..b4ed2941ec4b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateLinkResourceImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateLinkResourceImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.webpubsub.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.webpubsub.models.PrivateLinkResource; import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceType; @@ -33,6 +34,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String groupId() { return this.innerModel().groupId(); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/ReplicaImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/ReplicaImpl.java new file mode 100644 index 000000000000..11de23ff0f5f --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/ReplicaImpl.java @@ -0,0 +1,192 @@ +// 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.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.webpubsub.fluent.models.ReplicaInner; +import com.azure.resourcemanager.webpubsub.models.ProvisioningState; +import com.azure.resourcemanager.webpubsub.models.Replica; +import com.azure.resourcemanager.webpubsub.models.ResourceSku; +import java.util.Collections; +import java.util.Map; + +public final class ReplicaImpl implements Replica, Replica.Definition, Replica.Update { + private ReplicaInner 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 String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ResourceSku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ReplicaInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String replicaName; + + public ReplicaImpl withExistingWebPubSub(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public Replica create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebPubSubReplicas() + .createOrUpdate(resourceGroupName, resourceName, replicaName, this.innerModel(), Context.NONE); + return this; + } + + public Replica create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebPubSubReplicas() + .createOrUpdate(resourceGroupName, resourceName, replicaName, this.innerModel(), context); + return this; + } + + ReplicaImpl(String name, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + this.innerObject = new ReplicaInner(); + this.serviceManager = serviceManager; + this.replicaName = name; + } + + public ReplicaImpl update() { + return this; + } + + public Replica apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebPubSubReplicas() + .update(resourceGroupName, resourceName, replicaName, this.innerModel(), Context.NONE); + return this; + } + + public Replica apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebPubSubReplicas() + .update(resourceGroupName, resourceName, replicaName, this.innerModel(), context); + return this; + } + + ReplicaImpl(ReplicaInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "webPubSub"); + this.replicaName = Utils.getValueFromIdByName(innerObject.id(), "replicas"); + } + + public Replica refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebPubSubReplicas() + .getWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE) + .getValue(); + return this; + } + + public Replica refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebPubSubReplicas() + .getWithResponse(resourceGroupName, resourceName, replicaName, context) + .getValue(); + return this; + } + + public void restart() { + serviceManager.webPubSubReplicas().restart(resourceGroupName, resourceName, replicaName); + } + + public void restart(Context context) { + serviceManager.webPubSubReplicas().restart(resourceGroupName, resourceName, replicaName, context); + } + + public ReplicaImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ReplicaImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ReplicaImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public ReplicaImpl withSku(ResourceSku sku) { + this.innerModel().withSku(sku); + return this; + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesClientImpl.java index 23940624d5f7..97359db50697 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesClientImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesClientImpl.java @@ -140,8 +140,7 @@ Mono> listNext( /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -198,8 +197,7 @@ private Mono> listSinglePageAsync( /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,8 +252,7 @@ private Mono> listSinglePageAsync( /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -271,8 +268,7 @@ private PagedFlux listAsync(String resourceGroupName, St /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -291,8 +287,7 @@ private PagedFlux listAsync( /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -307,8 +302,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -324,8 +318,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,8 +372,7 @@ private Mono> getWithResponseAsync( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -432,8 +424,7 @@ private Mono> getWithResponseAsync( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,8 +442,7 @@ private Mono getAsync( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -470,8 +460,7 @@ public Response getWithResponse( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -487,8 +476,7 @@ public CustomCertificateInner get(String resourceGroupName, String resourceName, /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -549,8 +537,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -613,8 +600,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -641,8 +627,7 @@ private PollerFlux, CustomCertificateInner> b /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -675,8 +660,7 @@ private PollerFlux, CustomCertificateInner> b /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -696,8 +680,7 @@ public SyncPoller, CustomCertificateInner> be /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -722,8 +705,7 @@ public SyncPoller, CustomCertificateInner> be /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -743,8 +725,7 @@ private Mono createOrUpdateAsync( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -769,8 +750,7 @@ private Mono createOrUpdateAsync( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -788,8 +768,7 @@ public CustomCertificateInner createOrUpdate( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -812,8 +791,7 @@ public CustomCertificateInner createOrUpdate( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -867,8 +845,7 @@ private Mono> deleteWithResponseAsync( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -920,8 +897,7 @@ private Mono> deleteWithResponseAsync( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -938,8 +914,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -957,8 +932,7 @@ public Response deleteWithResponse( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsClientImpl.java index e97f2ef2cd65..0eb450b5aa14 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsClientImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsClientImpl.java @@ -139,8 +139,7 @@ Mono> listNext( /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -196,8 +195,7 @@ private Mono> listSinglePageAsync(String resour /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,8 +250,7 @@ private Mono> listSinglePageAsync( /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -269,8 +266,7 @@ private PagedFlux listAsync(String resourceGroupName, String /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,8 +284,7 @@ private PagedFlux listAsync(String resourceGroupName, String /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -304,8 +299,7 @@ public PagedIterable list(String resourceGroupName, String re /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -321,8 +315,7 @@ public PagedIterable list(String resourceGroupName, String re /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -375,8 +368,7 @@ private Mono> getWithResponseAsync( /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -427,8 +419,7 @@ private Mono> getWithResponseAsync( /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -445,8 +436,7 @@ private Mono getAsync(String resourceGroupName, String resour /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -464,8 +454,7 @@ public Response getWithResponse( /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -481,8 +470,7 @@ public CustomDomainInner get(String resourceGroupName, String resourceName, Stri /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -542,8 +530,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -601,8 +588,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -629,8 +615,7 @@ private PollerFlux, CustomDomainInner> beginCreate /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -655,8 +640,7 @@ private PollerFlux, CustomDomainInner> beginCreate /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -674,8 +658,7 @@ public SyncPoller, CustomDomainInner> beginCreateO /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -696,8 +679,7 @@ public SyncPoller, CustomDomainInner> beginCreateO /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -717,8 +699,7 @@ private Mono createOrUpdateAsync( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -739,8 +720,7 @@ private Mono createOrUpdateAsync( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -758,8 +738,7 @@ public CustomDomainInner createOrUpdate( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -778,8 +757,7 @@ public CustomDomainInner createOrUpdate( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -832,8 +810,7 @@ private Mono>> deleteWithResponseAsync( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -884,8 +861,7 @@ private Mono>> deleteWithResponseAsync( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -906,8 +882,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -929,8 +904,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -946,8 +920,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -965,8 +938,7 @@ public SyncPoller, Void> beginDelete( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -984,8 +956,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -1004,8 +975,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1020,8 +990,7 @@ public void delete(String resourceGroupName, String resourceName, String name) { /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. 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 index 60c986f32ed5..01a508586c32 100644 --- 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 @@ -27,14 +27,14 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public WebPubSubHubProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } 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 index b9112f9004e9..c938a84fcc1e 100644 --- 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 @@ -138,8 +138,7 @@ Mono> listNext( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -195,8 +194,7 @@ private Mono> listSinglePageAsync(String resour /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -251,8 +249,7 @@ private Mono> listSinglePageAsync( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -268,8 +265,7 @@ private PagedFlux listAsync(String resourceGroupName, String /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,8 +283,7 @@ private PagedFlux listAsync(String resourceGroupName, String /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -303,8 +298,7 @@ public PagedIterable list(String resourceGroupName, String re /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -321,8 +315,7 @@ public PagedIterable list(String resourceGroupName, String re * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -375,8 +368,7 @@ private Mono> getWithResponseAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -427,8 +419,7 @@ private Mono> getWithResponseAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -445,8 +436,7 @@ private Mono getAsync(String hubName, String resourceGroupNam * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -464,8 +454,7 @@ public Response getWithResponse( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -481,8 +470,7 @@ public WebPubSubHubInner get(String hubName, String resourceGroupName, String re * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -542,8 +530,7 @@ private Mono>> createOrUpdateWithResponseAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -601,8 +588,7 @@ private Mono>> createOrUpdateWithResponseAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -629,8 +615,7 @@ private PollerFlux, WebPubSubHubInner> beginCreate * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -655,8 +640,7 @@ private PollerFlux, WebPubSubHubInner> beginCreate * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -674,8 +658,7 @@ public SyncPoller, WebPubSubHubInner> beginCreateO * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -696,8 +679,7 @@ public SyncPoller, WebPubSubHubInner> beginCreateO * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -717,8 +699,7 @@ private Mono createOrUpdateAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -739,8 +720,7 @@ private Mono createOrUpdateAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of WebPubSubHub and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -758,8 +738,7 @@ public WebPubSubHubInner createOrUpdate( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -778,8 +757,7 @@ public WebPubSubHubInner createOrUpdate( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -832,8 +810,7 @@ private Mono>> deleteWithResponseAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -884,8 +861,7 @@ private Mono>> deleteWithResponseAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -906,8 +882,7 @@ private PollerFlux, Void> beginDeleteAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -930,8 +905,7 @@ private PollerFlux, Void> beginDeleteAsync( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -948,8 +922,7 @@ public SyncPoller, Void> beginDelete( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -967,8 +940,7 @@ public SyncPoller, Void> beginDelete( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -986,8 +958,7 @@ private Mono deleteAsync(String hubName, String resourceGroupName, String * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1006,8 +977,7 @@ private Mono deleteAsync(String hubName, String resourceGroupName, String * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1022,8 +992,7 @@ public 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubManagementClientBuilder.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubManagementClientBuilder.java index 219af2ba33a1..1c22f5150117 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubManagementClientBuilder.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubManagementClientBuilder.java @@ -18,14 +18,12 @@ @ServiceClientBuilder(serviceClients = {WebPubSubManagementClientImpl.class}) public final class WebPubSubManagementClientBuilder { /* - * Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of - * the URI for every service call. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Sets The ID of the target subscription. The value must be an UUID. * * @param subscriptionId the subscriptionId value. * @return the WebPubSubManagementClientBuilder. 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 286a705a5d62..bb91f20fdf8d 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 @@ -30,6 +30,7 @@ import com.azure.resourcemanager.webpubsub.fluent.WebPubSubManagementClient; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubPrivateEndpointConnectionsClient; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubPrivateLinkResourcesClient; +import com.azure.resourcemanager.webpubsub.fluent.WebPubSubReplicasClient; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubSharedPrivateLinkResourcesClient; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubsClient; import java.io.IOException; @@ -44,15 +45,11 @@ /** Initializes a new instance of the WebPubSubManagementClientImpl type. */ @ServiceClient(builder = WebPubSubManagementClientBuilder.class) public final class WebPubSubManagementClientImpl implements WebPubSubManagementClient { - /** - * Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of - * the URI for every service call. - */ + /** The ID of the target subscription. The value must be an UUID. */ private final String subscriptionId; /** - * Gets Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -216,6 +213,18 @@ public WebPubSubPrivateLinkResourcesClient getWebPubSubPrivateLinkResources() { return this.webPubSubPrivateLinkResources; } + /** The WebPubSubReplicasClient object to access its operations. */ + private final WebPubSubReplicasClient webPubSubReplicas; + + /** + * Gets the WebPubSubReplicasClient object to access its operations. + * + * @return the WebPubSubReplicasClient object. + */ + public WebPubSubReplicasClient getWebPubSubReplicas() { + return this.webPubSubReplicas; + } + /** The WebPubSubSharedPrivateLinkResourcesClient object to access its operations. */ private final WebPubSubSharedPrivateLinkResourcesClient webPubSubSharedPrivateLinkResources; @@ -235,8 +244,7 @@ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkRe * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure subscription. The - * subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ WebPubSubManagementClientImpl( @@ -251,7 +259,7 @@ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkRe this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-02-01"; + this.apiVersion = "2023-06-01-preview"; this.operations = new OperationsClientImpl(this); this.webPubSubs = new WebPubSubsClientImpl(this); this.usages = new UsagesClientImpl(this); @@ -260,6 +268,7 @@ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkRe this.webPubSubHubs = new WebPubSubHubsClientImpl(this); this.webPubSubPrivateEndpointConnections = new WebPubSubPrivateEndpointConnectionsClientImpl(this); this.webPubSubPrivateLinkResources = new WebPubSubPrivateLinkResourcesClientImpl(this); + this.webPubSubReplicas = new WebPubSubReplicasClientImpl(this); this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesClientImpl(this); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateEndpointConnectionsClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateEndpointConnectionsClientImpl.java index 5208b634b006..0b5c05634189 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateEndpointConnectionsClientImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateEndpointConnectionsClientImpl.java @@ -144,8 +144,7 @@ Mono> listNext( /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -203,8 +202,7 @@ private Mono> listSinglePageAsync( /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -260,8 +258,7 @@ private Mono> listSinglePageAsync( /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -277,8 +274,7 @@ private PagedFlux listAsync(String resourceGroup /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -297,8 +293,7 @@ private PagedFlux listAsync( /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -313,8 +308,7 @@ public PagedIterable list(String resourceGroupNa /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -331,9 +325,9 @@ public PagedIterable list( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -389,9 +383,9 @@ private Mono> getWithResponseAsync( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -445,9 +439,9 @@ private Mono> getWithResponseAsync( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -464,9 +458,9 @@ private Mono getAsync( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -483,9 +477,9 @@ public Response getWithResponse( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -501,9 +495,9 @@ public PrivateEndpointConnectionInner get( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -569,9 +563,9 @@ private Mono> updateWithResponseAsync( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @param context The context to associate with this operation. @@ -636,9 +630,9 @@ private Mono> updateWithResponseAsync( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -659,9 +653,9 @@ private Mono updateAsync( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @param context The context to associate with this operation. @@ -685,9 +679,9 @@ public Response updateWithResponse( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -709,9 +703,9 @@ public PrivateEndpointConnectionInner update( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -766,9 +760,9 @@ private Mono>> deleteWithResponseAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -821,9 +815,9 @@ private Mono>> deleteWithResponseAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -844,9 +838,9 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -868,9 +862,9 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -886,9 +880,9 @@ public SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -907,9 +901,9 @@ public SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -927,9 +921,9 @@ private Mono deleteAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -948,9 +942,9 @@ private Mono deleteAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -964,9 +958,9 @@ public void delete(String privateEndpointConnectionName, String resourceGroupNam /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateLinkResourcesClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateLinkResourcesClientImpl.java index dad60ed13158..419408502be2 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateLinkResourcesClientImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateLinkResourcesClientImpl.java @@ -88,8 +88,7 @@ Mono> listNext( /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -147,8 +146,7 @@ private Mono> listSinglePageAsync( /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,8 +202,7 @@ private Mono> listSinglePageAsync( /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -222,8 +219,7 @@ private PagedFlux listAsync(String resourceGroupName, /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,8 +239,7 @@ private PagedFlux listAsync( /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -260,8 +255,7 @@ public PagedIterable list(String resourceGroupName, St /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicasClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicasClientImpl.java new file mode 100644 index 000000000000..ede45c32eeec --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicasClientImpl.java @@ -0,0 +1,1547 @@ +// 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.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.webpubsub.fluent.WebPubSubReplicasClient; +import com.azure.resourcemanager.webpubsub.fluent.models.ReplicaInner; +import com.azure.resourcemanager.webpubsub.models.ReplicaList; +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 WebPubSubReplicasClient. */ +public final class WebPubSubReplicasClientImpl implements WebPubSubReplicasClient { + /** The proxy service used to perform REST calls. */ + private final WebPubSubReplicasService service; + + /** The service client containing this operation class. */ + private final WebPubSubManagementClientImpl client; + + /** + * Initializes an instance of WebPubSubReplicasClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WebPubSubReplicasClientImpl(WebPubSubManagementClientImpl client) { + this.service = + RestProxy.create(WebPubSubReplicasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebPubSubManagementClientWebPubSubReplicas to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebPubSubManagementC") + public interface WebPubSubReplicasService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ReplicaInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ReplicaInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/restart") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> restart( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @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 all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @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.getSubscriptionId(), + resourceGroupName, + resourceName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @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.getSubscriptionId(), + resourceGroupName, + resourceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedFlux}. + */ + @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 all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the replica and its properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the replica and its properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, String replicaName) { + return getWithResponseAsync(resourceGroupName, resourceName, replicaName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, replicaName, context).block(); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the replica and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner get(String resourceGroupName, String resourceName, String replicaName) { + return getWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE).getValue(); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update 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 class represent a replica resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicaInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, replicaName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, this.client.getContext()); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicaInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, replicaName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, context); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicaInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters).getSyncPoller(); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicaInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context) + .getSyncPoller(); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update 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 class represent a replica resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update 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 class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner createOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters).block(); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner createOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context).block(); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String replicaName) { + return deleteWithResponseAsync(resourceGroupName, resourceName, replicaName).flatMap(ignored -> Mono.empty()); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, replicaName, context).block(); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String replicaName) { + deleteWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update 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 class represent a replica resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName 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 + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName 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 + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicaInner> beginUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, resourceName, replicaName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, this.client.getContext()); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicaInner> beginUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, resourceName, replicaName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, context); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicaInner> beginUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return this.beginUpdateAsync(resourceGroupName, resourceName, replicaName, parameters).getSyncPoller(); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicaInner> beginUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context).getSyncPoller(); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update 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 class represent a replica resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return beginUpdateAsync(resourceGroupName, resourceName, replicaName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update 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 class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner update( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return updateAsync(resourceGroupName, resourceName, replicaName, parameters).block(); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner update( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return updateAsync(resourceGroupName, resourceName, replicaName, parameters, context).block(); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restartWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restart( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restartWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restart( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestartAsync( + String resourceGroupName, String resourceName, String replicaName) { + Mono>> mono = restartWithResponseAsync(resourceGroupName, resourceName, replicaName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestartAsync( + String resourceGroupName, String resourceName, String replicaName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restartWithResponseAsync(resourceGroupName, resourceName, replicaName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestart( + String resourceGroupName, String resourceName, String replicaName) { + return this.beginRestartAsync(resourceGroupName, resourceName, replicaName).getSyncPoller(); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestart( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return this.beginRestartAsync(resourceGroupName, resourceName, replicaName, context).getSyncPoller(); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartAsync(String resourceGroupName, String resourceName, String replicaName) { + return beginRestartAsync(resourceGroupName, resourceName, replicaName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartAsync( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return beginRestartAsync(resourceGroupName, resourceName, replicaName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restart(String resourceGroupName, String resourceName, String replicaName) { + restartAsync(resourceGroupName, resourceName, replicaName).block(); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 restart(String resourceGroupName, String resourceName, String replicaName, Context context) { + restartAsync(resourceGroupName, resourceName, replicaName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicasImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicasImpl.java new file mode 100644 index 000000000000..6dba7fb39ffe --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicasImpl.java @@ -0,0 +1,196 @@ +// 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.WebPubSubReplicasClient; +import com.azure.resourcemanager.webpubsub.fluent.models.ReplicaInner; +import com.azure.resourcemanager.webpubsub.models.Replica; +import com.azure.resourcemanager.webpubsub.models.WebPubSubReplicas; + +public final class WebPubSubReplicasImpl implements WebPubSubReplicas { + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubReplicasImpl.class); + + private final WebPubSubReplicasClient innerClient; + + private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; + + public WebPubSubReplicasImpl( + WebPubSubReplicasClient 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 ReplicaImpl(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 ReplicaImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, resourceName, replicaName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ReplicaImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Replica get(String resourceGroupName, String resourceName, String replicaName) { + ReplicaInner inner = this.serviceClient().get(resourceGroupName, resourceName, replicaName); + if (inner != null) { + return new ReplicaImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, replicaName, context); + } + + public void delete(String resourceGroupName, String resourceName, String replicaName) { + this.serviceClient().delete(resourceGroupName, resourceName, replicaName); + } + + public void restart(String resourceGroupName, String resourceName, String replicaName) { + this.serviceClient().restart(resourceGroupName, resourceName, replicaName); + } + + public void restart(String resourceGroupName, String resourceName, String replicaName, Context context) { + this.serviceClient().restart(resourceGroupName, resourceName, replicaName, context); + } + + public Replica getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String 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))); + } + String replicaName = Utils.getValueFromIdByName(id, "replicas"); + if (replicaName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String 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))); + } + String replicaName = Utils.getValueFromIdByName(id, "replicas"); + if (replicaName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, replicaName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String 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))); + } + String replicaName = Utils.getValueFromIdByName(id, "replicas"); + if (replicaName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); + } + this.deleteWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String 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))); + } + String replicaName = Utils.getValueFromIdByName(id, "replicas"); + if (replicaName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); + } + return this.deleteWithResponse(resourceGroupName, resourceName, replicaName, context); + } + + private WebPubSubReplicasClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { + return this.serviceManager; + } + + public ReplicaImpl define(String name) { + return new ReplicaImpl(name, this.manager()); + } +} 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 c587d21c607d..9d423a93cb48 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 @@ -18,6 +18,7 @@ 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.ServiceKind; import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResource; import com.azure.resourcemanager.webpubsub.models.WebPubSubKeys; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; @@ -63,6 +64,10 @@ public ResourceSku sku() { return this.innerModel().sku(); } + public ServiceKind kind() { + return this.innerModel().kind(); + } + public ManagedIdentity identity() { return this.innerModel().identity(); } @@ -302,6 +307,11 @@ public WebPubSubResourceImpl withSku(ResourceSku sku) { return this; } + public WebPubSubResourceImpl withKind(ServiceKind kind) { + this.innerModel().withKind(kind); + return this; + } + public WebPubSubResourceImpl withIdentity(ManagedIdentity identity) { this.innerModel().withIdentity(identity); return this; diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubSharedPrivateLinkResourcesClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubSharedPrivateLinkResourcesClientImpl.java index 3060051f276c..7ce399b986a8 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubSharedPrivateLinkResourcesClientImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubSharedPrivateLinkResourcesClientImpl.java @@ -144,8 +144,7 @@ Mono> listNext( /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -203,8 +202,7 @@ private Mono> listSinglePageAsync( /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -260,8 +258,7 @@ private Mono> listSinglePageAsync( /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -277,8 +274,7 @@ private PagedFlux listAsync(String resourceGroup /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -297,8 +293,7 @@ private PagedFlux listAsync( /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -313,8 +308,7 @@ public PagedIterable list(String resourceGroupNa /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -332,8 +326,7 @@ public PagedIterable list( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -390,8 +383,7 @@ private Mono> getWithResponseAsync( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -446,8 +438,7 @@ private Mono> getWithResponseAsync( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -465,8 +456,7 @@ private Mono getAsync( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -484,8 +474,7 @@ public Response getWithResponse( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -502,8 +491,7 @@ public SharedPrivateLinkResourceInner get( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -570,8 +558,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -637,8 +624,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -669,8 +655,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -705,8 +690,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -729,8 +713,7 @@ public SyncPoller, SharedPrivateLinkR * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -756,8 +739,7 @@ public SyncPoller, SharedPrivateLinkR * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -780,8 +762,7 @@ private Mono createOrUpdateAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -807,8 +788,7 @@ private Mono createOrUpdateAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -829,8 +809,7 @@ public SharedPrivateLinkResourceInner createOrUpdate( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -854,8 +833,7 @@ public SharedPrivateLinkResourceInner createOrUpdate( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -911,8 +889,7 @@ private Mono>> deleteWithResponseAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -966,8 +943,7 @@ private Mono>> deleteWithResponseAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -989,8 +965,7 @@ private PollerFlux, Void> beginDeleteAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1013,8 +988,7 @@ private PollerFlux, Void> beginDeleteAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1031,8 +1005,7 @@ public SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1052,8 +1025,7 @@ public SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1072,8 +1044,7 @@ private Mono deleteAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1093,8 +1064,7 @@ private Mono deleteAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1109,8 +1079,7 @@ public void delete(String sharedPrivateLinkResourceName, String resourceGroupNam * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 3a4e5950dba0..d552266dc316 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 @@ -184,7 +184,7 @@ Mono> listKeys( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/regenerateKey") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> regenerateKey( @HostParam("$host") String endpoint, @@ -196,6 +196,21 @@ Mono>> regenerateKey( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listReplicaSkus( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart") @@ -542,8 +557,7 @@ public PagedIterable list(Context context) { /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -595,8 +609,7 @@ private Mono> listByResourceGroupSinglePag /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -647,8 +660,7 @@ private Mono> listByResourceGroupSinglePag /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -665,8 +677,7 @@ private PagedFlux listByResourceGroupAsync(String resour /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -684,8 +695,7 @@ private PagedFlux listByResourceGroupAsync(String resour /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -700,8 +710,7 @@ public PagedIterable listByResourceGroup(String resource /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -717,8 +726,7 @@ public PagedIterable listByResourceGroup(String resource /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -766,8 +774,7 @@ private Mono> getByResourceGroupWithResponseAsy /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -813,8 +820,7 @@ private Mono> getByResourceGroupWithResponseAsy /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -830,8 +836,7 @@ private Mono getByResourceGroupAsync(String resourceGrou /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -848,8 +853,7 @@ public Response getByResourceGroupWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -864,8 +868,7 @@ public WebPubSubResourceInner getByResourceGroup(String resourceGroupName, Strin /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -920,8 +923,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -974,8 +976,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1001,8 +1002,7 @@ private PollerFlux, WebPubSubResourceInner> b /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -1030,8 +1030,7 @@ private PollerFlux, WebPubSubResourceInner> b /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1048,8 +1047,7 @@ public SyncPoller, WebPubSubResourceInner> be /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -1067,8 +1065,7 @@ public SyncPoller, WebPubSubResourceInner> be /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1087,8 +1084,7 @@ private Mono createOrUpdateAsync( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -1108,8 +1104,7 @@ private Mono createOrUpdateAsync( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1126,8 +1121,7 @@ public WebPubSubResourceInner createOrUpdate( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -1145,8 +1139,7 @@ public WebPubSubResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1193,8 +1186,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1240,8 +1232,7 @@ private Mono>> deleteWithResponseAsync( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1260,8 +1251,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1282,8 +1272,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1298,8 +1287,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1316,8 +1304,7 @@ public SyncPoller, Void> beginDelete( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1332,8 +1319,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1351,8 +1337,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, Co /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1366,8 +1351,7 @@ public void delete(String resourceGroupName, String resourceName) { /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1382,8 +1366,7 @@ public void delete(String resourceGroupName, String resourceName, Context contex /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1438,8 +1421,7 @@ private Mono>> updateWithResponseAsync( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1492,8 +1474,7 @@ private Mono>> updateWithResponseAsync( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1518,8 +1499,7 @@ private PollerFlux, WebPubSubResourceInner> b /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1547,8 +1527,7 @@ private PollerFlux, WebPubSubResourceInner> b /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1565,8 +1544,7 @@ public SyncPoller, WebPubSubResourceInner> be /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1584,8 +1562,7 @@ public SyncPoller, WebPubSubResourceInner> be /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1604,8 +1581,7 @@ private Mono updateAsync( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1625,8 +1601,7 @@ private Mono updateAsync( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1643,8 +1618,7 @@ public WebPubSubResourceInner update( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1662,8 +1636,7 @@ public WebPubSubResourceInner update( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1711,8 +1684,7 @@ private Mono> listKeysWithResponseAsync( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1758,8 +1730,7 @@ private Mono> listKeysWithResponseAsync( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1775,8 +1746,7 @@ private Mono listKeysAsync(String resourceGroupName, String /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1793,8 +1763,7 @@ public Response listKeysWithResponse( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1809,8 +1778,7 @@ public WebPubSubKeysInner listKeys(String resourceGroupName, String resourceName /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1866,8 +1834,7 @@ private Mono>> regenerateKeyWithResponseAsync( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -1921,8 +1888,7 @@ private Mono>> regenerateKeyWithResponseAsync( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1948,8 +1914,7 @@ private PollerFlux, WebPubSubKeysInner> beginRege /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -1973,8 +1938,7 @@ private PollerFlux, WebPubSubKeysInner> beginRege /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1991,8 +1955,7 @@ public SyncPoller, WebPubSubKeysInner> beginRegen /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -2010,8 +1973,7 @@ public SyncPoller, WebPubSubKeysInner> beginRegen /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2030,8 +1992,7 @@ private Mono regenerateKeyAsync( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -2051,8 +2012,7 @@ private Mono regenerateKeyAsync( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2069,8 +2029,7 @@ public WebPubSubKeysInner regenerateKey( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -2085,11 +2044,165 @@ public WebPubSubKeysInner regenerateKey( return regenerateKeyAsync(resourceGroupName, resourceName, parameters, context).block(); } + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listReplicaSkusWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listReplicaSkus( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listReplicaSkusWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listReplicaSkus( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listReplicaSkusAsync(String resourceGroupName, String resourceName, String replicaName) { + return listReplicaSkusWithResponseAsync(resourceGroupName, resourceName, replicaName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listReplicaSkusWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return listReplicaSkusWithResponseAsync(resourceGroupName, resourceName, replicaName, context).block(); + } + + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 listReplicaSkus(String resourceGroupName, String resourceName, String replicaName) { + return listReplicaSkusWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE).getValue(); + } + /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2136,8 +2249,7 @@ private Mono>> restartWithResponseAsync(String resourc /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2183,8 +2295,7 @@ private Mono>> restartWithResponseAsync( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2203,8 +2314,7 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2225,8 +2335,7 @@ private PollerFlux, Void> beginRestartAsync( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2241,8 +2350,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2259,8 +2367,7 @@ public SyncPoller, Void> beginRestart( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2275,8 +2382,7 @@ private Mono restartAsync(String resourceGroupName, String resourceName) { /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2294,8 +2400,7 @@ private Mono restartAsync(String resourceGroupName, String resourceName, C /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2309,8 +2414,7 @@ public void restart(String resourceGroupName, String resourceName) { /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2325,8 +2429,7 @@ public void restart(String resourceGroupName, String resourceName, Context conte /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2373,8 +2476,7 @@ private Mono> listSkusWithResponseAsync(String resourceGr /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2420,8 +2522,7 @@ private Mono> listSkusWithResponseAsync( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2437,8 +2538,7 @@ private Mono listSkusAsync(String resourceGroupName, String resour /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2454,8 +2554,7 @@ public Response listSkusWithResponse(String resourceGroupName, Str /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. 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 7d4c70cdec7a..498cec76be26 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 @@ -157,6 +157,30 @@ public WebPubSubKeys regenerateKey( } } + public Response listReplicaSkusWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + Response inner = + this.serviceClient().listReplicaSkusWithResponse(resourceGroupName, resourceName, replicaName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SkuListImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SkuList listReplicaSkus(String resourceGroupName, String resourceName, String replicaName) { + SkuListInner inner = this.serviceClient().listReplicaSkus(resourceGroupName, resourceName, replicaName); + if (inner != null) { + return new SkuListImpl(inner, this.manager()); + } else { + return null; + } + } + public void restart(String resourceGroupName, String resourceName) { this.serviceClient().restart(resourceGroupName, resourceName); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificate.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificate.java index 07bf938d8db0..3d559929906e 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificate.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificate.java @@ -32,7 +32,7 @@ public interface CustomCertificate { String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -98,8 +98,7 @@ 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @return the next definition stage. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java index 36edc99b482d..0b354c15b420 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java @@ -32,7 +32,7 @@ public interface CustomDomain { String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -91,8 +91,7 @@ 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @return the next definition stage. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NameAvailabilityParameters.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NameAvailabilityParameters.java index 7f2cbaa976e5..1112273c69aa 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NameAvailabilityParameters.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NameAvailabilityParameters.java @@ -12,7 +12,8 @@ @Fluent public final class NameAvailabilityParameters { /* - * The resource type. Can be "Microsoft.SignalRService/SignalR" or "Microsoft.SignalRService/webPubSub" + * The resource type. Can be "Microsoft.SignalRService/SignalR", "Microsoft.SignalRService/WebPubSub", + * "Microsoft.SignalRService/SignalR/replicas" or "Microsoft.SignalRService/WebPubSub/replicas" */ @JsonProperty(value = "type", required = true) private String type; @@ -28,8 +29,9 @@ public NameAvailabilityParameters() { } /** - * Get the type property: The resource type. Can be "Microsoft.SignalRService/SignalR" or - * "Microsoft.SignalRService/webPubSub". + * Get the type property: The resource type. Can be "Microsoft.SignalRService/SignalR", + * "Microsoft.SignalRService/WebPubSub", "Microsoft.SignalRService/SignalR/replicas" or + * "Microsoft.SignalRService/WebPubSub/replicas". * * @return the type value. */ @@ -38,8 +40,9 @@ public String type() { } /** - * Set the type property: The resource type. Can be "Microsoft.SignalRService/SignalR" or - * "Microsoft.SignalRService/webPubSub". + * Set the type property: The resource type. Can be "Microsoft.SignalRService/SignalR", + * "Microsoft.SignalRService/WebPubSub", "Microsoft.SignalRService/SignalR/replicas" or + * "Microsoft.SignalRService/WebPubSub/replicas". * * @param type the type value to set. * @return the NameAvailabilityParameters object itself. 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 28bb0cdeaa29..3191f8723a44 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 @@ -32,7 +32,7 @@ public interface PrivateEndpointConnection { String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkResource.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkResource.java index b08a282ae344..8a2186616d4a 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkResource.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkResource.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.webpubsub.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner; import java.util.List; @@ -30,6 +31,13 @@ public interface PrivateLinkResource { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the groupId property: Group Id of the private link resource. * diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Replica.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Replica.java new file mode 100644 index 000000000000..c2abebfc9829 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Replica.java @@ -0,0 +1,260 @@ +// 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.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.webpubsub.fluent.models.ReplicaInner; +import java.util.Map; + +/** An immutable client-side representation of Replica. */ +public interface Replica { + /** + * 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 location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the sku property: The billing information of the resource. + * + * @return the sku value. + */ + ResourceSku sku(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.ReplicaInner object. + * + * @return the inner object. + */ + ReplicaInner innerModel(); + + /** The entirety of the Replica definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithCreate { + } + /** The Replica definition stages. */ + interface DefinitionStages { + /** The first stage of the Replica definition. */ + interface Blank extends WithLocation { + } + /** The stage of the Replica definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + /** The stage of the Replica definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @return the next definition stage. + */ + WithCreate withExistingWebPubSub(String resourceGroupName, String resourceName); + } + /** + * The stage of the Replica definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku { + /** + * Executes the create request. + * + * @return the created resource. + */ + Replica create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Replica create(Context context); + } + /** The stage of the Replica definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the Replica definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The billing information of the resource.. + * + * @param sku The billing information of the resource. + * @return the next definition stage. + */ + WithCreate withSku(ResourceSku sku); + } + } + /** + * Begins update for the Replica resource. + * + * @return the stage of resource update. + */ + Replica.Update update(); + + /** The template for Replica update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Replica apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Replica apply(Context context); + } + /** The Replica update stages. */ + interface UpdateStages { + /** The stage of the Replica update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the Replica update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The billing information of the resource.. + * + * @param sku The billing information of the resource. + * @return the next definition stage. + */ + Update withSku(ResourceSku sku); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Replica refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Replica refresh(Context context); + + /** + * Operation to restart a replica. + * + * @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 restart(); + + /** + * Operation to restart a replica. + * + * @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 restart(Context context); +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ReplicaList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ReplicaList.java new file mode 100644 index 000000000000..1ff57f8f91b9 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ReplicaList.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.resourcemanager.webpubsub.fluent.models.ReplicaInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ReplicaList model. */ +@Fluent +public final class ReplicaList { + /* + * List of the replica + */ + @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") + private String nextLink; + + /** Creates an instance of ReplicaList class. */ + public ReplicaList() { + } + + /** + * Get the value property: List of the replica. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of the replica. + * + * @param value the value value to set. + * @return the ReplicaList object itself. + */ + public ReplicaList 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; + } + + /** + * Set 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. + * + * @param nextLink the nextLink value to set. + * @return the ReplicaList object itself. + */ + public ReplicaList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * 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/ServiceKind.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ServiceKind.java new file mode 100644 index 000000000000..e17ceef78242 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ServiceKind.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The kind of the service. */ +public final class ServiceKind extends ExpandableStringEnum { + /** Static value WebPubSub for ServiceKind. */ + public static final ServiceKind WEB_PUB_SUB = fromString("WebPubSub"); + + /** Static value SocketIO for ServiceKind. */ + public static final ServiceKind SOCKET_IO = fromString("SocketIO"); + + /** + * Creates a new instance of ServiceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceKind() { + } + + /** + * Creates or finds a ServiceKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceKind. + */ + @JsonCreator + public static ServiceKind fromString(String name) { + return fromString(name, ServiceKind.class); + } + + /** + * Gets known ServiceKind values. + * + * @return known ServiceKind values. + */ + public static Collection values() { + return values(ServiceKind.class); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResource.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResource.java index 059631955fd0..bde0b2b51295 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResource.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResource.java @@ -32,7 +32,7 @@ public interface SharedPrivateLinkResource { String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -102,8 +102,7 @@ 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @return the next definition stage. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomCertificates.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomCertificates.java index 58db8d19c280..945b2224f804 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomCertificates.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomCertificates.java @@ -13,8 +13,7 @@ public interface WebPubSubCustomCertificates { /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -26,8 +25,7 @@ public interface WebPubSubCustomCertificates { /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,8 +38,7 @@ public interface WebPubSubCustomCertificates { /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -56,8 +53,7 @@ Response getWithResponse( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,8 +66,7 @@ Response getWithResponse( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -86,8 +81,7 @@ Response deleteWithResponse( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomDomains.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomDomains.java index 4bcb90b59690..00a8614f4022 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomDomains.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomDomains.java @@ -13,8 +13,7 @@ public interface WebPubSubCustomDomains { /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -26,8 +25,7 @@ public interface WebPubSubCustomDomains { /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,8 +38,7 @@ public interface WebPubSubCustomDomains { /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -55,8 +52,7 @@ public interface WebPubSubCustomDomains { /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,8 +65,7 @@ public interface WebPubSubCustomDomains { /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -82,8 +77,7 @@ public interface WebPubSubCustomDomains { /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. 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 index ef815947c3dd..209180225ef7 100644 --- 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 @@ -32,18 +32,18 @@ public interface WebPubSubHub { String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the properties property: Properties of a hub. * - * @return the systemData value. + * @return the properties value. */ - SystemData systemData(); + WebPubSubHubProperties properties(); /** - * Gets the properties property: Properties of a hub. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the properties value. + * @return the systemData value. */ - WebPubSubHubProperties properties(); + SystemData systemData(); /** * Gets the name of the resource group. @@ -76,8 +76,7 @@ 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @return the next definition stage. */ 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 index 3a5262283a11..e927c8db3718 100644 --- 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 @@ -13,8 +13,7 @@ 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -26,8 +25,7 @@ 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,8 +39,7 @@ public interface WebPubSubHubs { * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,8 +54,7 @@ Response getWithResponse( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -71,8 +67,7 @@ Response getWithResponse( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -84,8 +79,7 @@ Response getWithResponse( * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateEndpointConnections.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateEndpointConnections.java index b82480538142..1226b397c3a8 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateEndpointConnections.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateEndpointConnections.java @@ -14,8 +14,7 @@ public interface WebPubSubPrivateEndpointConnections { /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -27,8 +26,7 @@ public interface WebPubSubPrivateEndpointConnections { /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,9 +39,9 @@ public interface WebPubSubPrivateEndpointConnections { /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,9 +55,9 @@ Response getWithResponse( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -71,9 +69,9 @@ Response getWithResponse( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @param context The context to associate with this operation. @@ -92,9 +90,9 @@ Response updateWithResponse( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,9 +109,9 @@ PrivateEndpointConnection update( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -124,9 +122,9 @@ PrivateEndpointConnection update( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateLinkResources.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateLinkResources.java index 3384d177874f..017eef6c9ba9 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateLinkResources.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateLinkResources.java @@ -12,8 +12,7 @@ public interface WebPubSubPrivateLinkResources { /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -26,8 +25,7 @@ public interface WebPubSubPrivateLinkResources { /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubReplicas.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubReplicas.java new file mode 100644 index 000000000000..089f3f090f1a --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubReplicas.java @@ -0,0 +1,170 @@ +// 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 WebPubSubReplicas. */ +public interface WebPubSubReplicas { + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties. + */ + Replica get(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 restart(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 restart(String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Get the replica and its properties. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the replica and its properties along with {@link Response}. + */ + Replica getById(String id); + + /** + * Get the replica and its properties. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the replica and its properties along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Operation to delete a replica. + * + * @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); + + /** + * Operation to delete a replica. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Replica resource. + * + * @param name resource name. + * @return the first stage of the new Replica definition. + */ + Replica.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 c5a8c61aa57a..d6cbebde5def 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 @@ -56,6 +56,13 @@ public interface WebPubSubResource { */ ResourceSku sku(); + /** + * Gets the kind property: The kind of the service. + * + * @return the kind value. + */ + ServiceKind kind(); + /** * Gets the identity property: A class represent managed identities used for request and response. * @@ -64,7 +71,7 @@ public interface WebPubSubResource { ManagedIdentity identity(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -251,8 +258,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -264,6 +270,7 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, + DefinitionStages.WithKind, DefinitionStages.WithIdentity, DefinitionStages.WithTls, DefinitionStages.WithLiveTraceConfiguration, @@ -307,6 +314,16 @@ interface WithSku { */ WithCreate withSku(ResourceSku sku); } + /** The stage of the WebPubSubResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: The kind of the service. + * + * @param kind The kind of the service. + * @return the next definition stage. + */ + WithCreate withKind(ServiceKind kind); + } /** The stage of the WebPubSubResource definition allowing to specify identity. */ interface WithIdentity { /** diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSharedPrivateLinkResources.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSharedPrivateLinkResources.java index c23a66e8cbf1..8b24831eec09 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSharedPrivateLinkResources.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSharedPrivateLinkResources.java @@ -13,8 +13,7 @@ public interface WebPubSubSharedPrivateLinkResources { /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -26,8 +25,7 @@ public interface WebPubSubSharedPrivateLinkResources { /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,8 +39,7 @@ public interface WebPubSubSharedPrivateLinkResources { * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,8 +54,7 @@ Response getWithResponse( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -71,8 +67,7 @@ Response getWithResponse( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -84,8 +79,7 @@ Response getWithResponse( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubTlsSettings.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubTlsSettings.java index 5fc2ce0d61a1..e2ae13b43ab6 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubTlsSettings.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubTlsSettings.java @@ -11,7 +11,8 @@ @Fluent public final class WebPubSubTlsSettings { /* - * Request client certificate during TLS handshake if enabled + * Request client certificate during TLS handshake if enabled. Not supported for free tier. Any input will be + * ignored for free tier. */ @JsonProperty(value = "clientCertEnabled") private Boolean clientCertEnabled; @@ -21,7 +22,8 @@ public WebPubSubTlsSettings() { } /** - * Get the clientCertEnabled property: Request client certificate during TLS handshake if enabled. + * Get the clientCertEnabled property: Request client certificate during TLS handshake if enabled. Not supported for + * free tier. Any input will be ignored for free tier. * * @return the clientCertEnabled value. */ @@ -30,7 +32,8 @@ public Boolean clientCertEnabled() { } /** - * Set the clientCertEnabled property: Request client certificate during TLS handshake if enabled. + * Set the clientCertEnabled property: Request client certificate during TLS handshake if enabled. Not supported for + * free tier. Any input will be ignored for free tier. * * @param clientCertEnabled the clientCertEnabled value to set. * @return the WebPubSubTlsSettings object itself. 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 8a598410b6f8..33a978d84a9b 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 @@ -61,8 +61,7 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -74,8 +73,7 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -88,8 +86,7 @@ Response checkNameAvailabilityWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,8 +100,7 @@ Response getByResourceGroupWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -116,8 +112,7 @@ Response getByResourceGroupWithResponse( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -128,8 +123,7 @@ Response getByResourceGroupWithResponse( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,8 +135,7 @@ Response getByResourceGroupWithResponse( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -155,8 +148,7 @@ Response getByResourceGroupWithResponse( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -168,8 +160,7 @@ Response getByResourceGroupWithResponse( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,8 +173,7 @@ Response getByResourceGroupWithResponse( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -195,11 +185,38 @@ Response getByResourceGroupWithResponse( WebPubSubKeys regenerateKey( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context); + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 along with {@link Response}. + */ + Response listReplicaSkusWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * List all available skus of the replica resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 listReplicaSkus(String resourceGroupName, String resourceName, String replicaName); + /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -210,8 +227,7 @@ WebPubSubKeys regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -223,8 +239,7 @@ WebPubSubKeys regenerateKey( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,8 +252,7 @@ WebPubSubKeys regenerateKey( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/OperationsListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/OperationsListSamples.java index aecf676551d4..ffd2e87a5a65 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/OperationsListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/Operations_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/UsagesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/UsagesListSamples.java index 43af54239b91..6056dc0d1f69 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/UsagesListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/UsagesListSamples.java @@ -7,7 +7,7 @@ /** Samples for Usages List. */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/Usages_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/Usages_List.json */ /** * Sample code: Usages_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCheckNameAvailabilitySamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCheckNameAvailabilitySamples.java index f4253711b240..eaf310c79b01 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCheckNameAvailabilitySamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for WebPubSub CheckNameAvailability. */ public final class WebPubSubCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_CheckNameAvailability.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_CheckNameAvailability.json */ /** * Sample code: WebPubSub_CheckNameAvailability. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCreateOrUpdateSamples.java index 00f7ac0e0d70..60ccf00be28f 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCreateOrUpdateSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCreateOrUpdateSamples.java @@ -12,6 +12,7 @@ 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.ServiceKind; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; @@ -23,7 +24,7 @@ /** Samples for WebPubSub CreateOrUpdate. */ public final class WebPubSubCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_CreateOrUpdate.json */ /** * Sample code: WebPubSub_CreateOrUpdate. @@ -38,6 +39,7 @@ public static void webPubSubCreateOrUpdate(com.azure.resourcemanager.webpubsub.W .withExistingResourceGroup("myResourceGroup") .withTags(mapOf("key1", "value1")) .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) + .withKind(ServiceKind.WEB_PUB_SUB) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) .withLiveTraceConfiguration( diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesCreateOrUpdateSamples.java index ce132c346c08..3c9ab444ceae 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesCreateOrUpdateSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubCustomCertificates CreateOrUpdate. */ public final class WebPubSubCustomCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomCertificates_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomCertificates_CreateOrUpdate.json */ /** * Sample code: WebPubSubCustomCertificates_CreateOrUpdate. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesDeleteSamples.java index daf7b8891d18..349bd2deb047 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesDeleteSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubCustomCertificates Delete. */ public final class WebPubSubCustomCertificatesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomCertificates_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomCertificates_Delete.json */ /** * Sample code: WebPubSubCustomCertificates_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesGetSamples.java index e0ef35ffc6ba..10497a89cfa9 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesGetSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubCustomCertificates Get. */ public final class WebPubSubCustomCertificatesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomCertificates_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomCertificates_Get.json */ /** * Sample code: WebPubSubCustomCertificates_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesListSamples.java index e82726206c4c..a7324fc3e06e 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesListSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubCustomCertificates List. */ public final class WebPubSubCustomCertificatesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomCertificates_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomCertificates_List.json */ /** * Sample code: WebPubSubCustomCertificates_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsCreateOrUpdateSamples.java index 2b6bc3c44d37..358e07ce42a0 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsCreateOrUpdateSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for WebPubSubCustomDomains CreateOrUpdate. */ public final class WebPubSubCustomDomainsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomDomains_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomDomains_CreateOrUpdate.json */ /** * Sample code: WebPubSubCustomDomains_CreateOrUpdate. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteSamples.java index 77f5213657b0..b16442780f7b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubCustomDomains Delete. */ public final class WebPubSubCustomDomainsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomDomains_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomDomains_Delete.json */ /** * Sample code: WebPubSubCustomDomains_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsGetSamples.java index 538d3600e67e..3e827462abf7 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsGetSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubCustomDomains Get. */ public final class WebPubSubCustomDomainsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomDomains_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomDomains_Get.json */ /** * Sample code: WebPubSubCustomDomains_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsListSamples.java index f8c5e256f083..2b0d741369e6 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsListSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubCustomDomains List. */ public final class WebPubSubCustomDomainsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubCustomDomains_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubCustomDomains_List.json */ /** * Sample code: WebPubSubCustomDomains_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubDeleteSamples.java index 1ceffef99a2b..5a16b62331eb 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubDeleteSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSub Delete. */ public final class WebPubSubDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_Delete.json */ /** * Sample code: WebPubSub_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubGetByResourceGroupSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubGetByResourceGroupSamples.java index 5919b66f13a2..71531efec00e 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubGetByResourceGroupSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSub GetByResourceGroup. */ public final class WebPubSubGetByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_Get.json */ /** * Sample code: WebPubSub_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateSamples.java index d0f3e03caa6a..d229d5102bc9 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ /** Samples for WebPubSubHubs CreateOrUpdate. */ public final class WebPubSubHubsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubHubs_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubHubs_CreateOrUpdate.json */ /** * Sample code: WebPubSubHubs_CreateOrUpdate. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsDeleteSamples.java index 6c32fd7cc732..7d53f567703a 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsDeleteSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubHubs Delete. */ public final class WebPubSubHubsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubHubs_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubHubs_Delete.json */ /** * Sample code: WebPubSubHubs_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetSamples.java index bd60fcedf356..5bac3d9a003b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubHubs Get. */ public final class WebPubSubHubsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubHubs_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubHubs_Get.json */ /** * Sample code: WebPubSubHubs_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListSamples.java index c3789a39bfcf..673cfe19e175 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubHubs List. */ public final class WebPubSubHubsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubHubs_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubHubs_List.json */ /** * Sample code: WebPubSubHubs_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListByResourceGroupSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListByResourceGroupSamples.java index 295937e6fe41..ea8feae2f317 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListByResourceGroupSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSub ListByResourceGroup. */ public final class WebPubSubListByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_ListByResourceGroup.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListByResourceGroup.json */ /** * Sample code: WebPubSub_ListByResourceGroup. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListKeysSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListKeysSamples.java index 517b2db8c1ad..922a4d1c1f49 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListKeysSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListKeysSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSub ListKeys. */ public final class WebPubSubListKeysSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_ListKeys.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListKeys.json */ /** * Sample code: WebPubSub_ListKeys. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListReplicaSkusSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListReplicaSkusSamples.java new file mode 100644 index 000000000000..5eeae9b988bb --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListReplicaSkusSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.generated; + +/** Samples for WebPubSub ListReplicaSkus. */ +public final class WebPubSubListReplicaSkusSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListReplicaSkus.json + */ + /** + * Sample code: WebPubSub_ListReplicaSkus. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubListReplicaSkus(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubs() + .listReplicaSkusWithResponse( + "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSamples.java index fa436ff49169..c1b8f366706a 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSub List. */ public final class WebPubSubListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_ListBySubscription.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListBySubscription.json */ /** * Sample code: WebPubSub_ListBySubscription. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSkusSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSkusSamples.java index 0bc04e07f84f..cd6a74bade04 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSkusSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSkusSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSub ListSkus. */ public final class WebPubSubListSkusSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_ListSkus.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_ListSkus.json */ /** * Sample code: WebPubSub_ListSkus. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteSamples.java index 0978f04cd9e5..57a188f2c10c 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubPrivateEndpointConnections Delete. */ public final class WebPubSubPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateEndpointConnections_Delete.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetSamples.java index 2e169cacba0c..67815f9c6c73 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubPrivateEndpointConnections Get. */ public final class WebPubSubPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateEndpointConnections_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateEndpointConnections_Get.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListSamples.java index 53c11ea6da3c..e949cdd3f831 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubPrivateEndpointConnections List. */ public final class WebPubSubPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateEndpointConnections_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateEndpointConnections_List.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateSamples.java index e648bc129c96..956aa7746d08 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for WebPubSubPrivateEndpointConnections Update. */ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateEndpointConnections_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateEndpointConnections_Update.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Update. @@ -28,10 +28,7 @@ public static void webPubSubPrivateEndpointConnectionsUpdate( "myResourceGroup", "myWebPubSubService", new PrivateEndpointConnectionInner() - .withPrivateEndpoint( - new PrivateEndpoint() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint")) + .withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState( new PrivateLinkServiceConnectionState() .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateLinkResourcesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateLinkResourcesListSamples.java index 45aaa187683f..6d01e8903b61 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateLinkResourcesListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateLinkResourcesListSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubPrivateLinkResources List. */ public final class WebPubSubPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubPrivateLinkResources_List.json */ /** * Sample code: WebPubSubPrivateLinkResources_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRegenerateKeySamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRegenerateKeySamples.java index dfcb143c9118..ff6d281c5c05 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRegenerateKeySamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRegenerateKeySamples.java @@ -10,7 +10,7 @@ /** Samples for WebPubSub RegenerateKey. */ public final class WebPubSubRegenerateKeySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_RegenerateKey.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_RegenerateKey.json */ /** * Sample code: WebPubSub_RegenerateKey. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasCreateOrUpdateSamples.java new file mode 100644 index 000000000000..faa66d12b78b --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.webpubsub.models.ResourceSku; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for WebPubSubReplicas CreateOrUpdate. */ +public final class WebPubSubReplicasCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_CreateOrUpdate.json + */ + /** + * Sample code: WebPubSubReplicas_CreateOrUpdate. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubReplicas() + .define("myWebPubSubService-eastus") + .withRegion("eastus") + .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) + .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/generated/WebPubSubReplicasDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasDeleteSamples.java new file mode 100644 index 000000000000..5f3431aecae3 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.generated; + +/** Samples for WebPubSubReplicas Delete. */ +public final class WebPubSubReplicasDeleteSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_Delete.json + */ + /** + * Sample code: WebPubSubReplicas_Delete. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubReplicas() + .deleteWithResponse( + "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasGetSamples.java new file mode 100644 index 000000000000..ae82c0c7380f --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.generated; + +/** Samples for WebPubSubReplicas Get. */ +public final class WebPubSubReplicasGetSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_Get.json + */ + /** + * Sample code: WebPubSubReplicas_Get. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubReplicas() + .getWithResponse( + "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasListSamples.java new file mode 100644 index 000000000000..ad28513f240b --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasListSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.generated; + +/** Samples for WebPubSubReplicas List. */ +public final class WebPubSubReplicasListSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_List.json + */ + /** + * Sample code: WebPubSubReplicas_List. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubReplicas().list("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasRestartSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasRestartSamples.java new file mode 100644 index 000000000000..c0dca2c8e899 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasRestartSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.generated; + +/** Samples for WebPubSubReplicas Restart. */ +public final class WebPubSubReplicasRestartSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_Restart.json + */ + /** + * Sample code: WebPubSubReplicas_Restart. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasRestart(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager + .webPubSubReplicas() + .restart( + "myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasUpdateSamples.java new file mode 100644 index 000000000000..47837223cdc8 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.generated; + +import com.azure.resourcemanager.webpubsub.models.Replica; +import com.azure.resourcemanager.webpubsub.models.ResourceSku; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for WebPubSubReplicas Update. */ +public final class WebPubSubReplicasUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubReplicas_Update.json + */ + /** + * Sample code: WebPubSubReplicas_Update. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicasUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + Replica resource = + manager + .webPubSubReplicas() + .getWithResponse( + "myResourceGroup", + "myWebPubSubService", + "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) + .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; + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRestartSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRestartSamples.java index b190511963d7..82c3462b4a61 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRestartSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRestartSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSub Restart. */ public final class WebPubSubRestartSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_Restart.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_Restart.json */ /** * Sample code: WebPubSub_Restart. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java index 9471d62dfe1b..6d81eb501d17 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. */ public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_CreateOrUpdate. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java index 2aab5f542955..3369d976af37 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubSharedPrivateLinkResources Delete. */ public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubSharedPrivateLinkResources_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubSharedPrivateLinkResources_Delete.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetSamples.java index bdb10c7f6b3c..8adc95d3a9e0 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubSharedPrivateLinkResources Get. */ public final class WebPubSubSharedPrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubSharedPrivateLinkResources_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubSharedPrivateLinkResources_Get.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListSamples.java index b517c9b5fe7a..89f2f5c59367 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubSharedPrivateLinkResources List. */ public final class WebPubSubSharedPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSubSharedPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSubSharedPrivateLinkResources_List.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubUpdateSamples.java index 5b17fa885774..687a5dd5fc3d 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubUpdateSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubUpdateSamples.java @@ -24,7 +24,7 @@ /** Samples for WebPubSub Update. */ public final class WebPubSubUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2023-02-01/examples/WebPubSub_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-06-01-preview/examples/WebPubSub_Update.json */ /** * Sample code: WebPubSub_Update. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainInnerTests.java deleted file mode 100644 index 994fe9348e7b..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainInnerTests.java +++ /dev/null @@ -1,34 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; -import com.azure.resourcemanager.webpubsub.models.ResourceReference; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomainInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Unknown\",\"domainName\":\"xzvlvqhjkbegib\",\"customCertificate\":{\"id\":\"mxiebw\"}},\"id\":\"aloayqcgwrtzju\",\"name\":\"gwyzm\",\"type\":\"txon\"}") - .toObject(CustomDomainInner.class); - Assertions.assertEquals("xzvlvqhjkbegib", model.domainName()); - Assertions.assertEquals("mxiebw", model.customCertificate().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainInner model = - new CustomDomainInner() - .withDomainName("xzvlvqhjkbegib") - .withCustomCertificate(new ResourceReference().withId("mxiebw")); - model = BinaryData.fromObject(model).toObject(CustomDomainInner.class); - Assertions.assertEquals("xzvlvqhjkbegib", model.domainName()); - Assertions.assertEquals("mxiebw", model.customCertificate().id()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainListTests.java deleted file mode 100644 index db3b845bb3b0..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainListTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; -import com.azure.resourcemanager.webpubsub.models.CustomDomainList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomainList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"domainName\":\"cg\"},\"id\":\"lwn\",\"name\":\"nhjdauw\",\"type\":\"vylwzbtdhxuj\"},{\"properties\":{\"provisioningState\":\"Creating\",\"domainName\":\"pow\"},\"id\":\"wpr\",\"name\":\"qlveualupjmkh\",\"type\":\"xobbcswsrt\"}],\"nextLink\":\"iplrbpbewtghfgb\"}") - .toObject(CustomDomainList.class); - Assertions.assertEquals("cg", model.value().get(0).domainName()); - Assertions.assertEquals("iplrbpbewtghfgb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainList model = - new CustomDomainList() - .withValue( - Arrays - .asList( - new CustomDomainInner().withDomainName("cg"), - new CustomDomainInner().withDomainName("pow"))) - .withNextLink("iplrbpbewtghfgb"); - model = BinaryData.fromObject(model).toObject(CustomDomainList.class); - Assertions.assertEquals("cg", model.value().get(0).domainName()); - Assertions.assertEquals("iplrbpbewtghfgb", model.nextLink()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainPropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainPropertiesTests.java deleted file mode 100644 index 2127b6a2a2e6..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainPropertiesTests.java +++ /dev/null @@ -1,34 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainProperties; -import com.azure.resourcemanager.webpubsub.models.ResourceReference; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomainProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Updating\",\"domainName\":\"savjcbpwxqps\",\"customCertificate\":{\"id\":\"nftguvriuhpr\"}}") - .toObject(CustomDomainProperties.class); - Assertions.assertEquals("savjcbpwxqps", model.domainName()); - Assertions.assertEquals("nftguvriuhpr", model.customCertificate().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainProperties model = - new CustomDomainProperties() - .withDomainName("savjcbpwxqps") - .withCustomCertificate(new ResourceReference().withId("nftguvriuhpr")); - model = BinaryData.fromObject(model).toObject(CustomDomainProperties.class); - Assertions.assertEquals("savjcbpwxqps", model.domainName()); - Assertions.assertEquals("nftguvriuhpr", model.customCertificate().id()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/DimensionTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/DimensionTests.java deleted file mode 100644 index a654bb2bac89..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/DimensionTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.Dimension; -import org.junit.jupiter.api.Assertions; - -public final class DimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dimension model = - BinaryData - .fromString( - "{\"name\":\"gsntnbybkzgcwr\",\"displayName\":\"lxxwrljdouskc\",\"internalName\":\"kocrcjdkwtnhx\",\"toBeExportedForShoebox\":true}") - .toObject(Dimension.class); - Assertions.assertEquals("gsntnbybkzgcwr", model.name()); - Assertions.assertEquals("lxxwrljdouskc", model.displayName()); - Assertions.assertEquals("kocrcjdkwtnhx", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dimension model = - new Dimension() - .withName("gsntnbybkzgcwr") - .withDisplayName("lxxwrljdouskc") - .withInternalName("kocrcjdkwtnhx") - .withToBeExportedForShoebox(true); - model = BinaryData.fromObject(model).toObject(Dimension.class); - Assertions.assertEquals("gsntnbybkzgcwr", model.name()); - Assertions.assertEquals("lxxwrljdouskc", model.displayName()); - Assertions.assertEquals("kocrcjdkwtnhx", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventHandlerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventHandlerTests.java deleted file mode 100644 index cbc1a2e2b8c8..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventHandlerTests.java +++ /dev/null @@ -1,48 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.EventHandler; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentitySettings; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthSettings; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventHandlerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventHandler model = - BinaryData - .fromString( - "{\"urlTemplate\":\"hxcr\",\"userEventPattern\":\"fovasr\",\"systemEvents\":[\"wbhsqfsub\"],\"auth\":{\"type\":\"None\",\"managedIdentity\":{\"resource\":\"xb\"}}}") - .toObject(EventHandler.class); - Assertions.assertEquals("hxcr", model.urlTemplate()); - Assertions.assertEquals("fovasr", model.userEventPattern()); - Assertions.assertEquals("wbhsqfsub", model.systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.NONE, model.auth().type()); - Assertions.assertEquals("xb", model.auth().managedIdentity().resource()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHandler model = - new EventHandler() - .withUrlTemplate("hxcr") - .withUserEventPattern("fovasr") - .withSystemEvents(Arrays.asList("wbhsqfsub")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.NONE) - .withManagedIdentity(new ManagedIdentitySettings().withResource("xb"))); - model = BinaryData.fromObject(model).toObject(EventHandler.class); - Assertions.assertEquals("hxcr", model.urlTemplate()); - Assertions.assertEquals("fovasr", model.userEventPattern()); - Assertions.assertEquals("wbhsqfsub", model.systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.NONE, model.auth().type()); - Assertions.assertEquals("xb", model.auth().managedIdentity().resource()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventHubEndpointTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventHubEndpointTests.java deleted file mode 100644 index b511aeb94900..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventHubEndpointTests.java +++ /dev/null @@ -1,31 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.EventHubEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class EventHubEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventHubEndpoint model = - BinaryData - .fromString( - "{\"type\":\"EventHub\",\"fullyQualifiedNamespace\":\"qkvpuvksgplsakn\",\"eventHubName\":\"n\"}") - .toObject(EventHubEndpoint.class); - Assertions.assertEquals("qkvpuvksgplsakn", model.fullyQualifiedNamespace()); - Assertions.assertEquals("n", model.eventHubName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHubEndpoint model = - new EventHubEndpoint().withFullyQualifiedNamespace("qkvpuvksgplsakn").withEventHubName("n"); - model = BinaryData.fromObject(model).toObject(EventHubEndpoint.class); - Assertions.assertEquals("qkvpuvksgplsakn", model.fullyQualifiedNamespace()); - Assertions.assertEquals("n", model.eventHubName()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerEndpointTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerEndpointTests.java deleted file mode 100644 index 80a2eeffd11c..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerEndpointTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.EventListenerEndpoint; - -public final class EventListenerEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventListenerEndpoint model = - BinaryData.fromString("{\"type\":\"EventListenerEndpoint\"}").toObject(EventListenerEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventListenerEndpoint model = new EventListenerEndpoint(); - model = BinaryData.fromObject(model).toObject(EventListenerEndpoint.class); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerFilterTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerFilterTests.java deleted file mode 100644 index 2359fbbca30a..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerFilterTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.EventListenerFilter; - -public final class EventListenerFilterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventListenerFilter model = - BinaryData.fromString("{\"type\":\"EventListenerFilter\"}").toObject(EventListenerFilter.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventListenerFilter model = new EventListenerFilter(); - model = BinaryData.fromObject(model).toObject(EventListenerFilter.class); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerTests.java deleted file mode 100644 index 5dc35b99d4ba..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventListenerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.EventListener; -import com.azure.resourcemanager.webpubsub.models.EventListenerEndpoint; -import com.azure.resourcemanager.webpubsub.models.EventListenerFilter; - -public final class EventListenerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventListener model = - BinaryData - .fromString( - "{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}") - .toObject(EventListener.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventListener model = - new EventListener().withFilter(new EventListenerFilter()).withEndpoint(new EventListenerEndpoint()); - model = BinaryData.fromObject(model).toObject(EventListener.class); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventNameFilterTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventNameFilterTests.java deleted file mode 100644 index faad661ed9f4..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventNameFilterTests.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.EventNameFilter; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventNameFilterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventNameFilter model = - BinaryData - .fromString("{\"type\":\"EventName\",\"systemEvents\":[\"n\"],\"userEventPattern\":\"ph\"}") - .toObject(EventNameFilter.class); - Assertions.assertEquals("n", model.systemEvents().get(0)); - Assertions.assertEquals("ph", model.userEventPattern()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventNameFilter model = new EventNameFilter().withSystemEvents(Arrays.asList("n")).withUserEventPattern("ph"); - model = BinaryData.fromObject(model).toObject(EventNameFilter.class); - Assertions.assertEquals("n", model.systemEvents().get(0)); - Assertions.assertEquals("ph", model.userEventPattern()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LiveTraceCategoryTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LiveTraceCategoryTests.java deleted file mode 100644 index 27f10ca629f5..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LiveTraceCategoryTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.LiveTraceCategory; -import org.junit.jupiter.api.Assertions; - -public final class LiveTraceCategoryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LiveTraceCategory model = - BinaryData.fromString("{\"name\":\"mtxpsiebtfh\",\"enabled\":\"esap\"}").toObject(LiveTraceCategory.class); - Assertions.assertEquals("mtxpsiebtfh", model.name()); - Assertions.assertEquals("esap", model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LiveTraceCategory model = new LiveTraceCategory().withName("mtxpsiebtfh").withEnabled("esap"); - model = BinaryData.fromObject(model).toObject(LiveTraceCategory.class); - Assertions.assertEquals("mtxpsiebtfh", model.name()); - Assertions.assertEquals("esap", model.enabled()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LiveTraceConfigurationTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LiveTraceConfigurationTests.java deleted file mode 100644 index ca8720d545bf..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LiveTraceConfigurationTests.java +++ /dev/null @@ -1,42 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.LiveTraceCategory; -import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LiveTraceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LiveTraceConfiguration model = - BinaryData - .fromString( - "{\"enabled\":\"mkfssxqukkfplgm\",\"categories\":[{\"name\":\"kjz\",\"enabled\":\"es\"},{\"name\":\"vlopwiyighx\",\"enabled\":\"dwzbaiue\"},{\"name\":\"a\",\"enabled\":\"nyqupedeojnabck\"}]}") - .toObject(LiveTraceConfiguration.class); - Assertions.assertEquals("mkfssxqukkfplgm", model.enabled()); - Assertions.assertEquals("kjz", model.categories().get(0).name()); - Assertions.assertEquals("es", model.categories().get(0).enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LiveTraceConfiguration model = - new LiveTraceConfiguration() - .withEnabled("mkfssxqukkfplgm") - .withCategories( - Arrays - .asList( - new LiveTraceCategory().withName("kjz").withEnabled("es"), - new LiveTraceCategory().withName("vlopwiyighx").withEnabled("dwzbaiue"), - new LiveTraceCategory().withName("a").withEnabled("nyqupedeojnabck"))); - model = BinaryData.fromObject(model).toObject(LiveTraceConfiguration.class); - Assertions.assertEquals("mkfssxqukkfplgm", model.enabled()); - Assertions.assertEquals("kjz", model.categories().get(0).name()); - Assertions.assertEquals("es", model.categories().get(0).enabled()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LogSpecificationTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LogSpecificationTests.java deleted file mode 100644 index f05e102898e4..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LogSpecificationTests.java +++ /dev/null @@ -1,29 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model = - BinaryData - .fromString("{\"name\":\"iksqr\",\"displayName\":\"ssainqpjwnzll\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("iksqr", model.name()); - Assertions.assertEquals("ssainqpjwnzll", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = new LogSpecification().withName("iksqr").withDisplayName("ssainqpjwnzll"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("iksqr", model.name()); - Assertions.assertEquals("ssainqpjwnzll", model.displayName()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ManagedIdentitySettingsTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ManagedIdentitySettingsTests.java deleted file mode 100644 index 51918d030c43..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ManagedIdentitySettingsTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentitySettings; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentitySettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentitySettings model = - BinaryData.fromString("{\"resource\":\"exilzznfqqnvwpmq\"}").toObject(ManagedIdentitySettings.class); - Assertions.assertEquals("exilzznfqqnvwpmq", model.resource()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentitySettings model = new ManagedIdentitySettings().withResource("exilzznfqqnvwpmq"); - model = BinaryData.fromObject(model).toObject(ManagedIdentitySettings.class); - Assertions.assertEquals("exilzznfqqnvwpmq", model.resource()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ManagedIdentityTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ManagedIdentityTests.java deleted file mode 100644 index da70d2999074..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ManagedIdentityTests.java +++ /dev/null @@ -1,55 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentity; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; -import com.azure.resourcemanager.webpubsub.models.UserAssignedIdentityProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentity model = - BinaryData - .fromString( - "{\"type\":\"None\",\"userAssignedIdentities\":{\"ofmxagkvtmelmqkr\":{\"principalId\":\"hseyvju\",\"clientId\":\"tslhspkdeem\"},\"aex\":{\"principalId\":\"hvljuahaquh\",\"clientId\":\"hmdua\"},\"vxpvgomz\":{\"principalId\":\"vfadmws\",\"clientId\":\"r\"},\"auhashsfwx\":{\"principalId\":\"misgwbnb\",\"clientId\":\"ldawkzbaliourqha\"}},\"principalId\":\"owzxcu\",\"tenantId\":\"cjooxdjebwpucwwf\"}") - .toObject(ManagedIdentity.class); - Assertions.assertEquals(ManagedIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentity model = - new ManagedIdentity() - .withType(ManagedIdentityType.NONE) - .withUserAssignedIdentities( - mapOf( - "ofmxagkvtmelmqkr", - new UserAssignedIdentityProperty(), - "aex", - new UserAssignedIdentityProperty(), - "vxpvgomz", - new UserAssignedIdentityProperty(), - "auhashsfwx", - new UserAssignedIdentityProperty())); - model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(ManagedIdentityType.NONE, model.type()); - } - - @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/test/java/com/azure/resourcemanager/webpubsub/generated/MetricSpecificationTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/MetricSpecificationTests.java deleted file mode 100644 index 42e1918c1d73..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/MetricSpecificationTests.java +++ /dev/null @@ -1,71 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.Dimension; -import com.azure.resourcemanager.webpubsub.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecification model = - BinaryData - .fromString( - "{\"name\":\"fpdvhpfxxypi\",\"displayName\":\"nmayhuybb\",\"displayDescription\":\"odepoogin\",\"unit\":\"amiheognarxz\",\"aggregationType\":\"heotusiv\",\"fillGapWithZero\":\"v\",\"category\":\"iqihn\",\"dimensions\":[{\"name\":\"bwjzr\",\"displayName\":\"ygxgispemvtz\",\"internalName\":\"ufubl\",\"toBeExportedForShoebox\":false},{\"name\":\"qeof\",\"displayName\":\"e\",\"internalName\":\"hqjbasvmsmj\",\"toBeExportedForShoebox\":true}]}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("fpdvhpfxxypi", model.name()); - Assertions.assertEquals("nmayhuybb", model.displayName()); - Assertions.assertEquals("odepoogin", model.displayDescription()); - Assertions.assertEquals("amiheognarxz", model.unit()); - Assertions.assertEquals("heotusiv", model.aggregationType()); - Assertions.assertEquals("v", model.fillGapWithZero()); - Assertions.assertEquals("iqihn", model.category()); - Assertions.assertEquals("bwjzr", model.dimensions().get(0).name()); - Assertions.assertEquals("ygxgispemvtz", model.dimensions().get(0).displayName()); - Assertions.assertEquals("ufubl", model.dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.dimensions().get(0).toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = - new MetricSpecification() - .withName("fpdvhpfxxypi") - .withDisplayName("nmayhuybb") - .withDisplayDescription("odepoogin") - .withUnit("amiheognarxz") - .withAggregationType("heotusiv") - .withFillGapWithZero("v") - .withCategory("iqihn") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("bwjzr") - .withDisplayName("ygxgispemvtz") - .withInternalName("ufubl") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("qeof") - .withDisplayName("e") - .withInternalName("hqjbasvmsmj") - .withToBeExportedForShoebox(true))); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("fpdvhpfxxypi", model.name()); - Assertions.assertEquals("nmayhuybb", model.displayName()); - Assertions.assertEquals("odepoogin", model.displayDescription()); - Assertions.assertEquals("amiheognarxz", model.unit()); - Assertions.assertEquals("heotusiv", model.aggregationType()); - Assertions.assertEquals("v", model.fillGapWithZero()); - Assertions.assertEquals("iqihn", model.category()); - Assertions.assertEquals("bwjzr", model.dimensions().get(0).name()); - Assertions.assertEquals("ygxgispemvtz", model.dimensions().get(0).displayName()); - Assertions.assertEquals("ufubl", model.dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.dimensions().get(0).toBeExportedForShoebox()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NameAvailabilityInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NameAvailabilityInnerTests.java deleted file mode 100644 index c46cc530f415..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NameAvailabilityInnerTests.java +++ /dev/null @@ -1,32 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.NameAvailabilityInner; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"zdzevndh\",\"message\":\"wpdappdsbdkv\"}") - .toObject(NameAvailabilityInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("zdzevndh", model.reason()); - Assertions.assertEquals("wpdappdsbdkv", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityInner model = - new NameAvailabilityInner().withNameAvailable(true).withReason("zdzevndh").withMessage("wpdappdsbdkv"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("zdzevndh", model.reason()); - Assertions.assertEquals("wpdappdsbdkv", model.message()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NameAvailabilityParametersTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NameAvailabilityParametersTests.java deleted file mode 100644 index a097aa3d36d1..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NameAvailabilityParametersTests.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityParameters model = - BinaryData - .fromString("{\"type\":\"fmppe\",\"name\":\"bvmgxsabkyqduuji\"}") - .toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("fmppe", model.type()); - Assertions.assertEquals("bvmgxsabkyqduuji", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityParameters model = - new NameAvailabilityParameters().withType("fmppe").withName("bvmgxsabkyqduuji"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("fmppe", model.type()); - Assertions.assertEquals("bvmgxsabkyqduuji", model.name()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NetworkAclTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NetworkAclTests.java deleted file mode 100644 index 0fbe17b637cd..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NetworkAclTests.java +++ /dev/null @@ -1,45 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.NetworkAcl; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkAclTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkAcl model = - BinaryData - .fromString( - "{\"allow\":[\"Trace\",\"ClientConnection\",\"Trace\"],\"deny\":[\"ClientConnection\",\"RESTAPI\",\"ClientConnection\"]}") - .toObject(NetworkAcl.class); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.deny().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkAcl model = - new NetworkAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.TRACE, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.TRACE)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.CLIENT_CONNECTION)); - model = BinaryData.fromObject(model).toObject(NetworkAcl.class); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.deny().get(0)); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationDisplayTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationDisplayTests.java deleted file mode 100644 index 3bafef1f8a1e..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationDisplayTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"tihfx\",\"resource\":\"jbpzvgnwzsymg\",\"operation\":\"uf\",\"description\":\"zk\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("tihfx", model.provider()); - Assertions.assertEquals("jbpzvgnwzsymg", model.resource()); - Assertions.assertEquals("uf", model.operation()); - Assertions.assertEquals("zk", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("tihfx") - .withResource("jbpzvgnwzsymg") - .withOperation("uf") - .withDescription("zk"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("tihfx", model.provider()); - Assertions.assertEquals("jbpzvgnwzsymg", model.resource()); - Assertions.assertEquals("uf", model.operation()); - Assertions.assertEquals("zk", model.description()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationInnerTests.java deleted file mode 100644 index 48e7a8d56710..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationInnerTests.java +++ /dev/null @@ -1,60 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.OperationInner; -import com.azure.resourcemanager.webpubsub.models.OperationDisplay; -import com.azure.resourcemanager.webpubsub.models.OperationProperties; -import com.azure.resourcemanager.webpubsub.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"rh\",\"isDataAction\":true,\"display\":{\"provider\":\"hs\",\"resource\":\"urkdtmlx\",\"operation\":\"kuksjtxukcdm\",\"description\":\"rcryuanzwuxzdxta\"},\"origin\":\"lhmwhfpmrqobm\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[],\"logSpecifications\":[]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("rh", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("hs", model.display().provider()); - Assertions.assertEquals("urkdtmlx", model.display().resource()); - Assertions.assertEquals("kuksjtxukcdm", model.display().operation()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.display().description()); - Assertions.assertEquals("lhmwhfpmrqobm", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withName("rh") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("hs") - .withResource("urkdtmlx") - .withOperation("kuksjtxukcdm") - .withDescription("rcryuanzwuxzdxta")) - .withOrigin("lhmwhfpmrqobm") - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications(Arrays.asList()) - .withLogSpecifications(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("rh", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("hs", model.display().provider()); - Assertions.assertEquals("urkdtmlx", model.display().resource()); - Assertions.assertEquals("kuksjtxukcdm", model.display().operation()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.display().description()); - Assertions.assertEquals("lhmwhfpmrqobm", model.origin()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationListTests.java deleted file mode 100644 index 739e983b32bf..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationListTests.java +++ /dev/null @@ -1,84 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.OperationInner; -import com.azure.resourcemanager.webpubsub.models.OperationDisplay; -import com.azure.resourcemanager.webpubsub.models.OperationList; -import com.azure.resourcemanager.webpubsub.models.OperationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationList model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"ownoizhw\",\"properties\":{}},{\"name\":\"bqsoqijg\",\"isDataAction\":true,\"display\":{\"provider\":\"azlobcufpdznrbt\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"origin\":\"kwm\",\"properties\":{}},{\"name\":\"siznto\",\"isDataAction\":false,\"display\":{\"provider\":\"uajpsquc\",\"resource\":\"o\",\"operation\":\"dkfo\",\"description\":\"nygj\"},\"origin\":\"jddeqsrdeupewnw\",\"properties\":{}}],\"nextLink\":\"jzyflu\"}") - .toObject(OperationList.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - Assertions.assertEquals("jzyflu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationList model = - new OperationList() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("quvgjxpybczme") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("pbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withOrigin("ownoizhw") - .withProperties(new OperationProperties()), - new OperationInner() - .withName("bqsoqijg") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("azlobcufpdznrbt") - .withResource("qjnqglhqgnufoooj") - .withOperation("ifsqesaagdfmg") - .withDescription("lhjxr")) - .withOrigin("kwm") - .withProperties(new OperationProperties()), - new OperationInner() - .withName("siznto") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("uajpsquc") - .withResource("o") - .withOperation("dkfo") - .withDescription("nygj")) - .withOrigin("jddeqsrdeupewnw") - .withProperties(new OperationProperties()))) - .withNextLink("jzyflu"); - model = BinaryData.fromObject(model).toObject(OperationList.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - Assertions.assertEquals("jzyflu", model.nextLink()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationPropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationPropertiesTests.java deleted file mode 100644 index 8730d2be5b4b..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,83 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.LogSpecification; -import com.azure.resourcemanager.webpubsub.models.MetricSpecification; -import com.azure.resourcemanager.webpubsub.models.OperationProperties; -import com.azure.resourcemanager.webpubsub.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"hanufhfcbjysagi\",\"displayName\":\"xqhabi\",\"displayDescription\":\"ikxwc\",\"unit\":\"yscnpqxu\",\"aggregationType\":\"vyq\",\"fillGapWithZero\":\"wby\",\"category\":\"k\",\"dimensions\":[]},{\"name\":\"umjgrtfwvuk\",\"displayName\":\"audccsnhs\",\"displayDescription\":\"nyejhkryhtnap\",\"unit\":\"wlokjyem\",\"aggregationType\":\"vnipjox\",\"fillGapWithZero\":\"nchgej\",\"category\":\"odmailzyd\",\"dimensions\":[]}],\"logSpecifications\":[{\"name\":\"yahux\",\"displayName\":\"pmqnja\"},{\"name\":\"ixjsprozvcputeg\",\"displayName\":\"wmfdatscmdvpjhul\"},{\"name\":\"uvm\",\"displayName\":\"ozkrwfndiodjpslw\"},{\"name\":\"dpvwryoqpsoaccta\",\"displayName\":\"kljla\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("hanufhfcbjysagi", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("xqhabi", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("ikxwc", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("yscnpqxu", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("vyq", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("wby", model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("k", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("yahux", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("pmqnja", model.serviceSpecification().logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("hanufhfcbjysagi") - .withDisplayName("xqhabi") - .withDisplayDescription("ikxwc") - .withUnit("yscnpqxu") - .withAggregationType("vyq") - .withFillGapWithZero("wby") - .withCategory("k") - .withDimensions(Arrays.asList()), - new MetricSpecification() - .withName("umjgrtfwvuk") - .withDisplayName("audccsnhs") - .withDisplayDescription("nyejhkryhtnap") - .withUnit("wlokjyem") - .withAggregationType("vnipjox") - .withFillGapWithZero("nchgej") - .withCategory("odmailzyd") - .withDimensions(Arrays.asList()))) - .withLogSpecifications( - Arrays - .asList( - new LogSpecification().withName("yahux").withDisplayName("pmqnja"), - new LogSpecification() - .withName("ixjsprozvcputeg") - .withDisplayName("wmfdatscmdvpjhul"), - new LogSpecification().withName("uvm").withDisplayName("ozkrwfndiodjpslw"), - new LogSpecification().withName("dpvwryoqpsoaccta").withDisplayName("kljla")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("hanufhfcbjysagi", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("xqhabi", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("ikxwc", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("yscnpqxu", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("vyq", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("wby", model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("k", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("yahux", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("pmqnja", model.serviceSpecification().logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationsListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationsListMockTests.java deleted file mode 100644 index f8268cb99aaa..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationsListMockTests.java +++ /dev/null @@ -1,73 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"pxodlqiyntorzih\",\"isDataAction\":false,\"display\":{\"provider\":\"swsrms\",\"resource\":\"zrpzb\",\"operation\":\"ckqqzqioxiysui\",\"description\":\"ynkedyatrwyhqmib\"},\"origin\":\"hwit\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[],\"logSpecifications\":[]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pxodlqiyntorzih", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("swsrms", response.iterator().next().display().provider()); - Assertions.assertEquals("zrpzb", response.iterator().next().display().resource()); - Assertions.assertEquals("ckqqzqioxiysui", response.iterator().next().display().operation()); - Assertions.assertEquals("ynkedyatrwyhqmib", response.iterator().next().display().description()); - Assertions.assertEquals("hwit", response.iterator().next().origin()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointAclTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointAclTests.java deleted file mode 100644 index ef8042a8e34c..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointAclTests.java +++ /dev/null @@ -1,38 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointAcl; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointAclTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointAcl model = - BinaryData - .fromString( - "{\"name\":\"zka\",\"allow\":[\"Trace\"],\"deny\":[\"ClientConnection\",\"ServerConnection\"]}") - .toObject(PrivateEndpointAcl.class); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.deny().get(0)); - Assertions.assertEquals("zka", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointAcl model = - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.TRACE)) - .withDeny(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION, WebPubSubRequestType.SERVER_CONNECTION)) - .withName("zka"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointAcl.class); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.deny().get(0)); - Assertions.assertEquals("zka", model.name()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 75137b5e0034..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,48 +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.generated; - -import com.azure.core.util.BinaryData; -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; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Moving\",\"privateEndpoint\":{\"id\":\"debfqkkrbmpukgri\"},\"groupIds\":[\"zlfbxzpuzycispnq\",\"ahmgkbrp\",\"y\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"uqqkpik\",\"actionsRequired\":\"rgvtqag\"}},\"id\":\"buynhijggm\",\"name\":\"bfs\",\"type\":\"arbu\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("debfqkkrbmpukgri", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("uqqkpik", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("rgvtqag", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("debfqkkrbmpukgri")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REJECTED) - .withDescription("uqqkpik") - .withActionsRequired("rgvtqag")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("debfqkkrbmpukgri", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("uqqkpik", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("rgvtqag", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionListTests.java deleted file mode 100644 index d2404c5bbc59..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionListTests.java +++ /dev/null @@ -1,33 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointConnectionList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"groupIds\":[]},\"id\":\"bnw\",\"name\":\"ewgdrjervn\",\"type\":\"enq\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"groupIds\":[]},\"id\":\"gmifthnzd\",\"name\":\"dslgnayqigynduh\",\"type\":\"vhqlkthumaqo\"}],\"nextLink\":\"gycdu\"}") - .toObject(PrivateEndpointConnectionList.class); - Assertions.assertEquals("gycdu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionList model = - new PrivateEndpointConnectionList() - .withValue(Arrays.asList(new PrivateEndpointConnectionInner(), new PrivateEndpointConnectionInner())) - .withNextLink("gycdu"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionList.class); - Assertions.assertEquals("gycdu", model.nextLink()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 16ff24c16625..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,48 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpoint; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"na\"},\"groupIds\":[\"hj\",\"unmpxttd\",\"hrbnlankxmyskpbh\",\"nbtkcxywnytnr\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"idybyxczf\",\"actionsRequired\":\"haaxdbabphl\"}}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("na", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("idybyxczf", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("haaxdbabphl", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint().withId("na")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("idybyxczf") - .withActionsRequired("haaxdbabphl")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("na", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("idybyxczf", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("haaxdbabphl", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointTests.java deleted file mode 100644 index f13f4e831fda..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"qlfktsths\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("qlfktsths", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("qlfktsths"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("qlfktsths", model.id()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourceInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index 8b59c56c8fc9..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,47 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"dbzm\",\"requiredMembers\":[\"fznudaodvxzb\",\"cblylpstdbhhxsr\",\"dzu\"],\"requiredZoneNames\":[\"scdntnevf\"],\"shareablePrivateLinkResourceTypes\":[{\"name\":\"ygtdsslswt\"},{\"name\":\"riofzpyqse\"},{\"name\":\"bnetshh\"},{\"name\":\"edplvwiwubmw\"}]},\"id\":\"esl\",\"name\":\"nkww\",\"type\":\"pp\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("dbzm", model.groupId()); - Assertions.assertEquals("fznudaodvxzb", model.requiredMembers().get(0)); - Assertions.assertEquals("scdntnevf", model.requiredZoneNames().get(0)); - Assertions.assertEquals("ygtdsslswt", model.shareablePrivateLinkResourceTypes().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = - new PrivateLinkResourceInner() - .withGroupId("dbzm") - .withRequiredMembers(Arrays.asList("fznudaodvxzb", "cblylpstdbhhxsr", "dzu")) - .withRequiredZoneNames(Arrays.asList("scdntnevf")) - .withShareablePrivateLinkResourceTypes( - Arrays - .asList( - new ShareablePrivateLinkResourceType().withName("ygtdsslswt"), - new ShareablePrivateLinkResourceType().withName("riofzpyqse"), - new ShareablePrivateLinkResourceType().withName("bnetshh"), - new ShareablePrivateLinkResourceType().withName("edplvwiwubmw"))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("dbzm", model.groupId()); - Assertions.assertEquals("fznudaodvxzb", model.requiredMembers().get(0)); - Assertions.assertEquals("scdntnevf", model.requiredZoneNames().get(0)); - Assertions.assertEquals("ygtdsslswt", model.shareablePrivateLinkResourceTypes().get(0).name()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourceListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourceListTests.java deleted file mode 100644 index a4f426645150..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourceListTests.java +++ /dev/null @@ -1,42 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkResourceList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"ccymvaolpsslql\",\"requiredMembers\":[],\"requiredZoneNames\":[],\"shareablePrivateLinkResourceTypes\":[]},\"id\":\"n\",\"name\":\"bglzpswi\",\"type\":\"d\"}],\"nextLink\":\"wyhzdx\"}") - .toObject(PrivateLinkResourceList.class); - Assertions.assertEquals("ccymvaolpsslql", model.value().get(0).groupId()); - Assertions.assertEquals("wyhzdx", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceList model = - new PrivateLinkResourceList() - .withValue( - Arrays - .asList( - new PrivateLinkResourceInner() - .withGroupId("ccymvaolpsslql") - .withRequiredMembers(Arrays.asList()) - .withRequiredZoneNames(Arrays.asList()) - .withShareablePrivateLinkResourceTypes(Arrays.asList()))) - .withNextLink("wyhzdx"); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceList.class); - Assertions.assertEquals("ccymvaolpsslql", model.value().get(0).groupId()); - Assertions.assertEquals("wyhzdx", model.nextLink()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourcePropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 85c4615dd8c5..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,77 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceProperties; -import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceProperties; -import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"lcxog\",\"requiredMembers\":[\"onz\",\"nsikvmkqzeqqkdl\",\"fzxmhhvhgureodkw\"],\"requiredZoneNames\":[\"agxti\",\"qdxbxwa\",\"bogqxndlkzgxhu\"],\"shareablePrivateLinkResourceTypes\":[{\"name\":\"bpodxunkbebxm\",\"properties\":{\"description\":\"yntwlrbq\",\"groupId\":\"oievseotgqrlltm\",\"type\":\"lauwzizxbmpgcjef\"}},{\"name\":\"muvp\",\"properties\":{\"description\":\"d\",\"groupId\":\"orppxebmnzbtb\",\"type\":\"pglkf\"}},{\"name\":\"hdneuelfph\",\"properties\":{\"description\":\"htozfikdow\",\"groupId\":\"uuvxz\",\"type\":\"lvithhqzonosgg\"}}]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("lcxog", model.groupId()); - Assertions.assertEquals("onz", model.requiredMembers().get(0)); - Assertions.assertEquals("agxti", model.requiredZoneNames().get(0)); - Assertions.assertEquals("bpodxunkbebxm", model.shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals("yntwlrbq", model.shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions - .assertEquals("oievseotgqrlltm", model.shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions - .assertEquals("lauwzizxbmpgcjef", model.shareablePrivateLinkResourceTypes().get(0).properties().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties() - .withGroupId("lcxog") - .withRequiredMembers(Arrays.asList("onz", "nsikvmkqzeqqkdl", "fzxmhhvhgureodkw")) - .withRequiredZoneNames(Arrays.asList("agxti", "qdxbxwa", "bogqxndlkzgxhu")) - .withShareablePrivateLinkResourceTypes( - Arrays - .asList( - new ShareablePrivateLinkResourceType() - .withName("bpodxunkbebxm") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("yntwlrbq") - .withGroupId("oievseotgqrlltm") - .withType("lauwzizxbmpgcjef")), - new ShareablePrivateLinkResourceType() - .withName("muvp") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("d") - .withGroupId("orppxebmnzbtb") - .withType("pglkf")), - new ShareablePrivateLinkResourceType() - .withName("hdneuelfph") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("htozfikdow") - .withGroupId("uuvxz") - .withType("lvithhqzonosgg")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("lcxog", model.groupId()); - Assertions.assertEquals("onz", model.requiredMembers().get(0)); - Assertions.assertEquals("agxti", model.requiredZoneNames().get(0)); - Assertions.assertEquals("bpodxunkbebxm", model.shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals("yntwlrbq", model.shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions - .assertEquals("oievseotgqrlltm", model.shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions - .assertEquals("lauwzizxbmpgcjef", model.shareablePrivateLinkResourceTypes().get(0).properties().type()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 9733b8cf21db..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,36 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString("{\"status\":\"Disconnected\",\"description\":\"mnyyazt\",\"actionsRequired\":\"twwrqp\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("mnyyazt", model.description()); - Assertions.assertEquals("twwrqp", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("mnyyazt") - .withActionsRequired("twwrqp"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("mnyyazt", model.description()); - Assertions.assertEquals("twwrqp", model.actionsRequired()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceLogCategoryTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceLogCategoryTests.java deleted file mode 100644 index cf0d08f236d9..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceLogCategoryTests.java +++ /dev/null @@ -1,29 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ResourceLogCategory; -import org.junit.jupiter.api.Assertions; - -public final class ResourceLogCategoryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceLogCategory model = - BinaryData - .fromString("{\"name\":\"vjtoqnermclfp\",\"enabled\":\"hoxus\"}") - .toObject(ResourceLogCategory.class); - Assertions.assertEquals("vjtoqnermclfp", model.name()); - Assertions.assertEquals("hoxus", model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceLogCategory model = new ResourceLogCategory().withName("vjtoqnermclfp").withEnabled("hoxus"); - model = BinaryData.fromObject(model).toObject(ResourceLogCategory.class); - Assertions.assertEquals("vjtoqnermclfp", model.name()); - Assertions.assertEquals("hoxus", model.enabled()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceLogConfigurationTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceLogConfigurationTests.java deleted file mode 100644 index 1f4a4610a58e..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceLogConfigurationTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ResourceLogCategory; -import com.azure.resourcemanager.webpubsub.models.ResourceLogConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceLogConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceLogConfiguration model = - BinaryData - .fromString( - "{\"categories\":[{\"name\":\"qmhjjdhtld\",\"enabled\":\"yzxuutkncw\"},{\"name\":\"wsvlxotogtwrupqs\",\"enabled\":\"nmic\"},{\"name\":\"vce\",\"enabled\":\"eil\"},{\"name\":\"notyfjfcnjbkcn\",\"enabled\":\"hbttkphyw\"}]}") - .toObject(ResourceLogConfiguration.class); - Assertions.assertEquals("qmhjjdhtld", model.categories().get(0).name()); - Assertions.assertEquals("yzxuutkncw", model.categories().get(0).enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceLogConfiguration model = - new ResourceLogConfiguration() - .withCategories( - Arrays - .asList( - new ResourceLogCategory().withName("qmhjjdhtld").withEnabled("yzxuutkncw"), - new ResourceLogCategory().withName("wsvlxotogtwrupqs").withEnabled("nmic"), - new ResourceLogCategory().withName("vce").withEnabled("eil"), - new ResourceLogCategory().withName("notyfjfcnjbkcn").withEnabled("hbttkphyw"))); - model = BinaryData.fromObject(model).toObject(ResourceLogConfiguration.class); - Assertions.assertEquals("qmhjjdhtld", model.categories().get(0).name()); - Assertions.assertEquals("yzxuutkncw", model.categories().get(0).enabled()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceReferenceTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceReferenceTests.java deleted file mode 100644 index b9354d2a44ec..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceReferenceTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ResourceReference; -import org.junit.jupiter.api.Assertions; - -public final class ResourceReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceReference model = BinaryData.fromString("{\"id\":\"dyvxqtayriww\"}").toObject(ResourceReference.class); - Assertions.assertEquals("dyvxqtayriww", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceReference model = new ResourceReference().withId("dyvxqtayriww"); - model = BinaryData.fromObject(model).toObject(ResourceReference.class); - Assertions.assertEquals("dyvxqtayriww", model.id()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceSkuTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceSkuTests.java deleted file mode 100644 index b605e2deeeb7..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceSkuTests.java +++ /dev/null @@ -1,34 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ResourceSku; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import org.junit.jupiter.api.Assertions; - -public final class ResourceSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceSku model = - BinaryData - .fromString( - "{\"name\":\"zwtruwiqzbqjvsov\",\"tier\":\"Basic\",\"size\":\"acspkwl\",\"family\":\"dobpxjmflbvvn\",\"capacity\":1044580515}") - .toObject(ResourceSku.class); - Assertions.assertEquals("zwtruwiqzbqjvsov", model.name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, model.tier()); - Assertions.assertEquals(1044580515, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceSku model = - new ResourceSku().withName("zwtruwiqzbqjvsov").withTier(WebPubSubSkuTier.BASIC).withCapacity(1044580515); - model = BinaryData.fromObject(model).toObject(ResourceSku.class); - Assertions.assertEquals("zwtruwiqzbqjvsov", model.name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, model.tier()); - Assertions.assertEquals(1044580515, model.capacity()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ServiceSpecificationTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ServiceSpecificationTests.java deleted file mode 100644 index d2bc9514bc5f..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,63 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.LogSpecification; -import com.azure.resourcemanager.webpubsub.models.MetricSpecification; -import com.azure.resourcemanager.webpubsub.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = - BinaryData - .fromString( - "{\"metricSpecifications\":[{\"name\":\"yffdfdos\",\"displayName\":\"expa\",\"displayDescription\":\"akhmsbzjhcrz\",\"unit\":\"dphlxaolt\",\"aggregationType\":\"trg\",\"fillGapWithZero\":\"bpf\",\"category\":\"s\",\"dimensions\":[]}],\"logSpecifications\":[{\"name\":\"cjrwzoxxjtfellu\",\"displayName\":\"zitonpeqfpjkjl\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("yffdfdos", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("expa", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("akhmsbzjhcrz", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("dphlxaolt", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("trg", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("bpf", model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("s", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("cjrwzoxxjtfellu", model.logSpecifications().get(0).name()); - Assertions.assertEquals("zitonpeqfpjkjl", model.logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("yffdfdos") - .withDisplayName("expa") - .withDisplayDescription("akhmsbzjhcrz") - .withUnit("dphlxaolt") - .withAggregationType("trg") - .withFillGapWithZero("bpf") - .withCategory("s") - .withDimensions(Arrays.asList()))) - .withLogSpecifications( - Arrays - .asList(new LogSpecification().withName("cjrwzoxxjtfellu").withDisplayName("zitonpeqfpjkjl"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("yffdfdos", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("expa", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("akhmsbzjhcrz", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("dphlxaolt", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("trg", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("bpf", model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("s", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("cjrwzoxxjtfellu", model.logSpecifications().get(0).name()); - Assertions.assertEquals("zitonpeqfpjkjl", model.logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ShareablePrivateLinkResourcePropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ShareablePrivateLinkResourcePropertiesTests.java deleted file mode 100644 index dfd3cdf104a3..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ShareablePrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,35 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceProperties; -import org.junit.jupiter.api.Assertions; - -public final class ShareablePrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ShareablePrivateLinkResourceProperties model = - BinaryData - .fromString("{\"description\":\"wkfvhqcrailvp\",\"groupId\":\"pfuflrw\",\"type\":\"hdlxyjrxsagafcn\"}") - .toObject(ShareablePrivateLinkResourceProperties.class); - Assertions.assertEquals("wkfvhqcrailvp", model.description()); - Assertions.assertEquals("pfuflrw", model.groupId()); - Assertions.assertEquals("hdlxyjrxsagafcn", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShareablePrivateLinkResourceProperties model = - new ShareablePrivateLinkResourceProperties() - .withDescription("wkfvhqcrailvp") - .withGroupId("pfuflrw") - .withType("hdlxyjrxsagafcn"); - model = BinaryData.fromObject(model).toObject(ShareablePrivateLinkResourceProperties.class); - Assertions.assertEquals("wkfvhqcrailvp", model.description()); - Assertions.assertEquals("pfuflrw", model.groupId()); - Assertions.assertEquals("hdlxyjrxsagafcn", model.type()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ShareablePrivateLinkResourceTypeTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ShareablePrivateLinkResourceTypeTests.java deleted file mode 100644 index f91048095289..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ShareablePrivateLinkResourceTypeTests.java +++ /dev/null @@ -1,42 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceProperties; -import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceType; -import org.junit.jupiter.api.Assertions; - -public final class ShareablePrivateLinkResourceTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ShareablePrivateLinkResourceType model = - BinaryData - .fromString( - "{\"name\":\"c\",\"properties\":{\"description\":\"wdsjnkalju\",\"groupId\":\"iswac\",\"type\":\"gdkz\"}}") - .toObject(ShareablePrivateLinkResourceType.class); - Assertions.assertEquals("c", model.name()); - Assertions.assertEquals("wdsjnkalju", model.properties().description()); - Assertions.assertEquals("iswac", model.properties().groupId()); - Assertions.assertEquals("gdkz", model.properties().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShareablePrivateLinkResourceType model = - new ShareablePrivateLinkResourceType() - .withName("c") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("wdsjnkalju") - .withGroupId("iswac") - .withType("gdkz")); - model = BinaryData.fromObject(model).toObject(ShareablePrivateLinkResourceType.class); - Assertions.assertEquals("c", model.name()); - Assertions.assertEquals("wdsjnkalju", model.properties().description()); - Assertions.assertEquals("iswac", model.properties().groupId()); - Assertions.assertEquals("gdkz", model.properties().type()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourceInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourceInnerTests.java deleted file mode 100644 index 7bf478d80261..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,36 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"ckzywbiexzfeyue\",\"privateLinkResourceId\":\"xibxujwbhqwalm\",\"provisioningState\":\"Moving\",\"requestMessage\":\"xaepdkzjancuxr\",\"status\":\"Rejected\"},\"id\":\"bavxbniwdjswzt\",\"name\":\"dbpgnxytxhp\",\"type\":\"xbzpfzab\"}") - .toObject(SharedPrivateLinkResourceInner.class); - Assertions.assertEquals("ckzywbiexzfeyue", model.groupId()); - Assertions.assertEquals("xibxujwbhqwalm", model.privateLinkResourceId()); - Assertions.assertEquals("xaepdkzjancuxr", model.requestMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceInner model = - new SharedPrivateLinkResourceInner() - .withGroupId("ckzywbiexzfeyue") - .withPrivateLinkResourceId("xibxujwbhqwalm") - .withRequestMessage("xaepdkzjancuxr"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceInner.class); - Assertions.assertEquals("ckzywbiexzfeyue", model.groupId()); - Assertions.assertEquals("xibxujwbhqwalm", model.privateLinkResourceId()); - Assertions.assertEquals("xaepdkzjancuxr", model.requestMessage()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourceListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourceListTests.java deleted file mode 100644 index 65d2fe1119af..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourceListTests.java +++ /dev/null @@ -1,53 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; -import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"nedgfbc\",\"privateLinkResourceId\":\"kcvqvpke\",\"provisioningState\":\"Deleting\",\"requestMessage\":\"drhvoodsotbo\",\"status\":\"Pending\"},\"id\":\"opcjwvnhd\",\"name\":\"d\",\"type\":\"mgxcxrslpm\"},{\"properties\":{\"groupId\":\"uoegrpkhjwniyqs\",\"privateLinkResourceId\":\"uicpd\",\"provisioningState\":\"Updating\",\"requestMessage\":\"zl\",\"status\":\"Timeout\"},\"id\":\"mpaxmodfvuefywsb\",\"name\":\"fvmwy\",\"type\":\"rfouyftaakcpw\"},{\"properties\":{\"groupId\":\"vqtmnub\",\"privateLinkResourceId\":\"xkp\",\"provisioningState\":\"Moving\",\"requestMessage\":\"ondjmq\",\"status\":\"Rejected\"},\"id\":\"ypomgkopkwho\",\"name\":\"v\",\"type\":\"ajqgxy\"}],\"nextLink\":\"ocmbqfqvmkcxoza\"}") - .toObject(SharedPrivateLinkResourceList.class); - Assertions.assertEquals("nedgfbc", model.value().get(0).groupId()); - Assertions.assertEquals("kcvqvpke", model.value().get(0).privateLinkResourceId()); - Assertions.assertEquals("drhvoodsotbo", model.value().get(0).requestMessage()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceList model = - new SharedPrivateLinkResourceList() - .withValue( - Arrays - .asList( - new SharedPrivateLinkResourceInner() - .withGroupId("nedgfbc") - .withPrivateLinkResourceId("kcvqvpke") - .withRequestMessage("drhvoodsotbo"), - new SharedPrivateLinkResourceInner() - .withGroupId("uoegrpkhjwniyqs") - .withPrivateLinkResourceId("uicpd") - .withRequestMessage("zl"), - new SharedPrivateLinkResourceInner() - .withGroupId("vqtmnub") - .withPrivateLinkResourceId("xkp") - .withRequestMessage("ondjmq"))) - .withNextLink("ocmbqfqvmkcxoza"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceList.class); - Assertions.assertEquals("nedgfbc", model.value().get(0).groupId()); - Assertions.assertEquals("kcvqvpke", model.value().get(0).privateLinkResourceId()); - Assertions.assertEquals("drhvoodsotbo", model.value().get(0).requestMessage()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.nextLink()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourcePropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 4db9c282a455..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,36 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceProperties; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"lcuhxwtctyqiklb\",\"privateLinkResourceId\":\"ovplw\",\"provisioningState\":\"Updating\",\"requestMessage\":\"gy\",\"status\":\"Rejected\"}") - .toObject(SharedPrivateLinkResourceProperties.class); - Assertions.assertEquals("lcuhxwtctyqiklb", model.groupId()); - Assertions.assertEquals("ovplw", model.privateLinkResourceId()); - Assertions.assertEquals("gy", model.requestMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceProperties model = - new SharedPrivateLinkResourceProperties() - .withGroupId("lcuhxwtctyqiklb") - .withPrivateLinkResourceId("ovplw") - .withRequestMessage("gy"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperties.class); - Assertions.assertEquals("lcuhxwtctyqiklb", model.groupId()); - Assertions.assertEquals("ovplw", model.privateLinkResourceId()); - Assertions.assertEquals("gy", model.requestMessage()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageInnerTests.java deleted file mode 100644 index ad008b189df6..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageInnerTests.java +++ /dev/null @@ -1,45 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.SignalRServiceUsageInner; -import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsageName; -import org.junit.jupiter.api.Assertions; - -public final class SignalRServiceUsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SignalRServiceUsageInner model = - BinaryData - .fromString( - "{\"id\":\"qktapspwgcuert\",\"currentValue\":7020809285560485144,\"limit\":6338655194328976084,\"name\":{\"value\":\"hbmdgbbjfdd\",\"localizedValue\":\"bmbexppbhtqqro\"},\"unit\":\"p\"}") - .toObject(SignalRServiceUsageInner.class); - Assertions.assertEquals("qktapspwgcuert", model.id()); - Assertions.assertEquals(7020809285560485144L, model.currentValue()); - Assertions.assertEquals(6338655194328976084L, model.limit()); - Assertions.assertEquals("hbmdgbbjfdd", model.name().value()); - Assertions.assertEquals("bmbexppbhtqqro", model.name().localizedValue()); - Assertions.assertEquals("p", model.unit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SignalRServiceUsageInner model = - new SignalRServiceUsageInner() - .withId("qktapspwgcuert") - .withCurrentValue(7020809285560485144L) - .withLimit(6338655194328976084L) - .withName(new SignalRServiceUsageName().withValue("hbmdgbbjfdd").withLocalizedValue("bmbexppbhtqqro")) - .withUnit("p"); - model = BinaryData.fromObject(model).toObject(SignalRServiceUsageInner.class); - Assertions.assertEquals("qktapspwgcuert", model.id()); - Assertions.assertEquals(7020809285560485144L, model.currentValue()); - Assertions.assertEquals(6338655194328976084L, model.limit()); - Assertions.assertEquals("hbmdgbbjfdd", model.name().value()); - Assertions.assertEquals("bmbexppbhtqqro", model.name().localizedValue()); - Assertions.assertEquals("p", model.unit()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageListTests.java deleted file mode 100644 index 0070d1e446b4..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageListTests.java +++ /dev/null @@ -1,76 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.SignalRServiceUsageInner; -import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsageList; -import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsageName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SignalRServiceUsageListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SignalRServiceUsageList model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"feusnhut\",\"currentValue\":7488631932267615574,\"limit\":1681358719295999682,\"name\":{\"value\":\"ugjzzdatqxhocdge\",\"localizedValue\":\"lgphu\"},\"unit\":\"cndvkaozwyiftyhx\"},{\"id\":\"rokft\",\"currentValue\":3868150209180294588,\"limit\":8023201833032933577,\"name\":{\"value\":\"cukjf\",\"localizedValue\":\"iawxklry\"},\"unit\":\"wckbasyypnd\"},{\"id\":\"sgcbac\",\"currentValue\":3223006673254134056,\"limit\":1592886583482291968,\"name\":{\"value\":\"qgoulznd\",\"localizedValue\":\"kwy\"},\"unit\":\"gfgibm\"},{\"id\":\"gakeqsr\",\"currentValue\":4764420434211011454,\"limit\":7229748892246039848,\"name\":{\"value\":\"ytb\",\"localizedValue\":\"qfou\"},\"unit\":\"mmnkzsmodmgl\"}],\"nextLink\":\"gpbkwtmut\"}") - .toObject(SignalRServiceUsageList.class); - Assertions.assertEquals("feusnhut", model.value().get(0).id()); - Assertions.assertEquals(7488631932267615574L, model.value().get(0).currentValue()); - Assertions.assertEquals(1681358719295999682L, model.value().get(0).limit()); - Assertions.assertEquals("ugjzzdatqxhocdge", model.value().get(0).name().value()); - Assertions.assertEquals("lgphu", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("cndvkaozwyiftyhx", model.value().get(0).unit()); - Assertions.assertEquals("gpbkwtmut", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SignalRServiceUsageList model = - new SignalRServiceUsageList() - .withValue( - Arrays - .asList( - new SignalRServiceUsageInner() - .withId("feusnhut") - .withCurrentValue(7488631932267615574L) - .withLimit(1681358719295999682L) - .withName( - new SignalRServiceUsageName() - .withValue("ugjzzdatqxhocdge") - .withLocalizedValue("lgphu")) - .withUnit("cndvkaozwyiftyhx"), - new SignalRServiceUsageInner() - .withId("rokft") - .withCurrentValue(3868150209180294588L) - .withLimit(8023201833032933577L) - .withName( - new SignalRServiceUsageName().withValue("cukjf").withLocalizedValue("iawxklry")) - .withUnit("wckbasyypnd"), - new SignalRServiceUsageInner() - .withId("sgcbac") - .withCurrentValue(3223006673254134056L) - .withLimit(1592886583482291968L) - .withName(new SignalRServiceUsageName().withValue("qgoulznd").withLocalizedValue("kwy")) - .withUnit("gfgibm"), - new SignalRServiceUsageInner() - .withId("gakeqsr") - .withCurrentValue(4764420434211011454L) - .withLimit(7229748892246039848L) - .withName(new SignalRServiceUsageName().withValue("ytb").withLocalizedValue("qfou")) - .withUnit("mmnkzsmodmgl"))) - .withNextLink("gpbkwtmut"); - model = BinaryData.fromObject(model).toObject(SignalRServiceUsageList.class); - Assertions.assertEquals("feusnhut", model.value().get(0).id()); - Assertions.assertEquals(7488631932267615574L, model.value().get(0).currentValue()); - Assertions.assertEquals(1681358719295999682L, model.value().get(0).limit()); - Assertions.assertEquals("ugjzzdatqxhocdge", model.value().get(0).name().value()); - Assertions.assertEquals("lgphu", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("cndvkaozwyiftyhx", model.value().get(0).unit()); - Assertions.assertEquals("gpbkwtmut", model.nextLink()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageNameTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageNameTests.java deleted file mode 100644 index 274e9a8ab481..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageNameTests.java +++ /dev/null @@ -1,29 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsageName; -import org.junit.jupiter.api.Assertions; - -public final class SignalRServiceUsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SignalRServiceUsageName model = - BinaryData - .fromString("{\"value\":\"s\",\"localizedValue\":\"gbquxigj\"}") - .toObject(SignalRServiceUsageName.class); - Assertions.assertEquals("s", model.value()); - Assertions.assertEquals("gbquxigj", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SignalRServiceUsageName model = new SignalRServiceUsageName().withValue("s").withLocalizedValue("gbquxigj"); - model = BinaryData.fromObject(model).toObject(SignalRServiceUsageName.class); - Assertions.assertEquals("s", model.value()); - Assertions.assertEquals("gbquxigj", model.localizedValue()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuCapacityTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuCapacityTests.java deleted file mode 100644 index 470c5a0c20b2..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuCapacityTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.SkuCapacity; - -public final class SkuCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapacity model = - BinaryData - .fromString( - "{\"minimum\":1703781779,\"maximum\":995419481,\"default\":1024892279,\"allowedValues\":[1113434704,346562184,254804801,1095781686],\"scaleType\":\"Automatic\"}") - .toObject(SkuCapacity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = new SkuCapacity(); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuListInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuListInnerTests.java deleted file mode 100644 index d40311ef3ed9..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuListInnerTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner; - -public final class SkuListInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuListInner model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"lxprglyatddckcbc\",\"sku\":{\"name\":\"jrjxgciqibrhosx\",\"tier\":\"Premium\",\"size\":\"hzoymibmrqy\",\"family\":\"ahwfluszdtmhrk\",\"capacity\":1386295796},\"capacity\":{\"minimum\":1026914225,\"maximum\":1655642589,\"default\":728388129,\"allowedValues\":[],\"scaleType\":\"None\"}},{\"resourceType\":\"pbtg\",\"sku\":{\"name\":\"bwoenwashrt\",\"tier\":\"Standard\",\"size\":\"nqxwbp\",\"family\":\"ulpiuj\",\"capacity\":2036871201},\"capacity\":{\"minimum\":279995448,\"maximum\":172575084,\"default\":1035814224,\"allowedValues\":[],\"scaleType\":\"Manual\"}},{\"resourceType\":\"erpqlpqwcciuqg\",\"sku\":{\"name\":\"butauvfb\",\"tier\":\"Premium\",\"size\":\"hhmhykojoxa\",\"family\":\"nd\",\"capacity\":1324529031},\"capacity\":{\"minimum\":1639639314,\"maximum\":1904357705,\"default\":1940707417,\"allowedValues\":[],\"scaleType\":\"None\"}}],\"nextLink\":\"bpkkpwdre\"}") - .toObject(SkuListInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuListInner model = new SkuListInner(); - model = BinaryData.fromObject(model).toObject(SkuListInner.class); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuTests.java deleted file mode 100644 index 5cc8a8b7a070..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SkuTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.Sku; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = - BinaryData - .fromString( - "{\"resourceType\":\"ovvqfovljxywsu\",\"sku\":{\"name\":\"yrs\",\"tier\":\"Standard\",\"size\":\"tgadgvraeaen\",\"family\":\"nzar\",\"capacity\":1854977873},\"capacity\":{\"minimum\":1397845425,\"maximum\":1309534736,\"default\":2001921074,\"allowedValues\":[398350813,216133532,1905366329,2115532997],\"scaleType\":\"Manual\"}}") - .toObject(Sku.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku(); - model = BinaryData.fromObject(model).toObject(Sku.class); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UpstreamAuthSettingsTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UpstreamAuthSettingsTests.java deleted file mode 100644 index 49ebfeb5af4b..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UpstreamAuthSettingsTests.java +++ /dev/null @@ -1,34 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentitySettings; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthSettings; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthType; -import org.junit.jupiter.api.Assertions; - -public final class UpstreamAuthSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpstreamAuthSettings model = - BinaryData - .fromString("{\"type\":\"None\",\"managedIdentity\":{\"resource\":\"fbjfdtwssotftpvj\"}}") - .toObject(UpstreamAuthSettings.class); - Assertions.assertEquals(UpstreamAuthType.NONE, model.type()); - Assertions.assertEquals("fbjfdtwssotftpvj", model.managedIdentity().resource()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpstreamAuthSettings model = - new UpstreamAuthSettings() - .withType(UpstreamAuthType.NONE) - .withManagedIdentity(new ManagedIdentitySettings().withResource("fbjfdtwssotftpvj")); - model = BinaryData.fromObject(model).toObject(UpstreamAuthSettings.class); - Assertions.assertEquals(UpstreamAuthType.NONE, model.type()); - Assertions.assertEquals("fbjfdtwssotftpvj", model.managedIdentity().resource()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UsagesListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UsagesListMockTests.java deleted file mode 100644 index 4587cfbc995b..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UsagesListMockTests.java +++ /dev/null @@ -1,73 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UsagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"hevxcced\",\"currentValue\":3364825341811848774,\"limit\":1362790125818102816,\"name\":{\"value\":\"wzxltjc\",\"localizedValue\":\"hlt\"},\"unit\":\"gcxn\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.usages().list("hfwpracstwit", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hevxcced", response.iterator().next().id()); - Assertions.assertEquals(3364825341811848774L, response.iterator().next().currentValue()); - Assertions.assertEquals(1362790125818102816L, response.iterator().next().limit()); - Assertions.assertEquals("wzxltjc", response.iterator().next().name().value()); - Assertions.assertEquals("hlt", response.iterator().next().name().localizedValue()); - Assertions.assertEquals("gcxn", response.iterator().next().unit()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UserAssignedIdentityPropertyTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UserAssignedIdentityPropertyTests.java deleted file mode 100644 index 7cddb8bd94ee..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/UserAssignedIdentityPropertyTests.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.UserAssignedIdentityProperty; - -public final class UserAssignedIdentityPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentityProperty model = - BinaryData - .fromString("{\"principalId\":\"vbvmeu\",\"clientId\":\"ivyhzceuojgjrwju\"}") - .toObject(UserAssignedIdentityProperty.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentityProperty model = new UserAssignedIdentityProperty(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentityProperty.class); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesDeleteWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index 3002e9daddd4..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubCustomCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .webPubSubCustomCertificates() - .deleteWithResponse("ibqipqkg", "vxndz", "mkrefajpjorwkq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteMockTests.java deleted file mode 100644 index 0ae1b1fb0ddc..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubCustomDomainsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.webPubSubCustomDomains().delete("pzimejzanlfzxi", "vrmbzono", "i", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsGetWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsGetWithResponseMockTests.java deleted file mode 100644 index cc655108b562..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.CustomDomain; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubCustomDomainsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Creating\",\"domainName\":\"mwutwbdsre\",\"customCertificate\":{\"id\":\"drhneuyow\"}},\"id\":\"kdw\",\"name\":\"t\",\"type\":\"sibircgpi\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CustomDomain response = - manager - .webPubSubCustomDomains() - .getWithResponse("wrv", "ldgmfpgvmpip", "slthaq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mwutwbdsre", response.domainName()); - Assertions.assertEquals("drhneuyow", response.customCertificate().id()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsListMockTests.java deleted file mode 100644 index 9768f0b4badb..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsListMockTests.java +++ /dev/null @@ -1,69 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.CustomDomain; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubCustomDomainsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"domainName\":\"jk\",\"customCertificate\":{\"id\":\"fhmouwq\"}},\"id\":\"gzrf\",\"name\":\"eeyebi\",\"type\":\"ikayuhqlbjbsybb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.webPubSubCustomDomains().list("ncj", "budurgkakmo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jk", response.iterator().next().domainName()); - Assertions.assertEquals("fhmouwq", response.iterator().next().customCertificate().id()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubInnerTests.java deleted file mode 100644 index e2d2e4682da8..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubInnerTests.java +++ /dev/null @@ -1,52 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner; -import com.azure.resourcemanager.webpubsub.models.EventHandler; -import com.azure.resourcemanager.webpubsub.models.EventListener; -import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebPubSubHubInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubHubInner model = - BinaryData - .fromString( - "{\"properties\":{\"eventHandlers\":[{\"urlTemplate\":\"iidzyexzne\",\"userEventPattern\":\"xhnrztfolhb\",\"systemEvents\":[]},{\"urlTemplate\":\"nalaulppg\",\"userEventPattern\":\"tpnapnyiropuhpig\",\"systemEvents\":[]}],\"eventListeners\":[{}],\"anonymousConnectPolicy\":\"qgitxmed\"},\"id\":\"v\",\"name\":\"slynqwwnc\",\"type\":\"zzhxgktrm\"}") - .toObject(WebPubSubHubInner.class); - Assertions.assertEquals("iidzyexzne", model.properties().eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("xhnrztfolhb", model.properties().eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("qgitxmed", model.properties().anonymousConnectPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubHubInner model = - new WebPubSubHubInner() - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers( - Arrays - .asList( - new EventHandler() - .withUrlTemplate("iidzyexzne") - .withUserEventPattern("xhnrztfolhb") - .withSystemEvents(Arrays.asList()), - new EventHandler() - .withUrlTemplate("nalaulppg") - .withUserEventPattern("tpnapnyiropuhpig") - .withSystemEvents(Arrays.asList()))) - .withEventListeners(Arrays.asList(new EventListener())) - .withAnonymousConnectPolicy("qgitxmed")); - model = BinaryData.fromObject(model).toObject(WebPubSubHubInner.class); - Assertions.assertEquals("iidzyexzne", model.properties().eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("xhnrztfolhb", model.properties().eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("qgitxmed", model.properties().anonymousConnectPolicy()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubListTests.java deleted file mode 100644 index aa041844e5fd..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubListTests.java +++ /dev/null @@ -1,59 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner; -import com.azure.resourcemanager.webpubsub.models.WebPubSubHubList; -import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebPubSubHubListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubHubList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"eventHandlers\":[],\"eventListeners\":[],\"anonymousConnectPolicy\":\"rmcqiby\"},\"id\":\"nojvknmefqsg\",\"name\":\"vah\",\"type\":\"pjyzhpv\"},{\"properties\":{\"eventHandlers\":[],\"eventListeners\":[],\"anonymousConnectPolicy\":\"rvxdjzlmw\"},\"id\":\"xkvugfhzov\",\"name\":\"wjvzunluthnn\",\"type\":\"rnxipei\"},{\"properties\":{\"eventHandlers\":[],\"eventListeners\":[],\"anonymousConnectPolicy\":\"aejxd\"},\"id\":\"ltskzbbtd\",\"name\":\"umveekgpwozuhkf\",\"type\":\"bsjyofdx\"},{\"properties\":{\"eventHandlers\":[],\"eventListeners\":[],\"anonymousConnectPolicy\":\"ttouwaboekqvkel\"},\"id\":\"smv\",\"name\":\"xwyjsflhhc\",\"type\":\"aln\"}],\"nextLink\":\"xisxyawjoyaqcsl\"}") - .toObject(WebPubSubHubList.class); - Assertions.assertEquals("rmcqiby", model.value().get(0).properties().anonymousConnectPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubHubList model = - new WebPubSubHubList() - .withValue( - Arrays - .asList( - new WebPubSubHubInner() - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers(Arrays.asList()) - .withEventListeners(Arrays.asList()) - .withAnonymousConnectPolicy("rmcqiby")), - new WebPubSubHubInner() - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers(Arrays.asList()) - .withEventListeners(Arrays.asList()) - .withAnonymousConnectPolicy("rvxdjzlmw")), - new WebPubSubHubInner() - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers(Arrays.asList()) - .withEventListeners(Arrays.asList()) - .withAnonymousConnectPolicy("aejxd")), - new WebPubSubHubInner() - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers(Arrays.asList()) - .withEventListeners(Arrays.asList()) - .withAnonymousConnectPolicy("ttouwaboekqvkel")))); - model = BinaryData.fromObject(model).toObject(WebPubSubHubList.class); - Assertions.assertEquals("rmcqiby", model.value().get(0).properties().anonymousConnectPolicy()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubPropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubPropertiesTests.java deleted file mode 100644 index fe4967efc5b7..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubPropertiesTests.java +++ /dev/null @@ -1,75 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.EventHandler; -import com.azure.resourcemanager.webpubsub.models.EventListener; -import com.azure.resourcemanager.webpubsub.models.EventListenerEndpoint; -import com.azure.resourcemanager.webpubsub.models.EventListenerFilter; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthSettings; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthType; -import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebPubSubHubPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubHubProperties model = - BinaryData - .fromString( - "{\"eventHandlers\":[{\"urlTemplate\":\"napkteoellw\",\"userEventPattern\":\"fdygpfqbuaceopz\",\"systemEvents\":[\"hhuao\",\"ppcqeqxolz\",\"ahzxctobgbk\",\"moizpos\"],\"auth\":{\"type\":\"None\"}},{\"urlTemplate\":\"fbunrmfqjhhk\",\"userEventPattern\":\"pvjymjhxxjyng\",\"systemEvents\":[\"vkr\",\"swbxqz\"],\"auth\":{\"type\":\"ManagedIdentity\"}},{\"urlTemplate\":\"auvjfdxxivet\",\"userEventPattern\":\"cqaqtdoqmcbx\",\"systemEvents\":[\"xyslqbh\",\"fxoblytkb\"],\"auth\":{\"type\":\"ManagedIdentity\"}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"bkrvrnsvshqj\"}") - .toObject(WebPubSubHubProperties.class); - Assertions.assertEquals("napkteoellw", model.eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("fdygpfqbuaceopz", model.eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("hhuao", model.eventHandlers().get(0).systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.NONE, model.eventHandlers().get(0).auth().type()); - Assertions.assertEquals("bkrvrnsvshqj", model.anonymousConnectPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubHubProperties model = - new WebPubSubHubProperties() - .withEventHandlers( - Arrays - .asList( - new EventHandler() - .withUrlTemplate("napkteoellw") - .withUserEventPattern("fdygpfqbuaceopz") - .withSystemEvents(Arrays.asList("hhuao", "ppcqeqxolz", "ahzxctobgbk", "moizpos")) - .withAuth(new UpstreamAuthSettings().withType(UpstreamAuthType.NONE)), - new EventHandler() - .withUrlTemplate("fbunrmfqjhhk") - .withUserEventPattern("pvjymjhxxjyng") - .withSystemEvents(Arrays.asList("vkr", "swbxqz")) - .withAuth(new UpstreamAuthSettings().withType(UpstreamAuthType.MANAGED_IDENTITY)), - new EventHandler() - .withUrlTemplate("auvjfdxxivet") - .withUserEventPattern("cqaqtdoqmcbx") - .withSystemEvents(Arrays.asList("xyslqbh", "fxoblytkb")) - .withAuth(new UpstreamAuthSettings().withType(UpstreamAuthType.MANAGED_IDENTITY)))) - .withEventListeners( - Arrays - .asList( - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()), - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()), - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()))) - .withAnonymousConnectPolicy("bkrvrnsvshqj"); - model = BinaryData.fromObject(model).toObject(WebPubSubHubProperties.class); - Assertions.assertEquals("napkteoellw", model.eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("fdygpfqbuaceopz", model.eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("hhuao", model.eventHandlers().get(0).systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.NONE, model.eventHandlers().get(0).auth().type()); - Assertions.assertEquals("bkrvrnsvshqj", model.anonymousConnectPolicy()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateMockTests.java deleted file mode 100644 index 804585ff79b7..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,78 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.WebPubSubHub; -import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubHubsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"eventHandlers\":[],\"eventListeners\":[],\"anonymousConnectPolicy\":\"uq\"},\"id\":\"hwyg\",\"name\":\"lvdnkfx\",\"type\":\"semdwzrmu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WebPubSubHub response = - manager - .webPubSubHubs() - .define("syqtfi") - .withExistingWebPubSub("whbotzingamv", "phoszqz") - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers(Arrays.asList()) - .withEventListeners(Arrays.asList()) - .withAnonymousConnectPolicy("vdkfwynwcvtbvk")) - .create(); - - Assertions.assertEquals("uq", response.properties().anonymousConnectPolicy()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsDeleteMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsDeleteMockTests.java deleted file mode 100644 index 92e0da56629a..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubHubsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.webPubSubHubs().delete("ughftqsx", "qxujxukndxd", "grjguufzd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetWithResponseMockTests.java deleted file mode 100644 index e852abfa6ac6..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.WebPubSubHub; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubHubsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"eventHandlers\":[],\"eventListeners\":[],\"anonymousConnectPolicy\":\"vriiio\"},\"id\":\"nalghfkvtvsexso\",\"name\":\"ueluqhhahhxvrhmz\",\"type\":\"wpjgwws\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WebPubSubHub response = - manager - .webPubSubHubs() - .getWithResponse("lsj", "dhszfjv", "bgofeljag", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vriiio", response.properties().anonymousConnectPolicy()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListMockTests.java deleted file mode 100644 index ac3592b1cd73..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListMockTests.java +++ /dev/null @@ -1,68 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.WebPubSubHub; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubHubsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"eventHandlers\":[],\"eventListeners\":[],\"anonymousConnectPolicy\":\"zrnw\"},\"id\":\"iin\",\"name\":\"fpwpjylwbt\",\"type\":\"h\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.webPubSubHubs().list("rjqc", "rgz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zrnw", response.iterator().next().properties().anonymousConnectPolicy()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubNetworkACLsTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubNetworkACLsTests.java deleted file mode 100644 index 0d3dba94d2c5..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubNetworkACLsTests.java +++ /dev/null @@ -1,83 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.AclAction; -import com.azure.resourcemanager.webpubsub.models.NetworkAcl; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointAcl; -import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebPubSubNetworkACLsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubNetworkACLs model = - BinaryData - .fromString( - "{\"defaultAction\":\"Allow\",\"publicNetwork\":{\"allow\":[\"ClientConnection\",\"RESTAPI\"],\"deny\":[\"Trace\"]},\"privateEndpoints\":[{\"name\":\"azqugxywpmueefj\",\"allow\":[\"RESTAPI\",\"RESTAPI\"],\"deny\":[\"Trace\",\"ClientConnection\",\"RESTAPI\"]},{\"name\":\"suyonobglaocq\",\"allow\":[\"ServerConnection\"],\"deny\":[\"RESTAPI\"]},{\"name\":\"udxytlmoyrx\",\"allow\":[\"ClientConnection\",\"ClientConnection\"],\"deny\":[\"ServerConnection\"]},{\"name\":\"ntxhdzhlrqjbhck\",\"allow\":[\"ServerConnection\",\"ServerConnection\",\"RESTAPI\"],\"deny\":[\"ClientConnection\",\"Trace\"]}]}") - .toObject(WebPubSubNetworkACLs.class); - Assertions.assertEquals(AclAction.ALLOW, model.defaultAction()); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.publicNetwork().deny().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.privateEndpoints().get(0).allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("azqugxywpmueefj", model.privateEndpoints().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubNetworkACLs model = - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.ALLOW) - .withPublicNetwork( - new NetworkAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION, WebPubSubRequestType.RESTAPI)) - .withDeny(Arrays.asList(WebPubSubRequestType.TRACE))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.RESTAPI, WebPubSubRequestType.RESTAPI)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.TRACE, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.RESTAPI)) - .withName("azqugxywpmueefj"), - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) - .withDeny(Arrays.asList(WebPubSubRequestType.RESTAPI)) - .withName("suyonobglaocq"), - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.CLIENT_CONNECTION)) - .withDeny(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) - .withName("udxytlmoyrx"), - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.RESTAPI)) - .withDeny( - Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION, WebPubSubRequestType.TRACE)) - .withName("ntxhdzhlrqjbhck"))); - model = BinaryData.fromObject(model).toObject(WebPubSubNetworkACLs.class); - Assertions.assertEquals(AclAction.ALLOW, model.defaultAction()); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.publicNetwork().deny().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.privateEndpoints().get(0).allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("azqugxywpmueefj", model.privateEndpoints().get(0).name()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index c80de28b0339..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,63 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubPrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .webPubSubPrivateEndpointConnections() - .delete("azpxdtnkdmkqjjl", "uenvrkp", "ou", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index a6284860c335..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointConnection; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubPrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Moving\",\"privateEndpoint\":{\"id\":\"qaatjinrv\"},\"groupIds\":[\"pmfi\",\"bfggjioolvr\",\"x\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"gllqwjy\",\"actionsRequired\":\"jayvblmhv\"}},\"id\":\"zuhbxvvyhgsopb\",\"name\":\"rqufegxuvwz\",\"type\":\"bnhlmc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .webPubSubPrivateEndpointConnections() - .getWithResponse("tmtdhtmdvypgik", "gszywk", "irryuzhlh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qaatjinrv", response.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gllqwjy", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jayvblmhv", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index eae67c4d0dcb..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListMockTests.java +++ /dev/null @@ -1,79 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointConnection; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubPrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpoint\":{\"id\":\"rypqlmfeo\"},\"groupIds\":[\"qwkyhkobop\",\"xedk\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"qpcrf\",\"actionsRequired\":\"wccsnjvcdwxlpqek\"}},\"id\":\"tn\",\"name\":\"htjsying\",\"type\":\"fq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .webPubSubPrivateEndpointConnections() - .list("apfcqdpsq", "qvpsvuoymg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rypqlmfeo", response.iterator().next().privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.DISCONNECTED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("qpcrf", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals( - "wccsnjvcdwxlpqek", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateWithResponseMockTests.java deleted file mode 100644 index 2c197d36bc5c..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,90 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpoint; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointConnection; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubPrivateEndpointConnectionsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"a\"},\"groupIds\":[\"rjreafxts\",\"umh\",\"glikkxwslolb\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"lmv\",\"actionsRequired\":\"lfktgplcrpwjxe\"}},\"id\":\"noigbrnjwmwk\",\"name\":\"nbsazejjoqkag\",\"type\":\"hsxttaugzxnf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .webPubSubPrivateEndpointConnections() - .updateWithResponse( - "l", - "dn", - "itvgbmhrixkwm", - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("grhbpn")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REJECTED) - .withDescription("t") - .withActionsRequired("qp")), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("a", response.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lmv", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lfktgplcrpwjxe", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateLinkResourcesListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateLinkResourcesListMockTests.java deleted file mode 100644 index 8b1475a1e542..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateLinkResourcesListMockTests.java +++ /dev/null @@ -1,70 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubPrivateLinkResourcesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"xqtnq\",\"requiredMembers\":[\"zlwfffiakp\"],\"requiredZoneNames\":[\"qmt\",\"d\",\"tmmjihyeozph\"],\"shareablePrivateLinkResourceTypes\":[]},\"id\":\"uyqncygupkvipmd\",\"name\":\"cwxqu\",\"type\":\"evzhfsto\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.webPubSubPrivateLinkResources().list("ibreb", "aays", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xqtnq", response.iterator().next().groupId()); - Assertions.assertEquals("zlwfffiakp", response.iterator().next().requiredMembers().get(0)); - Assertions.assertEquals("qmt", response.iterator().next().requiredZoneNames().get(0)); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPropertiesTests.java deleted file mode 100644 index 4a18cc689210..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPropertiesTests.java +++ /dev/null @@ -1,111 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubProperties; -import com.azure.resourcemanager.webpubsub.models.AclAction; -import com.azure.resourcemanager.webpubsub.models.LiveTraceCategory; -import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration; -import com.azure.resourcemanager.webpubsub.models.NetworkAcl; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointAcl; -import com.azure.resourcemanager.webpubsub.models.ResourceLogCategory; -import com.azure.resourcemanager.webpubsub.models.ResourceLogConfiguration; -import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WebPubSubPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Canceled\",\"externalIP\":\"iwwzjuqk\",\"hostName\":\"sa\",\"publicPort\":1410521625,\"serverPort\":481973669,\"version\":\"foskghsauuimj\",\"privateEndpointConnections\":[{\"properties\":{\"provisioningState\":\"Creating\",\"groupIds\":[]},\"id\":\"dyjrrfbyaosv\",\"name\":\"xc\",\"type\":\"onpc\"},{\"properties\":{\"provisioningState\":\"Moving\",\"groupIds\":[]},\"id\":\"kevle\",\"name\":\"gz\",\"type\":\"buhfmvfaxkffeiit\"},{\"properties\":{\"provisioningState\":\"Running\",\"groupIds\":[]},\"id\":\"shxmzsbbzoggigrx\",\"name\":\"burvjxxjnspy\",\"type\":\"ptkoenkoukn\"},{\"properties\":{\"provisioningState\":\"Unknown\",\"groupIds\":[]},\"id\":\"bldngkpoc\",\"name\":\"pazyxoegukg\",\"type\":\"npiucgygevqznty\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"izcdrqjsd\",\"privateLinkResourceId\":\"ydnfyhxdeoejz\",\"provisioningState\":\"Failed\",\"requestMessage\":\"fsj\",\"status\":\"Rejected\"},\"id\":\"zfbishcbkhaj\",\"name\":\"eyeam\",\"type\":\"p\"},{\"properties\":{\"groupId\":\"alpbuxwgipwhon\",\"privateLinkResourceId\":\"wkgshwa\",\"provisioningState\":\"Failed\",\"requestMessage\":\"zbinjeputtm\",\"status\":\"Timeout\"},\"id\":\"nuzo\",\"name\":\"ftiyqzrnkcq\",\"type\":\"yx\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"sicohoqqnwvlry\",\"liveTraceConfiguration\":{\"enabled\":\"hheunmmqhgyx\",\"categories\":[{\"name\":\"ocukoklyax\",\"enabled\":\"onuq\"},{\"name\":\"fkbey\",\"enabled\":\"wrmjmwvvjektc\"}]},\"resourceLogConfiguration\":{\"categories\":[{\"name\":\"wlrsffrzpwv\",\"enabled\":\"dqgbiqylihkaetc\"},{\"name\":\"vfcivfsnkymuc\",\"enabled\":\"hjfbebrjcxe\"},{\"name\":\"uwutttxfvjrbi\",\"enabled\":\"hxepcyvahfnlj\"},{\"name\":\"qxj\",\"enabled\":\"ujqgidok\"}]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"publicNetwork\":{\"allow\":[\"ClientConnection\",\"RESTAPI\"],\"deny\":[\"RESTAPI\",\"Trace\",\"RESTAPI\"]},\"privateEndpoints\":[{\"name\":\"c\",\"allow\":[],\"deny\":[]},{\"name\":\"jeszzhbijhtxfv\",\"allow\":[],\"deny\":[]}]},\"publicNetworkAccess\":\"smx\",\"disableLocalAuth\":false,\"disableAadAuth\":true}") - .toObject(WebPubSubProperties.class); - Assertions.assertEquals(false, model.tls().clientCertEnabled()); - Assertions.assertEquals("hheunmmqhgyx", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("ocukoklyax", model.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("onuq", model.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("wlrsffrzpwv", model.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("dqgbiqylihkaetc", model.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.DENY, model.networkACLs().defaultAction()); - Assertions - .assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.networkACLs().publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.networkACLs().publicNetwork().deny().get(0)); - Assertions.assertEquals("c", model.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("smx", model.publicNetworkAccess()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(true, model.disableAadAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubProperties model = - new WebPubSubProperties() - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("hheunmmqhgyx") - .withCategories( - Arrays - .asList( - new LiveTraceCategory().withName("ocukoklyax").withEnabled("onuq"), - new LiveTraceCategory().withName("fkbey").withEnabled("wrmjmwvvjektc")))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories( - Arrays - .asList( - new ResourceLogCategory().withName("wlrsffrzpwv").withEnabled("dqgbiqylihkaetc"), - new ResourceLogCategory().withName("vfcivfsnkymuc").withEnabled("hjfbebrjcxe"), - new ResourceLogCategory().withName("uwutttxfvjrbi").withEnabled("hxepcyvahfnlj"), - new ResourceLogCategory().withName("qxj").withEnabled("ujqgidok")))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl() - .withAllow( - Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION, WebPubSubRequestType.RESTAPI)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.TRACE, - WebPubSubRequestType.RESTAPI))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow(Arrays.asList()) - .withDeny(Arrays.asList()) - .withName("c"), - new PrivateEndpointAcl() - .withAllow(Arrays.asList()) - .withDeny(Arrays.asList()) - .withName("jeszzhbijhtxfv")))) - .withPublicNetworkAccess("smx") - .withDisableLocalAuth(false) - .withDisableAadAuth(true); - model = BinaryData.fromObject(model).toObject(WebPubSubProperties.class); - Assertions.assertEquals(false, model.tls().clientCertEnabled()); - Assertions.assertEquals("hheunmmqhgyx", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("ocukoklyax", model.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("onuq", model.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("wlrsffrzpwv", model.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("dqgbiqylihkaetc", model.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.DENY, model.networkACLs().defaultAction()); - Assertions - .assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.networkACLs().publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.networkACLs().publicNetwork().deny().get(0)); - Assertions.assertEquals("c", model.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("smx", model.publicNetworkAccess()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(true, model.disableAadAuth()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubResourceInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubResourceInnerTests.java deleted file mode 100644 index baf69a519dfa..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubResourceInnerTests.java +++ /dev/null @@ -1,101 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubResourceInner; -import com.azure.resourcemanager.webpubsub.models.AclAction; -import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentity; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; -import com.azure.resourcemanager.webpubsub.models.ResourceLogConfiguration; -import com.azure.resourcemanager.webpubsub.models.ResourceSku; -import com.azure.resourcemanager.webpubsub.models.UserAssignedIdentityProperty; -import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; -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; -import org.junit.jupiter.api.Assertions; - -public final class WebPubSubResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubResourceInner model = - BinaryData - .fromString( - "{\"sku\":{\"name\":\"qbqqwxr\",\"tier\":\"Premium\",\"size\":\"llnwsubi\",\"family\":\"jampmngnzscxaqw\",\"capacity\":2024300309},\"properties\":{\"provisioningState\":\"Unknown\",\"externalIP\":\"nqvpkvlrxnje\",\"hostName\":\"eipheoflokeyy\",\"publicPort\":354708232,\"serverPort\":1285754335,\"version\":\"lwtgrhpdj\",\"privateEndpointConnections\":[{\"id\":\"sxazjpq\",\"name\":\"e\",\"type\":\"ualhbxxhejj\"},{\"id\":\"dudgwdslfhot\",\"name\":\"mcy\",\"type\":\"pwlbjnpg\"},{\"id\":\"tadehxnltyfsopp\",\"name\":\"suesnzw\",\"type\":\"ej\"}],\"sharedPrivateLinkResources\":[{\"id\":\"xzdmohctb\",\"name\":\"vudwx\",\"type\":\"ndnvo\"},{\"id\":\"jjugwdkcglhslaz\",\"name\":\"dyggdtjixhbku\",\"type\":\"fqweykhmene\"},{\"id\":\"exfwhy\",\"name\":\"cibvyvdcsitynn\",\"type\":\"amdecte\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"cj\",\"liveTraceConfiguration\":{\"enabled\":\"vhezrkgqhcj\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"yvxyqjp\",\"disableLocalAuth\":true,\"disableAadAuth\":true},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"canoaeupf\":{\"principalId\":\"cczsq\",\"clientId\":\"hvmdajvnysounq\"}},\"principalId\":\"hltrpmopjmcmatuo\",\"tenantId\":\"hfuiuaodsfc\"},\"location\":\"vxodpu\",\"tags\":{\"okktwhrdxw\":\"yzydagfuaxbezyi\",\"ryocfsfksymdd\":\"ywqsmbsurexim\",\"o\":\"stkiiuxhqyud\",\"b\":\"rq\"},\"id\":\"oczvy\",\"name\":\"fqrvkdvjsllrmvvd\",\"type\":\"watkpnpulexxb\"}") - .toObject(WebPubSubResourceInner.class); - Assertions.assertEquals("vxodpu", model.location()); - Assertions.assertEquals("yzydagfuaxbezyi", model.tags().get("okktwhrdxw")); - Assertions.assertEquals("qbqqwxr", model.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals(2024300309, model.sku().capacity()); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(false, model.tls().clientCertEnabled()); - Assertions.assertEquals("vhezrkgqhcj", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().defaultAction()); - Assertions.assertEquals("yvxyqjp", model.publicNetworkAccess()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(true, model.disableAadAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubResourceInner model = - new WebPubSubResourceInner() - .withLocation("vxodpu") - .withTags( - mapOf( - "okktwhrdxw", - "yzydagfuaxbezyi", - "ryocfsfksymdd", - "ywqsmbsurexim", - "o", - "stkiiuxhqyud", - "b", - "rq")) - .withSku( - new ResourceSku().withName("qbqqwxr").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(2024300309)) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("canoaeupf", new UserAssignedIdentityProperty()))) - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration().withEnabled("vhezrkgqhcj").withCategories(Arrays.asList())) - .withResourceLogConfiguration(new ResourceLogConfiguration().withCategories(Arrays.asList())) - .withNetworkACLs( - new WebPubSubNetworkACLs().withDefaultAction(AclAction.ALLOW).withPrivateEndpoints(Arrays.asList())) - .withPublicNetworkAccess("yvxyqjp") - .withDisableLocalAuth(true) - .withDisableAadAuth(true); - model = BinaryData.fromObject(model).toObject(WebPubSubResourceInner.class); - Assertions.assertEquals("vxodpu", model.location()); - Assertions.assertEquals("yzydagfuaxbezyi", model.tags().get("okktwhrdxw")); - Assertions.assertEquals("qbqqwxr", model.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals(2024300309, model.sku().capacity()); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(false, model.tls().clientCertEnabled()); - Assertions.assertEquals("vhezrkgqhcj", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().defaultAction()); - Assertions.assertEquals("yvxyqjp", model.publicNetworkAccess()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(true, model.disableAadAuth()); - } - - @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/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubResourceListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubResourceListTests.java deleted file mode 100644 index 0426cc1f0ec0..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubResourceListTests.java +++ /dev/null @@ -1,130 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubResourceInner; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentity; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; -import com.azure.resourcemanager.webpubsub.models.ResourceSku; -import com.azure.resourcemanager.webpubsub.models.WebPubSubResourceList; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WebPubSubResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"sku\":{\"name\":\"jaoyfhrtx\",\"tier\":\"Free\",\"size\":\"rkujy\",\"family\":\"l\",\"capacity\":867367638},\"properties\":{\"provisioningState\":\"Canceled\",\"externalIP\":\"wrlyxwjkcprb\",\"hostName\":\"b\",\"publicPort\":19976049,\"serverPort\":1017472579,\"version\":\"vpys\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"hostNamePrefix\":\"uj\",\"publicNetworkAccess\":\"uouq\",\"disableLocalAuth\":false,\"disableAadAuth\":false},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{},\"principalId\":\"itnwuizgazxufi\",\"tenantId\":\"ckyfih\"},\"location\":\"idf\",\"tags\":{\"dkfthwxmnt\":\"dzuhtymwi\",\"aop\":\"i\",\"jcmmxdcufufsrp\":\"km\"},\"id\":\"mzidnsezcxtb\",\"name\":\"sgfyccsnew\",\"type\":\"dwzjeiach\"},{\"sku\":{\"name\":\"osfln\",\"tier\":\"Standard\",\"size\":\"qpteeh\",\"family\":\"vypyqrimzinpv\",\"capacity\":694156912},\"properties\":{\"provisioningState\":\"Canceled\",\"externalIP\":\"soodqxhcrmnoh\",\"hostName\":\"ckwhds\",\"publicPort\":1580515344,\"serverPort\":614073164,\"version\":\"pjxsqwpgrjbznor\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"hostNamePrefix\":\"nb\",\"publicNetworkAccess\":\"nmoc\",\"disableLocalAuth\":false,\"disableAadAuth\":true},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"bl\",\"tenantId\":\"gpbtoqcjmklj\"},\"location\":\"bqidtqaj\",\"tags\":{\"kudjkrlkhb\":\"l\",\"locx\":\"hfepgzgqex\",\"aierhhb\":\"c\"},\"id\":\"sglumma\",\"name\":\"tjaodxobnb\",\"type\":\"xkqpxo\"},{\"sku\":{\"name\":\"jionpimexgstxgc\",\"tier\":\"Free\",\"size\":\"maajrmvdjwzrlo\",\"family\":\"clwhijcoejctbz\",\"capacity\":21849341},\"properties\":{\"provisioningState\":\"Unknown\",\"externalIP\":\"bkbfkgukdkex\",\"hostName\":\"pofm\",\"publicPort\":159547648,\"serverPort\":1757077121,\"version\":\"pg\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"hostNamePrefix\":\"jjxhvpmo\",\"publicNetworkAccess\":\"zxibqeoj\",\"disableLocalAuth\":true,\"disableAadAuth\":true},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"wndeicbtwnp\",\"tenantId\":\"oqvuhr\"},\"location\":\"f\",\"tags\":{\"t\":\"ddglm\"},\"id\":\"jqkwpyeicx\",\"name\":\"qciwqvhkhixuigdt\",\"type\":\"pbobjo\"},{\"sku\":{\"name\":\"m\",\"tier\":\"Free\",\"size\":\"m\",\"family\":\"hrzayvvtpgvdf\",\"capacity\":1330318957},\"properties\":{\"provisioningState\":\"Deleting\",\"externalIP\":\"utqxlngx\",\"hostName\":\"fgugnxkrxdqmid\",\"publicPort\":1583346323,\"serverPort\":1570785735,\"version\":\"qdrabhjybigehoqf\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"hostNamePrefix\":\"anyktzlcuiywg\",\"publicNetworkAccess\":\"drvyn\",\"disableLocalAuth\":true,\"disableAadAuth\":true},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"nc\",\"tenantId\":\"pec\"},\"location\":\"m\",\"tags\":{\"zevgb\":\"ofsx\"},\"id\":\"qjqabcypmivkwl\",\"name\":\"uvcc\",\"type\":\"wnfnbacf\"}],\"nextLink\":\"nlebxetqgtzxd\"}") - .toObject(WebPubSubResourceList.class); - Assertions.assertEquals("idf", model.value().get(0).location()); - Assertions.assertEquals("dzuhtymwi", model.value().get(0).tags().get("dkfthwxmnt")); - Assertions.assertEquals("jaoyfhrtx", model.value().get(0).sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals(867367638, model.value().get(0).sku().capacity()); - Assertions.assertEquals(ManagedIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("uouq", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals(false, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(false, model.value().get(0).disableAadAuth()); - Assertions.assertEquals("nlebxetqgtzxd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubResourceList model = - new WebPubSubResourceList() - .withValue( - Arrays - .asList( - new WebPubSubResourceInner() - .withLocation("idf") - .withTags(mapOf("dkfthwxmnt", "dzuhtymwi", "aop", "i", "jcmmxdcufufsrp", "km")) - .withSku( - new ResourceSku() - .withName("jaoyfhrtx") - .withTier(WebPubSubSkuTier.FREE) - .withCapacity(867367638)) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withPublicNetworkAccess("uouq") - .withDisableLocalAuth(false) - .withDisableAadAuth(false), - new WebPubSubResourceInner() - .withLocation("bqidtqaj") - .withTags(mapOf("kudjkrlkhb", "l", "locx", "hfepgzgqex", "aierhhb", "c")) - .withSku( - new ResourceSku() - .withName("osfln") - .withTier(WebPubSubSkuTier.STANDARD) - .withCapacity(694156912)) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withPublicNetworkAccess("nmoc") - .withDisableLocalAuth(false) - .withDisableAadAuth(true), - new WebPubSubResourceInner() - .withLocation("f") - .withTags(mapOf("t", "ddglm")) - .withSku( - new ResourceSku() - .withName("jionpimexgstxgc") - .withTier(WebPubSubSkuTier.FREE) - .withCapacity(21849341)) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withPublicNetworkAccess("zxibqeoj") - .withDisableLocalAuth(true) - .withDisableAadAuth(true), - new WebPubSubResourceInner() - .withLocation("m") - .withTags(mapOf("zevgb", "ofsx")) - .withSku( - new ResourceSku() - .withName("m") - .withTier(WebPubSubSkuTier.FREE) - .withCapacity(1330318957)) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withPublicNetworkAccess("drvyn") - .withDisableLocalAuth(true) - .withDisableAadAuth(true))) - .withNextLink("nlebxetqgtzxd"); - model = BinaryData.fromObject(model).toObject(WebPubSubResourceList.class); - Assertions.assertEquals("idf", model.value().get(0).location()); - Assertions.assertEquals("dzuhtymwi", model.value().get(0).tags().get("dkfthwxmnt")); - Assertions.assertEquals("jaoyfhrtx", model.value().get(0).sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals(867367638, model.value().get(0).sku().capacity()); - Assertions.assertEquals(ManagedIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("uouq", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals(false, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(false, model.value().get(0).disableAadAuth()); - Assertions.assertEquals("nlebxetqgtzxd", model.nextLink()); - } - - @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/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateMockTests.java deleted file mode 100644 index 227458a1fe23..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,76 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"zejntps\",\"privateLinkResourceId\":\"wgioilqukry\",\"provisioningState\":\"Succeeded\",\"requestMessage\":\"mieoxorgguf\",\"status\":\"Pending\"},\"id\":\"omtbghhavgrvkff\",\"name\":\"vjzhpjbib\",\"type\":\"jmfxumvf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SharedPrivateLinkResource response = - manager - .webPubSubSharedPrivateLinkResources() - .define("zh") - .withExistingWebPubSub("tw", "sgogczhonnxk") - .withGroupId("nyhmossxkkgthr") - .withPrivateLinkResourceId("gh") - .withRequestMessage("hqxvcxgfrpdsofbs") - .create(); - - Assertions.assertEquals("zejntps", response.groupId()); - Assertions.assertEquals("wgioilqukry", response.privateLinkResourceId()); - Assertions.assertEquals("mieoxorgguf", response.requestMessage()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteMockTests.java deleted file mode 100644 index c2619dcd6d35..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteMockTests.java +++ /dev/null @@ -1,63 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubSharedPrivateLinkResourcesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .webPubSubSharedPrivateLinkResources() - .delete("ratiz", "ronasxift", "zq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index 58f6fbe5c647..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubSharedPrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"lwg\",\"privateLinkResourceId\":\"ytsbwtovv\",\"provisioningState\":\"Moving\",\"requestMessage\":\"inqfiufxqknpirgn\",\"status\":\"Rejected\"},\"id\":\"twqmsniffcdmqnr\",\"name\":\"jlpijnkrx\",\"type\":\"rddh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SharedPrivateLinkResource response = - manager - .webPubSubSharedPrivateLinkResources() - .getWithResponse("twjchrdg", "ihxumwctondzj", "uu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lwg", response.groupId()); - Assertions.assertEquals("ytsbwtovv", response.privateLinkResourceId()); - Assertions.assertEquals("inqfiufxqknpirgn", response.requestMessage()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListMockTests.java deleted file mode 100644 index ca25f16bb25d..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListMockTests.java +++ /dev/null @@ -1,70 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubSharedPrivateLinkResourcesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"xbjxyfwnylrcools\",\"privateLinkResourceId\":\"tpkiwkkbnujry\",\"provisioningState\":\"Updating\",\"requestMessage\":\"lbfpncurd\",\"status\":\"Disconnected\"},\"id\":\"iithtywu\",\"name\":\"xcbihw\",\"type\":\"knfd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.webPubSubSharedPrivateLinkResources().list("xhojuj", "ypelmcu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xbjxyfwnylrcools", response.iterator().next().groupId()); - Assertions.assertEquals("tpkiwkkbnujry", response.iterator().next().privateLinkResourceId()); - Assertions.assertEquals("lbfpncurd", response.iterator().next().requestMessage()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubTlsSettingsTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubTlsSettingsTests.java deleted file mode 100644 index aa588fee3b96..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubTlsSettingsTests.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; -import org.junit.jupiter.api.Assertions; - -public final class WebPubSubTlsSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubTlsSettings model = - BinaryData.fromString("{\"clientCertEnabled\":true}").toObject(WebPubSubTlsSettings.class); - Assertions.assertEquals(true, model.clientCertEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubTlsSettings model = new WebPubSubTlsSettings().withClientCertEnabled(true); - model = BinaryData.fromObject(model).toObject(WebPubSubTlsSettings.class); - Assertions.assertEquals(true, model.clientCertEnabled()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsCheckNameAvailabilityWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 0c9ab8e23698..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,75 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.NameAvailability; -import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"ncvokotllxdyhg\",\"message\":\"ocogj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailability response = - manager - .webPubSubs() - .checkNameAvailabilityWithResponse( - "ynpcdpumnzgmwznm", - new NameAvailabilityParameters().withType("biknsorgjhxbld").withName("lwwrl"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("ncvokotllxdyhg", response.reason()); - Assertions.assertEquals("ocogj", response.message()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsCreateOrUpdateMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsCreateOrUpdateMockTests.java deleted file mode 100644 index 58254e422d3d..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,120 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.AclAction; -import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentity; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; -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.WebPubSubResource; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"fgmjzrwrdgrt\",\"tier\":\"Standard\",\"size\":\"u\",\"family\":\"kopbminrf\",\"capacity\":123182613},\"properties\":{\"provisioningState\":\"Succeeded\",\"externalIP\":\"ziuiefozbhdm\",\"hostName\":\"l\",\"publicPort\":1354395459,\"serverPort\":572432734,\"version\":\"trmaequiahxicslf\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"halns\",\"liveTraceConfiguration\":{\"enabled\":\"csphkaiv\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"gwol\",\"disableLocalAuth\":true,\"disableAadAuth\":true},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"rsbrgzdwm\",\"tenantId\":\"eypqwdxggicccn\"},\"location\":\"huexmk\",\"tags\":{\"dtclusiypb\":\"stvlzywemhzrnc\",\"ukyhejhzis\":\"fgytguslfeadcyg\",\"jzraehtwdwrf\":\"gfpelolppvksrpqv\"},\"id\":\"swibyr\",\"name\":\"dl\",\"type\":\"h\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WebPubSubResource response = - manager - .webPubSubs() - .define("l") - .withRegion("ztvbtqgsfr") - .withExistingResourceGroup("dmovsm") - .withTags( - mapOf("dsyuuximerqfob", "zkoowtlmnguxawqa", "utwpfhp", "yznkby", "tdlmkkzevd", "gmhrskdsnfdsdoak")) - .withSku(new ResourceSku().withName("ab").withTier(WebPubSubSkuTier.BASIC).withCapacity(1601819937)) - .withIdentity( - new ManagedIdentity().withType(ManagedIdentityType.NONE).withUserAssignedIdentities(mapOf())) - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(true)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration().withEnabled("szufoxciqopidoa").withCategories(Arrays.asList())) - .withResourceLogConfiguration(new ResourceLogConfiguration().withCategories(Arrays.asList())) - .withNetworkACLs( - new WebPubSubNetworkACLs().withDefaultAction(AclAction.DENY).withPrivateEndpoints(Arrays.asList())) - .withPublicNetworkAccess("xkhnzbonlwnto") - .withDisableLocalAuth(false) - .withDisableAadAuth(true) - .create(); - - Assertions.assertEquals("huexmk", response.location()); - Assertions.assertEquals("stvlzywemhzrnc", response.tags().get("dtclusiypb")); - Assertions.assertEquals("fgmjzrwrdgrt", response.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals(123182613, response.sku().capacity()); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(true, response.tls().clientCertEnabled()); - Assertions.assertEquals("csphkaiv", response.liveTraceConfiguration().enabled()); - Assertions.assertEquals(AclAction.DENY, response.networkACLs().defaultAction()); - Assertions.assertEquals("gwol", response.publicNetworkAccess()); - Assertions.assertEquals(true, response.disableLocalAuth()); - Assertions.assertEquals(true, response.disableAadAuth()); - } - - @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/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsDeleteMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsDeleteMockTests.java deleted file mode 100644 index c5354c745f85..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.webPubSubs().delete("lxorjaltolmncws", "bqwcsdbnwdcf", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsGetByResourceGroupWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 3e65f10cc234..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,84 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.AclAction; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; -import com.azure.resourcemanager.webpubsub.models.WebPubSubResource; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"axhexiilivp\",\"tier\":\"Basic\",\"size\":\"r\",\"family\":\"d\",\"capacity\":887642500},\"properties\":{\"provisioningState\":\"Creating\",\"externalIP\":\"zfgs\",\"hostName\":\"yfxrx\",\"publicPort\":1104175771,\"serverPort\":2043686923,\"version\":\"amxjezwlw\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"dy\",\"liveTraceConfiguration\":{\"enabled\":\"dooaojkniodko\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"msbvdkcrodtjinf\",\"disableLocalAuth\":false,\"disableAadAuth\":false},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"efkdlf\",\"tenantId\":\"kggkfpa\"},\"location\":\"owpulpq\",\"tags\":{\"agxsdszuemps\":\"lsyxkqjnsjervt\",\"nqicvinvkjjxdxrb\":\"zkfzbeyv\",\"zpof\":\"ukzclewyhmlwpaz\"},\"id\":\"cckwyfzqwhxxbu\",\"name\":\"qa\",\"type\":\"zfeqztppri\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WebPubSubResource response = - manager - .webPubSubs() - .getByResourceGroupWithResponse("judpfrxt", "thzvaytdwkqbrqu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("owpulpq", response.location()); - Assertions.assertEquals("lsyxkqjnsjervt", response.tags().get("agxsdszuemps")); - Assertions.assertEquals("axhexiilivp", response.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals(887642500, response.sku().capacity()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals(true, response.tls().clientCertEnabled()); - Assertions.assertEquals("dooaojkniodko", response.liveTraceConfiguration().enabled()); - Assertions.assertEquals(AclAction.ALLOW, response.networkACLs().defaultAction()); - Assertions.assertEquals("msbvdkcrodtjinf", response.publicNetworkAccess()); - Assertions.assertEquals(false, response.disableLocalAuth()); - Assertions.assertEquals(false, response.disableAadAuth()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListByResourceGroupMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListByResourceGroupMockTests.java deleted file mode 100644 index 9c53a43038a9..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListByResourceGroupMockTests.java +++ /dev/null @@ -1,82 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.AclAction; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; -import com.azure.resourcemanager.webpubsub.models.WebPubSubResource; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"sku\":{\"name\":\"bjhwuaan\",\"tier\":\"Free\",\"size\":\"sphyoulpjrvxa\",\"family\":\"rvimjwosytxitcsk\",\"capacity\":212130052},\"properties\":{\"provisioningState\":\"Succeeded\",\"externalIP\":\"iekkezz\",\"hostName\":\"hlyfjhdgqgg\",\"publicPort\":1278183507,\"serverPort\":1059730193,\"version\":\"g\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"t\",\"liveTraceConfiguration\":{\"enabled\":\"lr\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"varmywdmj\",\"disableLocalAuth\":false,\"disableAadAuth\":true},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{},\"principalId\":\"wlycoduhpkxkg\",\"tenantId\":\"areqna\"},\"location\":\"qugjhkycube\",\"tags\":{\"krmnjijpxacqqud\":\"ssofwqmzqa\",\"yffimrzrtuzqogs\":\"nbyxbaaabjyv\"},\"id\":\"xnevfdnwn\",\"name\":\"mewzsyyc\",\"type\":\"uzsoi\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.webPubSubs().listByResourceGroup("fatkld", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qugjhkycube", response.iterator().next().location()); - Assertions.assertEquals("ssofwqmzqa", response.iterator().next().tags().get("krmnjijpxacqqud")); - Assertions.assertEquals("bjhwuaan", response.iterator().next().sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.FREE, response.iterator().next().sku().tier()); - Assertions.assertEquals(212130052, response.iterator().next().sku().capacity()); - Assertions.assertEquals(ManagedIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals(true, response.iterator().next().tls().clientCertEnabled()); - Assertions.assertEquals("lr", response.iterator().next().liveTraceConfiguration().enabled()); - Assertions.assertEquals(AclAction.ALLOW, response.iterator().next().networkACLs().defaultAction()); - Assertions.assertEquals("varmywdmj", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals(false, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(true, response.iterator().next().disableAadAuth()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListMockTests.java deleted file mode 100644 index 53c3c6f48c82..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListMockTests.java +++ /dev/null @@ -1,81 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.AclAction; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; -import com.azure.resourcemanager.webpubsub.models.WebPubSubResource; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"sku\":{\"name\":\"dtbnnha\",\"tier\":\"Standard\",\"size\":\"rkvcikhnvpa\",\"family\":\"gxqquezik\",\"capacity\":2021225461},\"properties\":{\"provisioningState\":\"Running\",\"externalIP\":\"lla\",\"hostName\":\"elwuipi\",\"publicPort\":1198418421,\"serverPort\":1148951623,\"version\":\"ivgvvcna\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"ueedndrdvs\",\"liveTraceConfiguration\":{\"enabled\":\"qqtch\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"ygdvwv\",\"disableLocalAuth\":true,\"disableAadAuth\":true},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"udxepxgyqagv\",\"tenantId\":\"mnpkukghimdblxg\"},\"location\":\"mfnjh\",\"tags\":{\"oqreyfkzikfjawn\":\"wmszkk\"},\"id\":\"a\",\"name\":\"vxwc\",\"type\":\"elpcirelsfeaenwa\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.webPubSubs().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mfnjh", response.iterator().next().location()); - Assertions.assertEquals("wmszkk", response.iterator().next().tags().get("oqreyfkzikfjawn")); - Assertions.assertEquals("dtbnnha", response.iterator().next().sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals(2021225461, response.iterator().next().sku().capacity()); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(false, response.iterator().next().tls().clientCertEnabled()); - Assertions.assertEquals("qqtch", response.iterator().next().liveTraceConfiguration().enabled()); - Assertions.assertEquals(AclAction.DENY, response.iterator().next().networkACLs().defaultAction()); - Assertions.assertEquals("ygdvwv", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals(true, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(true, response.iterator().next().disableAadAuth()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListSkusWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListSkusWithResponseMockTests.java deleted file mode 100644 index f4dd3d0840d8..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListSkusWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.webpubsub.WebPubSubManager; -import com.azure.resourcemanager.webpubsub.models.SkuList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WebPubSubsListSkusWithResponseMockTests { - @Test - public void testListSkusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"dsg\"},{\"resourceType\":\"kycgrauwj\"}],\"nextLink\":\"eburu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - WebPubSubManager manager = - WebPubSubManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuList response = - manager - .webPubSubs() - .listSkusWithResponse("kgjubgdknnqvsazn", "n", com.azure.core.util.Context.NONE) - .getValue(); - } -}