diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md index 2392d1f6f8f0..0ad3a279a342 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.3 (Unreleased) +## 1.0.0-beta.1 (2024-05-23) + +- 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-2024-03-01. 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 fcf793a4c198..2828bd57b465 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-08-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2024-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-webpubsub - 1.1.0-beta.2 + 1.1.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md index 0db6b7b03f19..21077d8a8dd1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md @@ -56,6 +56,12 @@ - [List](#webpubsubprivatelinkresources_list) +## WebPubSubReplicaSharedPrivateLinkResources + +- [CreateOrUpdate](#webpubsubreplicasharedprivatelinkresources_createorupdate) +- [Get](#webpubsubreplicasharedprivatelinkresources_get) +- [List](#webpubsubreplicasharedprivatelinkresources_list) + ## WebPubSubReplicas - [CreateOrUpdate](#webpubsubreplicas_createorupdate) @@ -74,14 +80,16 @@ ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/Operations_List.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void operationsList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { @@ -93,14 +101,16 @@ public final class OperationsListSamples { ### Usages_List ```java -/** Samples for Usages List. */ +/** + * Samples for Usages List. + */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/Usages_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/Usages_List.json */ /** * Sample code: Usages_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void usagesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { @@ -114,23 +124,22 @@ public final class UsagesListSamples { ```java import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters; -/** Samples for WebPubSub CheckNameAvailability. */ +/** + * Samples for WebPubSub CheckNameAvailability. + */ public final class WebPubSubCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_CheckNameAvailability.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_CheckNameAvailability.json */ /** * Sample code: WebPubSub_CheckNameAvailability. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCheckNameAvailability(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() - .checkNameAvailabilityWithResponse( - "eastus", - new NameAvailabilityParameters() - .withType("Microsoft.SignalRService/WebPubSub") + manager.webPubSubs() + .checkNameAvailabilityWithResponse("eastus", + new NameAvailabilityParameters().withType("Microsoft.SignalRService/WebPubSub") .withName("myWebPubSubService"), com.azure.core.util.Context.NONE); } @@ -152,24 +161,26 @@ 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; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSocketIOSettings; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for WebPubSub CreateOrUpdate. */ +/** + * Samples for WebPubSub CreateOrUpdate. + */ public final class WebPubSubCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_CreateOrUpdate.json */ /** * Sample code: WebPubSub_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() + manager.webPubSubs() .define("myWebPubSubService") .withRegion("eastus") .withExistingResourceGroup("myResourceGroup") @@ -178,25 +189,18 @@ public final class WebPubSubCreateOrUpdateSamples { .withKind(ServiceKind.WEB_PUB_SUB) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("false") - .withCategories( - Arrays.asList(new LiveTraceCategory().withName("ConnectivityLogs").withEnabled("true")))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) - .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) + .withLiveTraceConfiguration(new LiveTraceConfiguration().withEnabled("false") + .withCategories( + Arrays.asList(new LiveTraceCategory().withName("ConnectivityLogs").withEnabled("true")))) + .withNetworkACLs(new WebPubSubNetworkACLs().withDefaultAction(AclAction.DENY) + .withPublicNetwork(new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) + .withPrivateEndpoints(Arrays + .asList(new PrivateEndpointAcl().withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) + .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) .withPublicNetworkAccess("Enabled") .withDisableLocalAuth(false) .withDisableAadAuth(false) + .withSocketIO(new WebPubSubSocketIOSettings().withServiceMode("Serverless")) .create(); } @@ -217,14 +221,16 @@ public final class WebPubSubCreateOrUpdateSamples { ### WebPubSub_Delete ```java -/** Samples for WebPubSub Delete. */ +/** + * Samples for WebPubSub Delete. + */ public final class WebPubSubDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Delete.json */ /** * Sample code: WebPubSub_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { @@ -236,19 +242,20 @@ public final class WebPubSubDeleteSamples { ### WebPubSub_GetByResourceGroup ```java -/** Samples for WebPubSub GetByResourceGroup. */ +/** + * Samples for WebPubSub GetByResourceGroup. + */ public final class WebPubSubGetByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Get.json */ /** * Sample code: WebPubSub_Get. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() + manager.webPubSubs() .getByResourceGroupWithResponse("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -257,14 +264,16 @@ public final class WebPubSubGetByResourceGroupSamples { ### WebPubSub_List ```java -/** Samples for WebPubSub List. */ +/** + * Samples for WebPubSub List. + */ public final class WebPubSubListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListBySubscription.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListBySubscription.json */ /** * Sample code: WebPubSub_ListBySubscription. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubListBySubscription(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { @@ -276,14 +285,16 @@ public final class WebPubSubListSamples { ### WebPubSub_ListByResourceGroup ```java -/** Samples for WebPubSub ListByResourceGroup. */ +/** + * Samples for WebPubSub ListByResourceGroup. + */ public final class WebPubSubListByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListByResourceGroup.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListByResourceGroup.json */ /** * Sample code: WebPubSub_ListByResourceGroup. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubListByResourceGroup(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { @@ -295,19 +306,20 @@ public final class WebPubSubListByResourceGroupSamples { ### WebPubSub_ListKeys ```java -/** Samples for WebPubSub ListKeys. */ +/** + * Samples for WebPubSub ListKeys. + */ public final class WebPubSubListKeysSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListKeys.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListKeys.json */ /** * Sample code: WebPubSub_ListKeys. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubListKeys(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() + manager.webPubSubs() .listKeysWithResponse("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -316,21 +328,22 @@ public final class WebPubSubListKeysSamples { ### WebPubSub_ListReplicaSkus ```java -/** Samples for WebPubSub ListReplicaSkus. */ +/** + * Samples for WebPubSub ListReplicaSkus. + */ public final class WebPubSubListReplicaSkusSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListReplicaSkus.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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); + manager.webPubSubs() + .listReplicaSkusWithResponse("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE); } } ``` @@ -338,19 +351,20 @@ public final class WebPubSubListReplicaSkusSamples { ### WebPubSub_ListSkus ```java -/** Samples for WebPubSub ListSkus. */ +/** + * Samples for WebPubSub ListSkus. + */ public final class WebPubSubListSkusSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListSkus.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListSkus.json */ /** * Sample code: WebPubSub_ListSkus. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubListSkus(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() + manager.webPubSubs() .listSkusWithResponse("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -362,24 +376,22 @@ public final class WebPubSubListSkusSamples { import com.azure.resourcemanager.webpubsub.models.KeyType; import com.azure.resourcemanager.webpubsub.models.RegenerateKeyParameters; -/** Samples for WebPubSub RegenerateKey. */ +/** + * Samples for WebPubSub RegenerateKey. + */ public final class WebPubSubRegenerateKeySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_RegenerateKey.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_RegenerateKey.json */ /** * Sample code: WebPubSub_RegenerateKey. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubRegenerateKey(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() - .regenerateKey( - "myResourceGroup", - "myWebPubSubService", - new RegenerateKeyParameters().withKeyType(KeyType.PRIMARY), - com.azure.core.util.Context.NONE); + manager.webPubSubs() + .regenerateKey("myResourceGroup", "myWebPubSubService", + new RegenerateKeyParameters().withKeyType(KeyType.PRIMARY), com.azure.core.util.Context.NONE); } } ``` @@ -387,14 +399,16 @@ public final class WebPubSubRegenerateKeySamples { ### WebPubSub_Restart ```java -/** Samples for WebPubSub Restart. */ +/** + * Samples for WebPubSub Restart. + */ public final class WebPubSubRestartSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_Restart.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Restart.json */ /** * Sample code: WebPubSub_Restart. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubRestart(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { @@ -418,53 +432,45 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; import com.azure.resourcemanager.webpubsub.models.WebPubSubResource; import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSocketIOSettings; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for WebPubSub Update. */ +/** + * Samples for WebPubSub Update. + */ public final class WebPubSubUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Update.json */ /** * Sample code: WebPubSub_Update. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - WebPubSubResource resource = - manager - .webPubSubs() - .getByResourceGroupWithResponse( - "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + WebPubSubResource resource = manager.webPubSubs() + .getByResourceGroupWithResponse("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("key1", "fakeTokenPlaceholder")) .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("false") - .withCategories( - Arrays.asList(new LiveTraceCategory().withName("ConnectivityLogs").withEnabled("true")))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) - .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) + .withLiveTraceConfiguration(new LiveTraceConfiguration().withEnabled("false") + .withCategories( + Arrays.asList(new LiveTraceCategory().withName("ConnectivityLogs").withEnabled("true")))) + .withNetworkACLs(new WebPubSubNetworkACLs().withDefaultAction(AclAction.DENY) + .withPublicNetwork(new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) + .withPrivateEndpoints(Arrays + .asList(new PrivateEndpointAcl().withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) + .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) .withPublicNetworkAccess("Enabled") .withDisableLocalAuth(false) .withDisableAadAuth(false) + .withSocketIO(new WebPubSubSocketIOSettings().withServiceMode("Serverless")) .apply(); } @@ -485,20 +491,21 @@ public final class WebPubSubUpdateSamples { ### WebPubSubCustomCertificates_CreateOrUpdate ```java -/** Samples for WebPubSubCustomCertificates CreateOrUpdate. */ +/** + * Samples for WebPubSubCustomCertificates CreateOrUpdate. + */ public final class WebPubSubCustomCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomCertificates_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_CreateOrUpdate.json */ /** * Sample code: WebPubSubCustomCertificates_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubCustomCertificatesCreateOrUpdate( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomCertificates() + public static void + webPubSubCustomCertificatesCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubCustomCertificates() .define("myCert") .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") .withKeyVaultBaseUri("https://myvault.keyvault.azure.net/") @@ -512,19 +519,20 @@ public final class WebPubSubCustomCertificatesCreateOrUpdateSamples { ### WebPubSubCustomCertificates_Delete ```java -/** Samples for WebPubSubCustomCertificates Delete. */ +/** + * Samples for WebPubSubCustomCertificates Delete. + */ public final class WebPubSubCustomCertificatesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomCertificates_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_Delete.json */ /** * Sample code: WebPubSubCustomCertificates_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomCertificatesDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomCertificates() + manager.webPubSubCustomCertificates() .deleteWithResponse("myResourceGroup", "myWebPubSubService", "myCert", com.azure.core.util.Context.NONE); } } @@ -533,19 +541,20 @@ public final class WebPubSubCustomCertificatesDeleteSamples { ### WebPubSubCustomCertificates_Get ```java -/** Samples for WebPubSubCustomCertificates Get. */ +/** + * Samples for WebPubSubCustomCertificates Get. + */ public final class WebPubSubCustomCertificatesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomCertificates_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_Get.json */ /** * Sample code: WebPubSubCustomCertificates_Get. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomCertificatesGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomCertificates() + manager.webPubSubCustomCertificates() .getWithResponse("myResourceGroup", "myWebPubSubService", "myCert", com.azure.core.util.Context.NONE); } } @@ -554,19 +563,20 @@ public final class WebPubSubCustomCertificatesGetSamples { ### WebPubSubCustomCertificates_List ```java -/** Samples for WebPubSubCustomCertificates List. */ +/** + * Samples for WebPubSubCustomCertificates List. + */ public final class WebPubSubCustomCertificatesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomCertificates_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_List.json */ /** * Sample code: WebPubSubCustomCertificates_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomCertificatesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomCertificates() + manager.webPubSubCustomCertificates() .list("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -577,27 +587,26 @@ public final class WebPubSubCustomCertificatesListSamples { ```java import com.azure.resourcemanager.webpubsub.models.ResourceReference; -/** Samples for WebPubSubCustomDomains CreateOrUpdate. */ +/** + * Samples for WebPubSubCustomDomains CreateOrUpdate. + */ public final class WebPubSubCustomDomainsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomDomains_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_CreateOrUpdate.json */ /** * Sample code: WebPubSubCustomDomains_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubCustomDomainsCreateOrUpdate( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomDomains() + public static void + webPubSubCustomDomainsCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubCustomDomains() .define("myDomain") .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") .withDomainName("example.com") - .withCustomCertificate( - new ResourceReference() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert")) + .withCustomCertificate(new ResourceReference().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert")) .create(); } } @@ -606,19 +615,20 @@ public final class WebPubSubCustomDomainsCreateOrUpdateSamples { ### WebPubSubCustomDomains_Delete ```java -/** Samples for WebPubSubCustomDomains Delete. */ +/** + * Samples for WebPubSubCustomDomains Delete. + */ public final class WebPubSubCustomDomainsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomDomains_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_Delete.json */ /** * Sample code: WebPubSubCustomDomains_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomDomainsDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomDomains() + manager.webPubSubCustomDomains() .delete("myResourceGroup", "myWebPubSubService", "example", com.azure.core.util.Context.NONE); } } @@ -627,19 +637,20 @@ public final class WebPubSubCustomDomainsDeleteSamples { ### WebPubSubCustomDomains_Get ```java -/** Samples for WebPubSubCustomDomains Get. */ +/** + * Samples for WebPubSubCustomDomains Get. + */ public final class WebPubSubCustomDomainsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomDomains_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_Get.json */ /** * Sample code: WebPubSubCustomDomains_Get. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomDomainsGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomDomains() + manager.webPubSubCustomDomains() .getWithResponse("myResourceGroup", "myWebPubSubService", "example", com.azure.core.util.Context.NONE); } } @@ -648,19 +659,20 @@ public final class WebPubSubCustomDomainsGetSamples { ### WebPubSubCustomDomains_List ```java -/** Samples for WebPubSubCustomDomains List. */ +/** + * Samples for WebPubSubCustomDomains List. + */ public final class WebPubSubCustomDomainsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomDomains_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_List.json */ /** * Sample code: WebPubSubCustomDomains_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomDomainsList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomDomains() + manager.webPubSubCustomDomains() .list("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -679,47 +691,35 @@ import com.azure.resourcemanager.webpubsub.models.UpstreamAuthType; import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties; import java.util.Arrays; -/** Samples for WebPubSubHubs CreateOrUpdate. */ +/** + * Samples for WebPubSubHubs CreateOrUpdate. + */ public final class WebPubSubHubsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubHubs_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_CreateOrUpdate.json */ /** * Sample code: WebPubSubHubs_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubHubsCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubHubs() + manager.webPubSubHubs() .define("exampleHub") .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers( - Arrays - .asList( - new EventHandler() - .withUrlTemplate("http://host.com") - .withUserEventPattern("*") - .withSystemEvents(Arrays.asList("connect", "connected")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings().withResource("abc"))))) - .withEventListeners( - Arrays - .asList( - new EventListener() - .withFilter( - new EventNameFilter() - .withSystemEvents(Arrays.asList("connected", "disconnected")) - .withUserEventPattern("*")) - .withEndpoint( - new EventHubEndpoint() - .withFullyQualifiedNamespace("example.servicebus.windows.net") - .withEventHubName("eventHubName1")))) - .withAnonymousConnectPolicy("allow")) + .withProperties(new WebPubSubHubProperties() + .withEventHandlers(Arrays.asList(new EventHandler().withUrlTemplate("http://host.com") + .withUserEventPattern("*") + .withSystemEvents(Arrays.asList("connect", "connected")) + .withAuth(new UpstreamAuthSettings().withType(UpstreamAuthType.MANAGED_IDENTITY) + .withManagedIdentity(new ManagedIdentitySettings().withResource("abc"))))) + .withEventListeners(Arrays.asList(new EventListener() + .withFilter(new EventNameFilter().withSystemEvents(Arrays.asList("connected", "disconnected")) + .withUserEventPattern("*")) + .withEndpoint(new EventHubEndpoint().withFullyQualifiedNamespace("example.servicebus.windows.net") + .withEventHubName("eventHubName1")))) + .withAnonymousConnectPolicy("allow") + .withWebSocketKeepAliveIntervalInSeconds(50)) .create(); } } @@ -728,19 +728,20 @@ public final class WebPubSubHubsCreateOrUpdateSamples { ### WebPubSubHubs_Delete ```java -/** Samples for WebPubSubHubs Delete. */ +/** + * Samples for WebPubSubHubs Delete. + */ public final class WebPubSubHubsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubHubs_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_Delete.json */ /** * Sample code: WebPubSubHubs_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubHubsDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubHubs() + manager.webPubSubHubs() .delete("exampleHub", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -749,19 +750,20 @@ public final class WebPubSubHubsDeleteSamples { ### WebPubSubHubs_Get ```java -/** Samples for WebPubSubHubs Get. */ +/** + * Samples for WebPubSubHubs Get. + */ public final class WebPubSubHubsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubHubs_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_Get.json */ /** * Sample code: WebPubSubHubs_Get. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubHubsGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubHubs() + manager.webPubSubHubs() .getWithResponse("exampleHub", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -770,14 +772,16 @@ public final class WebPubSubHubsGetSamples { ### WebPubSubHubs_List ```java -/** Samples for WebPubSubHubs List. */ +/** + * Samples for WebPubSubHubs List. + */ public final class WebPubSubHubsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubHubs_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_List.json */ /** * Sample code: WebPubSubHubs_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubHubsList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { @@ -789,24 +793,22 @@ public final class WebPubSubHubsListSamples { ### WebPubSubPrivateEndpointConnections_Delete ```java -/** Samples for WebPubSubPrivateEndpointConnections Delete. */ +/** + * Samples for WebPubSubPrivateEndpointConnections Delete. + */ public final class WebPubSubPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_Delete.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubPrivateEndpointConnectionsDelete( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateEndpointConnections() - .delete( - "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", - "myResourceGroup", - "myWebPubSubService", + public static void + webPubSubPrivateEndpointConnectionsDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubPrivateEndpointConnections() + .delete("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -815,25 +817,23 @@ public final class WebPubSubPrivateEndpointConnectionsDeleteSamples { ### WebPubSubPrivateEndpointConnections_Get ```java -/** Samples for WebPubSubPrivateEndpointConnections Get. */ +/** + * Samples for WebPubSubPrivateEndpointConnections Get. + */ public final class WebPubSubPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_Get.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Get. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubPrivateEndpointConnectionsGet( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateEndpointConnections() - .getWithResponse( - "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", - "myResourceGroup", - "myWebPubSubService", - com.azure.core.util.Context.NONE); + public static void + webPubSubPrivateEndpointConnectionsGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubPrivateEndpointConnections() + .getWithResponse("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", + "myWebPubSubService", com.azure.core.util.Context.NONE); } } ``` @@ -841,20 +841,21 @@ public final class WebPubSubPrivateEndpointConnectionsGetSamples { ### WebPubSubPrivateEndpointConnections_List ```java -/** Samples for WebPubSubPrivateEndpointConnections List. */ +/** + * Samples for WebPubSubPrivateEndpointConnections List. + */ public final class WebPubSubPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateEndpointConnections_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_List.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_List. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubPrivateEndpointConnectionsList( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateEndpointConnections() + public static void + webPubSubPrivateEndpointConnectionsList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubPrivateEndpointConnections() .list("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -868,29 +869,26 @@ import com.azure.resourcemanager.webpubsub.models.PrivateEndpoint; import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus; -/** Samples for WebPubSubPrivateEndpointConnections Update. */ +/** + * Samples for WebPubSubPrivateEndpointConnections Update. + */ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_Update.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Update. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubPrivateEndpointConnectionsUpdate( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateEndpointConnections() - .updateWithResponse( - "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", - "myResourceGroup", + public static void + webPubSubPrivateEndpointConnectionsUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubPrivateEndpointConnections() + .updateWithResponse("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "myWebPubSubService", - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint()) + new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) + new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.APPROVED) .withActionsRequired("None")), com.azure.core.util.Context.NONE); } @@ -900,24 +898,102 @@ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { ### WebPubSubPrivateLinkResources_List ```java -/** Samples for WebPubSubPrivateLinkResources List. */ +/** + * Samples for WebPubSubPrivateLinkResources List. + */ public final class WebPubSubPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateLinkResources_List.json */ /** * Sample code: WebPubSubPrivateLinkResources_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubPrivateLinkResourcesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateLinkResources() + manager.webPubSubPrivateLinkResources() .list("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } ``` +### WebPubSubReplicaSharedPrivateLinkResources_CreateOrUpdate + +```java +/** + * Samples for WebPubSubReplicaSharedPrivateLinkResources CreateOrUpdate. + */ +public final class WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_CreateOrUpdate.json + */ + /** + * Sample code: WebPubSubReplicaSharedPrivateLinkResources_CreateOrUpdate. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdate( + com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubReplicaSharedPrivateLinkResources() + .define("upstream") + .withExistingReplica("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus") + .withGroupId("sites") + .withPrivateLinkResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp") + .withRequestMessage("Please approve") + .create(); + } +} +``` + +### WebPubSubReplicaSharedPrivateLinkResources_Get + +```java +/** + * Samples for WebPubSubReplicaSharedPrivateLinkResources Get. + */ +public final class WebPubSubReplicaSharedPrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_Get.json + */ + /** + * Sample code: WebPubSubReplicaSharedPrivateLinkResources_Get. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void + webPubSubReplicaSharedPrivateLinkResourcesGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubReplicaSharedPrivateLinkResources() + .getWithResponse("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", "upstream", + com.azure.core.util.Context.NONE); + } +} +``` + +### WebPubSubReplicaSharedPrivateLinkResources_List + +```java +/** + * Samples for WebPubSubReplicaSharedPrivateLinkResources List. + */ +public final class WebPubSubReplicaSharedPrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_List.json + */ + /** + * Sample code: WebPubSubReplicaSharedPrivateLinkResources_List. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void + webPubSubReplicaSharedPrivateLinkResourcesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubReplicaSharedPrivateLinkResources() + .list("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE); + } +} +``` + ### WebPubSubReplicas_CreateOrUpdate ```java @@ -926,19 +1002,20 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; import java.util.HashMap; import java.util.Map; -/** Samples for WebPubSubReplicas CreateOrUpdate. */ +/** + * Samples for WebPubSubReplicas CreateOrUpdate. + */ public final class WebPubSubReplicasCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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() + manager.webPubSubReplicas() .define("myWebPubSubService-eastus") .withRegion("eastus") .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") @@ -965,21 +1042,22 @@ public final class WebPubSubReplicasCreateOrUpdateSamples { ### WebPubSubReplicas_Delete ```java -/** Samples for WebPubSubReplicas Delete. */ +/** + * Samples for WebPubSubReplicas Delete. + */ public final class WebPubSubReplicasDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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); + manager.webPubSubReplicas() + .deleteWithResponse("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE); } } ``` @@ -987,21 +1065,22 @@ public final class WebPubSubReplicasDeleteSamples { ### WebPubSubReplicas_Get ```java -/** Samples for WebPubSubReplicas Get. */ +/** + * Samples for WebPubSubReplicas Get. + */ public final class WebPubSubReplicasGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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); + manager.webPubSubReplicas() + .getWithResponse("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE); } } ``` @@ -1009,14 +1088,16 @@ public final class WebPubSubReplicasGetSamples { ### WebPubSubReplicas_List ```java -/** Samples for WebPubSubReplicas List. */ +/** + * Samples for WebPubSubReplicas List. + */ public final class WebPubSubReplicasListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicas_List.json */ /** * Sample code: WebPubSubReplicas_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubReplicasList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { @@ -1028,21 +1109,22 @@ public final class WebPubSubReplicasListSamples { ### WebPubSubReplicas_Restart ```java -/** Samples for WebPubSubReplicas Restart. */ +/** + * Samples for WebPubSubReplicas Restart. + */ public final class WebPubSubReplicasRestartSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_Restart.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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); + manager.webPubSubReplicas() + .restart("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE); } } ``` @@ -1056,28 +1138,24 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; import java.util.HashMap; import java.util.Map; -/** Samples for WebPubSubReplicas Update. */ +/** + * Samples for WebPubSubReplicas Update. + */ public final class WebPubSubReplicasUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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() + Replica resource = manager.webPubSubReplicas() + .getWithResponse("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("key1", "fakeTokenPlaceholder")) .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) .withResourceStopped("false") @@ -1101,27 +1179,28 @@ public final class WebPubSubReplicasUpdateSamples { ### WebPubSubSharedPrivateLinkResources_CreateOrUpdate ```java -/** Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. */ +import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; + +/** + * Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. + */ public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubSharedPrivateLinkResourcesCreateOrUpdate( com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubSharedPrivateLinkResources() - .define("upstream") - .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") - .withGroupId("sites") - .withPrivateLinkResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp") - .withRequestMessage("Please approve") - .create(); + manager.webPubSubSharedPrivateLinkResources() + .createOrUpdate("upstream", "myResourceGroup", "myWebPubSubService", new SharedPrivateLinkResourceInner() + .withGroupId("sites") + .withPrivateLinkResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp") + .withRequestMessage("Please approve"), com.azure.core.util.Context.NONE); } } ``` @@ -1129,20 +1208,21 @@ public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples { ### WebPubSubSharedPrivateLinkResources_Delete ```java -/** Samples for WebPubSubSharedPrivateLinkResources Delete. */ +/** + * Samples for WebPubSubSharedPrivateLinkResources Delete. + */ public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_Delete.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubSharedPrivateLinkResourcesDelete( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubSharedPrivateLinkResources() + public static void + webPubSubSharedPrivateLinkResourcesDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubSharedPrivateLinkResources() .delete("upstream", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -1151,20 +1231,21 @@ public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples { ### WebPubSubSharedPrivateLinkResources_Get ```java -/** Samples for WebPubSubSharedPrivateLinkResources Get. */ +/** + * Samples for WebPubSubSharedPrivateLinkResources Get. + */ public final class WebPubSubSharedPrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_Get.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Get. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubSharedPrivateLinkResourcesGet( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubSharedPrivateLinkResources() + public static void + webPubSubSharedPrivateLinkResourcesGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubSharedPrivateLinkResources() .getWithResponse("upstream", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } @@ -1173,20 +1254,21 @@ public final class WebPubSubSharedPrivateLinkResourcesGetSamples { ### WebPubSubSharedPrivateLinkResources_List ```java -/** Samples for WebPubSubSharedPrivateLinkResources List. */ +/** + * Samples for WebPubSubSharedPrivateLinkResources List. + */ public final class WebPubSubSharedPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_List.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_List. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubSharedPrivateLinkResourcesList( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubSharedPrivateLinkResources() + public static void + webPubSubSharedPrivateLinkResourcesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubSharedPrivateLinkResources() .list("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml b/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml index 3ead56cf31ad..80c644d10a4a 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-08-01-preview. + This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package tag package-2024-03-01. https://github.com/Azure/azure-sdk-for-java @@ -61,7 +61,7 @@ com.azure azure-core-test - 1.26.0-beta.1 + 1.25.0 test @@ -88,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy 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 f4ae414a2bd7..19b630247728 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 @@ -11,8 +11,8 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -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.WebPubSubReplicaSharedPrivateLinkResourcesImpl; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubReplicasImpl; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubSharedPrivateLinkResourcesImpl; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubsImpl; @@ -43,8 +44,9 @@ 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.WebPubSubReplicaSharedPrivateLinkResources; import com.azure.resourcemanager.webpubsub.models.WebPubSubs; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSharedPrivateLinkResources; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -52,7 +54,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to WebPubSubManager. REST API for Azure WebPubSub Service. */ +/** + * Entry point to WebPubSubManager. + * REST API for Azure WebPubSub Service. + */ public final class WebPubSubManager { private Operations operations; @@ -72,6 +77,8 @@ public final class WebPubSubManager { private WebPubSubReplicas webPubSubReplicas; + private WebPubSubReplicaSharedPrivateLinkResources webPubSubReplicaSharedPrivateLinkResources; + private WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources; private final WebPubSubManagementClient clientObject; @@ -79,18 +86,16 @@ public final class WebPubSubManager { private WebPubSubManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new WebPubSubManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new WebPubSubManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** * Creates an instance of WebPubSub service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the WebPubSub service API instance. @@ -103,7 +108,7 @@ public static WebPubSubManager authenticate(TokenCredential credential, AzurePro /** * Creates an instance of WebPubSub service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the WebPubSub service API instance. @@ -116,14 +121,16 @@ public static WebPubSubManager authenticate(HttpPipeline httpPipeline, AzureProf /** * Gets a Configurable instance that can be used to create WebPubSubManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new WebPubSubManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -195,8 +202,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -213,8 +220,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -234,15 +241,13 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") + userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.webpubsub") .append("/") - .append("1.1.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") + userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ") .append(Configuration.getGlobalConfiguration().get("os.name")) @@ -267,38 +272,28 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); return new WebPubSubManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -310,7 +305,7 @@ public Operations operations() { /** * Gets the resource collection API of WebPubSubs. It manages WebPubSubResource. - * + * * @return Resource collection API of WebPubSubs. */ public WebPubSubs webPubSubs() { @@ -322,7 +317,7 @@ public WebPubSubs webPubSubs() { /** * Gets the resource collection API of Usages. - * + * * @return Resource collection API of Usages. */ public Usages usages() { @@ -334,33 +329,33 @@ public Usages usages() { /** * Gets the resource collection API of WebPubSubCustomCertificates. It manages CustomCertificate. - * + * * @return Resource collection API of WebPubSubCustomCertificates. */ public WebPubSubCustomCertificates webPubSubCustomCertificates() { if (this.webPubSubCustomCertificates == null) { - this.webPubSubCustomCertificates = - new WebPubSubCustomCertificatesImpl(clientObject.getWebPubSubCustomCertificates(), this); + this.webPubSubCustomCertificates + = new WebPubSubCustomCertificatesImpl(clientObject.getWebPubSubCustomCertificates(), this); } return webPubSubCustomCertificates; } /** * Gets the resource collection API of WebPubSubCustomDomains. It manages CustomDomain. - * + * * @return Resource collection API of WebPubSubCustomDomains. */ public WebPubSubCustomDomains webPubSubCustomDomains() { if (this.webPubSubCustomDomains == null) { - this.webPubSubCustomDomains = - new WebPubSubCustomDomainsImpl(clientObject.getWebPubSubCustomDomains(), this); + this.webPubSubCustomDomains + = new WebPubSubCustomDomainsImpl(clientObject.getWebPubSubCustomDomains(), this); } return webPubSubCustomDomains; } /** * Gets the resource collection API of WebPubSubHubs. It manages WebPubSubHub. - * + * * @return Resource collection API of WebPubSubHubs. */ public WebPubSubHubs webPubSubHubs() { @@ -372,34 +367,33 @@ public WebPubSubHubs webPubSubHubs() { /** * Gets the resource collection API of WebPubSubPrivateEndpointConnections. - * + * * @return Resource collection API of WebPubSubPrivateEndpointConnections. */ public WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections() { if (this.webPubSubPrivateEndpointConnections == null) { - this.webPubSubPrivateEndpointConnections = - new WebPubSubPrivateEndpointConnectionsImpl( - clientObject.getWebPubSubPrivateEndpointConnections(), this); + this.webPubSubPrivateEndpointConnections = new WebPubSubPrivateEndpointConnectionsImpl( + clientObject.getWebPubSubPrivateEndpointConnections(), this); } return webPubSubPrivateEndpointConnections; } /** * Gets the resource collection API of WebPubSubPrivateLinkResources. - * + * * @return Resource collection API of WebPubSubPrivateLinkResources. */ public WebPubSubPrivateLinkResources webPubSubPrivateLinkResources() { if (this.webPubSubPrivateLinkResources == null) { - this.webPubSubPrivateLinkResources = - new WebPubSubPrivateLinkResourcesImpl(clientObject.getWebPubSubPrivateLinkResources(), this); + this.webPubSubPrivateLinkResources + = new WebPubSubPrivateLinkResourcesImpl(clientObject.getWebPubSubPrivateLinkResources(), this); } return webPubSubPrivateLinkResources; } /** * Gets the resource collection API of WebPubSubReplicas. It manages Replica. - * + * * @return Resource collection API of WebPubSubReplicas. */ public WebPubSubReplicas webPubSubReplicas() { @@ -410,15 +404,28 @@ public WebPubSubReplicas webPubSubReplicas() { } /** - * Gets the resource collection API of WebPubSubSharedPrivateLinkResources. It manages SharedPrivateLinkResource. - * + * Gets the resource collection API of WebPubSubReplicaSharedPrivateLinkResources. It manages + * SharedPrivateLinkResource. + * + * @return Resource collection API of WebPubSubReplicaSharedPrivateLinkResources. + */ + public WebPubSubReplicaSharedPrivateLinkResources webPubSubReplicaSharedPrivateLinkResources() { + if (this.webPubSubReplicaSharedPrivateLinkResources == null) { + this.webPubSubReplicaSharedPrivateLinkResources = new WebPubSubReplicaSharedPrivateLinkResourcesImpl( + clientObject.getWebPubSubReplicaSharedPrivateLinkResources(), this); + } + return webPubSubReplicaSharedPrivateLinkResources; + } + + /** + * Gets the resource collection API of WebPubSubSharedPrivateLinkResources. + * * @return Resource collection API of WebPubSubSharedPrivateLinkResources. */ public WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources() { if (this.webPubSubSharedPrivateLinkResources == null) { - this.webPubSubSharedPrivateLinkResources = - new WebPubSubSharedPrivateLinkResourcesImpl( - clientObject.getWebPubSubSharedPrivateLinkResources(), this); + this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesImpl( + clientObject.getWebPubSubSharedPrivateLinkResources(), this); } return webPubSubSharedPrivateLinkResources; } @@ -426,7 +433,7 @@ public WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources() /** * Gets wrapped service client WebPubSubManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. - * + * * @return Wrapped service client WebPubSubManagementClient. */ public WebPubSubManagementClient serviceClient() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/OperationsClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/OperationsClient.java index 90bdf89c2ba2..4e37ffd7b1ef 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/OperationsClient.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/OperationsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.webpubsub.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @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 result of the request to list REST API operations as paginated response with {@link PagedIterable}. @@ -24,7 +26,7 @@ public interface OperationsClient { /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @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. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/UsagesClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/UsagesClient.java index b3518388b313..c3617e9dbffe 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/UsagesClient.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/UsagesClient.java @@ -10,31 +10,33 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.webpubsub.fluent.models.SignalRServiceUsageInner; -/** An instance of this class provides access to all the operations defined in UsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in UsagesClient. + */ public interface UsagesClient { /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @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 object that includes an array of the resource usages and a possible link for next set as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location); /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @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 object that includes an array of the resource usages and a possible link for next set as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location, Context context); 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 5dac2b46db40..19ffba3aef08 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 @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.webpubsub.fluent.models.CustomCertificateInner; -/** An instance of this class provides access to all the operations defined in WebPubSubCustomCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubCustomCertificatesClient. + */ public interface WebPubSubCustomCertificatesClient { /** * List all custom certificates. - * + * * @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. @@ -30,7 +32,7 @@ public interface WebPubSubCustomCertificatesClient { /** * List all custom certificates. - * + * * @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. @@ -44,7 +46,7 @@ public interface WebPubSubCustomCertificatesClient { /** * Get a custom certificate. - * + * * @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. @@ -55,12 +57,12 @@ public interface WebPubSubCustomCertificatesClient { * @return a custom certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String certificateName, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, + String certificateName, Context context); /** * Get a custom certificate. - * + * * @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. @@ -74,7 +76,7 @@ Response getWithResponse( /** * Create or update a custom certificate. - * + * * @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. @@ -85,12 +87,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of a custom certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CustomCertificateInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters); + SyncPoller, CustomCertificateInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String certificateName, CustomCertificateInner parameters); /** * Create or update a custom certificate. - * + * * @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. @@ -102,16 +104,12 @@ SyncPoller, CustomCertificateInner> beginCrea * @return the {@link SyncPoller} for polling of a custom certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CustomCertificateInner> beginCreateOrUpdate( - String resourceGroupName, - String resourceName, - String certificateName, - CustomCertificateInner parameters, - Context context); + SyncPoller, CustomCertificateInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String certificateName, CustomCertificateInner parameters, Context context); /** * Create or update a custom certificate. - * + * * @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. @@ -122,12 +120,12 @@ SyncPoller, CustomCertificateInner> beginCrea * @return a custom certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomCertificateInner createOrUpdate( - String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters); + CustomCertificateInner createOrUpdate(String resourceGroupName, String resourceName, String certificateName, + CustomCertificateInner parameters); /** * Create or update a custom certificate. - * + * * @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. @@ -139,16 +137,12 @@ CustomCertificateInner createOrUpdate( * @return a custom certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomCertificateInner createOrUpdate( - String resourceGroupName, - String resourceName, - String certificateName, - CustomCertificateInner parameters, - Context context); + CustomCertificateInner createOrUpdate(String resourceGroupName, String resourceName, String certificateName, + CustomCertificateInner parameters, Context context); /** * Delete a custom certificate. - * + * * @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. @@ -159,12 +153,12 @@ CustomCertificateInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String certificateName, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String certificateName, + Context context); /** * Delete a custom certificate. - * + * * @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. 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 14ddbfbcb9ac..48b599c2d06e 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 @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; -/** An instance of this class provides access to all the operations defined in WebPubSubCustomDomainsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubCustomDomainsClient. + */ public interface WebPubSubCustomDomainsClient { /** * List all custom domains. - * + * * @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. @@ -30,7 +32,7 @@ public interface WebPubSubCustomDomainsClient { /** * List all custom domains. - * + * * @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. @@ -44,7 +46,7 @@ public interface WebPubSubCustomDomainsClient { /** * Get a custom domain. - * + * * @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. @@ -55,12 +57,12 @@ public interface WebPubSubCustomDomainsClient { * @return a custom domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String name, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, String name, + Context context); /** * Get a custom domain. - * + * * @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. @@ -74,7 +76,7 @@ Response getWithResponse( /** * Create or update a custom domain. - * + * * @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. @@ -85,12 +87,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of a custom domain. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CustomDomainInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters); + SyncPoller, CustomDomainInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String name, CustomDomainInner parameters); /** * Create or update a custom domain. - * + * * @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. @@ -102,12 +104,12 @@ SyncPoller, CustomDomainInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of a custom domain. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CustomDomainInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context); + SyncPoller, CustomDomainInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String name, CustomDomainInner parameters, Context context); /** * Create or update a custom domain. - * + * * @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. @@ -118,12 +120,12 @@ SyncPoller, CustomDomainInner> beginCreateOrUpdate * @return a custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomDomainInner createOrUpdate( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters); + CustomDomainInner createOrUpdate(String resourceGroupName, String resourceName, String name, + CustomDomainInner parameters); /** * Create or update a custom domain. - * + * * @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. @@ -135,12 +137,12 @@ CustomDomainInner createOrUpdate( * @return a custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - CustomDomainInner createOrUpdate( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context); + CustomDomainInner createOrUpdate(String resourceGroupName, String resourceName, String name, + CustomDomainInner parameters, Context context); /** * Delete a custom domain. - * + * * @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. @@ -154,7 +156,7 @@ CustomDomainInner createOrUpdate( /** * Delete a custom domain. - * + * * @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. @@ -165,12 +167,12 @@ CustomDomainInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceName, String name, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String name, + Context context); /** * Delete a custom domain. - * + * * @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. @@ -183,7 +185,7 @@ SyncPoller, Void> beginDelete( /** * Delete a custom domain. - * + * * @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. 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 d3f7c561b72b..39e7f6c3e6e5 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 @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner; -/** An instance of this class provides access to all the operations defined in WebPubSubHubsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubHubsClient. + */ public interface WebPubSubHubsClient { /** * List hub settings. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +32,7 @@ public interface WebPubSubHubsClient { /** * List hub settings. - * + * * @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. @@ -44,7 +46,7 @@ public interface WebPubSubHubsClient { /** * Get a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -55,12 +57,12 @@ public interface WebPubSubHubsClient { * @return a hub setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String hubName, String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String hubName, String resourceGroupName, String resourceName, + Context context); /** * Get a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -74,7 +76,7 @@ Response getWithResponse( /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -85,12 +87,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebPubSubHubInner> beginCreateOrUpdate( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters); + SyncPoller, WebPubSubHubInner> beginCreateOrUpdate(String hubName, + String resourceGroupName, String resourceName, WebPubSubHubInner parameters); /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -102,12 +104,12 @@ SyncPoller, WebPubSubHubInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebPubSubHubInner> beginCreateOrUpdate( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context); + SyncPoller, WebPubSubHubInner> beginCreateOrUpdate(String hubName, + String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context); /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -118,12 +120,12 @@ SyncPoller, WebPubSubHubInner> beginCreateOrUpdate * @return a hub setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubHubInner createOrUpdate( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters); + WebPubSubHubInner createOrUpdate(String hubName, String resourceGroupName, String resourceName, + WebPubSubHubInner parameters); /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -135,12 +137,12 @@ WebPubSubHubInner createOrUpdate( * @return a hub setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubHubInner createOrUpdate( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context); + WebPubSubHubInner createOrUpdate(String hubName, String resourceGroupName, String resourceName, + WebPubSubHubInner parameters, Context context); /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -154,7 +156,7 @@ WebPubSubHubInner createOrUpdate( /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -165,12 +167,12 @@ WebPubSubHubInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String hubName, String resourceGroupName, String resourceName, Context context); + SyncPoller, Void> beginDelete(String hubName, String resourceGroupName, String resourceName, + Context context); /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -183,7 +185,7 @@ SyncPoller, Void> beginDelete( /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. 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 088e2053c105..752136bc55ac 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 @@ -7,109 +7,118 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for WebPubSubManagementClient class. */ +/** + * The interface for WebPubSubManagementClient class. + */ public interface WebPubSubManagementClient { /** * Gets The ID of the target subscription. The value must be an UUID. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the WebPubSubsClient object to access its operations. - * + * * @return the WebPubSubsClient object. */ WebPubSubsClient getWebPubSubs(); /** * Gets the UsagesClient object to access its operations. - * + * * @return the UsagesClient object. */ UsagesClient getUsages(); /** * Gets the WebPubSubCustomCertificatesClient object to access its operations. - * + * * @return the WebPubSubCustomCertificatesClient object. */ WebPubSubCustomCertificatesClient getWebPubSubCustomCertificates(); /** * Gets the WebPubSubCustomDomainsClient object to access its operations. - * + * * @return the WebPubSubCustomDomainsClient object. */ WebPubSubCustomDomainsClient getWebPubSubCustomDomains(); /** * Gets the WebPubSubHubsClient object to access its operations. - * + * * @return the WebPubSubHubsClient object. */ WebPubSubHubsClient getWebPubSubHubs(); /** * Gets the WebPubSubPrivateEndpointConnectionsClient object to access its operations. - * + * * @return the WebPubSubPrivateEndpointConnectionsClient object. */ WebPubSubPrivateEndpointConnectionsClient getWebPubSubPrivateEndpointConnections(); /** * Gets the WebPubSubPrivateLinkResourcesClient object to access its operations. - * + * * @return the WebPubSubPrivateLinkResourcesClient object. */ WebPubSubPrivateLinkResourcesClient getWebPubSubPrivateLinkResources(); /** * Gets the WebPubSubReplicasClient object to access its operations. - * + * * @return the WebPubSubReplicasClient object. */ WebPubSubReplicasClient getWebPubSubReplicas(); + /** + * Gets the WebPubSubReplicaSharedPrivateLinkResourcesClient object to access its operations. + * + * @return the WebPubSubReplicaSharedPrivateLinkResourcesClient object. + */ + WebPubSubReplicaSharedPrivateLinkResourcesClient getWebPubSubReplicaSharedPrivateLinkResources(); + /** * Gets the WebPubSubSharedPrivateLinkResourcesClient object to access its operations. - * + * * @return the WebPubSubSharedPrivateLinkResourcesClient object. */ WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkResources(); 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 ca03028bf0c1..a79c2825c6d8 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 @@ -19,7 +19,7 @@ public interface WebPubSubPrivateEndpointConnectionsClient { /** * List private endpoint connections. - * + * * @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. @@ -32,7 +32,7 @@ public interface WebPubSubPrivateEndpointConnectionsClient { /** * List private endpoint connections. - * + * * @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. @@ -46,9 +46,9 @@ public interface WebPubSubPrivateEndpointConnectionsClient { /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -58,14 +58,14 @@ public interface WebPubSubPrivateEndpointConnectionsClient { * @return the specified private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, Context context); /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -74,14 +74,14 @@ Response getWithResponse( * @return the specified private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String privateEndpointConnectionName, String resourceGroupName, String resourceName); + PrivateEndpointConnectionInner get(String privateEndpointConnectionName, String resourceGroupName, + String resourceName); /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -92,18 +92,14 @@ PrivateEndpointConnectionInner get( * @return a private endpoint connection to an azure resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters, - Context context); + Response updateWithResponse(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters, Context context); /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -113,17 +109,14 @@ Response updateWithResponse( * @return a private endpoint connection to an azure resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner update( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters); + PrivateEndpointConnectionInner update(String privateEndpointConnectionName, String resourceGroupName, + String resourceName, PrivateEndpointConnectionInner parameters); /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -132,14 +125,14 @@ PrivateEndpointConnectionInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String privateEndpointConnectionName, String resourceGroupName, String resourceName); + SyncPoller, Void> beginDelete(String privateEndpointConnectionName, String resourceGroupName, + String resourceName); /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -149,14 +142,14 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context); + SyncPoller, Void> beginDelete(String privateEndpointConnectionName, String resourceGroupName, + String resourceName, Context context); /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -168,9 +161,9 @@ SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. 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 45bce5befa4d..b67445a6be32 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 @@ -10,33 +10,35 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner; -/** An instance of this class provides access to all the operations defined in WebPubSubPrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubPrivateLinkResourcesClient. + */ public interface WebPubSubPrivateLinkResourcesClient { /** * Get the private link resources that need to be created for a 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 private link resources that need to be created for a resource as paginated response with {@link - * PagedIterable}. + * @return the private link resources that need to be created for a resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName); /** * Get the private link resources that need to be created for a 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 private link resources that need to be created for a resource as paginated response with {@link - * PagedIterable}. + * @return the private link resources that need to be created for a resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName, Context context); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubReplicaSharedPrivateLinkResourcesClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubReplicaSharedPrivateLinkResourcesClient.java new file mode 100644 index 000000000000..47538de646f5 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubReplicaSharedPrivateLinkResourcesClient.java @@ -0,0 +1,156 @@ +// 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.SharedPrivateLinkResourceInner; + +/** + * An instance of this class provides access to all the operations defined in + * WebPubSubReplicaSharedPrivateLinkResourcesClient. + */ +public interface WebPubSubReplicaSharedPrivateLinkResourcesClient { + /** + * List shared private link resources. + * + * @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 a list of shared private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, + String replicaName); + + /** + * List shared private link resources. + * + * @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 a list of shared private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, + String replicaName, Context context); + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName, Context context); + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SharedPrivateLinkResourceInner get(String resourceGroupName, String resourceName, String replicaName, + String sharedPrivateLinkResourceName); + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 {@link SyncPoller} for polling of describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, String sharedPrivateLinkResourceName, + SharedPrivateLinkResourceInner parameters); + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 {@link SyncPoller} for polling of describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, String sharedPrivateLinkResourceName, + SharedPrivateLinkResourceInner parameters, Context context); + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SharedPrivateLinkResourceInner createOrUpdate(String resourceGroupName, String resourceName, String replicaName, + String sharedPrivateLinkResourceName, SharedPrivateLinkResourceInner parameters); + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SharedPrivateLinkResourceInner createOrUpdate(String resourceGroupName, String resourceName, String replicaName, + String sharedPrivateLinkResourceName, SharedPrivateLinkResourceInner parameters, Context context); +} 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 index 0e4898bdbb77..949fb97673cb 100644 --- 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 @@ -13,11 +13,13 @@ 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. */ +/** + * 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. @@ -30,7 +32,7 @@ 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. * @param context The context to associate with this operation. @@ -44,7 +46,7 @@ public interface WebPubSubReplicasClient { /** * 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. @@ -55,12 +57,12 @@ public interface WebPubSubReplicasClient { * @return the replica and its properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String replicaName, Context context); + 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. @@ -74,7 +76,7 @@ Response getWithResponse( /** * 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. @@ -85,12 +87,12 @@ Response getWithResponse( * @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); + 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. @@ -102,12 +104,12 @@ SyncPoller, ReplicaInner> beginCreateOrUpdate( * @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); + 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. @@ -118,12 +120,12 @@ SyncPoller, ReplicaInner> beginCreateOrUpdate( * @return a class represent a replica resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaInner createOrUpdate( - String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + 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. @@ -135,12 +137,12 @@ ReplicaInner createOrUpdate( * @return a class represent a replica resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaInner createOrUpdate( - String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + 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. @@ -151,12 +153,12 @@ ReplicaInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String replicaName, Context context); + 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. @@ -169,7 +171,7 @@ Response deleteWithResponse( /** * 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. @@ -180,12 +182,12 @@ Response deleteWithResponse( * @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); + 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. @@ -197,12 +199,12 @@ SyncPoller, ReplicaInner> beginUpdate( * @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); + 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. @@ -217,7 +219,7 @@ SyncPoller, ReplicaInner> beginUpdate( /** * 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. @@ -229,12 +231,12 @@ SyncPoller, ReplicaInner> beginUpdate( * @return a class represent a replica resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaInner update( - String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + 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. @@ -248,7 +250,7 @@ ReplicaInner update( /** * 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. @@ -259,12 +261,12 @@ ReplicaInner update( * @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); + 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. @@ -277,7 +279,7 @@ SyncPoller, Void> beginRestart( /** * 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. 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 ef55efb72aa1..47decd79f702 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 @@ -19,7 +19,7 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { /** * List shared private link resources. - * + * * @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. @@ -32,7 +32,7 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { /** * List shared private link resources. - * + * * @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. @@ -46,7 +46,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. The name is case insensitive. * @param resourceName The name of the resource. @@ -57,12 +57,12 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { * @return the specified shared private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, Context context); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -72,12 +72,12 @@ Response getWithResponse( * @return the specified shared private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - SharedPrivateLinkResourceInner get( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); + SharedPrivateLinkResourceInner get(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -89,14 +89,12 @@ SharedPrivateLinkResourceInner get( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, SharedPrivateLinkResourceInner parameters); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -109,15 +107,12 @@ SyncPoller, SharedPrivateLinkResource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters, - Context context); + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, + SharedPrivateLinkResourceInner parameters, Context context); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -128,15 +123,12 @@ SyncPoller, SharedPrivateLinkResource * @return describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - SharedPrivateLinkResourceInner createOrUpdate( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters); + SharedPrivateLinkResourceInner createOrUpdate(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, SharedPrivateLinkResourceInner parameters); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -148,16 +140,12 @@ SharedPrivateLinkResourceInner createOrUpdate( * @return describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - SharedPrivateLinkResourceInner createOrUpdate( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters, - Context context); + SharedPrivateLinkResourceInner createOrUpdate(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, SharedPrivateLinkResourceInner parameters, Context context); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -167,12 +155,12 @@ SharedPrivateLinkResourceInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); + SyncPoller, Void> beginDelete(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -183,12 +171,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); + SyncPoller, Void> beginDelete(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, Context context); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -201,7 +189,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. The name is case insensitive. * @param resourceName The name of the resource. 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 b25a183ce80e..fbc803fe2334 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 @@ -18,11 +18,13 @@ import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters; import com.azure.resourcemanager.webpubsub.models.RegenerateKeyParameters; -/** An instance of this class provides access to all the operations defined in WebPubSubsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubsClient. + */ public interface WebPubSubsClient { /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the operation. * @param context The context to associate with this operation. @@ -32,12 +34,12 @@ public interface WebPubSubsClient { * @return result of the request to check name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters parameters, Context context); + Response checkNameAvailabilityWithResponse(String location, + NameAvailabilityParameters parameters, Context context); /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,58 +52,58 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a subscription. - * + * * @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 object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Handles requests to list all resources in a subscription. - * + * * @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 object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Handles requests to list all resources in a resource group. - * + * * @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. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** * Handles requests to list all resources in a resource group. - * + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Get the resource and its properties. - * + * * @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. @@ -111,12 +113,12 @@ Response checkNameAvailabilityWithResponse( * @return the resource and its properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); /** * Get the resource and its properties. - * + * * @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. @@ -129,7 +131,7 @@ Response getByResourceGroupWithResponse( /** * Create or update a resource. - * + * * @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. @@ -139,12 +141,12 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters); + SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, WebPubSubResourceInner parameters); /** * Create or update a resource. - * + * * @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. @@ -155,12 +157,12 @@ SyncPoller, WebPubSubResourceInner> beginCrea * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context); + SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, WebPubSubResourceInner parameters, Context context); /** * Create or update a resource. - * + * * @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. @@ -170,12 +172,12 @@ SyncPoller, WebPubSubResourceInner> beginCrea * @return a class represent a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubResourceInner createOrUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters); + WebPubSubResourceInner createOrUpdate(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters); /** * Create or update a resource. - * + * * @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. @@ -186,12 +188,12 @@ WebPubSubResourceInner createOrUpdate( * @return a class represent a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubResourceInner createOrUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context); + WebPubSubResourceInner createOrUpdate(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters, Context context); /** * Operation to delete a 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. @@ -204,7 +206,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to delete a 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. @@ -218,7 +220,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to delete a 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. @@ -230,7 +232,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to delete a 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. @@ -243,7 +245,7 @@ WebPubSubResourceInner createOrUpdate( /** * Operation to update an exiting resource. - * + * * @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. @@ -253,12 +255,12 @@ WebPubSubResourceInner createOrUpdate( * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebPubSubResourceInner> beginUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters); + SyncPoller, WebPubSubResourceInner> beginUpdate(String resourceGroupName, + String resourceName, WebPubSubResourceInner parameters); /** * Operation to update an exiting resource. - * + * * @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. @@ -269,12 +271,12 @@ SyncPoller, WebPubSubResourceInner> beginUpda * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebPubSubResourceInner> beginUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context); + SyncPoller, WebPubSubResourceInner> beginUpdate(String resourceGroupName, + String resourceName, WebPubSubResourceInner parameters, Context context); /** * Operation to update an exiting resource. - * + * * @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. @@ -288,7 +290,7 @@ SyncPoller, WebPubSubResourceInner> beginUpda /** * Operation to update an exiting resource. - * + * * @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. @@ -299,12 +301,12 @@ SyncPoller, WebPubSubResourceInner> beginUpda * @return a class represent a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubResourceInner update( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context); + WebPubSubResourceInner update(String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, + Context context); /** * Get the access keys of the 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. @@ -318,7 +320,7 @@ WebPubSubResourceInner update( /** * Get the access keys of the 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. @@ -331,7 +333,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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -341,12 +343,12 @@ WebPubSubResourceInner update( * @return the {@link SyncPoller} for polling of a class represents the access keys of the resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebPubSubKeysInner> beginRegenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters); + SyncPoller, WebPubSubKeysInner> beginRegenerateKey(String resourceGroupName, + String resourceName, RegenerateKeyParameters parameters); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -357,12 +359,12 @@ SyncPoller, WebPubSubKeysInner> beginRegenerateKe * @return the {@link SyncPoller} for polling of a class represents the access keys of the resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WebPubSubKeysInner> beginRegenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context); + SyncPoller, WebPubSubKeysInner> beginRegenerateKey(String resourceGroupName, + String resourceName, RegenerateKeyParameters parameters, Context context); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -376,7 +378,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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -387,12 +389,12 @@ SyncPoller, WebPubSubKeysInner> beginRegenerateKe * @return a class represents the access keys of the resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubKeysInner regenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context); + 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. @@ -403,12 +405,12 @@ WebPubSubKeysInner regenerateKey( * @return the list skus operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listReplicaSkusWithResponse( - String resourceGroupName, String resourceName, String replicaName, Context context); + 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. @@ -422,7 +424,7 @@ Response listReplicaSkusWithResponse( /** * Operation to restart a 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. @@ -435,7 +437,7 @@ Response listReplicaSkusWithResponse( /** * Operation to restart a 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. @@ -449,7 +451,7 @@ Response listReplicaSkusWithResponse( /** * Operation to restart a 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. @@ -461,7 +463,7 @@ Response listReplicaSkusWithResponse( /** * Operation to restart a 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. @@ -474,7 +476,7 @@ Response listReplicaSkusWithResponse( /** * List all available skus of the 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. @@ -488,7 +490,7 @@ Response listReplicaSkusWithResponse( /** * List all available skus of the 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. 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 2e88bdde3efd..5fde9713d3d4 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 @@ -11,7 +11,9 @@ import com.azure.resourcemanager.webpubsub.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** A custom certificate. */ +/** + * A custom certificate. + */ @Fluent public final class CustomCertificateInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class CustomCertificateInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of CustomCertificateInner class. */ + /** + * Creates an instance of CustomCertificateInner class. + */ public CustomCertificateInner() { } /** * Get the innerProperties property: Custom certificate properties. - * + * * @return the innerProperties value. */ private CustomCertificateProperties innerProperties() { @@ -41,7 +45,7 @@ private CustomCertificateProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +54,7 @@ public SystemData systemData() { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -59,7 +63,7 @@ public ProvisioningState provisioningState() { /** * Get the keyVaultBaseUri property: Base uri of the KeyVault that stores certificate. - * + * * @return the keyVaultBaseUri value. */ public String keyVaultBaseUri() { @@ -68,7 +72,7 @@ public String keyVaultBaseUri() { /** * Set the keyVaultBaseUri property: Base uri of the KeyVault that stores certificate. - * + * * @param keyVaultBaseUri the keyVaultBaseUri value to set. * @return the CustomCertificateInner object itself. */ @@ -82,7 +86,7 @@ public CustomCertificateInner withKeyVaultBaseUri(String keyVaultBaseUri) { /** * Get the keyVaultSecretName property: Certificate secret name. - * + * * @return the keyVaultSecretName value. */ public String keyVaultSecretName() { @@ -91,7 +95,7 @@ public String keyVaultSecretName() { /** * Set the keyVaultSecretName property: Certificate secret name. - * + * * @param keyVaultSecretName the keyVaultSecretName value to set. * @return the CustomCertificateInner object itself. */ @@ -105,7 +109,7 @@ public CustomCertificateInner withKeyVaultSecretName(String keyVaultSecretName) /** * Get the keyVaultSecretVersion property: Certificate secret version. - * + * * @return the keyVaultSecretVersion value. */ public String keyVaultSecretVersion() { @@ -114,7 +118,7 @@ public String keyVaultSecretVersion() { /** * Set the keyVaultSecretVersion property: Certificate secret version. - * + * * @param keyVaultSecretVersion the keyVaultSecretVersion value to set. * @return the CustomCertificateInner object itself. */ @@ -128,15 +132,14 @@ public CustomCertificateInner withKeyVaultSecretVersion(String keyVaultSecretVer /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model CustomCertificateInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model CustomCertificateInner")); } else { innerProperties().validate(); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateProperties.java index 1c6383c0f669..249e3efa08fd 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.webpubsub.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Custom certificate properties. */ +/** + * Custom certificate properties. + */ @Fluent public final class CustomCertificateProperties { /* @@ -36,13 +38,15 @@ public final class CustomCertificateProperties { @JsonProperty(value = "keyVaultSecretVersion") private String keyVaultSecretVersion; - /** Creates an instance of CustomCertificateProperties class. */ + /** + * Creates an instance of CustomCertificateProperties class. + */ public CustomCertificateProperties() { } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -51,7 +55,7 @@ public ProvisioningState provisioningState() { /** * Get the keyVaultBaseUri property: Base uri of the KeyVault that stores certificate. - * + * * @return the keyVaultBaseUri value. */ public String keyVaultBaseUri() { @@ -60,7 +64,7 @@ public String keyVaultBaseUri() { /** * Set the keyVaultBaseUri property: Base uri of the KeyVault that stores certificate. - * + * * @param keyVaultBaseUri the keyVaultBaseUri value to set. * @return the CustomCertificateProperties object itself. */ @@ -71,7 +75,7 @@ public CustomCertificateProperties withKeyVaultBaseUri(String keyVaultBaseUri) { /** * Get the keyVaultSecretName property: Certificate secret name. - * + * * @return the keyVaultSecretName value. */ public String keyVaultSecretName() { @@ -80,7 +84,7 @@ public String keyVaultSecretName() { /** * Set the keyVaultSecretName property: Certificate secret name. - * + * * @param keyVaultSecretName the keyVaultSecretName value to set. * @return the CustomCertificateProperties object itself. */ @@ -91,7 +95,7 @@ public CustomCertificateProperties withKeyVaultSecretName(String keyVaultSecretN /** * Get the keyVaultSecretVersion property: Certificate secret version. - * + * * @return the keyVaultSecretVersion value. */ public String keyVaultSecretVersion() { @@ -100,7 +104,7 @@ public String keyVaultSecretVersion() { /** * Set the keyVaultSecretVersion property: Certificate secret version. - * + * * @param keyVaultSecretVersion the keyVaultSecretVersion value to set. * @return the CustomCertificateProperties object itself. */ @@ -111,21 +115,19 @@ public CustomCertificateProperties withKeyVaultSecretVersion(String keyVaultSecr /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (keyVaultBaseUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyVaultBaseUri in model CustomCertificateProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultBaseUri in model CustomCertificateProperties")); } if (keyVaultSecretName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyVaultSecretName in model CustomCertificateProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultSecretName in model CustomCertificateProperties")); } } 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 07a463571d27..6612ea49a497 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 @@ -12,7 +12,9 @@ import com.azure.resourcemanager.webpubsub.models.ResourceReference; import com.fasterxml.jackson.annotation.JsonProperty; -/** A custom domain. */ +/** + * A custom domain. + */ @Fluent public final class CustomDomainInner extends ProxyResource { /* @@ -27,13 +29,15 @@ public final class CustomDomainInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of CustomDomainInner class. */ + /** + * Creates an instance of CustomDomainInner class. + */ public CustomDomainInner() { } /** * Get the innerProperties property: Properties of a custom domain. - * + * * @return the innerProperties value. */ private CustomDomainProperties innerProperties() { @@ -42,7 +46,7 @@ private CustomDomainProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -51,7 +55,7 @@ public SystemData systemData() { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -60,7 +64,7 @@ public ProvisioningState provisioningState() { /** * Get the domainName property: The custom domain name. - * + * * @return the domainName value. */ public String domainName() { @@ -69,7 +73,7 @@ public String domainName() { /** * Set the domainName property: The custom domain name. - * + * * @param domainName the domainName value to set. * @return the CustomDomainInner object itself. */ @@ -83,7 +87,7 @@ public CustomDomainInner withDomainName(String domainName) { /** * Get the customCertificate property: Reference to a resource. - * + * * @return the customCertificate value. */ public ResourceReference customCertificate() { @@ -92,7 +96,7 @@ public ResourceReference customCertificate() { /** * Set the customCertificate property: Reference to a resource. - * + * * @param customCertificate the customCertificate value to set. * @return the CustomDomainInner object itself. */ @@ -106,15 +110,14 @@ public CustomDomainInner withCustomCertificate(ResourceReference customCertifica /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model CustomDomainInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model CustomDomainInner")); } else { innerProperties().validate(); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainProperties.java index 99ee6115c780..30f2dbe2db16 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainProperties.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.webpubsub.models.ResourceReference; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of a custom domain. */ +/** + * Properties of a custom domain. + */ @Fluent public final class CustomDomainProperties { /* @@ -31,13 +33,15 @@ public final class CustomDomainProperties { @JsonProperty(value = "customCertificate", required = true) private ResourceReference customCertificate; - /** Creates an instance of CustomDomainProperties class. */ + /** + * Creates an instance of CustomDomainProperties class. + */ public CustomDomainProperties() { } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -46,7 +50,7 @@ public ProvisioningState provisioningState() { /** * Get the domainName property: The custom domain name. - * + * * @return the domainName value. */ public String domainName() { @@ -55,7 +59,7 @@ public String domainName() { /** * Set the domainName property: The custom domain name. - * + * * @param domainName the domainName value to set. * @return the CustomDomainProperties object itself. */ @@ -66,7 +70,7 @@ public CustomDomainProperties withDomainName(String domainName) { /** * Get the customCertificate property: Reference to a resource. - * + * * @return the customCertificate value. */ public ResourceReference customCertificate() { @@ -75,7 +79,7 @@ public ResourceReference customCertificate() { /** * Set the customCertificate property: Reference to a resource. - * + * * @param customCertificate the customCertificate value to set. * @return the CustomDomainProperties object itself. */ @@ -86,21 +90,19 @@ public CustomDomainProperties withCustomCertificate(ResourceReference customCert /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (domainName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property domainName in model CustomDomainProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property domainName in model CustomDomainProperties")); } if (customCertificate() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property customCertificate in model CustomDomainProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property customCertificate in model CustomDomainProperties")); } else { customCertificate().validate(); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/NameAvailabilityInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/NameAvailabilityInner.java index 997c2f3acbfb..e1a5f49641e1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/NameAvailabilityInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/NameAvailabilityInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Result of the request to check name availability. It contains a flag and possible reason of failure. */ +/** + * Result of the request to check name availability. It contains a flag and possible reason of failure. + */ @Fluent public final class NameAvailabilityInner { /* @@ -28,13 +30,15 @@ public final class NameAvailabilityInner { @JsonProperty(value = "message") private String message; - /** Creates an instance of NameAvailabilityInner class. */ + /** + * Creates an instance of NameAvailabilityInner class. + */ public NameAvailabilityInner() { } /** * Get the nameAvailable property: Indicates whether the name is available or not. - * + * * @return the nameAvailable value. */ public Boolean nameAvailable() { @@ -43,7 +47,7 @@ public Boolean nameAvailable() { /** * Set the nameAvailable property: Indicates whether the name is available or not. - * + * * @param nameAvailable the nameAvailable value to set. * @return the NameAvailabilityInner object itself. */ @@ -54,7 +58,7 @@ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) { /** * Get the reason property: The reason of the availability. Required if name is not available. - * + * * @return the reason value. */ public String reason() { @@ -63,7 +67,7 @@ public String reason() { /** * Set the reason property: The reason of the availability. Required if name is not available. - * + * * @param reason the reason value to set. * @return the NameAvailabilityInner object itself. */ @@ -74,7 +78,7 @@ public NameAvailabilityInner withReason(String reason) { /** * Get the message property: The message of the operation. - * + * * @return the message value. */ public String message() { @@ -83,7 +87,7 @@ public String message() { /** * Set the message property: The message of the operation. - * + * * @param message the message value to set. * @return the NameAvailabilityInner object itself. */ @@ -94,7 +98,7 @@ public NameAvailabilityInner withMessage(String message) { /** * 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/OperationInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/OperationInner.java index a9c61ee4fdf7..faac524a2ecb 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/OperationInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/OperationInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.webpubsub.models.OperationProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** REST API operation supported by resource provider. */ +/** + * REST API operation supported by resource provider. + */ @Fluent public final class OperationInner { /* @@ -31,8 +33,7 @@ public final class OperationInner { private OperationDisplay display; /* - * Optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the - * audit logs UX. + * Optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. */ @JsonProperty(value = "origin") private String origin; @@ -43,13 +44,15 @@ public final class OperationInner { @JsonProperty(value = "properties") private OperationProperties properties; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: Name of the operation with format: {provider}/{resource}/{operation}. - * + * * @return the name value. */ public String name() { @@ -58,7 +61,7 @@ public String name() { /** * Set the name property: Name of the operation with format: {provider}/{resource}/{operation}. - * + * * @param name the name value to set. * @return the OperationInner object itself. */ @@ -69,7 +72,7 @@ public OperationInner withName(String name) { /** * Get the isDataAction property: If the operation is a data action. (for data plane rbac). - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -78,7 +81,7 @@ public Boolean isDataAction() { /** * Set the isDataAction property: If the operation is a data action. (for data plane rbac). - * + * * @param isDataAction the isDataAction value to set. * @return the OperationInner object itself. */ @@ -89,7 +92,7 @@ public OperationInner withIsDataAction(Boolean isDataAction) { /** * Get the display property: The object that describes a operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -98,7 +101,7 @@ public OperationDisplay display() { /** * Set the display property: The object that describes a operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -110,7 +113,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Get the origin property: Optional. The intended executor of the operation; governs the display of the operation * in the RBAC UX and the audit logs UX. - * + * * @return the origin value. */ public String origin() { @@ -120,7 +123,7 @@ public String origin() { /** * Set the origin property: Optional. The intended executor of the operation; governs the display of the operation * in the RBAC UX and the audit logs UX. - * + * * @param origin the origin value to set. * @return the OperationInner object itself. */ @@ -131,7 +134,7 @@ public OperationInner withOrigin(String origin) { /** * Get the properties property: Extra Operation properties. - * + * * @return the properties value. */ public OperationProperties properties() { @@ -140,7 +143,7 @@ public OperationProperties properties() { /** * Set the properties property: Extra Operation properties. - * + * * @param properties the properties value to set. * @return the OperationInner object itself. */ @@ -151,7 +154,7 @@ public OperationInner withProperties(OperationProperties properties) { /** * 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/PrivateEndpointConnectionInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateEndpointConnectionInner.java index fb737095aa3b..5363eaaa46fe 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 @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A private endpoint connection to an azure resource. */ +/** + * A private endpoint connection to an azure resource. + */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { /* @@ -28,13 +30,15 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of PrivateEndpointConnectionInner class. */ + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ public PrivateEndpointConnectionInner() { } /** * Get the innerProperties property: Private endpoint connection properties. - * + * * @return the innerProperties value. */ private PrivateEndpointConnectionProperties innerProperties() { @@ -43,7 +47,7 @@ private PrivateEndpointConnectionProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -52,7 +56,7 @@ public SystemData systemData() { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -61,7 +65,7 @@ public ProvisioningState provisioningState() { /** * Get the privateEndpoint property: Private endpoint. - * + * * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { @@ -70,7 +74,7 @@ public PrivateEndpoint privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionInner object itself. */ @@ -84,7 +88,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat /** * Get the groupIds property: Group IDs. - * + * * @return the groupIds value. */ public List groupIds() { @@ -93,7 +97,7 @@ public List groupIds() { /** * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -102,12 +106,12 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { /** * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionInner + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { if (this.innerProperties() == null) { this.innerProperties = new PrivateEndpointConnectionProperties(); } @@ -117,7 +121,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( /** * 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/PrivateEndpointConnectionProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateEndpointConnectionProperties.java index a9347af361b3..c51fbfa376af 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateEndpointConnectionProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Private endpoint connection properties. */ +/** + * Private endpoint connection properties. + */ @Fluent public final class PrivateEndpointConnectionProperties { /* @@ -38,13 +40,15 @@ public final class PrivateEndpointConnectionProperties { @JsonProperty(value = "privateLinkServiceConnectionState") private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - /** Creates an instance of PrivateEndpointConnectionProperties class. */ + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ public PrivateEndpointConnectionProperties() { } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -53,7 +57,7 @@ public ProvisioningState provisioningState() { /** * Get the privateEndpoint property: Private endpoint. - * + * * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { @@ -62,7 +66,7 @@ public PrivateEndpoint privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionProperties object itself. */ @@ -73,7 +77,7 @@ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint p /** * Get the groupIds property: Group IDs. - * + * * @return the groupIds value. */ public List groupIds() { @@ -82,7 +86,7 @@ public List groupIds() { /** * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -91,19 +95,19 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { /** * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionProperties object itself. */ - public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceInner.java index d26916a2123e..5c121a45e7d1 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Private link resource. */ +/** + * Private link resource. + */ @Fluent public final class PrivateLinkResourceInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class PrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of PrivateLinkResourceInner class. */ + /** + * Creates an instance of PrivateLinkResourceInner class. + */ public PrivateLinkResourceInner() { } /** * Get the innerProperties property: Private link resource properties. - * + * * @return the innerProperties value. */ private PrivateLinkResourceProperties innerProperties() { @@ -41,7 +45,7 @@ private PrivateLinkResourceProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +54,7 @@ public SystemData systemData() { /** * Get the groupId property: Group Id of the private link resource. - * + * * @return the groupId value. */ public String groupId() { @@ -59,7 +63,7 @@ public String groupId() { /** * Set the groupId property: Group Id of the private link resource. - * + * * @param groupId the groupId value to set. * @return the PrivateLinkResourceInner object itself. */ @@ -73,7 +77,7 @@ public PrivateLinkResourceInner withGroupId(String groupId) { /** * Get the requiredMembers property: Required members of the private link resource. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -82,7 +86,7 @@ public List requiredMembers() { /** * Set the requiredMembers property: Required members of the private link resource. - * + * * @param requiredMembers the requiredMembers value to set. * @return the PrivateLinkResourceInner object itself. */ @@ -96,7 +100,7 @@ public PrivateLinkResourceInner withRequiredMembers(List requiredMembers /** * Get the requiredZoneNames property: Required private DNS zone names. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -105,7 +109,7 @@ public List requiredZoneNames() { /** * Set the requiredZoneNames property: Required private DNS zone names. - * + * * @param requiredZoneNames the requiredZoneNames value to set. * @return the PrivateLinkResourceInner object itself. */ @@ -120,7 +124,7 @@ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneN /** * Get the shareablePrivateLinkResourceTypes property: The list of resources that are onboarded to private link * service. - * + * * @return the shareablePrivateLinkResourceTypes value. */ public List shareablePrivateLinkResourceTypes() { @@ -130,7 +134,7 @@ public List shareablePrivateLinkResourceTypes( /** * Set the shareablePrivateLinkResourceTypes property: The list of resources that are onboarded to private link * service. - * + * * @param shareablePrivateLinkResourceTypes the shareablePrivateLinkResourceTypes value to set. * @return the PrivateLinkResourceInner object itself. */ @@ -145,7 +149,7 @@ public PrivateLinkResourceInner withShareablePrivateLinkResourceTypes( /** * 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/PrivateLinkResourceProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceProperties.java index d4c97c5c6d11..af5a471d33e0 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Private link resource properties. */ +/** + * Private link resource properties. + */ @Fluent public final class PrivateLinkResourceProperties { /* @@ -36,13 +38,15 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "shareablePrivateLinkResourceTypes") private List shareablePrivateLinkResourceTypes; - /** Creates an instance of PrivateLinkResourceProperties class. */ + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ public PrivateLinkResourceProperties() { } /** * Get the groupId property: Group Id of the private link resource. - * + * * @return the groupId value. */ public String groupId() { @@ -51,7 +55,7 @@ public String groupId() { /** * Set the groupId property: Group Id of the private link resource. - * + * * @param groupId the groupId value to set. * @return the PrivateLinkResourceProperties object itself. */ @@ -62,7 +66,7 @@ public PrivateLinkResourceProperties withGroupId(String groupId) { /** * Get the requiredMembers property: Required members of the private link resource. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -71,7 +75,7 @@ public List requiredMembers() { /** * Set the requiredMembers property: Required members of the private link resource. - * + * * @param requiredMembers the requiredMembers value to set. * @return the PrivateLinkResourceProperties object itself. */ @@ -82,7 +86,7 @@ public PrivateLinkResourceProperties withRequiredMembers(List requiredMe /** * Get the requiredZoneNames property: Required private DNS zone names. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -91,7 +95,7 @@ public List requiredZoneNames() { /** * Set the requiredZoneNames property: Required private DNS zone names. - * + * * @param requiredZoneNames the requiredZoneNames value to set. * @return the PrivateLinkResourceProperties object itself. */ @@ -103,7 +107,7 @@ public PrivateLinkResourceProperties withRequiredZoneNames(List required /** * Get the shareablePrivateLinkResourceTypes property: The list of resources that are onboarded to private link * service. - * + * * @return the shareablePrivateLinkResourceTypes value. */ public List shareablePrivateLinkResourceTypes() { @@ -113,7 +117,7 @@ public List shareablePrivateLinkResourceTypes( /** * Set the shareablePrivateLinkResourceTypes property: The list of resources that are onboarded to private link * service. - * + * * @param shareablePrivateLinkResourceTypes the shareablePrivateLinkResourceTypes value to set. * @return the PrivateLinkResourceProperties object itself. */ @@ -125,7 +129,7 @@ public PrivateLinkResourceProperties withShareablePrivateLinkResourceTypes( /** * 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/ReplicaInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/ReplicaInner.java index 69b00fe1283c..a958d936efb2 100644 --- 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 @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** A class represent a replica resource. */ +/** + * A class represent a replica resource. + */ @Fluent public final class ReplicaInner extends Resource { /* @@ -33,13 +35,15 @@ public final class ReplicaInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ReplicaInner class. */ + /** + * 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() { @@ -48,7 +52,7 @@ public ResourceSku sku() { /** * Set the sku property: The billing information of the resource. - * + * * @param sku the sku value to set. * @return the ReplicaInner object itself. */ @@ -59,7 +63,7 @@ public ReplicaInner withSku(ResourceSku sku) { /** * Get the innerProperties property: The properties property. - * + * * @return the innerProperties value. */ private ReplicaProperties innerProperties() { @@ -68,21 +72,25 @@ private ReplicaProperties 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} */ + /** + * {@inheritDoc} + */ @Override public ReplicaInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ReplicaInner withTags(Map tags) { super.withTags(tags); @@ -91,7 +99,7 @@ public ReplicaInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -99,9 +107,10 @@ public ProvisioningState provisioningState() { } /** - * Get the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. - * + * Get the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. + * * @return the regionEndpointEnabled value. */ public String regionEndpointEnabled() { @@ -109,9 +118,10 @@ public String regionEndpointEnabled() { } /** - * Set the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. - * + * Set the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. + * * @param regionEndpointEnabled the regionEndpointEnabled value to set. * @return the ReplicaInner object itself. */ @@ -124,9 +134,10 @@ public ReplicaInner withRegionEndpointEnabled(String regionEndpointEnabled) { } /** - * Get the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Get the resourceStopped property: Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @return the resourceStopped value. */ public String resourceStopped() { @@ -134,9 +145,10 @@ public String resourceStopped() { } /** - * Set the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Set the resourceStopped property: Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @param resourceStopped the resourceStopped value to set. * @return the ReplicaInner object itself. */ @@ -150,7 +162,7 @@ public ReplicaInner withResourceStopped(String resourceStopped) { /** * 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/ReplicaProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/ReplicaProperties.java index c224d0d9d87a..cf54823d6348 100644 --- 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 @@ -8,7 +8,9 @@ import com.azure.resourcemanager.webpubsub.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ReplicaProperties model. */ +/** + * The ReplicaProperties model. + */ @Fluent public final class ReplicaProperties { /* @@ -19,8 +21,7 @@ public final class ReplicaProperties { /* * Enable or disable the regional endpoint. Default to "Enabled". - * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not - * be affected. + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. */ @JsonProperty(value = "regionEndpointEnabled") private String regionEndpointEnabled; @@ -33,13 +34,15 @@ public final class ReplicaProperties { @JsonProperty(value = "resourceStopped") private String resourceStopped; - /** Creates an instance of ReplicaProperties class. */ + /** + * Creates an instance of ReplicaProperties class. + */ public ReplicaProperties() { } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -47,9 +50,10 @@ public ProvisioningState provisioningState() { } /** - * Get the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. - * + * Get the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. + * * @return the regionEndpointEnabled value. */ public String regionEndpointEnabled() { @@ -57,9 +61,10 @@ public String regionEndpointEnabled() { } /** - * Set the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. - * + * Set the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. + * * @param regionEndpointEnabled the regionEndpointEnabled value to set. * @return the ReplicaProperties object itself. */ @@ -69,9 +74,10 @@ public ReplicaProperties withRegionEndpointEnabled(String regionEndpointEnabled) } /** - * Get the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Get the resourceStopped property: Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @return the resourceStopped value. */ public String resourceStopped() { @@ -79,9 +85,10 @@ public String resourceStopped() { } /** - * Set the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Set the resourceStopped property: Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @param resourceStopped the resourceStopped value to set. * @return the ReplicaProperties object itself. */ @@ -92,7 +99,7 @@ public ReplicaProperties withResourceStopped(String resourceStopped) { /** * 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 5cd74f9ea568..5475fc5d99b0 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 @@ -11,7 +11,9 @@ import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes a Shared Private Link Resource. */ +/** + * Describes a Shared Private Link Resource. + */ @Fluent public final class SharedPrivateLinkResourceInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class SharedPrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of SharedPrivateLinkResourceInner class. */ + /** + * Creates an instance of SharedPrivateLinkResourceInner class. + */ public SharedPrivateLinkResourceInner() { } /** * Get the innerProperties property: Describes the properties of an existing Shared Private Link Resource. - * + * * @return the innerProperties value. */ private SharedPrivateLinkResourceProperties innerProperties() { @@ -41,7 +45,7 @@ private SharedPrivateLinkResourceProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +54,7 @@ public SystemData systemData() { /** * Get the groupId property: The group id from the provider of resource the shared private link resource is for. - * + * * @return the groupId value. */ public String groupId() { @@ -59,7 +63,7 @@ public String groupId() { /** * Set the groupId property: The group id from the provider of resource the shared private link resource is for. - * + * * @param groupId the groupId value to set. * @return the SharedPrivateLinkResourceInner object itself. */ @@ -73,7 +77,7 @@ public SharedPrivateLinkResourceInner withGroupId(String groupId) { /** * Get the privateLinkResourceId property: The resource id of the resource the shared private link resource is for. - * + * * @return the privateLinkResourceId value. */ public String privateLinkResourceId() { @@ -82,7 +86,7 @@ public String privateLinkResourceId() { /** * Set the privateLinkResourceId property: The resource id of the resource the shared private link resource is for. - * + * * @param privateLinkResourceId the privateLinkResourceId value to set. * @return the SharedPrivateLinkResourceInner object itself. */ @@ -96,7 +100,7 @@ public SharedPrivateLinkResourceInner withPrivateLinkResourceId(String privateLi /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -105,7 +109,7 @@ public ProvisioningState provisioningState() { /** * Get the requestMessage property: The request message for requesting approval of the shared private link resource. - * + * * @return the requestMessage value. */ public String requestMessage() { @@ -114,7 +118,7 @@ public String requestMessage() { /** * Set the requestMessage property: The request message for requesting approval of the shared private link resource. - * + * * @param requestMessage the requestMessage value to set. * @return the SharedPrivateLinkResourceInner object itself. */ @@ -128,7 +132,7 @@ public SharedPrivateLinkResourceInner withRequestMessage(String requestMessage) /** * Get the status property: Status of the shared private link resource. - * + * * @return the status value. */ public SharedPrivateLinkResourceStatus status() { @@ -137,7 +141,7 @@ public SharedPrivateLinkResourceStatus status() { /** * 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/SharedPrivateLinkResourceProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SharedPrivateLinkResourceProperties.java index 8bbd5c6dab1a..0f0688c6ce1c 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SharedPrivateLinkResourceProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SharedPrivateLinkResourceProperties.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of an existing Shared Private Link Resource. */ +/** + * Describes the properties of an existing Shared Private Link Resource. + */ @Fluent public final class SharedPrivateLinkResourceProperties { /* @@ -43,13 +45,15 @@ public final class SharedPrivateLinkResourceProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private SharedPrivateLinkResourceStatus status; - /** Creates an instance of SharedPrivateLinkResourceProperties class. */ + /** + * Creates an instance of SharedPrivateLinkResourceProperties class. + */ public SharedPrivateLinkResourceProperties() { } /** * Get the groupId property: The group id from the provider of resource the shared private link resource is for. - * + * * @return the groupId value. */ public String groupId() { @@ -58,7 +62,7 @@ public String groupId() { /** * Set the groupId property: The group id from the provider of resource the shared private link resource is for. - * + * * @param groupId the groupId value to set. * @return the SharedPrivateLinkResourceProperties object itself. */ @@ -69,7 +73,7 @@ public SharedPrivateLinkResourceProperties withGroupId(String groupId) { /** * Get the privateLinkResourceId property: The resource id of the resource the shared private link resource is for. - * + * * @return the privateLinkResourceId value. */ public String privateLinkResourceId() { @@ -78,7 +82,7 @@ public String privateLinkResourceId() { /** * Set the privateLinkResourceId property: The resource id of the resource the shared private link resource is for. - * + * * @param privateLinkResourceId the privateLinkResourceId value to set. * @return the SharedPrivateLinkResourceProperties object itself. */ @@ -89,7 +93,7 @@ public SharedPrivateLinkResourceProperties withPrivateLinkResourceId(String priv /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -98,7 +102,7 @@ public ProvisioningState provisioningState() { /** * Get the requestMessage property: The request message for requesting approval of the shared private link resource. - * + * * @return the requestMessage value. */ public String requestMessage() { @@ -107,7 +111,7 @@ public String requestMessage() { /** * Set the requestMessage property: The request message for requesting approval of the shared private link resource. - * + * * @param requestMessage the requestMessage value to set. * @return the SharedPrivateLinkResourceProperties object itself. */ @@ -118,7 +122,7 @@ public SharedPrivateLinkResourceProperties withRequestMessage(String requestMess /** * Get the status property: Status of the shared private link resource. - * + * * @return the status value. */ public SharedPrivateLinkResourceStatus status() { @@ -127,22 +131,19 @@ public SharedPrivateLinkResourceStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (groupId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property groupId in model SharedPrivateLinkResourceProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property groupId in model SharedPrivateLinkResourceProperties")); } if (privateLinkResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property privateLinkResourceId in model" - + " SharedPrivateLinkResourceProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property privateLinkResourceId in model SharedPrivateLinkResourceProperties")); } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SignalRServiceUsageInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SignalRServiceUsageInner.java index f4986e30167f..44e016d4dc26 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SignalRServiceUsageInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SignalRServiceUsageInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsageName; import com.fasterxml.jackson.annotation.JsonProperty; -/** Object that describes a specific usage of the resources. */ +/** + * Object that describes a specific usage of the resources. + */ @Fluent public final class SignalRServiceUsageInner { /* @@ -36,19 +38,20 @@ public final class SignalRServiceUsageInner { private SignalRServiceUsageName name; /* - * Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, - * BytesPerSecond. + * Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. */ @JsonProperty(value = "unit") private String unit; - /** Creates an instance of SignalRServiceUsageInner class. */ + /** + * Creates an instance of SignalRServiceUsageInner class. + */ public SignalRServiceUsageInner() { } /** * Get the id property: Fully qualified ARM resource id. - * + * * @return the id value. */ public String id() { @@ -57,7 +60,7 @@ public String id() { /** * Set the id property: Fully qualified ARM resource id. - * + * * @param id the id value to set. * @return the SignalRServiceUsageInner object itself. */ @@ -68,7 +71,7 @@ public SignalRServiceUsageInner withId(String id) { /** * Get the currentValue property: Current value for the usage quota. - * + * * @return the currentValue value. */ public Long currentValue() { @@ -77,7 +80,7 @@ public Long currentValue() { /** * Set the currentValue property: Current value for the usage quota. - * + * * @param currentValue the currentValue value to set. * @return the SignalRServiceUsageInner object itself. */ @@ -89,7 +92,7 @@ public SignalRServiceUsageInner withCurrentValue(Long currentValue) { /** * Get the limit property: The maximum permitted value for the usage quota. If there is no limit, this value will be * -1. - * + * * @return the limit value. */ public Long limit() { @@ -99,7 +102,7 @@ public Long limit() { /** * Set the limit property: The maximum permitted value for the usage quota. If there is no limit, this value will be * -1. - * + * * @param limit the limit value to set. * @return the SignalRServiceUsageInner object itself. */ @@ -110,7 +113,7 @@ public SignalRServiceUsageInner withLimit(Long limit) { /** * Get the name property: Localizable String object containing the name and a localized value. - * + * * @return the name value. */ public SignalRServiceUsageName name() { @@ -119,7 +122,7 @@ public SignalRServiceUsageName name() { /** * Set the name property: Localizable String object containing the name and a localized value. - * + * * @param name the name value to set. * @return the SignalRServiceUsageInner object itself. */ @@ -131,7 +134,7 @@ public SignalRServiceUsageInner withName(SignalRServiceUsageName name) { /** * Get the unit property: Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, * Percent, CountPerSecond, BytesPerSecond. - * + * * @return the unit value. */ public String unit() { @@ -141,7 +144,7 @@ public String unit() { /** * Set the unit property: Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, * Percent, CountPerSecond, BytesPerSecond. - * + * * @param unit the unit value to set. * @return the SignalRServiceUsageInner object itself. */ @@ -152,7 +155,7 @@ public SignalRServiceUsageInner withUnit(String unit) { /** * 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/SkuListInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SkuListInner.java index 203915dc1e28..dfc443d3f3a3 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SkuListInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SkuListInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The list skus operation response. */ +/** + * The list skus operation response. + */ @Immutable public final class SkuListInner { /* @@ -25,13 +27,15 @@ public final class SkuListInner { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SkuListInner class. */ + /** + * Creates an instance of SkuListInner class. + */ public SkuListInner() { } /** * Get the value property: The list of skus available for the resource. - * + * * @return the value value. */ public List value() { @@ -39,9 +43,9 @@ public List value() { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -50,7 +54,7 @@ public String nextLink() { /** * 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/WebPubSubHubInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubHubInner.java index cc999412a27a..39ddd52571b1 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 @@ -11,7 +11,9 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A hub setting. */ +/** + * A hub setting. + */ @Fluent public final class WebPubSubHubInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class WebPubSubHubInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of WebPubSubHubInner class. */ + /** + * Creates an instance of WebPubSubHubInner class. + */ public WebPubSubHubInner() { } /** * Get the properties property: Properties of a hub. - * + * * @return the properties value. */ public WebPubSubHubProperties properties() { @@ -41,7 +45,7 @@ public WebPubSubHubProperties properties() { /** * Set the properties property: Properties of a hub. - * + * * @param properties the properties value to set. * @return the WebPubSubHubInner object itself. */ @@ -52,7 +56,7 @@ public WebPubSubHubInner withProperties(WebPubSubHubProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData systemData() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model WebPubSubHubInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model WebPubSubHubInner")); } else { properties().validate(); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubKeysInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubKeysInner.java index f41c4a121e67..11fecda11743 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubKeysInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubKeysInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** A class represents the access keys of the resource. */ +/** + * A class represents the access keys of the resource. + */ @Fluent public final class WebPubSubKeysInner { /* @@ -34,13 +36,15 @@ public final class WebPubSubKeysInner { @JsonProperty(value = "secondaryConnectionString") private String secondaryConnectionString; - /** Creates an instance of WebPubSubKeysInner class. */ + /** + * Creates an instance of WebPubSubKeysInner class. + */ public WebPubSubKeysInner() { } /** * Get the primaryKey property: The primary access key. - * + * * @return the primaryKey value. */ public String primaryKey() { @@ -49,7 +53,7 @@ public String primaryKey() { /** * Set the primaryKey property: The primary access key. - * + * * @param primaryKey the primaryKey value to set. * @return the WebPubSubKeysInner object itself. */ @@ -60,7 +64,7 @@ public WebPubSubKeysInner withPrimaryKey(String primaryKey) { /** * Get the secondaryKey property: The secondary access key. - * + * * @return the secondaryKey value. */ public String secondaryKey() { @@ -69,7 +73,7 @@ public String secondaryKey() { /** * Set the secondaryKey property: The secondary access key. - * + * * @param secondaryKey the secondaryKey value to set. * @return the WebPubSubKeysInner object itself. */ @@ -80,7 +84,7 @@ public WebPubSubKeysInner withSecondaryKey(String secondaryKey) { /** * Get the primaryConnectionString property: Connection string constructed via the primaryKey. - * + * * @return the primaryConnectionString value. */ public String primaryConnectionString() { @@ -89,7 +93,7 @@ public String primaryConnectionString() { /** * Set the primaryConnectionString property: Connection string constructed via the primaryKey. - * + * * @param primaryConnectionString the primaryConnectionString value to set. * @return the WebPubSubKeysInner object itself. */ @@ -100,7 +104,7 @@ public WebPubSubKeysInner withPrimaryConnectionString(String primaryConnectionSt /** * Get the secondaryConnectionString property: Connection string constructed via the secondaryKey. - * + * * @return the secondaryConnectionString value. */ public String secondaryConnectionString() { @@ -109,7 +113,7 @@ public String secondaryConnectionString() { /** * Set the secondaryConnectionString property: Connection string constructed via the secondaryKey. - * + * * @param secondaryConnectionString the secondaryConnectionString value to set. * @return the WebPubSubKeysInner object itself. */ @@ -120,7 +124,7 @@ public WebPubSubKeysInner withSecondaryConnectionString(String secondaryConnecti /** * 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/WebPubSubProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubProperties.java index d4a8aaf989c9..79652ef2e204 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubProperties.java @@ -9,11 +9,14 @@ import com.azure.resourcemanager.webpubsub.models.ProvisioningState; import com.azure.resourcemanager.webpubsub.models.ResourceLogConfiguration; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSocketIOSettings; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A class that describes the properties of the resource. */ +/** + * A class that describes the properties of the resource. + */ @Fluent public final class WebPubSubProperties { /* @@ -120,28 +123,35 @@ public final class WebPubSubProperties { /* * Enable or disable the regional endpoint. Default to "Enabled". - * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not - * be affected. + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. * This property is replica specific. Disable the regional endpoint without replica is not allowed. */ @JsonProperty(value = "regionEndpointEnabled") private String regionEndpointEnabled; /* - * Stop or start the resource. Default to "false". + * Stop or start the resource. Default to "False". * When it's true, the data plane of the resource is shutdown. * When it's false, the data plane of the resource is started. */ @JsonProperty(value = "resourceStopped") private String resourceStopped; - /** Creates an instance of WebPubSubProperties class. */ + /* + * SocketIO settings for the resource + */ + @JsonProperty(value = "socketIO") + private WebPubSubSocketIOSettings socketIO; + + /** + * Creates an instance of WebPubSubProperties class. + */ public WebPubSubProperties() { } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -150,7 +160,7 @@ public ProvisioningState provisioningState() { /** * Get the externalIp property: The publicly accessible IP of the resource. - * + * * @return the externalIp value. */ public String externalIp() { @@ -159,7 +169,7 @@ public String externalIp() { /** * Get the hostname property: FQDN of the service instance. - * + * * @return the hostname value. */ public String hostname() { @@ -169,7 +179,7 @@ public String hostname() { /** * Get the publicPort property: The publicly accessible port of the resource which is designed for browser/client * side usage. - * + * * @return the publicPort value. */ public Integer publicPort() { @@ -179,7 +189,7 @@ public Integer publicPort() { /** * Get the serverPort property: The publicly accessible port of the resource which is designed for customer server * side usage. - * + * * @return the serverPort value. */ public Integer serverPort() { @@ -188,7 +198,7 @@ public Integer serverPort() { /** * Get the version property: Version of the resource. Probably you need the same or higher version of client SDKs. - * + * * @return the version value. */ public String version() { @@ -197,7 +207,7 @@ public String version() { /** * Get the privateEndpointConnections property: Private endpoint connections to the resource. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -206,7 +216,7 @@ public List privateEndpointConnections() { /** * Get the sharedPrivateLinkResources property: The list of shared private link resources. - * + * * @return the sharedPrivateLinkResources value. */ public List sharedPrivateLinkResources() { @@ -215,7 +225,7 @@ public List sharedPrivateLinkResources() { /** * Get the tls property: TLS settings for the resource. - * + * * @return the tls value. */ public WebPubSubTlsSettings tls() { @@ -224,7 +234,7 @@ public WebPubSubTlsSettings tls() { /** * Set the tls property: TLS settings for the resource. - * + * * @param tls the tls value to set. * @return the WebPubSubProperties object itself. */ @@ -235,7 +245,7 @@ public WebPubSubProperties withTls(WebPubSubTlsSettings tls) { /** * Get the hostnamePrefix property: Deprecated. - * + * * @return the hostnamePrefix value. */ public String hostnamePrefix() { @@ -244,7 +254,7 @@ public String hostnamePrefix() { /** * Get the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService resource. - * + * * @return the liveTraceConfiguration value. */ public LiveTraceConfiguration liveTraceConfiguration() { @@ -253,7 +263,7 @@ public LiveTraceConfiguration liveTraceConfiguration() { /** * Set the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService resource. - * + * * @param liveTraceConfiguration the liveTraceConfiguration value to set. * @return the WebPubSubProperties object itself. */ @@ -264,7 +274,7 @@ public WebPubSubProperties withLiveTraceConfiguration(LiveTraceConfiguration liv /** * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. - * + * * @return the resourceLogConfiguration value. */ public ResourceLogConfiguration resourceLogConfiguration() { @@ -273,7 +283,7 @@ public ResourceLogConfiguration resourceLogConfiguration() { /** * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. - * + * * @param resourceLogConfiguration the resourceLogConfiguration value to set. * @return the WebPubSubProperties object itself. */ @@ -284,7 +294,7 @@ public WebPubSubProperties withResourceLogConfiguration(ResourceLogConfiguration /** * Get the networkACLs property: Network ACLs for the resource. - * + * * @return the networkACLs value. */ public WebPubSubNetworkACLs networkACLs() { @@ -293,7 +303,7 @@ public WebPubSubNetworkACLs networkACLs() { /** * Set the networkACLs property: Network ACLs for the resource. - * + * * @param networkACLs the networkACLs value to set. * @return the WebPubSubProperties object itself. */ @@ -303,10 +313,10 @@ public WebPubSubProperties withNetworkACLs(WebPubSubNetworkACLs networkACLs) { } /** - * Get the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's - * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what - * you set in network ACLs. - * + * Get the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs. + * * @return the publicNetworkAccess value. */ public String publicNetworkAccess() { @@ -314,10 +324,10 @@ public String publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's - * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what - * you set in network ACLs. - * + * Set the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs. + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WebPubSubProperties object itself. */ @@ -327,9 +337,10 @@ public WebPubSubProperties withPublicNetworkAccess(String publicNetworkAccess) { } /** - * Get the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as true, - * connection with AccessKey=xxx won't work. - * + * Get the disableLocalAuth property: DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. + * * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { @@ -337,9 +348,10 @@ public Boolean disableLocalAuth() { } /** - * Set the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as true, - * connection with AccessKey=xxx won't work. - * + * Set the disableLocalAuth property: DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. + * * @param disableLocalAuth the disableLocalAuth value to set. * @return the WebPubSubProperties object itself. */ @@ -349,9 +361,10 @@ public WebPubSubProperties withDisableLocalAuth(Boolean disableLocalAuth) { } /** - * Get the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with - * AuthType=aad won't work. - * + * Get the disableAadAuth property: DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. + * * @return the disableAadAuth value. */ public Boolean disableAadAuth() { @@ -359,9 +372,10 @@ public Boolean disableAadAuth() { } /** - * Set the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with - * AuthType=aad won't work. - * + * Set the disableAadAuth property: DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. + * * @param disableAadAuth the disableAadAuth value to set. * @return the WebPubSubProperties object itself. */ @@ -371,10 +385,11 @@ public WebPubSubProperties withDisableAadAuth(Boolean disableAadAuth) { } /** - * Get the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. + * Get the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. * This property is replica specific. Disable the regional endpoint without replica is not allowed. - * + * * @return the regionEndpointEnabled value. */ public String regionEndpointEnabled() { @@ -382,10 +397,11 @@ public String regionEndpointEnabled() { } /** - * Set the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. + * Set the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. * This property is replica specific. Disable the regional endpoint without replica is not allowed. - * + * * @param regionEndpointEnabled the regionEndpointEnabled value to set. * @return the WebPubSubProperties object itself. */ @@ -395,9 +411,10 @@ public WebPubSubProperties withRegionEndpointEnabled(String regionEndpointEnable } /** - * Get the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Get the resourceStopped property: Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @return the resourceStopped value. */ public String resourceStopped() { @@ -405,9 +422,10 @@ public String resourceStopped() { } /** - * Set the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Set the resourceStopped property: Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @param resourceStopped the resourceStopped value to set. * @return the WebPubSubProperties object itself. */ @@ -416,9 +434,29 @@ public WebPubSubProperties withResourceStopped(String resourceStopped) { return this; } + /** + * Get the socketIO property: SocketIO settings for the resource. + * + * @return the socketIO value. + */ + public WebPubSubSocketIOSettings socketIO() { + return this.socketIO; + } + + /** + * Set the socketIO property: SocketIO settings for the resource. + * + * @param socketIO the socketIO value to set. + * @return the WebPubSubProperties object itself. + */ + public WebPubSubProperties withSocketIO(WebPubSubSocketIOSettings socketIO) { + this.socketIO = socketIO; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -440,5 +478,8 @@ public void validate() { if (networkACLs() != null) { networkACLs().validate(); } + if (socketIO() != null) { + socketIO().validate(); + } } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubResourceInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/WebPubSubResourceInner.java index fcc07f7a84b1..233bcde5bb99 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 @@ -14,12 +14,15 @@ 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.WebPubSubSocketIOSettings; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** A class represent a resource. */ +/** + * A class represent a resource. + */ @Fluent public final class WebPubSubResourceInner extends Resource { /* @@ -52,13 +55,15 @@ public final class WebPubSubResourceInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of WebPubSubResourceInner class. */ + /** + * Creates an instance of WebPubSubResourceInner class. + */ public WebPubSubResourceInner() { } /** * Get the sku property: The billing information of the resource. - * + * * @return the sku value. */ public ResourceSku sku() { @@ -67,7 +72,7 @@ public ResourceSku sku() { /** * Set the sku property: The billing information of the resource. - * + * * @param sku the sku value to set. * @return the WebPubSubResourceInner object itself. */ @@ -78,7 +83,7 @@ public WebPubSubResourceInner withSku(ResourceSku sku) { /** * Get the innerProperties property: A class that describes the properties of the resource. - * + * * @return the innerProperties value. */ private WebPubSubProperties innerProperties() { @@ -87,7 +92,7 @@ private WebPubSubProperties innerProperties() { /** * Get the kind property: The kind of the service. - * + * * @return the kind value. */ public ServiceKind kind() { @@ -96,7 +101,7 @@ public ServiceKind kind() { /** * Set the kind property: The kind of the service. - * + * * @param kind the kind value to set. * @return the WebPubSubResourceInner object itself. */ @@ -107,7 +112,7 @@ public WebPubSubResourceInner withKind(ServiceKind kind) { /** * Get the identity property: A class represent managed identities used for request and response. - * + * * @return the identity value. */ public ManagedIdentity identity() { @@ -116,7 +121,7 @@ public ManagedIdentity identity() { /** * Set the identity property: A class represent managed identities used for request and response. - * + * * @param identity the identity value to set. * @return the WebPubSubResourceInner object itself. */ @@ -127,21 +132,25 @@ public WebPubSubResourceInner withIdentity(ManagedIdentity identity) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WebPubSubResourceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WebPubSubResourceInner withTags(Map tags) { super.withTags(tags); @@ -150,7 +159,7 @@ public WebPubSubResourceInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -159,7 +168,7 @@ public ProvisioningState provisioningState() { /** * Get the externalIp property: The publicly accessible IP of the resource. - * + * * @return the externalIp value. */ public String externalIp() { @@ -168,7 +177,7 @@ public String externalIp() { /** * Get the hostname property: FQDN of the service instance. - * + * * @return the hostname value. */ public String hostname() { @@ -178,7 +187,7 @@ public String hostname() { /** * Get the publicPort property: The publicly accessible port of the resource which is designed for browser/client * side usage. - * + * * @return the publicPort value. */ public Integer publicPort() { @@ -188,7 +197,7 @@ public Integer publicPort() { /** * Get the serverPort property: The publicly accessible port of the resource which is designed for customer server * side usage. - * + * * @return the serverPort value. */ public Integer serverPort() { @@ -197,7 +206,7 @@ public Integer serverPort() { /** * Get the version property: Version of the resource. Probably you need the same or higher version of client SDKs. - * + * * @return the version value. */ public String version() { @@ -206,7 +215,7 @@ public String version() { /** * Get the privateEndpointConnections property: Private endpoint connections to the resource. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -215,7 +224,7 @@ public List privateEndpointConnections() { /** * Get the sharedPrivateLinkResources property: The list of shared private link resources. - * + * * @return the sharedPrivateLinkResources value. */ public List sharedPrivateLinkResources() { @@ -224,7 +233,7 @@ public List sharedPrivateLinkResources() { /** * Get the tls property: TLS settings for the resource. - * + * * @return the tls value. */ public WebPubSubTlsSettings tls() { @@ -233,7 +242,7 @@ public WebPubSubTlsSettings tls() { /** * Set the tls property: TLS settings for the resource. - * + * * @param tls the tls value to set. * @return the WebPubSubResourceInner object itself. */ @@ -247,7 +256,7 @@ public WebPubSubResourceInner withTls(WebPubSubTlsSettings tls) { /** * Get the hostnamePrefix property: Deprecated. - * + * * @return the hostnamePrefix value. */ public String hostnamePrefix() { @@ -256,7 +265,7 @@ public String hostnamePrefix() { /** * Get the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService resource. - * + * * @return the liveTraceConfiguration value. */ public LiveTraceConfiguration liveTraceConfiguration() { @@ -265,7 +274,7 @@ public LiveTraceConfiguration liveTraceConfiguration() { /** * Set the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService resource. - * + * * @param liveTraceConfiguration the liveTraceConfiguration value to set. * @return the WebPubSubResourceInner object itself. */ @@ -279,7 +288,7 @@ public WebPubSubResourceInner withLiveTraceConfiguration(LiveTraceConfiguration /** * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. - * + * * @return the resourceLogConfiguration value. */ public ResourceLogConfiguration resourceLogConfiguration() { @@ -288,7 +297,7 @@ public ResourceLogConfiguration resourceLogConfiguration() { /** * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. - * + * * @param resourceLogConfiguration the resourceLogConfiguration value to set. * @return the WebPubSubResourceInner object itself. */ @@ -302,7 +311,7 @@ public WebPubSubResourceInner withResourceLogConfiguration(ResourceLogConfigurat /** * Get the networkACLs property: Network ACLs for the resource. - * + * * @return the networkACLs value. */ public WebPubSubNetworkACLs networkACLs() { @@ -311,7 +320,7 @@ public WebPubSubNetworkACLs networkACLs() { /** * Set the networkACLs property: Network ACLs for the resource. - * + * * @param networkACLs the networkACLs value to set. * @return the WebPubSubResourceInner object itself. */ @@ -324,10 +333,10 @@ public WebPubSubResourceInner withNetworkACLs(WebPubSubNetworkACLs networkACLs) } /** - * Get the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's - * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what - * you set in network ACLs. - * + * Get the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs. + * * @return the publicNetworkAccess value. */ public String publicNetworkAccess() { @@ -335,10 +344,10 @@ public String publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's - * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what - * you set in network ACLs. - * + * Set the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs. + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WebPubSubResourceInner object itself. */ @@ -351,9 +360,10 @@ public WebPubSubResourceInner withPublicNetworkAccess(String publicNetworkAccess } /** - * Get the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as true, - * connection with AccessKey=xxx won't work. - * + * Get the disableLocalAuth property: DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. + * * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { @@ -361,9 +371,10 @@ public Boolean disableLocalAuth() { } /** - * Set the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as true, - * connection with AccessKey=xxx won't work. - * + * Set the disableLocalAuth property: DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. + * * @param disableLocalAuth the disableLocalAuth value to set. * @return the WebPubSubResourceInner object itself. */ @@ -376,9 +387,10 @@ public WebPubSubResourceInner withDisableLocalAuth(Boolean disableLocalAuth) { } /** - * Get the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with - * AuthType=aad won't work. - * + * Get the disableAadAuth property: DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. + * * @return the disableAadAuth value. */ public Boolean disableAadAuth() { @@ -386,9 +398,10 @@ public Boolean disableAadAuth() { } /** - * Set the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with - * AuthType=aad won't work. - * + * Set the disableAadAuth property: DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. + * * @param disableAadAuth the disableAadAuth value to set. * @return the WebPubSubResourceInner object itself. */ @@ -401,10 +414,11 @@ public WebPubSubResourceInner withDisableAadAuth(Boolean disableAadAuth) { } /** - * Get the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. + * Get the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. * This property is replica specific. Disable the regional endpoint without replica is not allowed. - * + * * @return the regionEndpointEnabled value. */ public String regionEndpointEnabled() { @@ -412,10 +426,11 @@ public String regionEndpointEnabled() { } /** - * Set the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. + * Set the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. * This property is replica specific. Disable the regional endpoint without replica is not allowed. - * + * * @param regionEndpointEnabled the regionEndpointEnabled value to set. * @return the WebPubSubResourceInner object itself. */ @@ -428,9 +443,10 @@ public WebPubSubResourceInner withRegionEndpointEnabled(String regionEndpointEna } /** - * Get the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Get the resourceStopped property: Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @return the resourceStopped value. */ public String resourceStopped() { @@ -438,9 +454,10 @@ public String resourceStopped() { } /** - * Set the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Set the resourceStopped property: Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @param resourceStopped the resourceStopped value to set. * @return the WebPubSubResourceInner object itself. */ @@ -452,9 +469,32 @@ public WebPubSubResourceInner withResourceStopped(String resourceStopped) { return this; } + /** + * Get the socketIO property: SocketIO settings for the resource. + * + * @return the socketIO value. + */ + public WebPubSubSocketIOSettings socketIO() { + return this.innerProperties() == null ? null : this.innerProperties().socketIO(); + } + + /** + * Set the socketIO property: SocketIO settings for the resource. + * + * @param socketIO the socketIO value to set. + * @return the WebPubSubResourceInner object itself. + */ + public WebPubSubResourceInner withSocketIO(WebPubSubSocketIOSettings socketIO) { + if (this.innerProperties() == null) { + this.innerProperties = new WebPubSubProperties(); + } + this.innerProperties().withSocketIO(socketIO); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/package-info.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/package-info.java index 018377dd6fc6..0ae9547f31bf 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/package-info.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for WebPubSubManagementClient. REST API for Azure WebPubSub Service. */ +/** + * Package containing the inner data models for WebPubSubManagementClient. + * REST API for Azure WebPubSub Service. + */ package com.azure.resourcemanager.webpubsub.fluent.models; diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/package-info.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/package-info.java index d26f4301311b..00fc4452604c 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/package-info.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for WebPubSubManagementClient. REST API for Azure WebPubSub Service. */ +/** + * Package containing the service clients for WebPubSubManagementClient. + * REST API for Azure WebPubSub Service. + */ package com.azure.resourcemanager.webpubsub.fluent; diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomCertificateImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomCertificateImpl.java index 8624ba526594..1efa5abbbc8b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomCertificateImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomCertificateImpl.java @@ -73,20 +73,16 @@ public CustomCertificateImpl withExistingWebPubSub(String resourceGroupName, Str } public CustomCertificate create() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomCertificates() - .createOrUpdate(resourceGroupName, resourceName, certificateName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomCertificates() + .createOrUpdate(resourceGroupName, resourceName, certificateName, this.innerModel(), Context.NONE); return this; } public CustomCertificate create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomCertificates() - .createOrUpdate(resourceGroupName, resourceName, certificateName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomCertificates() + .createOrUpdate(resourceGroupName, resourceName, certificateName, this.innerModel(), context); return this; } @@ -101,49 +97,41 @@ public CustomCertificateImpl update() { } public CustomCertificate apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomCertificates() - .createOrUpdate(resourceGroupName, resourceName, certificateName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomCertificates() + .createOrUpdate(resourceGroupName, resourceName, certificateName, this.innerModel(), Context.NONE); return this; } public CustomCertificate apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomCertificates() - .createOrUpdate(resourceGroupName, resourceName, certificateName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomCertificates() + .createOrUpdate(resourceGroupName, resourceName, certificateName, this.innerModel(), context); return this; } - CustomCertificateImpl( - CustomCertificateInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + CustomCertificateImpl(CustomCertificateInner 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.certificateName = Utils.getValueFromIdByName(innerObject.id(), "customCertificates"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webPubSub"); + this.certificateName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "customCertificates"); } public CustomCertificate refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomCertificates() - .getWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomCertificates() + .getWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE) + .getValue(); return this; } public CustomCertificate refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomCertificates() - .getWithResponse(resourceGroupName, resourceName, certificateName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomCertificates() + .getWithResponse(resourceGroupName, resourceName, certificateName, context) + .getValue(); return this; } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomDomainImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomDomainImpl.java index dbdf288a4a62..79f0a2dc2a80 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomDomainImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomDomainImpl.java @@ -69,20 +69,16 @@ public CustomDomainImpl withExistingWebPubSub(String resourceGroupName, String r } public CustomDomain create() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomDomains() - .createOrUpdate(resourceGroupName, resourceName, name, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomDomains() + .createOrUpdate(resourceGroupName, resourceName, name, this.innerModel(), Context.NONE); return this; } public CustomDomain create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomDomains() - .createOrUpdate(resourceGroupName, resourceName, name, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomDomains() + .createOrUpdate(resourceGroupName, resourceName, name, this.innerModel(), context); return this; } @@ -97,49 +93,41 @@ public CustomDomainImpl update() { } public CustomDomain apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomDomains() - .createOrUpdate(resourceGroupName, resourceName, name, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomDomains() + .createOrUpdate(resourceGroupName, resourceName, name, this.innerModel(), Context.NONE); return this; } public CustomDomain apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomDomains() - .createOrUpdate(resourceGroupName, resourceName, name, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomDomains() + .createOrUpdate(resourceGroupName, resourceName, name, this.innerModel(), context); return this; } - CustomDomainImpl( - CustomDomainInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + CustomDomainImpl(CustomDomainInner 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.name = Utils.getValueFromIdByName(innerObject.id(), "customDomains"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webPubSub"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "customDomains"); } public CustomDomain refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomDomains() - .getWithResponse(resourceGroupName, resourceName, name, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomDomains() + .getWithResponse(resourceGroupName, resourceName, name, Context.NONE) + .getValue(); return this; } public CustomDomain refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubCustomDomains() - .getWithResponse(resourceGroupName, resourceName, name, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubCustomDomains() + .getWithResponse(resourceGroupName, resourceName, name, context) + .getValue(); return this; } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/NameAvailabilityImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/NameAvailabilityImpl.java index e6d724de5d95..49a7f765ff29 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/NameAvailabilityImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/NameAvailabilityImpl.java @@ -12,8 +12,8 @@ public final class NameAvailabilityImpl implements NameAvailability { private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - NameAvailabilityImpl( - NameAvailabilityInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + NameAvailabilityImpl(NameAvailabilityInner innerObject, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/OperationsClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/OperationsClientImpl.java index 3586e063d164..bb24e9d1c10d 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/OperationsClientImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/OperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.webpubsub.models.OperationList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(WebPubSubManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,95 +62,70 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.SignalRService/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list REST API operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @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 result of the request to list REST API operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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 - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list REST API operations as paginated response with {@link PagedFlux}. @@ -156,7 +137,7 @@ private PagedFlux listAsync() { /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @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. @@ -165,13 +146,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. @@ -183,7 +164,7 @@ public PagedIterable list() { /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @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. @@ -197,14 +178,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 result of the request to list REST API operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -212,37 +194,28 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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)) + 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. + * + * 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 result of the request to list REST API operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -250,23 +223,13 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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)); + 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/OperationsImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/OperationsImpl.java index 46923b4dc029..71ec22d329f6 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/OperationsImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/OperationsImpl.java @@ -19,20 +19,20 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateEndpointConnectionImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateEndpointConnectionImpl.java index 6012837566a0..41bba20599b1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/PrivateEndpointConnectionImpl.java @@ -18,8 +18,7 @@ public final class PrivateEndpointConnectionImpl implements PrivateEndpointConne private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - PrivateEndpointConnectionImpl( - PrivateEndpointConnectionInner innerObject, + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 b4ed2941ec4b..f396d998293c 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 @@ -16,8 +16,8 @@ public final class PrivateLinkResourceImpl implements PrivateLinkResource { private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - PrivateLinkResourceImpl( - PrivateLinkResourceInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } 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 index acb890ed8615..587eae035f5d 100644 --- 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 @@ -97,20 +97,16 @@ public ReplicaImpl withExistingWebPubSub(String resourceGroupName, String resour } public Replica create() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubReplicas() - .createOrUpdate(resourceGroupName, resourceName, replicaName, this.innerModel(), Context.NONE); + 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); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubReplicas() + .createOrUpdate(resourceGroupName, resourceName, replicaName, this.innerModel(), context); return this; } @@ -125,48 +121,40 @@ public ReplicaImpl update() { } public Replica apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubReplicas() - .update(resourceGroupName, resourceName, replicaName, this.innerModel(), Context.NONE); + 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); + 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"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webPubSub"); + this.replicaName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicas"); } public Replica refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubReplicas() - .getWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE) - .getValue(); + 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(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubReplicas() + .getWithResponse(resourceGroupName, resourceName, replicaName, context) + .getValue(); return this; } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/Utils.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/ResourceManagerUtils.java similarity index 90% rename from sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/Utils.java rename to sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/ResourceManagerUtils.java index af4866dc2af9..8d18e60b7efe 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/Utils.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { @@ -87,26 +87,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SharedPrivateLinkResourceImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SharedPrivateLinkResourceImpl.java index bd566baa3f2c..246c41fc0212 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SharedPrivateLinkResourceImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SharedPrivateLinkResourceImpl.java @@ -65,35 +65,35 @@ private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { return this.serviceManager; } - private String sharedPrivateLinkResourceName; - private String resourceGroupName; private String resourceName; - public SharedPrivateLinkResourceImpl withExistingWebPubSub(String resourceGroupName, String resourceName) { + private String replicaName; + + private String sharedPrivateLinkResourceName; + + public SharedPrivateLinkResourceImpl withExistingReplica(String resourceGroupName, String resourceName, + String replicaName) { this.resourceGroupName = resourceGroupName; this.resourceName = resourceName; + this.replicaName = replicaName; return this; } public SharedPrivateLinkResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubSharedPrivateLinkResources() - .createOrUpdate( - sharedPrivateLinkResourceName, resourceGroupName, resourceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubReplicaSharedPrivateLinkResources() + .createOrUpdate(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + this.innerModel(), Context.NONE); return this; } public SharedPrivateLinkResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubSharedPrivateLinkResources() - .createOrUpdate( - sharedPrivateLinkResourceName, resourceGroupName, resourceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubReplicaSharedPrivateLinkResources() + .createOrUpdate(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + this.innerModel(), context); return this; } @@ -108,52 +108,45 @@ public SharedPrivateLinkResourceImpl update() { } public SharedPrivateLinkResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubSharedPrivateLinkResources() - .createOrUpdate( - sharedPrivateLinkResourceName, resourceGroupName, resourceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubReplicaSharedPrivateLinkResources() + .createOrUpdate(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + this.innerModel(), Context.NONE); return this; } public SharedPrivateLinkResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubSharedPrivateLinkResources() - .createOrUpdate( - sharedPrivateLinkResourceName, resourceGroupName, resourceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubReplicaSharedPrivateLinkResources() + .createOrUpdate(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + this.innerModel(), context); return this; } - SharedPrivateLinkResourceImpl( - SharedPrivateLinkResourceInner innerObject, + SharedPrivateLinkResourceImpl(SharedPrivateLinkResourceInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.sharedPrivateLinkResourceName = Utils.getValueFromIdByName(innerObject.id(), "sharedPrivateLinkResources"); - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "webPubSub"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webPubSub"); + this.replicaName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "replicas"); + this.sharedPrivateLinkResourceName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "sharedPrivateLinkResources"); } public SharedPrivateLinkResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubSharedPrivateLinkResources() - .getWithResponse(sharedPrivateLinkResourceName, resourceGroupName, resourceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubReplicaSharedPrivateLinkResources() + .getWithResponse(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, Context.NONE) + .getValue(); return this; } public SharedPrivateLinkResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubSharedPrivateLinkResources() - .getWithResponse(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubReplicaSharedPrivateLinkResources() + .getWithResponse(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, context) + .getValue(); return this; } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SignalRServiceUsageImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SignalRServiceUsageImpl.java index 431d3de0e3c9..f26deeb032a0 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SignalRServiceUsageImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/SignalRServiceUsageImpl.java @@ -13,8 +13,8 @@ public final class SignalRServiceUsageImpl implements SignalRServiceUsage { private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - SignalRServiceUsageImpl( - SignalRServiceUsageInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + SignalRServiceUsageImpl(SignalRServiceUsageInner innerObject, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/UsagesClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/UsagesClientImpl.java index e6f2fb573700..37df6ef63b72 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/UsagesClientImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/UsagesClientImpl.java @@ -30,17 +30,23 @@ import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsageList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in UsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in UsagesClient. + */ public final class UsagesClientImpl implements UsagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final UsagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of UsagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ UsagesClientImpl(WebPubSubManagementClientImpl client) { @@ -55,138 +61,96 @@ public final class UsagesClientImpl implements UsagesClient { @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface UsagesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("location") String location, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of the resource usages and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of the resource usages and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), location, this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 resource usage quotas by location. - * + * * @param location the location like "eastus". * @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 object that includes an array of the resource usages and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of the resource usages and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), location, this.client.getApiVersion(), this.client.getSubscriptionId(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return object that includes an array of the resource usages and a possible link for next set as paginated - * response with {@link PagedFlux}. + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location) { @@ -195,30 +159,30 @@ private PagedFlux listAsync(String location) { /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @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 object that includes an array of the resource usages and a possible link for next set as paginated - * response with {@link PagedFlux}. + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(location, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return object that includes an array of the resource usages and a possible link for next set as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { @@ -227,14 +191,14 @@ public PagedIterable list(String location) { /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @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 object that includes an array of the resource usages and a possible link for next set as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { @@ -243,14 +207,15 @@ public PagedIterable list(String location, Context con /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 object that includes an array of the resource usages and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of the resource usages and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -258,37 +223,28 @@ private Mono> listNextSinglePageAsync(St 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.")); + 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)) + 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. + * + * 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 object that includes an array of the resource usages and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of the resource usages and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -296,23 +252,13 @@ private Mono> listNextSinglePageAsync(St 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.")); + 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)); + 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/UsagesImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/UsagesImpl.java index b7754d560819..ed15c94fa374 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/UsagesImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/UsagesImpl.java @@ -26,12 +26,12 @@ public UsagesImpl(UsagesClient innerClient, com.azure.resourcemanager.webpubsub. public PagedIterable list(String location) { PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new SignalRServiceUsageImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SignalRServiceUsageImpl(inner1, this.manager())); } public PagedIterable list(String location, Context context) { PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new SignalRServiceUsageImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SignalRServiceUsageImpl(inner1, this.manager())); } private UsagesClient serviceClient() { 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 97359db50697..67dbab13316b 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 @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WebPubSubCustomCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubCustomCertificatesClient. + */ public final class WebPubSubCustomCertificatesClientImpl implements WebPubSubCustomCertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebPubSubCustomCertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of WebPubSubCustomCertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebPubSubCustomCertificatesClientImpl(WebPubSubManagementClientImpl client) { - this.service = - RestProxy - .create( - WebPubSubCustomCertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(WebPubSubCustomCertificatesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,80 +70,57 @@ public final class WebPubSubCustomCertificatesClientImpl implements WebPubSubCus @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface WebPubSubCustomCertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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); + @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}/customCertificates/{certificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("certificateName") String certificateName, @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}/customCertificates/{certificateName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CustomCertificateInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CustomCertificateInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customCertificates/{certificateName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List all custom certificates. - * + * * @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. @@ -148,19 +129,15 @@ Mono> listNext( * @return custom certificates list along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -171,32 +148,16 @@ private Mono> listSinglePageAsync( } 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)) + .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 custom certificates. - * + * * @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. @@ -206,19 +167,15 @@ private Mono> listSinglePageAsync( * @return custom certificates list along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -230,28 +187,15 @@ private Mono> listSinglePageAsync( 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(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 custom certificates. - * + * * @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. @@ -261,13 +205,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List all custom certificates. - * + * * @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. @@ -277,16 +221,15 @@ private PagedFlux listAsync(String resourceGroupName, St * @return custom certificates list as 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), + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List all custom certificates. - * + * * @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. @@ -301,7 +244,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * List all custom certificates. - * + * * @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. @@ -317,7 +260,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * Get a custom certificate. - * + * * @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. @@ -327,19 +270,15 @@ public PagedIterable list(String resourceGroupName, Stri * @return a custom certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String certificateName) { + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String certificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -354,24 +293,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - certificateName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, certificateName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a custom certificate. - * + * * @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. @@ -382,19 +311,15 @@ private Mono> getWithResponseAsync( * @return a custom certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String certificateName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String certificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -409,21 +334,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - certificateName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + certificateName, this.client.getApiVersion(), accept, context); } /** * Get a custom certificate. - * + * * @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. @@ -433,15 +350,15 @@ private Mono> getWithResponseAsync( * @return a custom certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String certificateName) { + private Mono getAsync(String resourceGroupName, String resourceName, + String certificateName) { return getWithResponseAsync(resourceGroupName, resourceName, certificateName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a custom certificate. - * + * * @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. @@ -452,14 +369,14 @@ private Mono getAsync( * @return a custom certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String certificateName, Context context) { + public Response getWithResponse(String resourceGroupName, String resourceName, + String certificateName, Context context) { return getWithResponseAsync(resourceGroupName, resourceName, certificateName, context).block(); } /** * Get a custom certificate. - * + * * @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. @@ -475,7 +392,7 @@ public CustomCertificateInner get(String resourceGroupName, String resourceName, /** * Create or update a custom certificate. - * + * * @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. @@ -486,19 +403,15 @@ public CustomCertificateInner get(String resourceGroupName, String resourceName, * @return a custom certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String certificateName, CustomCertificateInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -518,25 +431,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - certificateName, - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, certificateName, this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a custom certificate. - * + * * @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. @@ -548,23 +451,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a custom certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - String certificateName, - CustomCertificateInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String certificateName, CustomCertificateInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -584,22 +479,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - certificateName, - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, certificateName, this.client.getApiVersion(), parameters, accept, context); } /** * Create or update a custom certificate. - * + * * @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. @@ -612,21 +498,16 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CustomCertificateInner> beginCreateOrUpdateAsync( String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, certificateName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - CustomCertificateInner.class, - CustomCertificateInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, certificateName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CustomCertificateInner.class, CustomCertificateInner.class, + this.client.getContext()); } /** * Create or update a custom certificate. - * + * * @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. @@ -639,27 +520,18 @@ private PollerFlux, CustomCertificateInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CustomCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String resourceName, - String certificateName, - CustomCertificateInner parameters, + String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, certificateName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - CustomCertificateInner.class, - CustomCertificateInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, certificateName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CustomCertificateInner.class, CustomCertificateInner.class, context); } /** * Create or update a custom certificate. - * + * * @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. @@ -672,14 +544,13 @@ private PollerFlux, CustomCertificateInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomCertificateInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters) .getSyncPoller(); } /** * Create or update a custom certificate. - * + * * @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. @@ -692,19 +563,15 @@ public SyncPoller, CustomCertificateInner> be */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomCertificateInner> beginCreateOrUpdate( - String resourceGroupName, - String resourceName, - String certificateName, - CustomCertificateInner parameters, + String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters, context) .getSyncPoller(); } /** * Create or update a custom certificate. - * + * * @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. @@ -715,16 +582,15 @@ public SyncPoller, CustomCertificateInner> be * @return a custom certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String certificateName, CustomCertificateInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a custom certificate. - * + * * @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. @@ -736,20 +602,15 @@ private Mono createOrUpdateAsync( * @return a custom certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String resourceName, - String certificateName, - CustomCertificateInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String certificateName, CustomCertificateInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a custom certificate. - * + * * @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. @@ -760,14 +621,14 @@ private Mono createOrUpdateAsync( * @return a custom certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomCertificateInner createOrUpdate( - String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters) { + public CustomCertificateInner createOrUpdate(String resourceGroupName, String resourceName, String certificateName, + CustomCertificateInner parameters) { return createOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters).block(); } /** * Create or update a custom certificate. - * + * * @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. @@ -779,18 +640,14 @@ public CustomCertificateInner createOrUpdate( * @return a custom certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomCertificateInner createOrUpdate( - String resourceGroupName, - String resourceName, - String certificateName, - CustomCertificateInner parameters, - Context context) { + public CustomCertificateInner createOrUpdate(String resourceGroupName, String resourceName, String certificateName, + CustomCertificateInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters, context).block(); } /** * Delete a custom certificate. - * + * * @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. @@ -800,19 +657,15 @@ public CustomCertificateInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String certificateName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String certificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -827,24 +680,14 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - certificateName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, certificateName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a custom certificate. - * + * * @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. @@ -855,19 +698,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String certificateName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String certificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -882,21 +721,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - certificateName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, certificateName, this.client.getApiVersion(), accept, context); } /** * Delete a custom certificate. - * + * * @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. @@ -913,7 +744,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * Delete a custom certificate. - * + * * @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. @@ -924,14 +755,14 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String certificateName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String certificateName, + Context context) { return deleteWithResponseAsync(resourceGroupName, resourceName, certificateName, context).block(); } /** * Delete a custom certificate. - * + * * @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. @@ -946,9 +777,10 @@ public void delete(String resourceGroupName, String resourceName, String certifi /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -960,31 +792,22 @@ private Mono> listNextSinglePageAsync(Stri 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.")); + 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)) + 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. + * + * 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. @@ -997,23 +820,13 @@ private Mono> listNextSinglePageAsync(Stri 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.")); + 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)); + 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/WebPubSubCustomCertificatesImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesImpl.java index 153c1478ac6b..0e9a735a5791 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesImpl.java @@ -21,8 +21,7 @@ public final class WebPubSubCustomCertificatesImpl implements WebPubSubCustomCer private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public WebPubSubCustomCertificatesImpl( - WebPubSubCustomCertificatesClient innerClient, + public WebPubSubCustomCertificatesImpl(WebPubSubCustomCertificatesClient innerClient, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,24 +29,21 @@ public WebPubSubCustomCertificatesImpl( public PagedIterable list(String resourceGroupName, String resourceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new CustomCertificateImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CustomCertificateImpl(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 CustomCertificateImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CustomCertificateImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String resourceName, String certificateName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, certificateName, context); + public Response getWithResponse(String resourceGroupName, String resourceName, + String certificateName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, certificateName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CustomCertificateImpl(inner.getValue(), this.manager())); } else { return null; @@ -63,8 +59,8 @@ public CustomCertificate get(String resourceGroupName, String resourceName, Stri } } - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String certificateName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String certificateName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, certificateName, context); } @@ -73,113 +69,77 @@ public void delete(String resourceGroupName, String resourceName, String certifi } public CustomCertificate getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } - String certificateName = Utils.getValueFromIdByName(id, "customCertificates"); + String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "customCertificates"); if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'customCertificates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customCertificates'.", id))); } return this.getWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } - String certificateName = Utils.getValueFromIdByName(id, "customCertificates"); + String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "customCertificates"); if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'customCertificates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customCertificates'.", id))); } return this.getWithResponse(resourceGroupName, resourceName, certificateName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } - String certificateName = Utils.getValueFromIdByName(id, "customCertificates"); + String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "customCertificates"); if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'customCertificates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customCertificates'.", id))); } this.deleteWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } - String certificateName = Utils.getValueFromIdByName(id, "customCertificates"); + String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "customCertificates"); if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'customCertificates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customCertificates'.", id))); } return this.deleteWithResponse(resourceGroupName, resourceName, certificateName, context); } 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 0eb450b5aa14..d05ca025e6f6 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 @@ -38,23 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WebPubSubCustomDomainsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubCustomDomainsClient. + */ public final class WebPubSubCustomDomainsClientImpl implements WebPubSubCustomDomainsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebPubSubCustomDomainsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of WebPubSubCustomDomainsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebPubSubCustomDomainsClientImpl(WebPubSubManagementClientImpl client) { - this.service = - RestProxy - .create(WebPubSubCustomDomainsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(WebPubSubCustomDomainsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -65,80 +70,57 @@ public final class WebPubSubCustomDomainsClientImpl implements WebPubSubCustomDo @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface WebPubSubCustomDomainsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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); + @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}/customDomains/{name}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("name") String name, @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}/customDomains/{name}") - @ExpectedResponses({201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}") + @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CustomDomainInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CustomDomainInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/customDomains/{name}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List all custom domains. - * + * * @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. @@ -149,16 +131,12 @@ Mono> listNext( @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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,32 +147,16 @@ private Mono> listSinglePageAsync(String resour } 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)) + .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 custom domains. - * + * * @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. @@ -204,19 +166,15 @@ private Mono> listSinglePageAsync(String resour * @return custom domains list along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -228,28 +186,15 @@ private Mono> listSinglePageAsync( 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(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 custom domains. - * + * * @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. @@ -259,13 +204,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List all custom domains. - * + * * @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. @@ -276,14 +221,13 @@ private PagedFlux listAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List all custom domains. - * + * * @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. @@ -298,7 +242,7 @@ public PagedIterable list(String resourceGroupName, String re /** * List all custom domains. - * + * * @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. @@ -314,7 +258,7 @@ public PagedIterable list(String resourceGroupName, String re /** * Get a custom domain. - * + * * @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. @@ -324,19 +268,15 @@ public PagedIterable list(String resourceGroupName, String re * @return a custom domain along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String name) { + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String name) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -350,24 +290,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, name, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a custom domain. - * + * * @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. @@ -378,19 +308,15 @@ private Mono> getWithResponseAsync( * @return a custom domain along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String name, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String name, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -404,21 +330,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + name, this.client.getApiVersion(), accept, context); } /** * Get a custom domain. - * + * * @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. @@ -435,7 +353,7 @@ private Mono getAsync(String resourceGroupName, String resour /** * Get a custom domain. - * + * * @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. @@ -446,14 +364,14 @@ private Mono getAsync(String resourceGroupName, String resour * @return a custom domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String name, Context context) { + public Response getWithResponse(String resourceGroupName, String resourceName, String name, + Context context) { return getWithResponseAsync(resourceGroupName, resourceName, name, context).block(); } /** * Get a custom domain. - * + * * @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. @@ -469,7 +387,7 @@ public CustomDomainInner get(String resourceGroupName, String resourceName, Stri /** * Create or update a custom domain. - * + * * @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. @@ -480,19 +398,15 @@ public CustomDomainInner get(String resourceGroupName, String resourceName, Stri * @return a custom domain along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String name, CustomDomainInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -511,25 +425,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - name, - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, name, this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a custom domain. - * + * * @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. @@ -541,19 +444,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a custom domain along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String name, CustomDomainInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -572,22 +471,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - name, - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, name, this.client.getApiVersion(), parameters, accept, context); } /** * Create or update a custom domain. - * + * * @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. @@ -600,21 +490,15 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CustomDomainInner> beginCreateOrUpdateAsync( String resourceGroupName, String resourceName, String name, CustomDomainInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, name, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - CustomDomainInner.class, - CustomDomainInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, name, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CustomDomainInner.class, CustomDomainInner.class, this.client.getContext()); } /** * Create or update a custom domain. - * + * * @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. @@ -629,17 +513,15 @@ private PollerFlux, CustomDomainInner> beginCreate private PollerFlux, CustomDomainInner> beginCreateOrUpdateAsync( String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, name, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), CustomDomainInner.class, CustomDomainInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, name, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CustomDomainInner.class, CustomDomainInner.class, context); } /** * Create or update a custom domain. - * + * * @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. @@ -650,14 +532,14 @@ private PollerFlux, CustomDomainInner> beginCreate * @return the {@link SyncPoller} for polling of a custom domain. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CustomDomainInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters) { + public SyncPoller, CustomDomainInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String name, CustomDomainInner parameters) { return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters).getSyncPoller(); } /** * Create or update a custom domain. - * + * * @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. @@ -669,16 +551,15 @@ public SyncPoller, CustomDomainInner> beginCreateO * @return the {@link SyncPoller} for polling of a custom domain. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CustomDomainInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters, context) + public SyncPoller, CustomDomainInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String name, CustomDomainInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters, context) .getSyncPoller(); } /** * Create or update a custom domain. - * + * * @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. @@ -689,16 +570,15 @@ public SyncPoller, CustomDomainInner> beginCreateO * @return a custom domain on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String name, + CustomDomainInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a custom domain. - * + * * @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. @@ -710,16 +590,15 @@ private Mono createOrUpdateAsync( * @return a custom domain on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String name, + CustomDomainInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a custom domain. - * + * * @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. @@ -730,14 +609,14 @@ private Mono createOrUpdateAsync( * @return a custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomDomainInner createOrUpdate( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters) { + public CustomDomainInner createOrUpdate(String resourceGroupName, String resourceName, String name, + CustomDomainInner parameters) { return createOrUpdateAsync(resourceGroupName, resourceName, name, parameters).block(); } /** * Create or update a custom domain. - * + * * @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. @@ -749,14 +628,14 @@ public CustomDomainInner createOrUpdate( * @return a custom domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomDomainInner createOrUpdate( - String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context) { + public CustomDomainInner createOrUpdate(String resourceGroupName, String resourceName, String name, + CustomDomainInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, resourceName, name, parameters, context).block(); } /** * Delete a custom domain. - * + * * @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. @@ -766,19 +645,15 @@ public CustomDomainInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String name) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String name) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -792,24 +667,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, name, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a custom domain. - * + * * @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. @@ -820,19 +685,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String name, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String name, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -846,21 +707,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + resourceName, name, this.client.getApiVersion(), accept, context); } /** * Delete a custom domain. - * + * * @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. @@ -870,18 +723,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String resourceName, String name) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String name) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, name); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a custom domain. - * + * * @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. @@ -892,18 +743,17 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String resourceName, String name, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String name, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, name, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a custom domain. - * + * * @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. @@ -919,7 +769,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a custom domain. - * + * * @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. @@ -930,14 +780,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceName, String name, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String name, + Context context) { return this.beginDeleteAsync(resourceGroupName, resourceName, name, context).getSyncPoller(); } /** * Delete a custom domain. - * + * * @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. @@ -948,14 +798,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName, String name) { - return beginDeleteAsync(resourceGroupName, resourceName, name) - .last() + return beginDeleteAsync(resourceGroupName, resourceName, name).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a custom domain. - * + * * @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. @@ -967,14 +816,13 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, name, context) - .last() + return beginDeleteAsync(resourceGroupName, resourceName, name, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a custom domain. - * + * * @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. @@ -989,7 +837,7 @@ public void delete(String resourceGroupName, String resourceName, String name) { /** * Delete a custom domain. - * + * * @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. @@ -1005,9 +853,10 @@ public void delete(String resourceGroupName, String resourceName, String name, C /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1019,31 +868,22 @@ private Mono> listNextSinglePageAsync(String ne 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.")); + 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)) + 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. + * + * 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. @@ -1056,23 +896,13 @@ private Mono> listNextSinglePageAsync(String ne 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.")); + 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)); + 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/WebPubSubCustomDomainsImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsImpl.java index 905763af1bf7..925accd86d01 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsImpl.java @@ -21,31 +21,28 @@ public final class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public WebPubSubCustomDomainsImpl( - WebPubSubCustomDomainsClient innerClient, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + public WebPubSubCustomDomainsImpl(WebPubSubCustomDomainsClient 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 CustomDomainImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CustomDomainImpl(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 CustomDomainImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CustomDomainImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String resourceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, name, context); + public Response getWithResponse(String resourceGroupName, String resourceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CustomDomainImpl(inner.getValue(), this.manager())); } else { return null; @@ -70,105 +67,77 @@ public void delete(String resourceGroupName, String resourceName, String name, C } public CustomDomain getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } - String name = Utils.getValueFromIdByName(id, "customDomains"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "customDomains"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); } return this.getWithResponse(resourceGroupName, resourceName, name, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } - String name = Utils.getValueFromIdByName(id, "customDomains"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "customDomains"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); } return this.getWithResponse(resourceGroupName, resourceName, name, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } - String name = Utils.getValueFromIdByName(id, "customDomains"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "customDomains"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); } this.delete(resourceGroupName, resourceName, name, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } - String name = Utils.getValueFromIdByName(id, "customDomains"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "customDomains"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); } this.delete(resourceGroupName, resourceName, name, context); } 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 01a508586c32..3e4e82137ef7 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 @@ -60,20 +60,16 @@ public WebPubSubHubImpl withExistingWebPubSub(String resourceGroupName, String r } public WebPubSubHub create() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubHubs() - .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubHubs() + .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), Context.NONE); return this; } public WebPubSubHub create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubHubs() - .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubHubs() + .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), context); return this; } @@ -88,49 +84,41 @@ public WebPubSubHubImpl update() { } public WebPubSubHub apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubHubs() - .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubHubs() + .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), Context.NONE); return this; } public WebPubSubHub apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubHubs() - .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubHubs() + .createOrUpdate(hubName, resourceGroupName, resourceName, this.innerModel(), context); return this; } - WebPubSubHubImpl( - WebPubSubHubInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + WebPubSubHubImpl(WebPubSubHubInner innerObject, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.hubName = Utils.getValueFromIdByName(innerObject.id(), "hubs"); - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "webPubSub"); + this.hubName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "hubs"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webPubSub"); } public WebPubSubHub refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubHubs() - .getWithResponse(hubName, resourceGroupName, resourceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubHubs() + .getWithResponse(hubName, resourceGroupName, resourceName, Context.NONE) + .getValue(); return this; } public WebPubSubHub refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubHubs() - .getWithResponse(hubName, resourceGroupName, resourceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubHubs() + .getWithResponse(hubName, resourceGroupName, resourceName, context) + .getValue(); return this; } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsClientImpl.java index c938a84fcc1e..3a56455e350c 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 @@ -38,22 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WebPubSubHubsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubHubsClient. + */ public final class WebPubSubHubsClientImpl implements WebPubSubHubsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebPubSubHubsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of WebPubSubHubsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebPubSubHubsClientImpl(WebPubSubManagementClientImpl client) { - this.service = - RestProxy.create(WebPubSubHubsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WebPubSubHubsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,80 +70,56 @@ public final class WebPubSubHubsClientImpl implements WebPubSubHubsClient { @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface WebPubSubHubsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}") - @ExpectedResponses({200}) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("hubName") String hubName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}") - @ExpectedResponses({200, 201}) + Mono> get(@HostParam("$host") String endpoint, @PathParam("hubName") String hubName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("hubName") String hubName, - @QueryParam("api-version") String apiVersion, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("hubName") String hubName, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") WebPubSubHubInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") WebPubSubHubInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("hubName") String hubName, - @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("hubName") String hubName, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List hub settings. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,16 +130,12 @@ Mono> listNext( @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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -168,32 +146,16 @@ private Mono> listSinglePageAsync(String resour } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List hub settings. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. @@ -203,19 +165,15 @@ private Mono> listSinglePageAsync(String resour * @return hub setting list along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -227,28 +185,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List hub settings. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -258,13 +203,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List hub settings. - * + * * @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. @@ -275,14 +220,13 @@ private PagedFlux listAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List hub settings. - * + * * @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. @@ -297,7 +241,7 @@ public PagedIterable list(String resourceGroupName, String re /** * List hub settings. - * + * * @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. @@ -313,7 +257,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. The name is case insensitive. * @param resourceName The name of the resource. @@ -323,22 +267,18 @@ public PagedIterable list(String resourceGroupName, String re * @return a hub setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String hubName, String resourceGroupName, String resourceName) { + private Mono> getWithResponseAsync(String hubName, String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (hubName == null) { return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -349,24 +289,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - hubName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), hubName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -377,22 +307,18 @@ private Mono> getWithResponseAsync( * @return a hub setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String hubName, String resourceGroupName, String resourceName, Context context) { + private Mono> getWithResponseAsync(String hubName, String resourceGroupName, + String resourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (hubName == null) { return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -403,21 +329,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - hubName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.get(this.client.getEndpoint(), hubName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** * Get a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -434,7 +352,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. The name is case insensitive. * @param resourceName The name of the resource. @@ -445,14 +363,14 @@ private Mono getAsync(String hubName, String resourceGroupNam * @return a hub setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String hubName, String resourceGroupName, String resourceName, Context context) { + public Response getWithResponse(String hubName, String resourceGroupName, String resourceName, + Context context) { return getWithResponseAsync(hubName, resourceGroupName, resourceName, context).block(); } /** * Get a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -468,7 +386,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. The name is case insensitive. * @param resourceName The name of the resource. @@ -479,22 +397,18 @@ public WebPubSubHubInner get(String hubName, String resourceGroupName, String re * @return a hub setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String hubName, String resourceGroupName, + String resourceName, WebPubSubHubInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (hubName == null) { return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -511,24 +425,14 @@ private Mono>> createOrUpdateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - hubName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context)) + context -> service.createOrUpdate(this.client.getEndpoint(), hubName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -540,22 +444,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a hub setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String hubName, String resourceGroupName, + String resourceName, WebPubSubHubInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (hubName == null) { return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -571,22 +471,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - hubName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), hubName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -597,23 +488,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebPubSubHubInner> beginCreateOrUpdateAsync( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(hubName, resourceGroupName, resourceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WebPubSubHubInner.class, - WebPubSubHubInner.class, - this.client.getContext()); + private PollerFlux, WebPubSubHubInner> beginCreateOrUpdateAsync(String hubName, + String resourceGroupName, String resourceName, WebPubSubHubInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(hubName, resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebPubSubHubInner.class, WebPubSubHubInner.class, this.client.getContext()); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -625,20 +510,18 @@ private PollerFlux, WebPubSubHubInner> beginCreate * @return the {@link PollerFlux} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebPubSubHubInner> beginCreateOrUpdateAsync( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) { + private PollerFlux, WebPubSubHubInner> beginCreateOrUpdateAsync(String hubName, + String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(hubName, resourceGroupName, resourceName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), WebPubSubHubInner.class, WebPubSubHubInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(hubName, resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebPubSubHubInner.class, WebPubSubHubInner.class, context); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -649,14 +532,14 @@ private PollerFlux, WebPubSubHubInner> beginCreate * @return the {@link SyncPoller} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebPubSubHubInner> beginCreateOrUpdate( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) { + public SyncPoller, WebPubSubHubInner> beginCreateOrUpdate(String hubName, + String resourceGroupName, String resourceName, WebPubSubHubInner parameters) { return this.beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters).getSyncPoller(); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -668,16 +551,15 @@ public SyncPoller, WebPubSubHubInner> beginCreateO * @return the {@link SyncPoller} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebPubSubHubInner> beginCreateOrUpdate( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) { - return this - .beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters, context) + public SyncPoller, WebPubSubHubInner> beginCreateOrUpdate(String hubName, + String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters, context) .getSyncPoller(); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -688,16 +570,15 @@ public SyncPoller, WebPubSubHubInner> beginCreateO * @return a hub setting on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) { - return beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters) - .last() + private Mono createOrUpdateAsync(String hubName, String resourceGroupName, String resourceName, + WebPubSubHubInner parameters) { + return beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -709,16 +590,15 @@ private Mono createOrUpdateAsync( * @return a hub setting on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) { - return beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters, context) - .last() + private Mono createOrUpdateAsync(String hubName, String resourceGroupName, String resourceName, + WebPubSubHubInner parameters, Context context) { + return beginCreateOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -729,14 +609,14 @@ private Mono createOrUpdateAsync( * @return a hub setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubHubInner createOrUpdate( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters) { + public WebPubSubHubInner createOrUpdate(String hubName, String resourceGroupName, String resourceName, + WebPubSubHubInner parameters) { return createOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters).block(); } /** * Create or update a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -748,14 +628,14 @@ public WebPubSubHubInner createOrUpdate( * @return a hub setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubHubInner createOrUpdate( - String hubName, String resourceGroupName, String resourceName, WebPubSubHubInner parameters, Context context) { + public WebPubSubHubInner createOrUpdate(String hubName, String resourceGroupName, String resourceName, + WebPubSubHubInner parameters, Context context) { return createOrUpdateAsync(hubName, resourceGroupName, resourceName, parameters, context).block(); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -765,22 +645,18 @@ public WebPubSubHubInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String hubName, String resourceGroupName, String resourceName) { + private Mono>> deleteWithResponseAsync(String hubName, String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (hubName == null) { return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -791,24 +667,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - hubName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), hubName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -819,22 +685,18 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String hubName, String resourceGroupName, String resourceName, Context context) { + private Mono>> deleteWithResponseAsync(String hubName, String resourceGroupName, + String resourceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (hubName == null) { return Mono.error(new IllegalArgumentException("Parameter hubName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -845,21 +707,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - hubName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.delete(this.client.getEndpoint(), hubName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -869,18 +723,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String hubName, String resourceGroupName, String resourceName) { + private PollerFlux, Void> beginDeleteAsync(String hubName, String resourceGroupName, + String resourceName) { Mono>> mono = deleteWithResponseAsync(hubName, resourceGroupName, resourceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -891,19 +743,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String hubName, String resourceGroupName, String resourceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String hubName, String resourceGroupName, + String resourceName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(hubName, resourceGroupName, resourceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(hubName, resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -913,14 +764,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String hubName, String resourceGroupName, String resourceName) { + public SyncPoller, Void> beginDelete(String hubName, String resourceGroupName, + String resourceName) { return this.beginDeleteAsync(hubName, resourceGroupName, resourceName).getSyncPoller(); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -931,14 +782,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String hubName, String resourceGroupName, String resourceName, Context context) { + public SyncPoller, Void> beginDelete(String hubName, String resourceGroupName, String resourceName, + Context context) { return this.beginDeleteAsync(hubName, resourceGroupName, resourceName, context).getSyncPoller(); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -949,14 +800,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String hubName, String resourceGroupName, String resourceName) { - return beginDeleteAsync(hubName, resourceGroupName, resourceName) - .last() + return beginDeleteAsync(hubName, resourceGroupName, resourceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -968,14 +818,13 @@ private Mono deleteAsync(String hubName, String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String hubName, String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(hubName, resourceGroupName, resourceName, context) - .last() + return beginDeleteAsync(hubName, resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -990,7 +839,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. The name is case insensitive. * @param resourceName The name of the resource. @@ -1006,9 +855,10 @@ public void delete(String hubName, String resourceGroupName, String resourceName /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1020,31 +870,22 @@ private Mono> listNextSinglePageAsync(String ne 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.")); + 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)) + 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. + * + * 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. @@ -1057,23 +898,13 @@ private Mono> listNextSinglePageAsync(String ne 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.")); + 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)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsImpl.java index 61d85f10f8ac..4bd81bf8c49a 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubsImpl.java @@ -21,31 +21,28 @@ public final class WebPubSubHubsImpl implements WebPubSubHubs { private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public WebPubSubHubsImpl( - WebPubSubHubsClient innerClient, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + public WebPubSubHubsImpl(WebPubSubHubsClient innerClient, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String resourceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new WebPubSubHubImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebPubSubHubImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String resourceName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName, context); - return Utils.mapPage(inner, inner1 -> new WebPubSubHubImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebPubSubHubImpl(inner1, this.manager())); } - public Response getWithResponse( - String hubName, String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(hubName, resourceGroupName, resourceName, context); + public Response getWithResponse(String hubName, String resourceGroupName, String resourceName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(hubName, resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WebPubSubHubImpl(inner.getValue(), this.manager())); } else { return null; @@ -70,105 +67,77 @@ public void delete(String hubName, String resourceGroupName, String resourceName } public WebPubSubHub getById(String id) { - String hubName = Utils.getValueFromIdByName(id, "hubs"); + String hubName = ResourceManagerUtils.getValueFromIdByName(id, "hubs"); if (hubName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); } - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } return this.getWithResponse(hubName, resourceGroupName, resourceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String hubName = Utils.getValueFromIdByName(id, "hubs"); + String hubName = ResourceManagerUtils.getValueFromIdByName(id, "hubs"); if (hubName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); } - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } return this.getWithResponse(hubName, resourceGroupName, resourceName, context); } public void deleteById(String id) { - String hubName = Utils.getValueFromIdByName(id, "hubs"); + String hubName = ResourceManagerUtils.getValueFromIdByName(id, "hubs"); if (hubName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); } - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } this.delete(hubName, resourceGroupName, resourceName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String hubName = Utils.getValueFromIdByName(id, "hubs"); + String hubName = ResourceManagerUtils.getValueFromIdByName(id, "hubs"); if (hubName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); } - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } this.delete(hubName, resourceGroupName, resourceName, context); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubKeysImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubKeysImpl.java index 4177758150dc..f6fbcd9d9fa2 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubKeysImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubKeysImpl.java @@ -12,8 +12,8 @@ public final class WebPubSubKeysImpl implements WebPubSubKeys { private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - WebPubSubKeysImpl( - WebPubSubKeysInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + WebPubSubKeysImpl(WebPubSubKeysInner innerObject, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } 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 71c1681f4deb..9f2a121b0100 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 @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the WebPubSubManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {WebPubSubManagementClientImpl.class}) +/** + * A builder for creating a new instance of the WebPubSubManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { WebPubSubManagementClientImpl.class }) public final class WebPubSubManagementClientBuilder { /* * The ID of the target subscription. The value must be an UUID. @@ -24,7 +26,7 @@ public final class WebPubSubManagementClientBuilder { /** * Sets The ID of the target subscription. The value must be an UUID. - * + * * @param subscriptionId the subscriptionId value. * @return the WebPubSubManagementClientBuilder. */ @@ -40,7 +42,7 @@ public WebPubSubManagementClientBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the WebPubSubManagementClientBuilder. */ @@ -56,7 +58,7 @@ public WebPubSubManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the WebPubSubManagementClientBuilder. */ @@ -72,7 +74,7 @@ public WebPubSubManagementClientBuilder environment(AzureEnvironment environment /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the WebPubSubManagementClientBuilder. */ @@ -88,7 +90,7 @@ public WebPubSubManagementClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the WebPubSubManagementClientBuilder. */ @@ -104,7 +106,7 @@ public WebPubSubManagementClientBuilder defaultPollInterval(Duration defaultPoll /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the WebPubSubManagementClientBuilder. */ @@ -115,30 +117,22 @@ public WebPubSubManagementClientBuilder serializerAdapter(SerializerAdapter seri /** * Builds an instance of WebPubSubManagementClientImpl with the provided parameters. - * + * * @return an instance of WebPubSubManagementClientImpl. */ public WebPubSubManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - WebPubSubManagementClientImpl client = - new WebPubSubManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + WebPubSubManagementClientImpl client = new WebPubSubManagementClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } 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 094d44f1b61a..b71000b9eda2 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.webpubsub.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -31,8 +32,9 @@ 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.WebPubSubReplicaSharedPrivateLinkResourcesClient; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubsClient; +import com.azure.resourcemanager.webpubsub.fluent.WebPubSubSharedPrivateLinkResourcesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -42,195 +44,243 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the WebPubSubManagementClientImpl type. */ +/** + * Initializes a new instance of the WebPubSubManagementClientImpl type. + */ @ServiceClient(builder = WebPubSubManagementClientBuilder.class) public final class WebPubSubManagementClientImpl implements WebPubSubManagementClient { - /** The ID of the target subscription. The value must be an UUID. */ + /** + * The ID of the target subscription. The value must be an UUID. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. The value must be an UUID. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The WebPubSubsClient object to access its operations. */ + /** + * The WebPubSubsClient object to access its operations. + */ private final WebPubSubsClient webPubSubs; /** * Gets the WebPubSubsClient object to access its operations. - * + * * @return the WebPubSubsClient object. */ public WebPubSubsClient getWebPubSubs() { return this.webPubSubs; } - /** The UsagesClient object to access its operations. */ + /** + * The UsagesClient object to access its operations. + */ private final UsagesClient usages; /** * Gets the UsagesClient object to access its operations. - * + * * @return the UsagesClient object. */ public UsagesClient getUsages() { return this.usages; } - /** The WebPubSubCustomCertificatesClient object to access its operations. */ + /** + * The WebPubSubCustomCertificatesClient object to access its operations. + */ private final WebPubSubCustomCertificatesClient webPubSubCustomCertificates; /** * Gets the WebPubSubCustomCertificatesClient object to access its operations. - * + * * @return the WebPubSubCustomCertificatesClient object. */ public WebPubSubCustomCertificatesClient getWebPubSubCustomCertificates() { return this.webPubSubCustomCertificates; } - /** The WebPubSubCustomDomainsClient object to access its operations. */ + /** + * The WebPubSubCustomDomainsClient object to access its operations. + */ private final WebPubSubCustomDomainsClient webPubSubCustomDomains; /** * Gets the WebPubSubCustomDomainsClient object to access its operations. - * + * * @return the WebPubSubCustomDomainsClient object. */ public WebPubSubCustomDomainsClient getWebPubSubCustomDomains() { return this.webPubSubCustomDomains; } - /** The WebPubSubHubsClient object to access its operations. */ + /** + * The WebPubSubHubsClient object to access its operations. + */ private final WebPubSubHubsClient webPubSubHubs; /** * Gets the WebPubSubHubsClient object to access its operations. - * + * * @return the WebPubSubHubsClient object. */ public WebPubSubHubsClient getWebPubSubHubs() { return this.webPubSubHubs; } - /** The WebPubSubPrivateEndpointConnectionsClient object to access its operations. */ + /** + * The WebPubSubPrivateEndpointConnectionsClient object to access its operations. + */ private final WebPubSubPrivateEndpointConnectionsClient webPubSubPrivateEndpointConnections; /** * Gets the WebPubSubPrivateEndpointConnectionsClient object to access its operations. - * + * * @return the WebPubSubPrivateEndpointConnectionsClient object. */ public WebPubSubPrivateEndpointConnectionsClient getWebPubSubPrivateEndpointConnections() { return this.webPubSubPrivateEndpointConnections; } - /** The WebPubSubPrivateLinkResourcesClient object to access its operations. */ + /** + * The WebPubSubPrivateLinkResourcesClient object to access its operations. + */ private final WebPubSubPrivateLinkResourcesClient webPubSubPrivateLinkResources; /** * Gets the WebPubSubPrivateLinkResourcesClient object to access its operations. - * + * * @return the WebPubSubPrivateLinkResourcesClient object. */ public WebPubSubPrivateLinkResourcesClient getWebPubSubPrivateLinkResources() { return this.webPubSubPrivateLinkResources; } - /** The WebPubSubReplicasClient object to access its operations. */ + /** + * 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. */ + /** + * The WebPubSubReplicaSharedPrivateLinkResourcesClient object to access its operations. + */ + private final WebPubSubReplicaSharedPrivateLinkResourcesClient webPubSubReplicaSharedPrivateLinkResources; + + /** + * Gets the WebPubSubReplicaSharedPrivateLinkResourcesClient object to access its operations. + * + * @return the WebPubSubReplicaSharedPrivateLinkResourcesClient object. + */ + public WebPubSubReplicaSharedPrivateLinkResourcesClient getWebPubSubReplicaSharedPrivateLinkResources() { + return this.webPubSubReplicaSharedPrivateLinkResources; + } + + /** + * The WebPubSubSharedPrivateLinkResourcesClient object to access its operations. + */ private final WebPubSubSharedPrivateLinkResourcesClient webPubSubSharedPrivateLinkResources; /** * Gets the WebPubSubSharedPrivateLinkResourcesClient object to access its operations. - * + * * @return the WebPubSubSharedPrivateLinkResourcesClient object. */ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkResources() { @@ -239,7 +289,7 @@ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkRe /** * Initializes an instance of WebPubSubManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -247,19 +297,14 @@ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkRe * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - WebPubSubManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + WebPubSubManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-08-01-preview"; + this.apiVersion = "2024-03-01"; this.operations = new OperationsClientImpl(this); this.webPubSubs = new WebPubSubsClientImpl(this); this.usages = new UsagesClientImpl(this); @@ -269,12 +314,14 @@ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkRe this.webPubSubPrivateEndpointConnections = new WebPubSubPrivateEndpointConnectionsClientImpl(this); this.webPubSubPrivateLinkResources = new WebPubSubPrivateLinkResourcesClientImpl(this); this.webPubSubReplicas = new WebPubSubReplicasClientImpl(this); + this.webPubSubReplicaSharedPrivateLinkResources + = new WebPubSubReplicaSharedPrivateLinkResourcesClientImpl(this); this.webPubSubSharedPrivateLinkResources = new WebPubSubSharedPrivateLinkResourcesClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -283,7 +330,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -293,7 +340,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -303,26 +350,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -335,19 +371,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -388,7 +421,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { 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 0b5c05634189..e0a232e29275 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 @@ -42,24 +42,24 @@ * An instance of this class provides access to all the operations defined in WebPubSubPrivateEndpointConnectionsClient. */ public final class WebPubSubPrivateEndpointConnectionsClientImpl implements WebPubSubPrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebPubSubPrivateEndpointConnectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of WebPubSubPrivateEndpointConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebPubSubPrivateEndpointConnectionsClientImpl(WebPubSubManagementClientImpl client) { - this.service = - RestProxy - .create( - WebPubSubPrivateEndpointConnectionsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(WebPubSubPrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -70,102 +70,76 @@ public final class WebPubSubPrivateEndpointConnectionsClientImpl implements WebP @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface WebPubSubPrivateEndpointConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List private endpoint connections. - * + * * @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 a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -176,32 +150,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List private endpoint connections. - * + * * @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. @@ -209,22 +167,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -236,28 +190,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List private endpoint connections. - * + * * @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. @@ -267,13 +208,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List private endpoint connections. - * + * * @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. @@ -283,16 +224,15 @@ private PagedFlux listAsync(String resourceGroup * @return a list of private endpoint connections as 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), + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List private endpoint connections. - * + * * @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. @@ -307,7 +247,7 @@ public PagedIterable list(String resourceGroupNa /** * List private endpoint connections. - * + * * @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. @@ -317,44 +257,38 @@ public PagedIterable list(String resourceGroupNa * @return a list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); } /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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 specified private endpoint connection along with {@link Response} on successful completion of {@link - * Mono}. + * @return the specified private endpoint connection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + private Mono> getWithResponseAsync(String privateEndpointConnectionName, + String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -365,55 +299,40 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - privateEndpointConnectionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), privateEndpointConnectionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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 specified private endpoint connection along with {@link Response} on successful completion of {@link - * Mono}. + * @return the specified private endpoint connection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { + private Mono> getWithResponseAsync(String privateEndpointConnectionName, + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -424,23 +343,15 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - privateEndpointConnectionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.get(this.client.getEndpoint(), privateEndpointConnectionName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -449,17 +360,17 @@ private Mono> getWithResponseAsync( * @return the specified private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + private Mono getAsync(String privateEndpointConnectionName, + String resourceGroupName, String resourceName) { return getWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -469,16 +380,16 @@ private Mono getAsync( * @return the specified private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { + public Response getWithResponse(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, Context context) { return getWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context).block(); } /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -487,16 +398,16 @@ public Response getWithResponse( * @return the specified private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + public PrivateEndpointConnectionInner get(String privateEndpointConnectionName, String resourceGroupName, + String resourceName) { return getWithResponse(privateEndpointConnectionName, resourceGroupName, resourceName, Context.NONE).getValue(); } /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -504,31 +415,22 @@ public PrivateEndpointConnectionInner get( * @throws 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 private endpoint connection to an azure resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters) { + private Mono> updateWithResponseAsync(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -544,27 +446,17 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - privateEndpointConnectionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), privateEndpointConnectionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -573,32 +465,22 @@ private Mono> updateWithResponseAsync( * @throws 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 private endpoint connection to an azure resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters, - Context context) { + private Mono> updateWithResponseAsync(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -614,24 +496,15 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - privateEndpointConnectionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), privateEndpointConnectionName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); } /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -641,20 +514,17 @@ private Mono> updateWithResponseAsync( * @return a private endpoint connection to an azure resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters) { + private Mono updateAsync(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters) { return updateWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -665,22 +535,17 @@ private Mono updateAsync( * @return a private endpoint connection to an azure resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters, - Context context) { - return updateWithResponseAsync( - privateEndpointConnectionName, resourceGroupName, resourceName, parameters, context) - .block(); + public Response updateWithResponse(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters, Context context) { + return updateWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters, + context).block(); } /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -690,21 +555,17 @@ public Response updateWithResponse( * @return a private endpoint connection to an azure resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner update( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters) { - return updateWithResponse( - privateEndpointConnectionName, resourceGroupName, resourceName, parameters, Context.NONE) - .getValue(); + public PrivateEndpointConnectionInner update(String privateEndpointConnectionName, String resourceGroupName, + String resourceName, PrivateEndpointConnectionInner parameters) { + return updateWithResponse(privateEndpointConnectionName, resourceGroupName, resourceName, parameters, + Context.NONE).getValue(); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -713,25 +574,19 @@ public PrivateEndpointConnectionInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + private Mono>> deleteWithResponseAsync(String privateEndpointConnectionName, + String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -742,26 +597,17 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - privateEndpointConnectionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), privateEndpointConnectionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -771,25 +617,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { + private Mono>> deleteWithResponseAsync(String privateEndpointConnectionName, + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -800,23 +640,15 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - privateEndpointConnectionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.delete(this.client.getEndpoint(), privateEndpointConnectionName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -825,21 +657,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { - Mono>> mono = - deleteWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String privateEndpointConnectionName, + String resourceGroupName, String resourceName) { + Mono>> mono + = deleteWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -849,21 +679,20 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -872,16 +701,16 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + public SyncPoller, Void> beginDelete(String privateEndpointConnectionName, + String resourceGroupName, String resourceName) { return this.beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName).getSyncPoller(); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -891,18 +720,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { - return this - .beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context) + public SyncPoller, Void> beginDelete(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, Context context) { + return this.beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context) .getSyncPoller(); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -911,18 +739,17 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { - return beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName) - .last() + private Mono deleteAsync(String privateEndpointConnectionName, String resourceGroupName, + String resourceName) { + return beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -932,18 +759,17 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context) - .last() + private Mono deleteAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, + Context context) { + return beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -957,9 +783,9 @@ public void delete(String privateEndpointConnectionName, String resourceGroupNam /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -968,21 +794,22 @@ public void delete(String privateEndpointConnectionName, String resourceGroupNam * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { + public void delete(String privateEndpointConnectionName, String resourceGroupName, String resourceName, + Context context) { deleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -990,62 +817,43 @@ private Mono> listNextSinglePageAs 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.")); + 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)) + 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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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/WebPubSubPrivateEndpointConnectionsImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateEndpointConnectionsImpl.java index 771ea5813a46..66e14e717ef0 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateEndpointConnectionsImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateEndpointConnectionsImpl.java @@ -21,47 +21,41 @@ public final class WebPubSubPrivateEndpointConnectionsImpl implements WebPubSubP private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public WebPubSubPrivateEndpointConnectionsImpl( - WebPubSubPrivateEndpointConnectionsClient innerClient, + public WebPubSubPrivateEndpointConnectionsImpl(WebPubSubPrivateEndpointConnectionsClient 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 PrivateEndpointConnectionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(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 PrivateEndpointConnectionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } - public Response getWithResponse( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(privateEndpointConnectionName, resourceGroupName, resourceName, context); + public Response getWithResponse(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(privateEndpointConnectionName, resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnection get( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { - PrivateEndpointConnectionInner inner = - this.serviceClient().get(privateEndpointConnectionName, resourceGroupName, resourceName); + public PrivateEndpointConnection get(String privateEndpointConnectionName, String resourceGroupName, + String resourceName) { + PrivateEndpointConnectionInner inner + = this.serviceClient().get(privateEndpointConnectionName, resourceGroupName, resourceName); if (inner != null) { return new PrivateEndpointConnectionImpl(inner, this.manager()); } else { @@ -69,35 +63,22 @@ public PrivateEndpointConnection get( } } - public Response updateWithResponse( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse( - privateEndpointConnectionName, resourceGroupName, resourceName, parameters, context); + public Response updateWithResponse(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters, Context context) { + Response inner = this.serviceClient() + .updateWithResponse(privateEndpointConnectionName, resourceGroupName, resourceName, parameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnection update( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters) { - PrivateEndpointConnectionInner inner = - this.serviceClient().update(privateEndpointConnectionName, resourceGroupName, resourceName, parameters); + public PrivateEndpointConnection update(String privateEndpointConnectionName, String resourceGroupName, + String resourceName, PrivateEndpointConnectionInner parameters) { + PrivateEndpointConnectionInner inner + = this.serviceClient().update(privateEndpointConnectionName, resourceGroupName, resourceName, parameters); if (inner != null) { return new PrivateEndpointConnectionImpl(inner, this.manager()); } else { @@ -109,8 +90,8 @@ public void delete(String privateEndpointConnectionName, String resourceGroupNam this.serviceClient().delete(privateEndpointConnectionName, resourceGroupName, resourceName); } - public void delete( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { + public void delete(String privateEndpointConnectionName, String resourceGroupName, String resourceName, + Context context) { this.serviceClient().delete(privateEndpointConnectionName, resourceGroupName, resourceName, context); } 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 419408502be2..3e82be961dd7 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 @@ -30,26 +30,28 @@ import com.azure.resourcemanager.webpubsub.models.PrivateLinkResourceList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WebPubSubPrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubPrivateLinkResourcesClient. + */ public final class WebPubSubPrivateLinkResourcesClientImpl implements WebPubSubPrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebPubSubPrivateLinkResourcesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of WebPubSubPrivateLinkResourcesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebPubSubPrivateLinkResourcesClientImpl(WebPubSubManagementClientImpl client) { - this.service = - RestProxy - .create( - WebPubSubPrivateLinkResourcesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(WebPubSubPrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,56 +62,44 @@ public final class WebPubSubPrivateLinkResourcesClientImpl implements WebPubSubP @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface WebPubSubPrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/privateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get the private link resources that need to be created for a 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 private link resources that need to be created for a resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -120,32 +110,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the private link resources that need to be created for a 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. @@ -153,22 +127,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a resource along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -180,72 +150,58 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the private link resources that need to be created for a 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 private link resources that need to be created for a resource as paginated response with {@link - * PagedFlux}. + * @return the private link resources that need to be created for a resource as 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)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get the private link resources that need to be created for a 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 private link resources that need to be created for a resource as paginated response with {@link - * PagedFlux}. + * @return the private link resources that need to be created for a resource as 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), + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get the private link resources that need to be created for a 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 private link resources that need to be created for a resource as paginated response with {@link - * PagedIterable}. + * @return the private link resources that need to be created for a resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String resourceName) { @@ -254,32 +210,33 @@ 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. 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 private link resources that need to be created for a resource as paginated response with {@link - * PagedIterable}. + * @return the private link resources that need to be created for a resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 contains a list of PrivateLinkResource and a possible link to query more results along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return contains a list of PrivateLinkResource and a possible link to query more results along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -287,37 +244,28 @@ private Mono> listNextSinglePageAsync(St 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.")); + 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)) + 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. + * + * 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 contains a list of PrivateLinkResource and a possible link to query more results along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return contains a list of PrivateLinkResource and a possible link to query more results along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -325,23 +273,13 @@ private Mono> listNextSinglePageAsync(St 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.")); + 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)); + 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/WebPubSubPrivateLinkResourcesImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateLinkResourcesImpl.java index 7ad3ec92806f..6737c7cd15de 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateLinkResourcesImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubPrivateLinkResourcesImpl.java @@ -19,8 +19,7 @@ public final class WebPubSubPrivateLinkResourcesImpl implements WebPubSubPrivate private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public WebPubSubPrivateLinkResourcesImpl( - WebPubSubPrivateLinkResourcesClient innerClient, + public WebPubSubPrivateLinkResourcesImpl(WebPubSubPrivateLinkResourcesClient innerClient, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,13 +27,13 @@ public WebPubSubPrivateLinkResourcesImpl( public PagedIterable list(String resourceGroupName, String resourceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(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 PrivateLinkResourceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } private WebPubSubPrivateLinkResourcesClient serviceClient() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicaSharedPrivateLinkResourcesClientImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicaSharedPrivateLinkResourcesClientImpl.java new file mode 100644 index 000000000000..38e4f0fbfe19 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicaSharedPrivateLinkResourcesClientImpl.java @@ -0,0 +1,767 @@ +// 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.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.webpubsub.fluent.WebPubSubReplicaSharedPrivateLinkResourcesClient; +import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; +import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceList; +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 + * WebPubSubReplicaSharedPrivateLinkResourcesClient. + */ +public final class WebPubSubReplicaSharedPrivateLinkResourcesClientImpl + implements WebPubSubReplicaSharedPrivateLinkResourcesClient { + /** + * The proxy service used to perform REST calls. + */ + private final WebPubSubReplicaSharedPrivateLinkResourcesService service; + + /** + * The service client containing this operation class. + */ + private final WebPubSubManagementClientImpl client; + + /** + * Initializes an instance of WebPubSubReplicaSharedPrivateLinkResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WebPubSubReplicaSharedPrivateLinkResourcesClientImpl(WebPubSubManagementClientImpl client) { + this.service = RestProxy.create(WebPubSubReplicaSharedPrivateLinkResourcesService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebPubSubManagementClientWebPubSubReplicaSharedPrivateLinkResources + * to be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebPubSubManagementC") + public interface WebPubSubReplicaSharedPrivateLinkResourcesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/sharedPrivateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/replicas/{replicaName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") + @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, + @PathParam("sharedPrivateLinkResourceName") String sharedPrivateLinkResourceName, + @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}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") + @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, + @PathParam("sharedPrivateLinkResourceName") String sharedPrivateLinkResourceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SharedPrivateLinkResourceInner parameters, + @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 shared private link resources. + * + * @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 list of shared private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, replicaName, 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 shared private link resources. + * + * @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 list of shared private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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 + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + replicaName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List shared private link resources. + * + * @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 list of shared private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, + String replicaName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, replicaName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List shared private link resources. + * + * @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 list of shared private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, + String replicaName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, replicaName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List shared private link resources. + * + * @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 list of shared private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, + String replicaName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, replicaName)); + } + + /** + * List shared private link resources. + * + * @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 list of shared private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, + String replicaName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, replicaName, context)); + } + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String replicaName, String sharedPrivateLinkResourceName) { + 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 (sharedPrivateLinkResourceName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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, sharedPrivateLinkResourceName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String replicaName, String sharedPrivateLinkResourceName, 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 (sharedPrivateLinkResourceName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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, sharedPrivateLinkResourceName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName) { + return getWithResponseAsync(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + context).block(); + } + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedPrivateLinkResourceInner get(String resourceGroupName, String resourceName, String replicaName, + String sharedPrivateLinkResourceName) { + return getWithResponse(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + Context.NONE).getValue(); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 describes a Shared Private Link Resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String replicaName, String sharedPrivateLinkResourceName, + SharedPrivateLinkResourceInner 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 (sharedPrivateLinkResourceName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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, sharedPrivateLinkResourceName, + this.client.getApiVersion(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 describes a Shared Private Link Resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String replicaName, String sharedPrivateLinkResourceName, + SharedPrivateLinkResourceInner 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 (sharedPrivateLinkResourceName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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, sharedPrivateLinkResourceName, this.client.getApiVersion(), parameters, accept, + context); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 {@link PollerFlux} for polling of describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SharedPrivateLinkResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String replicaName, + String sharedPrivateLinkResourceName, SharedPrivateLinkResourceInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + replicaName, sharedPrivateLinkResourceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SharedPrivateLinkResourceInner.class, SharedPrivateLinkResourceInner.class, + this.client.getContext()); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 {@link PollerFlux} for polling of describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SharedPrivateLinkResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, String replicaName, + String sharedPrivateLinkResourceName, SharedPrivateLinkResourceInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + replicaName, sharedPrivateLinkResourceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SharedPrivateLinkResourceInner.class, SharedPrivateLinkResourceInner.class, + context); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 {@link SyncPoller} for polling of describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, String sharedPrivateLinkResourceName, + SharedPrivateLinkResourceInner parameters) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + parameters) + .getSyncPoller(); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 {@link SyncPoller} for polling of describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, String sharedPrivateLinkResourceName, + SharedPrivateLinkResourceInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + parameters, context) + .getSyncPoller(); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 describes a Shared Private Link Resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName, SharedPrivateLinkResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 describes a Shared Private Link Resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName, SharedPrivateLinkResourceInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + parameters, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedPrivateLinkResourceInner createOrUpdate(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName, SharedPrivateLinkResourceInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + parameters).block(); + } + + /** + * Create or update a shared private link 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 sharedPrivateLinkResourceName The name of the shared private link resource. + * @param parameters The shared private link 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 describes a Shared Private Link Resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SharedPrivateLinkResourceInner createOrUpdate(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName, SharedPrivateLinkResourceInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + parameters, 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 a list of shared private link resources 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 a list of shared private link resources 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/WebPubSubReplicaSharedPrivateLinkResourcesImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicaSharedPrivateLinkResourcesImpl.java new file mode 100644 index 000000000000..574b40b07890 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubReplicaSharedPrivateLinkResourcesImpl.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.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.WebPubSubReplicaSharedPrivateLinkResourcesClient; +import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; +import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResource; +import com.azure.resourcemanager.webpubsub.models.WebPubSubReplicaSharedPrivateLinkResources; + +public final class WebPubSubReplicaSharedPrivateLinkResourcesImpl + implements WebPubSubReplicaSharedPrivateLinkResources { + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubReplicaSharedPrivateLinkResourcesImpl.class); + + private final WebPubSubReplicaSharedPrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; + + public WebPubSubReplicaSharedPrivateLinkResourcesImpl(WebPubSubReplicaSharedPrivateLinkResourcesClient innerClient, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String resourceName, + String replicaName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, replicaName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SharedPrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, + String replicaName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, replicaName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SharedPrivateLinkResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SharedPrivateLinkResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SharedPrivateLinkResource get(String resourceGroupName, String resourceName, String replicaName, + String sharedPrivateLinkResourceName) { + SharedPrivateLinkResourceInner inner + = this.serviceClient().get(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName); + if (inner != null) { + return new SharedPrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public SharedPrivateLinkResource getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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))); + } + String sharedPrivateLinkResourceName + = ResourceManagerUtils.getValueFromIdByName(id, "sharedPrivateLinkResources"); + if (sharedPrivateLinkResourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'sharedPrivateLinkResources'.", id))); + } + return this + .getWithResponse(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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))); + } + String sharedPrivateLinkResourceName + = ResourceManagerUtils.getValueFromIdByName(id, "sharedPrivateLinkResources"); + if (sharedPrivateLinkResourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'sharedPrivateLinkResources'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, replicaName, sharedPrivateLinkResourceName, + context); + } + + private WebPubSubReplicaSharedPrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { + return this.serviceManager; + } + + public SharedPrivateLinkResourceImpl define(String name) { + return new SharedPrivateLinkResourceImpl(name, this.manager()); + } +} 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 index ede45c32eeec..3c56fe010289 100644 --- 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 @@ -40,22 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WebPubSubReplicasClient. */ +/** + * 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. */ + /** + * The proxy service used to perform REST calls. + */ private final WebPubSubReplicasService service; - /** The service client containing this operation class. */ + /** + * 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.service + = RestProxy.create(WebPubSubReplicasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -66,111 +72,78 @@ public final class WebPubSubReplicasClientImpl implements WebPubSubReplicasClien @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}) + @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, + 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); + @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}) + @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, + 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); + @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}) + @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, + 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, + @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}) + @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, + 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); + @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}) + @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, + 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, + @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}) + @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, + 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); + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + 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. @@ -181,16 +154,12 @@ Mono> listNext( @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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -201,32 +170,16 @@ private Mono> listSinglePageAsync(String resourceGro } 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)) + .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. @@ -236,19 +189,15 @@ private Mono> listSinglePageAsync(String resourceGro * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -260,28 +209,15 @@ private Mono> listSinglePageAsync( 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(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. @@ -291,13 +227,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + 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. @@ -308,14 +244,13 @@ private PagedFlux listAsync(String resourceGroupName, String resou */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName, 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. @@ -330,7 +265,7 @@ public PagedIterable list(String resourceGroupName, String resourc /** * 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. @@ -346,7 +281,7 @@ public PagedIterable list(String resourceGroupName, String resourc /** * 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. @@ -356,19 +291,15 @@ public PagedIterable list(String resourceGroupName, String resourc * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -382,24 +313,14 @@ private Mono> getWithResponseAsync( } 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)) + .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. @@ -410,19 +331,15 @@ private Mono> getWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -436,21 +353,13 @@ private Mono> getWithResponseAsync( } 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); + 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. @@ -467,7 +376,7 @@ private Mono getAsync(String resourceGroupName, String resourceNam /** * 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. @@ -478,14 +387,14 @@ private Mono getAsync(String resourceGroupName, String resourceNam * @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) { + 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. @@ -501,7 +410,7 @@ public ReplicaInner get(String resourceGroupName, String resourceName, String re /** * 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. @@ -509,23 +418,19 @@ public ReplicaInner get(String resourceGroupName, String resourceName, String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -544,25 +449,14 @@ private Mono>> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -571,23 +465,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -606,22 +496,13 @@ private Mono>> createOrUpdateWithResponseAsync( } 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); + 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. @@ -632,19 +513,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @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()); + 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. @@ -656,20 +535,18 @@ private PollerFlux, ReplicaInner> beginCreateOrUpdateAs * @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) { + 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); + 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. @@ -680,14 +557,14 @@ private PollerFlux, ReplicaInner> beginCreateOrUpdateAs * @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) { + 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. @@ -699,16 +576,15 @@ public SyncPoller, ReplicaInner> beginCreateOrUpdate( * @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) + 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. @@ -719,16 +595,15 @@ public SyncPoller, ReplicaInner> beginCreateOrUpdate( * @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() + 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. @@ -740,16 +615,15 @@ private Mono createOrUpdateAsync( * @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() + 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. @@ -760,14 +634,14 @@ private Mono createOrUpdateAsync( * @return a class represent a replica resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaInner createOrUpdate( - String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + 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. @@ -779,14 +653,14 @@ public ReplicaInner createOrUpdate( * @return a class represent a replica resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaInner createOrUpdate( - String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + 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. @@ -796,19 +670,15 @@ public ReplicaInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String replicaName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -822,24 +692,14 @@ private Mono> deleteWithResponseAsync( } 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)) + .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. @@ -850,19 +710,15 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -876,21 +732,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -906,7 +754,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * 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. @@ -917,14 +765,14 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String replicaName, Context context) { + 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. @@ -939,7 +787,7 @@ public void delete(String resourceGroupName, String resourceName, String replica /** * 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. @@ -947,23 +795,19 @@ public void delete(String resourceGroupName, String resourceName, String 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 class represent a replica resource along with {@link Response} on successful completion of {@link - * Mono}. + * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -982,25 +826,14 @@ private Mono>> updateWithResponseAsync( } 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)) + .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. @@ -1009,23 +842,19 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1044,22 +873,13 @@ private Mono>> updateWithResponseAsync( } 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); + 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. @@ -1070,19 +890,17 @@ private Mono>> updateWithResponseAsync( * @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()); + 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. @@ -1094,20 +912,18 @@ private PollerFlux, ReplicaInner> beginUpdateAsync( * @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) { + 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); + 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. @@ -1118,14 +934,14 @@ private PollerFlux, ReplicaInner> beginUpdateAsync( * @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) { + 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. @@ -1137,14 +953,14 @@ public SyncPoller, ReplicaInner> beginUpdate( * @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) { + 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. @@ -1155,16 +971,15 @@ public SyncPoller, ReplicaInner> beginUpdate( * @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() + 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. @@ -1176,16 +991,15 @@ private Mono updateAsync( * @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() + 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. @@ -1196,14 +1010,14 @@ private Mono updateAsync( * @return a class represent a replica resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaInner update( - String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + 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. @@ -1215,14 +1029,14 @@ public ReplicaInner update( * @return a class represent a replica resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaInner update( - String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + 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. @@ -1232,19 +1046,15 @@ public ReplicaInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync( - String resourceGroupName, String resourceName, String replicaName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1258,24 +1068,14 @@ private Mono>> restartWithResponseAsync( } 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)) + .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. @@ -1286,19 +1086,15 @@ private Mono>> restartWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1312,21 +1108,13 @@ private Mono>> restartWithResponseAsync( } 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); + 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. @@ -1336,18 +1124,16 @@ private Mono>> restartWithResponseAsync( * @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) { + 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()); + 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. @@ -1358,19 +1144,18 @@ private PollerFlux, Void> beginRestartAsync( * @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) { + 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); + 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. @@ -1380,14 +1165,14 @@ private PollerFlux, Void> beginRestartAsync( * @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) { + 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. @@ -1398,14 +1183,14 @@ public SyncPoller, Void> beginRestart( * @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) { + 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. @@ -1416,14 +1201,13 @@ public SyncPoller, Void> beginRestart( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String resourceName, String replicaName) { - return beginRestartAsync(resourceGroupName, resourceName, replicaName) - .last() + 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. @@ -1434,16 +1218,15 @@ private Mono restartAsync(String resourceGroupName, String resourceName, S * @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() + 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. @@ -1458,7 +1241,7 @@ public void restart(String resourceGroupName, String resourceName, String replic /** * 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. @@ -1474,9 +1257,10 @@ public void restart(String resourceGroupName, String resourceName, String replic /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1488,31 +1272,22 @@ private Mono> listNextSinglePageAsync(String nextLin 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.")); + 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)) + 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. + * + * 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. @@ -1525,23 +1300,13 @@ private Mono> listNextSinglePageAsync(String nextLin 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.")); + 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)); + 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 index 6dba7fb39ffe..c6c73680b178 100644 --- 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 @@ -21,31 +21,28 @@ public final class WebPubSubReplicasImpl implements WebPubSubReplicas { private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public WebPubSubReplicasImpl( - WebPubSubReplicasClient innerClient, 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())); + return ResourceManagerUtils.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())); + return ResourceManagerUtils.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); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ReplicaImpl(inner.getValue(), this.manager())); } else { return null; @@ -61,8 +58,8 @@ public Replica get(String resourceGroupName, String resourceName, String replica } } - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String replicaName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String resourceName, String replicaName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, replicaName, context); } @@ -79,105 +76,77 @@ public void restart(String resourceGroupName, String resourceName, String replic } public Replica getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + 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"); + String replicaName = ResourceManagerUtils.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))); + 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"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + 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"); + String replicaName = ResourceManagerUtils.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))); + 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"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + 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"); + String replicaName = ResourceManagerUtils.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))); + 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"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + 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"); + String replicaName = ResourceManagerUtils.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))); + 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); } 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 aea9d3110e3e..239664aca9ee 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 @@ -23,6 +23,7 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubKeys; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubResource; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSocketIOSettings; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; import java.util.Collections; import java.util.List; @@ -103,12 +104,9 @@ public String version() { public List privateEndpointConnections() { List inner = this.innerModel().privateEndpointConnections(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } @@ -117,12 +115,9 @@ public List privateEndpointConnections() { public List sharedPrivateLinkResources() { List inner = this.innerModel().sharedPrivateLinkResources(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new SharedPrivateLinkResourceImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new SharedPrivateLinkResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } @@ -168,6 +163,10 @@ public String resourceStopped() { return this.innerModel().resourceStopped(); } + public WebPubSubSocketIOSettings socketIO() { + return this.innerModel().socketIO(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -198,20 +197,16 @@ public WebPubSubResourceImpl withExistingResourceGroup(String resourceGroupName) } public WebPubSubResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubs() - .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubs() + .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), Context.NONE); return this; } public WebPubSubResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubs() - .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubs() + .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), context); return this; } @@ -226,48 +221,40 @@ public WebPubSubResourceImpl update() { } public WebPubSubResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubs() - .update(resourceGroupName, resourceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubs() + .update(resourceGroupName, resourceName, this.innerModel(), Context.NONE); return this; } public WebPubSubResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubs() - .update(resourceGroupName, resourceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubs() + .update(resourceGroupName, resourceName, this.innerModel(), context); return this; } - WebPubSubResourceImpl( - WebPubSubResourceInner innerObject, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + WebPubSubResourceImpl(WebPubSubResourceInner 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.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "webPubSub"); } public WebPubSubResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubs() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubs() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) + .getValue(); return this; } public WebPubSubResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWebPubSubs() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWebPubSubs() + .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) + .getValue(); return this; } @@ -369,4 +356,9 @@ public WebPubSubResourceImpl withResourceStopped(String resourceStopped) { this.innerModel().withResourceStopped(resourceStopped); return this; } + + public WebPubSubResourceImpl withSocketIO(WebPubSubSocketIOSettings socketIO) { + this.innerModel().withSocketIO(socketIO); + 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 7ce399b986a8..05762ac2726a 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 @@ -42,24 +42,24 @@ * An instance of this class provides access to all the operations defined in WebPubSubSharedPrivateLinkResourcesClient. */ public final class WebPubSubSharedPrivateLinkResourcesClientImpl implements WebPubSubSharedPrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebPubSubSharedPrivateLinkResourcesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of WebPubSubSharedPrivateLinkResourcesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebPubSubSharedPrivateLinkResourcesClientImpl(WebPubSubManagementClientImpl client) { - this.service = - RestProxy - .create( - WebPubSubSharedPrivateLinkResourcesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(WebPubSubSharedPrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -70,102 +70,76 @@ public final class WebPubSubSharedPrivateLinkResourcesClientImpl implements WebP @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface WebPubSubSharedPrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") - @ExpectedResponses({200}) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("sharedPrivateLinkResourceName") String sharedPrivateLinkResourceName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("sharedPrivateLinkResourceName") String sharedPrivateLinkResourceName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @BodyParam("application/json") SharedPrivateLinkResourceInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("sharedPrivateLinkResourceName") String sharedPrivateLinkResourceName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List shared private link resources. - * + * * @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 a list of shared private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -176,32 +150,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List shared private link resources. - * + * * @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. @@ -209,22 +167,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of shared private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String resourceName, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -236,28 +190,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List shared private link resources. - * + * * @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. @@ -267,13 +208,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List shared private link resources. - * + * * @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. @@ -283,16 +224,15 @@ private PagedFlux listAsync(String resourceGroup * @return a list of shared private link resources as 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), + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List shared private link resources. - * + * * @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. @@ -307,7 +247,7 @@ public PagedIterable list(String resourceGroupNa /** * List shared private link resources. - * + * * @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. @@ -317,43 +257,37 @@ public PagedIterable list(String resourceGroupNa * @return a list of shared private link resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String resourceName, Context context) { + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); } /** * 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. 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 specified shared private link resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the specified shared private link resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { + private Mono> getWithResponseAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (sharedPrivateLinkResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sharedPrivateLinkResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -364,24 +298,15 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - sharedPrivateLinkResourceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), sharedPrivateLinkResourceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -389,29 +314,23 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 specified shared private link resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the specified shared private link resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { + private Mono> getWithResponseAsync(String sharedPrivateLinkResourceName, + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (sharedPrivateLinkResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sharedPrivateLinkResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -422,21 +341,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - sharedPrivateLinkResourceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.get(this.client.getEndpoint(), sharedPrivateLinkResourceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -446,15 +357,15 @@ private Mono> getWithResponseAsync( * @return the specified shared private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { + private Mono getAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName) { return getWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -465,14 +376,14 @@ private Mono getAsync( * @return the specified shared private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { + public Response getWithResponse(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, Context context) { return getWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context).block(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -482,14 +393,14 @@ public Response getWithResponse( * @return the specified shared private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SharedPrivateLinkResourceInner get( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { + public SharedPrivateLinkResourceInner get(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName) { return getWithResponse(sharedPrivateLinkResourceName, resourceGroupName, resourceName, Context.NONE).getValue(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -497,32 +408,23 @@ public SharedPrivateLinkResourceInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Shared Private Link Resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return describes a Shared Private Link Resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, SharedPrivateLinkResourceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (sharedPrivateLinkResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sharedPrivateLinkResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -538,25 +440,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - sharedPrivateLinkResourceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), sharedPrivateLinkResourceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, + parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a shared private link resource. - * + * * @param sharedPrivateLinkResourceName The name of the shared private link resource. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -565,33 +457,23 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Shared Private Link Resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return describes a Shared Private Link Resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, SharedPrivateLinkResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (sharedPrivateLinkResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sharedPrivateLinkResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -607,22 +489,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - sharedPrivateLinkResourceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), sharedPrivateLinkResourceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, + accept, context); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -634,26 +508,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SharedPrivateLinkResourceInner> - beginCreateOrUpdateAsync( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, + beginCreateOrUpdateAsync(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, SharedPrivateLinkResourceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SharedPrivateLinkResourceInner.class, - SharedPrivateLinkResourceInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(sharedPrivateLinkResourceName, + resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SharedPrivateLinkResourceInner.class, SharedPrivateLinkResourceInner.class, + this.client.getContext()); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -666,29 +532,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SharedPrivateLinkResourceInner> - beginCreateOrUpdateAsync( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters, - Context context) { + beginCreateOrUpdateAsync(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, + SharedPrivateLinkResourceInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SharedPrivateLinkResourceInner.class, - SharedPrivateLinkResourceInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(sharedPrivateLinkResourceName, + resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SharedPrivateLinkResourceInner.class, SharedPrivateLinkResourceInner.class, + context); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -700,18 +556,15 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, SharedPrivateLinkResourceInner parameters) { - return this - .beginCreateOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters) + return this.beginCreateOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters) .getSyncPoller(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -724,20 +577,17 @@ public SyncPoller, SharedPrivateLinkR */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters, - Context context) { + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, + SharedPrivateLinkResourceInner parameters, Context context) { return this - .beginCreateOrUpdateAsync( - sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, context) + .beginCreateOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, + context) .getSyncPoller(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -748,11 +598,8 @@ public SyncPoller, SharedPrivateLinkR * @return describes a Shared Private Link Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters) { + private Mono createOrUpdateAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, SharedPrivateLinkResourceInner parameters) { return beginCreateOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -760,7 +607,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. The name is case insensitive. * @param resourceName The name of the resource. @@ -772,21 +619,15 @@ private Mono createOrUpdateAsync( * @return describes a Shared Private Link Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, SharedPrivateLinkResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -797,17 +638,14 @@ private Mono createOrUpdateAsync( * @return describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SharedPrivateLinkResourceInner createOrUpdate( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters) { + public SharedPrivateLinkResourceInner createOrUpdate(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, SharedPrivateLinkResourceInner parameters) { return createOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters).block(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -819,19 +657,15 @@ public SharedPrivateLinkResourceInner createOrUpdate( * @return describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SharedPrivateLinkResourceInner createOrUpdate( - String sharedPrivateLinkResourceName, - String resourceGroupName, - String resourceName, - SharedPrivateLinkResourceInner parameters, - Context context) { + public SharedPrivateLinkResourceInner createOrUpdate(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, SharedPrivateLinkResourceInner parameters, Context context) { return createOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, context) .block(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -841,25 +675,19 @@ public SharedPrivateLinkResourceInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { + private Mono>> deleteWithResponseAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (sharedPrivateLinkResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sharedPrivateLinkResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -870,24 +698,15 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - sharedPrivateLinkResourceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), sharedPrivateLinkResourceName, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -898,25 +717,19 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { + private Mono>> deleteWithResponseAsync(String sharedPrivateLinkResourceName, + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (sharedPrivateLinkResourceName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter sharedPrivateLinkResourceName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter sharedPrivateLinkResourceName 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -927,21 +740,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - sharedPrivateLinkResourceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.delete(this.client.getEndpoint(), sharedPrivateLinkResourceName, this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -951,19 +756,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { - Mono>> mono = - deleteWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName) { + Mono>> mono + = deleteWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -974,19 +777,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -996,14 +798,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { + public SyncPoller, Void> beginDelete(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName) { return this.beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName).getSyncPoller(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -1014,16 +816,15 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { - return this - .beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context) + public SyncPoller, Void> beginDelete(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, Context context) { + return this.beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context) .getSyncPoller(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -1033,16 +834,15 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { - return beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName) - .last() + private Mono deleteAsync(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName) { + return beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -1053,16 +853,15 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context) - .last() + private Mono deleteAsync(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, + Context context) { + return beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -1077,7 +876,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. The name is case insensitive. * @param resourceName The name of the resource. @@ -1087,21 +886,22 @@ public void delete(String sharedPrivateLinkResourceName, String resourceGroupNam * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { + public void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, + Context context) { deleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of shared private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1109,62 +909,43 @@ private Mono> listNextSinglePageAs 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.")); + 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)) + 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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of shared private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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/WebPubSubSharedPrivateLinkResourcesImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubSharedPrivateLinkResourcesImpl.java index 05bf3b30cffa..34309b8472ce 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubSharedPrivateLinkResourcesImpl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubSharedPrivateLinkResourcesImpl.java @@ -21,47 +21,41 @@ public final class WebPubSubSharedPrivateLinkResourcesImpl implements WebPubSubS private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public WebPubSubSharedPrivateLinkResourcesImpl( - WebPubSubSharedPrivateLinkResourcesClient innerClient, + public WebPubSubSharedPrivateLinkResourcesImpl(WebPubSubSharedPrivateLinkResourcesClient 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 SharedPrivateLinkResourceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SharedPrivateLinkResourceImpl(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 SharedPrivateLinkResourceImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SharedPrivateLinkResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context); + public Response getWithResponse(String sharedPrivateLinkResourceName, + String resourceGroupName, String resourceName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SharedPrivateLinkResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public SharedPrivateLinkResource get( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { - SharedPrivateLinkResourceInner inner = - this.serviceClient().get(sharedPrivateLinkResourceName, resourceGroupName, resourceName); + public SharedPrivateLinkResource get(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName) { + SharedPrivateLinkResourceInner inner + = this.serviceClient().get(sharedPrivateLinkResourceName, resourceGroupName, resourceName); if (inner != null) { return new SharedPrivateLinkResourceImpl(inner, this.manager()); } else { @@ -69,131 +63,35 @@ public SharedPrivateLinkResource get( } } - public void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { - this.serviceClient().delete(sharedPrivateLinkResourceName, resourceGroupName, resourceName); - } - - public void delete( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { - this.serviceClient().delete(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context); - } - - public SharedPrivateLinkResource getById(String id) { - String sharedPrivateLinkResourceName = Utils.getValueFromIdByName(id, "sharedPrivateLinkResources"); - if (sharedPrivateLinkResourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'sharedPrivateLinkResources'.", - 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))); + public SharedPrivateLinkResource createOrUpdate(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, SharedPrivateLinkResourceInner parameters) { + SharedPrivateLinkResourceInner inner = this.serviceClient() + .createOrUpdate(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters); + if (inner != null) { + return new SharedPrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; } - return this - .getWithResponse(sharedPrivateLinkResourceName, resourceGroupName, resourceName, Context.NONE) - .getValue(); } - public Response getByIdWithResponse(String id, Context context) { - String sharedPrivateLinkResourceName = Utils.getValueFromIdByName(id, "sharedPrivateLinkResources"); - if (sharedPrivateLinkResourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'sharedPrivateLinkResources'.", - 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))); + public SharedPrivateLinkResource createOrUpdate(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, SharedPrivateLinkResourceInner parameters, Context context) { + SharedPrivateLinkResourceInner inner = this.serviceClient() + .createOrUpdate(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, context); + if (inner != null) { + return new SharedPrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context); } - public void deleteById(String id) { - String sharedPrivateLinkResourceName = Utils.getValueFromIdByName(id, "sharedPrivateLinkResources"); - if (sharedPrivateLinkResourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'sharedPrivateLinkResources'.", - id))); - } - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); - if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); - } - this.delete(sharedPrivateLinkResourceName, resourceGroupName, resourceName, Context.NONE); + public void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { + this.serviceClient().delete(sharedPrivateLinkResourceName, resourceGroupName, resourceName); } - public void deleteByIdWithResponse(String id, Context context) { - String sharedPrivateLinkResourceName = Utils.getValueFromIdByName(id, "sharedPrivateLinkResources"); - if (sharedPrivateLinkResourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'sharedPrivateLinkResources'.", - id))); - } - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); - if (resourceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); - } - this.delete(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context); + public void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, + Context context) { + this.serviceClient().delete(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context); } private WebPubSubSharedPrivateLinkResourcesClient serviceClient() { @@ -203,8 +101,4 @@ private WebPubSubSharedPrivateLinkResourcesClient serviceClient() { private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { return this.serviceManager; } - - public SharedPrivateLinkResourceImpl define(String name) { - return new SharedPrivateLinkResourceImpl(name, this.manager()); - } } 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 d552266dc316..2aac4799af46 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 @@ -45,22 +45,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WebPubSubsClient. */ +/** + * An instance of this class provides access to all the operations defined in WebPubSubsClient. + */ public final class WebPubSubsClientImpl implements WebPubSubsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WebPubSubsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final WebPubSubManagementClientImpl client; /** * Initializes an instance of WebPubSubsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WebPubSubsClientImpl(WebPubSubManagementClientImpl client) { - this.service = - RestProxy.create(WebPubSubsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WebPubSubsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -71,223 +77,159 @@ public final class WebPubSubsClientImpl implements WebPubSubsClient { @Host("{$host}") @ServiceInterface(name = "WebPubSubManagementC") public interface WebPubSubsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @PathParam("location") String location, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") NameAvailabilityParameters parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") NameAvailabilityParameters parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/webPubSub") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}") - @ExpectedResponses({200, 201, 202}) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") WebPubSubResourceInner parameters, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") WebPubSubResourceInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}") - @ExpectedResponses({200, 202}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") WebPubSubResourceInner parameters, - @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") WebPubSubResourceInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/listKeys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/listKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/regenerateKey") - @ExpectedResponses({200, 202}) + Mono> listKeys(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/regenerateKey") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKey( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") RegenerateKeyParameters parameters, - @HeaderParam("Accept") String accept, + Mono>> regenerateKey(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @BodyParam("application/json") RegenerateKeyParameters parameters, @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}) + @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, + 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); + @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") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/skus") - @ExpectedResponses({200}) + Mono>> restart(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/skus") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listSkus(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the 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 result of the request to check name availability along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, NameAvailabilityParameters parameters) { + private Mono> checkNameAvailabilityWithResponseAsync(String location, + NameAvailabilityParameters parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -296,23 +238,14 @@ private Mono> checkNameAvailabilityWithResponseA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context)) + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), location, + this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the operation. * @param context The context to associate with this operation. @@ -320,25 +253,21 @@ private Mono> checkNameAvailabilityWithResponseA * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to check name availability along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, NameAvailabilityParameters parameters, Context context) { + private Mono> checkNameAvailabilityWithResponseAsync(String location, + NameAvailabilityParameters parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -347,20 +276,13 @@ private Mono> checkNameAvailabilityWithResponseA } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context); + return service.checkNameAvailability(this.client.getEndpoint(), location, this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context); } /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -369,15 +291,15 @@ private Mono> checkNameAvailabilityWithResponseA * @return result of the request to check name availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String location, NameAvailabilityParameters parameters) { + private Mono checkNameAvailabilityAsync(String location, + NameAvailabilityParameters parameters) { return checkNameAvailabilityWithResponseAsync(location, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the operation. * @param context The context to associate with this operation. @@ -387,14 +309,14 @@ private Mono checkNameAvailabilityAsync( * @return result of the request to check name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters parameters, Context context) { + public Response checkNameAvailabilityWithResponse(String location, + NameAvailabilityParameters parameters, Context context) { return checkNameAvailabilityWithResponseAsync(location, parameters, context).block(); } /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -409,130 +331,97 @@ public NameAvailabilityInner checkNameAvailability(String location, NameAvailabi /** * Handles requests to list all resources in a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of resources and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); } /** * Handles requests to list all resources in a subscription. - * + * * @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 object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of resources and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Handles requests to list all resources in a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Handles requests to list all resources in a subscription. - * + * * @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 object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Handles requests to list all resources in a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -541,13 +430,13 @@ public PagedIterable list() { /** * Handles requests to list all resources in a subscription. - * + * * @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 object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -556,27 +445,23 @@ public PagedIterable list(Context context) { /** * Handles requests to list all resources in a resource group. - * + * * @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. - * @return object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of resources and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -584,53 +469,34 @@ private Mono> listByResourceGroupSinglePag } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** * Handles requests to list all resources in a resource group. - * + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of resources and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -639,68 +505,54 @@ private Mono> listByResourceGroupSinglePag final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Handles requests to list all resources in a resource group. - * + * * @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. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Handles requests to list all resources in a resource group. - * + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Handles requests to list all resources in a resource group. - * + * * @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. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -709,14 +561,14 @@ public PagedIterable listByResourceGroup(String resource /** * Handles requests to list all resources in a resource group. - * + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -725,7 +577,7 @@ public PagedIterable listByResourceGroup(String resource /** * Get the resource and its properties. - * + * * @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. @@ -734,19 +586,15 @@ public PagedIterable listByResourceGroup(String resource * @return the resource and its properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -757,23 +605,14 @@ private Mono> getByResourceGroupWithResponseAsy } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the resource and its properties. - * + * * @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. @@ -783,19 +622,15 @@ private Mono> getByResourceGroupWithResponseAsy * @return the resource and its properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -806,20 +641,13 @@ private Mono> getByResourceGroupWithResponseAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** * Get the resource and its properties. - * + * * @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. @@ -835,7 +663,7 @@ private Mono getByResourceGroupAsync(String resourceGrou /** * Get the resource and its properties. - * + * * @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. @@ -845,14 +673,14 @@ private Mono getByResourceGroupAsync(String resourceGrou * @return the resource and its properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * Get the resource and its properties. - * + * * @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. @@ -867,7 +695,7 @@ public WebPubSubResourceInner getByResourceGroup(String resourceGroupName, Strin /** * Create or update a resource. - * + * * @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. @@ -877,19 +705,15 @@ public WebPubSubResourceInner getByResourceGroup(String resourceGroupName, Strin * @return a class represent a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, WebPubSubResourceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -905,24 +729,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a resource. - * + * * @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. @@ -933,19 +747,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a class represent a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, WebPubSubResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -961,21 +771,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); } /** * Create or update a resource. - * + * * @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. @@ -985,23 +787,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebPubSubResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WebPubSubResourceInner.class, - WebPubSubResourceInner.class, - this.client.getContext()); + private PollerFlux, WebPubSubResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WebPubSubResourceInner.class, WebPubSubResourceInner.class, + this.client.getContext()); } /** * Create or update a resource. - * + * * @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. @@ -1015,21 +812,15 @@ private PollerFlux, WebPubSubResourceInner> b private PollerFlux, WebPubSubResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WebPubSubResourceInner.class, - WebPubSubResourceInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WebPubSubResourceInner.class, WebPubSubResourceInner.class, context); } /** * Create or update a resource. - * + * * @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. @@ -1039,14 +830,14 @@ private PollerFlux, WebPubSubResourceInner> b * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { + public SyncPoller, WebPubSubResourceInner> + beginCreateOrUpdate(String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); } /** * Create or update a resource. - * + * * @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. @@ -1064,7 +855,7 @@ public SyncPoller, WebPubSubResourceInner> be /** * Create or update a resource. - * + * * @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. @@ -1074,16 +865,15 @@ public SyncPoller, WebPubSubResourceInner> be * @return a class represent a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a resource. - * + * * @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. @@ -1094,16 +884,15 @@ private Mono createOrUpdateAsync( * @return a class represent a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a resource. - * + * * @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. @@ -1113,14 +902,14 @@ private Mono createOrUpdateAsync( * @return a class represent a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubResourceInner createOrUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { + public WebPubSubResourceInner createOrUpdate(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters) { return createOrUpdateAsync(resourceGroupName, resourceName, parameters).block(); } /** * Create or update a resource. - * + * * @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. @@ -1131,14 +920,14 @@ public WebPubSubResourceInner createOrUpdate( * @return a class represent a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubResourceInner createOrUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { + public WebPubSubResourceInner createOrUpdate(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, resourceName, parameters, context).block(); } /** * Operation to delete a 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. @@ -1149,16 +938,12 @@ public WebPubSubResourceInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1169,23 +954,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Operation to delete a 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. @@ -1195,19 +971,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + private Mono>> deleteWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1218,20 +990,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); } /** * Operation to delete a 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. @@ -1242,15 +1007,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Operation to delete a 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. @@ -1260,18 +1023,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String resourceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Operation to delete a 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. @@ -1286,7 +1048,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Operation to delete a 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. @@ -1296,14 +1058,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + Context context) { return this.beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** * Operation to delete a 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. @@ -1318,7 +1080,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { /** * Operation to delete a 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. @@ -1329,14 +1091,13 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, context) - .last() + return beginDeleteAsync(resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Operation to delete a 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. @@ -1350,7 +1111,7 @@ public void delete(String resourceGroupName, String resourceName) { /** * Operation to delete a 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. @@ -1365,7 +1126,7 @@ public void delete(String resourceGroupName, String resourceName, Context contex /** * Operation to update an exiting resource. - * + * * @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. @@ -1375,19 +1136,15 @@ public void delete(String resourceGroupName, String resourceName, Context contex * @return a class represent a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1403,24 +1160,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1431,19 +1178,15 @@ private Mono>> updateWithResponseAsync( * @return a class represent a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1459,21 +1202,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, parameters, accept, context); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1483,22 +1218,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebPubSubResourceInner> beginUpdateAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { + private PollerFlux, WebPubSubResourceInner> + beginUpdateAsync(String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, resourceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WebPubSubResourceInner.class, - WebPubSubResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WebPubSubResourceInner.class, WebPubSubResourceInner.class, + this.client.getContext()); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1512,21 +1242,15 @@ private PollerFlux, WebPubSubResourceInner> b private PollerFlux, WebPubSubResourceInner> beginUpdateAsync( String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, resourceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WebPubSubResourceInner.class, - WebPubSubResourceInner.class, - context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WebPubSubResourceInner.class, WebPubSubResourceInner.class, context); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1536,14 +1260,14 @@ private PollerFlux, WebPubSubResourceInner> b * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebPubSubResourceInner> beginUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { + public SyncPoller, WebPubSubResourceInner> beginUpdate(String resourceGroupName, + String resourceName, WebPubSubResourceInner parameters) { return this.beginUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1554,14 +1278,14 @@ public SyncPoller, WebPubSubResourceInner> be * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebPubSubResourceInner> beginUpdate( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { + public SyncPoller, WebPubSubResourceInner> beginUpdate(String resourceGroupName, + String resourceName, WebPubSubResourceInner parameters, Context context) { return this.beginUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1571,16 +1295,15 @@ public SyncPoller, WebPubSubResourceInner> be * @return a class represent a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { - return beginUpdateAsync(resourceGroupName, resourceName, parameters) - .last() + private Mono updateAsync(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters) { + return beginUpdateAsync(resourceGroupName, resourceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1591,16 +1314,15 @@ private Mono updateAsync( * @return a class represent a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, resourceName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, resourceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1610,14 +1332,14 @@ private Mono updateAsync( * @return a class represent a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubResourceInner update( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters) { + public WebPubSubResourceInner update(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters) { return updateAsync(resourceGroupName, resourceName, parameters).block(); } /** * Operation to update an exiting resource. - * + * * @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. @@ -1628,14 +1350,14 @@ public WebPubSubResourceInner update( * @return a class represent a resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubResourceInner update( - String resourceGroupName, String resourceName, WebPubSubResourceInner parameters, Context context) { + public WebPubSubResourceInner update(String resourceGroupName, String resourceName, + WebPubSubResourceInner parameters, Context context) { return updateAsync(resourceGroupName, resourceName, parameters, context).block(); } /** * Get the access keys of the 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. @@ -1644,19 +1366,15 @@ public WebPubSubResourceInner update( * @return the access keys of the resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String resourceName) { + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1667,23 +1385,14 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the access keys of the 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. @@ -1693,19 +1402,15 @@ private Mono> listKeysWithResponseAsync( * @return the access keys of the resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + private Mono> listKeysWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1716,20 +1421,13 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); } /** * Get the access keys of the 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. @@ -1745,7 +1443,7 @@ private Mono listKeysAsync(String resourceGroupName, String /** * Get the access keys of the 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. @@ -1755,14 +1453,14 @@ private Mono listKeysAsync(String resourceGroupName, String * @return the access keys of the resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String resourceName, Context context) { + public Response listKeysWithResponse(String resourceGroupName, String resourceName, + Context context) { return listKeysWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** * Get the access keys of the 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. @@ -1777,7 +1475,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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -1785,22 +1483,18 @@ public WebPubSubKeysInner listKeys(String resourceGroupName, String resourceName * @throws 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 represents the access keys of the resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeyWithResponseAsync( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { + private Mono>> regenerateKeyWithResponseAsync(String resourceGroupName, + String resourceName, RegenerateKeyParameters parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1816,24 +1510,14 @@ private Mono>> regenerateKeyWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .regenerateKey( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context)) + .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -1842,22 +1526,18 @@ private Mono>> regenerateKeyWithResponseAsync( * @throws 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 represents the access keys of the resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeyWithResponseAsync( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context) { + private Mono>> regenerateKeyWithResponseAsync(String resourceGroupName, + String resourceName, RegenerateKeyParameters parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1873,21 +1553,13 @@ private Mono>> regenerateKeyWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .regenerateKey( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - parameters, - accept, - context); + return service.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -1897,23 +1569,17 @@ private Mono>> regenerateKeyWithResponseAsync( * @return the {@link PollerFlux} for polling of a class represents the access keys of the resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WebPubSubKeysInner> beginRegenerateKeyAsync( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { - Mono>> mono = - regenerateKeyWithResponseAsync(resourceGroupName, resourceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WebPubSubKeysInner.class, - WebPubSubKeysInner.class, - this.client.getContext()); + private PollerFlux, WebPubSubKeysInner> + beginRegenerateKeyAsync(String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { + Mono>> mono + = regenerateKeyWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebPubSubKeysInner.class, WebPubSubKeysInner.class, this.client.getContext()); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -1927,17 +1593,15 @@ private PollerFlux, WebPubSubKeysInner> beginRege private PollerFlux, WebPubSubKeysInner> beginRegenerateKeyAsync( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - regenerateKeyWithResponseAsync(resourceGroupName, resourceName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), WebPubSubKeysInner.class, WebPubSubKeysInner.class, context); + Mono>> mono + = regenerateKeyWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WebPubSubKeysInner.class, WebPubSubKeysInner.class, context); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -1947,14 +1611,14 @@ private PollerFlux, WebPubSubKeysInner> beginRege * @return the {@link SyncPoller} for polling of a class represents the access keys of the resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebPubSubKeysInner> beginRegenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { + public SyncPoller, WebPubSubKeysInner> beginRegenerateKey(String resourceGroupName, + String resourceName, RegenerateKeyParameters parameters) { return this.beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -1965,14 +1629,14 @@ public SyncPoller, WebPubSubKeysInner> beginRegen * @return the {@link SyncPoller} for polling of a class represents the access keys of the resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WebPubSubKeysInner> beginRegenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context) { + public SyncPoller, WebPubSubKeysInner> beginRegenerateKey(String resourceGroupName, + String resourceName, RegenerateKeyParameters parameters, Context context) { return this.beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -1982,16 +1646,15 @@ public SyncPoller, WebPubSubKeysInner> beginRegen * @return a class represents the access keys of the resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeyAsync( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { - return beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters) - .last() + private Mono regenerateKeyAsync(String resourceGroupName, String resourceName, + RegenerateKeyParameters parameters) { + return beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -2002,16 +1665,15 @@ private Mono regenerateKeyAsync( * @return a class represents the access keys of the resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeyAsync( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context) { - return beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters, context) - .last() + private Mono regenerateKeyAsync(String resourceGroupName, String resourceName, + RegenerateKeyParameters parameters, Context context) { + return beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -2021,14 +1683,14 @@ private Mono regenerateKeyAsync( * @return a class represents the access keys of the resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubKeysInner regenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { + public WebPubSubKeysInner regenerateKey(String resourceGroupName, String resourceName, + RegenerateKeyParameters parameters) { return regenerateKeyAsync(resourceGroupName, resourceName, parameters).block(); } /** * 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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -2039,14 +1701,14 @@ public WebPubSubKeysInner regenerateKey( * @return a class represents the access keys of the resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubKeysInner regenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context) { + public WebPubSubKeysInner regenerateKey(String resourceGroupName, String resourceName, + RegenerateKeyParameters parameters, Context context) { 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. @@ -2056,19 +1718,15 @@ public WebPubSubKeysInner regenerateKey( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2082,24 +1740,14 @@ private Mono> listReplicaSkusWithResponseAsync( } 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)) + .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. @@ -2110,19 +1758,15 @@ private Mono> listReplicaSkusWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2136,21 +1780,13 @@ private Mono> listReplicaSkusWithResponseAsync( } 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); + 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. @@ -2167,7 +1803,7 @@ private Mono listReplicaSkusAsync(String resourceGroupName, String /** * 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. @@ -2178,14 +1814,14 @@ private Mono listReplicaSkusAsync(String resourceGroupName, String * @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) { + 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. @@ -2201,7 +1837,7 @@ public SkuListInner listReplicaSkus(String resourceGroupName, String resourceNam /** * Operation to restart a 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. @@ -2212,16 +1848,12 @@ public SkuListInner listReplicaSkus(String resourceGroupName, String resourceNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2232,23 +1864,14 @@ private Mono>> restartWithResponseAsync(String resourc } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .restart( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Operation to restart a 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. @@ -2258,19 +1881,15 @@ private Mono>> restartWithResponseAsync(String resourc * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + private Mono>> restartWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2281,20 +1900,13 @@ private Mono>> restartWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .restart( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.restart(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); } /** * Operation to restart a 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. @@ -2305,15 +1917,13 @@ private Mono>> restartWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String resourceName) { Mono>> mono = restartWithResponseAsync(resourceGroupName, resourceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Operation to restart a 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. @@ -2323,18 +1933,17 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync( - String resourceGroupName, String resourceName, Context context) { + private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String resourceName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = restartWithResponseAsync(resourceGroupName, resourceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Operation to restart a 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. @@ -2349,7 +1958,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, /** * Operation to restart a 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. @@ -2359,14 +1968,14 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart( - String resourceGroupName, String resourceName, Context context) { + public SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName, + Context context) { return this.beginRestartAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** * Operation to restart a 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. @@ -2381,7 +1990,7 @@ private Mono restartAsync(String resourceGroupName, String resourceName) { /** * Operation to restart a 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. @@ -2392,14 +2001,13 @@ private Mono restartAsync(String resourceGroupName, String resourceName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String resourceName, Context context) { - return beginRestartAsync(resourceGroupName, resourceName, context) - .last() + return beginRestartAsync(resourceGroupName, resourceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Operation to restart a 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. @@ -2413,7 +2021,7 @@ public void restart(String resourceGroupName, String resourceName) { /** * Operation to restart a 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. @@ -2428,7 +2036,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. The name is case insensitive. * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2439,16 +2047,12 @@ public void restart(String resourceGroupName, String resourceName, Context conte @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2459,23 +2063,14 @@ private Mono> listSkusWithResponseAsync(String resourceGr } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSkus( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context)) + .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all available skus of the resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. @@ -2485,19 +2080,15 @@ private Mono> listSkusWithResponseAsync(String resourceGr * @return the list skus operation response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusWithResponseAsync( - String resourceGroupName, String resourceName, Context context) { + private Mono> listSkusWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2508,20 +2099,13 @@ private Mono> listSkusWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSkus( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - accept, - context); + return service.listSkus(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); } /** * List all available skus of the resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2537,7 +2121,7 @@ private Mono listSkusAsync(String resourceGroupName, String resour /** * List all available skus of the 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. @@ -2553,7 +2137,7 @@ public Response listSkusWithResponse(String resourceGroupName, Str /** * List all available skus of the 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. @@ -2568,14 +2152,15 @@ public SkuListInner listSkus(String resourceGroupName, String resourceName) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of resources and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2583,76 +2168,59 @@ private Mono> listBySubscriptionNextSingle 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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 object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of resources and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of resources and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2660,63 +2228,45 @@ private Mono> listByResourceGroupNextSingl 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.")); + 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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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 object that includes an array of resources and a possible link for next set along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return object that includes an array of resources and a possible link for next set along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(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.")); + 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 - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(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/WebPubSubsImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubsImpl.java index 498cec76be26..d57387afa44a 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 @@ -29,21 +29,18 @@ public final class WebPubSubsImpl implements WebPubSubs { private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; - public WebPubSubsImpl( - WebPubSubsClient innerClient, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + public WebPubSubsImpl(WebPubSubsClient innerClient, + com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters parameters, Context context) { - Response inner = - this.serviceClient().checkNameAvailabilityWithResponse(location, parameters, context); + public Response checkNameAvailabilityWithResponse(String location, + NameAvailabilityParameters parameters, Context context) { + Response inner + = this.serviceClient().checkNameAvailabilityWithResponse(location, parameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new NameAvailabilityImpl(inner.getValue(), this.manager())); } else { return null; @@ -61,34 +58,31 @@ public NameAvailability checkNameAvailability(String location, NameAvailabilityP public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WebPubSubResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -112,15 +106,12 @@ public void delete(String resourceGroupName, String resourceName, Context contex this.serviceClient().delete(resourceGroupName, resourceName, context); } - public Response listKeysWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, resourceName, context); + public Response listKeysWithResponse(String resourceGroupName, String resourceName, + Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WebPubSubKeysImpl(inner.getValue(), this.manager())); } else { return null; @@ -136,8 +127,8 @@ public WebPubSubKeys listKeys(String resourceGroupName, String resourceName) { } } - public WebPubSubKeys regenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { + public WebPubSubKeys regenerateKey(String resourceGroupName, String resourceName, + RegenerateKeyParameters parameters) { WebPubSubKeysInner inner = this.serviceClient().regenerateKey(resourceGroupName, resourceName, parameters); if (inner != null) { return new WebPubSubKeysImpl(inner, this.manager()); @@ -146,10 +137,10 @@ public WebPubSubKeys regenerateKey( } } - public WebPubSubKeys regenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context) { - WebPubSubKeysInner inner = - this.serviceClient().regenerateKey(resourceGroupName, resourceName, parameters, context); + public WebPubSubKeys regenerateKey(String resourceGroupName, String resourceName, + RegenerateKeyParameters parameters, Context context) { + WebPubSubKeysInner inner + = this.serviceClient().regenerateKey(resourceGroupName, resourceName, parameters, context); if (inner != null) { return new WebPubSubKeysImpl(inner, this.manager()); } else { @@ -157,15 +148,12 @@ public WebPubSubKeys regenerateKey( } } - public Response listReplicaSkusWithResponse( - String resourceGroupName, String resourceName, String replicaName, Context context) { - Response inner = - this.serviceClient().listReplicaSkusWithResponse(resourceGroupName, resourceName, replicaName, context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SkuListImpl(inner.getValue(), this.manager())); } else { return null; @@ -190,13 +178,10 @@ public void restart(String resourceGroupName, String resourceName, Context conte } public Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().listSkusWithResponse(resourceGroupName, resourceName, context); + Response inner + = this.serviceClient().listSkusWithResponse(resourceGroupName, resourceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SkuListImpl(inner.getValue(), this.manager())); } else { return null; @@ -213,77 +198,57 @@ public SkuList listSkus(String resourceGroupName, String resourceName) { } public WebPubSubResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } this.delete(resourceGroupName, resourceName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String resourceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); } this.delete(resourceGroupName, resourceName, context); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/package-info.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/package-info.java index f4380b86ca23..20a6d6b7f145 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/package-info.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for WebPubSubManagementClient. REST API for Azure WebPubSub Service. */ +/** + * Package containing the implementations for WebPubSubManagementClient. + * REST API for Azure WebPubSub Service. + */ package com.azure.resourcemanager.webpubsub.implementation; diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/AclAction.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/AclAction.java index 7491a72b57b1..4ed4587549ed 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/AclAction.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/AclAction.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Azure Networking ACL Action. */ +/** + * Azure Networking ACL Action. + */ public final class AclAction extends ExpandableStringEnum { - /** Static value Allow for AclAction. */ + /** + * Static value Allow for AclAction. + */ public static final AclAction ALLOW = fromString("Allow"); - /** Static value Deny for AclAction. */ + /** + * Static value Deny for AclAction. + */ public static final AclAction DENY = fromString("Deny"); /** * Creates a new instance of AclAction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AclAction() { /** * Creates or finds a AclAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding AclAction. */ @@ -38,7 +44,7 @@ public static AclAction fromString(String name) { /** * Gets known AclAction values. - * + * * @return known AclAction values. */ public static Collection values() { 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 bc87b072d358..9e0c1ce46339 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 @@ -8,98 +8,104 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.webpubsub.fluent.models.CustomCertificateInner; -/** An immutable client-side representation of CustomCertificate. */ +/** + * An immutable client-side representation of CustomCertificate. + */ public interface CustomCertificate { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the keyVaultBaseUri property: Base uri of the KeyVault that stores certificate. - * + * * @return the keyVaultBaseUri value. */ String keyVaultBaseUri(); /** * Gets the keyVaultSecretName property: Certificate secret name. - * + * * @return the keyVaultSecretName value. */ String keyVaultSecretName(); /** * Gets the keyVaultSecretVersion property: Certificate secret version. - * + * * @return the keyVaultSecretVersion value. */ String keyVaultSecretVersion(); /** * 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.CustomCertificateInner object. - * + * * @return the inner object. */ CustomCertificateInner innerModel(); - /** The entirety of the CustomCertificate definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithKeyVaultBaseUri, - DefinitionStages.WithKeyVaultSecretName, - DefinitionStages.WithCreate { + /** + * The entirety of the CustomCertificate definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithKeyVaultBaseUri, DefinitionStages.WithKeyVaultSecretName, DefinitionStages.WithCreate { } - /** The CustomCertificate definition stages. */ + /** + * The CustomCertificate definition stages. + */ interface DefinitionStages { - /** The first stage of the CustomCertificate definition. */ + /** + * The first stage of the CustomCertificate definition. + */ interface Blank extends WithParentResource { } - /** The stage of the CustomCertificate definition allowing to specify parent resource. */ + /** + * The stage of the CustomCertificate 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. @@ -107,22 +113,26 @@ interface WithParentResource { WithKeyVaultBaseUri withExistingWebPubSub(String resourceGroupName, String resourceName); } - /** The stage of the CustomCertificate definition allowing to specify keyVaultBaseUri. */ + /** + * The stage of the CustomCertificate definition allowing to specify keyVaultBaseUri. + */ interface WithKeyVaultBaseUri { /** * Specifies the keyVaultBaseUri property: Base uri of the KeyVault that stores certificate.. - * + * * @param keyVaultBaseUri Base uri of the KeyVault that stores certificate. * @return the next definition stage. */ WithKeyVaultSecretName withKeyVaultBaseUri(String keyVaultBaseUri); } - /** The stage of the CustomCertificate definition allowing to specify keyVaultSecretName. */ + /** + * The stage of the CustomCertificate definition allowing to specify keyVaultSecretName. + */ interface WithKeyVaultSecretName { /** * Specifies the keyVaultSecretName property: Certificate secret name.. - * + * * @param keyVaultSecretName Certificate secret name. * @return the next definition stage. */ @@ -136,25 +146,27 @@ interface WithKeyVaultSecretName { interface WithCreate extends DefinitionStages.WithKeyVaultSecretVersion { /** * Executes the create request. - * + * * @return the created resource. */ CustomCertificate create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ CustomCertificate create(Context context); } - /** The stage of the CustomCertificate definition allowing to specify keyVaultSecretVersion. */ + /** + * The stage of the CustomCertificate definition allowing to specify keyVaultSecretVersion. + */ interface WithKeyVaultSecretVersion { /** * Specifies the keyVaultSecretVersion property: Certificate secret version.. - * + * * @param keyVaultSecretVersion Certificate secret version. * @return the next definition stage. */ @@ -164,43 +176,47 @@ interface WithKeyVaultSecretVersion { /** * Begins update for the CustomCertificate resource. - * + * * @return the stage of resource update. */ CustomCertificate.Update update(); - /** The template for CustomCertificate update. */ + /** + * The template for CustomCertificate update. + */ interface Update { /** * Executes the update request. - * + * * @return the updated resource. */ CustomCertificate apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ CustomCertificate apply(Context context); } - /** The CustomCertificate update stages. */ + /** + * The CustomCertificate update stages. + */ interface UpdateStages { } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CustomCertificate refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificateList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificateList.java index f50a7fab356b..96bff8acd784 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificateList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificateList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Custom certificates list. */ +/** + * Custom certificates list. + */ @Fluent public final class CustomCertificateList { /* @@ -25,13 +27,15 @@ public final class CustomCertificateList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CustomCertificateList class. */ + /** + * Creates an instance of CustomCertificateList class. + */ public CustomCertificateList() { } /** * Get the value property: List of custom certificates of this resource. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of custom certificates of this resource. - * + * * @param value the value value to set. * @return the CustomCertificateList object itself. */ @@ -50,9 +54,9 @@ public CustomCertificateList withValue(List value) { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -60,9 +64,9 @@ public String 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. - * + * 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 CustomCertificateList object itself. */ @@ -73,7 +77,7 @@ public CustomCertificateList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java index fa5c1e7c7083..26caa91060bb 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 @@ -8,91 +8,97 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; -/** An immutable client-side representation of CustomDomain. */ +/** + * An immutable client-side representation of CustomDomain. + */ public interface CustomDomain { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the domainName property: The custom domain name. - * + * * @return the domainName value. */ String domainName(); /** * Gets the customCertificate property: Reference to a resource. - * + * * @return the customCertificate value. */ ResourceReference customCertificate(); /** * 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.CustomDomainInner object. - * + * * @return the inner object. */ CustomDomainInner innerModel(); - /** The entirety of the CustomDomain definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithDomainName, - DefinitionStages.WithCustomCertificate, - DefinitionStages.WithCreate { + /** + * The entirety of the CustomDomain definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithDomainName, DefinitionStages.WithCustomCertificate, DefinitionStages.WithCreate { } - /** The CustomDomain definition stages. */ + /** + * The CustomDomain definition stages. + */ interface DefinitionStages { - /** The first stage of the CustomDomain definition. */ + /** + * The first stage of the CustomDomain definition. + */ interface Blank extends WithParentResource { } - /** The stage of the CustomDomain definition allowing to specify parent resource. */ + /** + * The stage of the CustomDomain 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. @@ -100,22 +106,26 @@ interface WithParentResource { WithDomainName withExistingWebPubSub(String resourceGroupName, String resourceName); } - /** The stage of the CustomDomain definition allowing to specify domainName. */ + /** + * The stage of the CustomDomain definition allowing to specify domainName. + */ interface WithDomainName { /** * Specifies the domainName property: The custom domain name.. - * + * * @param domainName The custom domain name. * @return the next definition stage. */ WithCustomCertificate withDomainName(String domainName); } - /** The stage of the CustomDomain definition allowing to specify customCertificate. */ + /** + * The stage of the CustomDomain definition allowing to specify customCertificate. + */ interface WithCustomCertificate { /** * Specifies the customCertificate property: Reference to a resource.. - * + * * @param customCertificate Reference to a resource. * @return the next definition stage. */ @@ -129,14 +139,14 @@ interface WithCustomCertificate { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ CustomDomain create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ @@ -146,47 +156,55 @@ interface WithCreate { /** * Begins update for the CustomDomain resource. - * + * * @return the stage of resource update. */ CustomDomain.Update update(); - /** The template for CustomDomain update. */ + /** + * The template for CustomDomain update. + */ interface Update extends UpdateStages.WithDomainName, UpdateStages.WithCustomCertificate { /** * Executes the update request. - * + * * @return the updated resource. */ CustomDomain apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ CustomDomain apply(Context context); } - /** The CustomDomain update stages. */ + /** + * The CustomDomain update stages. + */ interface UpdateStages { - /** The stage of the CustomDomain update allowing to specify domainName. */ + /** + * The stage of the CustomDomain update allowing to specify domainName. + */ interface WithDomainName { /** * Specifies the domainName property: The custom domain name.. - * + * * @param domainName The custom domain name. * @return the next definition stage. */ Update withDomainName(String domainName); } - /** The stage of the CustomDomain update allowing to specify customCertificate. */ + /** + * The stage of the CustomDomain update allowing to specify customCertificate. + */ interface WithCustomCertificate { /** * Specifies the customCertificate property: Reference to a resource.. - * + * * @param customCertificate Reference to a resource. * @return the next definition stage. */ @@ -196,14 +214,14 @@ interface WithCustomCertificate { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CustomDomain refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomainList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomainList.java index 64993b405210..d496ae72038b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomainList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomainList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Custom domains list. */ +/** + * Custom domains list. + */ @Fluent public final class CustomDomainList { /* @@ -25,13 +27,15 @@ public final class CustomDomainList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of CustomDomainList class. */ + /** + * Creates an instance of CustomDomainList class. + */ public CustomDomainList() { } /** * Get the value property: List of custom domains that bind to this resource. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of custom domains that bind to this resource. - * + * * @param value the value value to set. * @return the CustomDomainList object itself. */ @@ -50,9 +54,9 @@ public CustomDomainList withValue(List value) { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -60,9 +64,9 @@ public String 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. - * + * 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 CustomDomainList object itself. */ @@ -73,7 +77,7 @@ public CustomDomainList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Dimension.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Dimension.java index 3146d5272e8e..3d5b1a093679 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Dimension.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Dimension.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifications of the Dimension of metrics. */ +/** + * Specifications of the Dimension of metrics. + */ @Fluent public final class Dimension { /* @@ -34,13 +36,15 @@ public final class Dimension { @JsonProperty(value = "toBeExportedForShoebox") private Boolean toBeExportedForShoebox; - /** Creates an instance of Dimension class. */ + /** + * Creates an instance of Dimension class. + */ public Dimension() { } /** * Get the name property: The public facing name of the dimension. - * + * * @return the name value. */ public String name() { @@ -49,7 +53,7 @@ public String name() { /** * Set the name property: The public facing name of the dimension. - * + * * @param name the name value to set. * @return the Dimension object itself. */ @@ -60,7 +64,7 @@ public Dimension withName(String name) { /** * Get the displayName property: Localized friendly display name of the dimension. - * + * * @return the displayName value. */ public String displayName() { @@ -69,7 +73,7 @@ public String displayName() { /** * Set the displayName property: Localized friendly display name of the dimension. - * + * * @param displayName the displayName value to set. * @return the Dimension object itself. */ @@ -80,7 +84,7 @@ public Dimension withDisplayName(String displayName) { /** * Get the internalName property: Name of the dimension as it appears in MDM. - * + * * @return the internalName value. */ public String internalName() { @@ -89,7 +93,7 @@ public String internalName() { /** * Set the internalName property: Name of the dimension as it appears in MDM. - * + * * @param internalName the internalName value to set. * @return the Dimension object itself. */ @@ -101,7 +105,7 @@ public Dimension withInternalName(String internalName) { /** * Get the toBeExportedForShoebox property: A Boolean flag indicating whether this dimension should be included for * the shoebox export scenario. - * + * * @return the toBeExportedForShoebox value. */ public Boolean toBeExportedForShoebox() { @@ -111,7 +115,7 @@ public Boolean toBeExportedForShoebox() { /** * Set the toBeExportedForShoebox property: A Boolean flag indicating whether this dimension should be included for * the shoebox export scenario. - * + * * @param toBeExportedForShoebox the toBeExportedForShoebox value to set. * @return the Dimension object itself. */ @@ -122,7 +126,7 @@ public Dimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandler.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandler.java index 26926efa09c8..2cf0eb252cf9 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandler.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHandler.java @@ -9,12 +9,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of event handler. */ +/** + * Properties of event handler. + */ @Fluent public final class EventHandler { /* - * Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the - * template, the value of the EventHandler URL is dynamically calculated when the client request comes in. + * Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in. * For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters. */ @JsonProperty(value = "urlTemplate", required = true) @@ -23,9 +24,9 @@ public final class EventHandler { /* * Gets or sets the matching pattern for event names. * There are 3 kinds of patterns supported: - * 1. "*", it matches any event name - * 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2" - * 3. A single event name, for example, "event1", it matches "event1" + * 1. "*", it matches any event name + * 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2" + * 3. A single event name, for example, "event1", it matches "event1" */ @JsonProperty(value = "userEventPattern") private String userEventPattern; @@ -42,16 +43,18 @@ public final class EventHandler { @JsonProperty(value = "auth") private UpstreamAuthSettings auth; - /** Creates an instance of EventHandler class. */ + /** + * Creates an instance of EventHandler class. + */ public EventHandler() { } /** * Get the urlTemplate property: Gets or sets the EventHandler URL template. You can use a predefined parameter * {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the - * client request comes in. For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part - * can't contains parameters. - * + * client request comes in. + * For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters. + * * @return the urlTemplate value. */ public String urlTemplate() { @@ -61,9 +64,9 @@ public String urlTemplate() { /** * Set the urlTemplate property: Gets or sets the EventHandler URL template. You can use a predefined parameter * {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the - * client request comes in. For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part - * can't contains parameters. - * + * client request comes in. + * For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters. + * * @param urlTemplate the urlTemplate value to set. * @return the EventHandler object itself. */ @@ -73,11 +76,12 @@ public EventHandler withUrlTemplate(String urlTemplate) { } /** - * Get the userEventPattern property: Gets or sets the matching pattern for event names. There are 3 kinds of - * patterns supported: 1. "*", it matches any event name 2. Combine multiple events with ",", for example - * "event1,event2", it matches event "event1" and "event2" 3. A single event name, for example, "event1", it matches - * "event1". - * + * Get the userEventPattern property: Gets or sets the matching pattern for event names. + * There are 3 kinds of patterns supported: + * 1. "*", it matches any event name + * 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2" + * 3. A single event name, for example, "event1", it matches "event1". + * * @return the userEventPattern value. */ public String userEventPattern() { @@ -85,11 +89,12 @@ public String userEventPattern() { } /** - * Set the userEventPattern property: Gets or sets the matching pattern for event names. There are 3 kinds of - * patterns supported: 1. "*", it matches any event name 2. Combine multiple events with ",", for example - * "event1,event2", it matches event "event1" and "event2" 3. A single event name, for example, "event1", it matches - * "event1". - * + * Set the userEventPattern property: Gets or sets the matching pattern for event names. + * There are 3 kinds of patterns supported: + * 1. "*", it matches any event name + * 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2" + * 3. A single event name, for example, "event1", it matches "event1". + * * @param userEventPattern the userEventPattern value to set. * @return the EventHandler object itself. */ @@ -100,7 +105,7 @@ public EventHandler withUserEventPattern(String userEventPattern) { /** * Get the systemEvents property: Gets or sets the list of system events. - * + * * @return the systemEvents value. */ public List systemEvents() { @@ -109,7 +114,7 @@ public List systemEvents() { /** * Set the systemEvents property: Gets or sets the list of system events. - * + * * @param systemEvents the systemEvents value to set. * @return the EventHandler object itself. */ @@ -120,7 +125,7 @@ public EventHandler withSystemEvents(List systemEvents) { /** * Get the auth property: Upstream auth settings. If not set, no auth is used for upstream messages. - * + * * @return the auth value. */ public UpstreamAuthSettings auth() { @@ -129,7 +134,7 @@ public UpstreamAuthSettings auth() { /** * Set the auth property: Upstream auth settings. If not set, no auth is used for upstream messages. - * + * * @param auth the auth value to set. * @return the EventHandler object itself. */ @@ -140,14 +145,13 @@ public EventHandler withAuth(UpstreamAuthSettings auth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (urlTemplate() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property urlTemplate in model EventHandler")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property urlTemplate in model EventHandler")); } if (auth() != null) { auth().validate(); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHubEndpoint.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHubEndpoint.java index 30e6a9398c7b..91698b3422b9 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHubEndpoint.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHubEndpoint.java @@ -7,17 +7,26 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** - * An Event Hub endpoint. The managed identity of Web PubSub service must be enabled, and the identity should have the - * "Azure Event Hubs Data sender" role to access Event Hub. + * An Event Hub endpoint. + * The managed identity of Web PubSub service must be enabled, and the identity should have the "Azure Event Hubs Data + * sender" role to access Event Hub. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = EventHubEndpoint.class, visible = true) @JsonTypeName("EventHub") @Fluent public final class EventHubEndpoint extends EventListenerEndpoint { + /* + * The type property. + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private EventListenerEndpointDiscriminator type = EventListenerEndpointDiscriminator.EVENT_HUB; + /* * The fully qualified namespace name of the Event Hub resource. For example, "example.servicebus.windows.net". */ @@ -30,14 +39,26 @@ public final class EventHubEndpoint extends EventListenerEndpoint { @JsonProperty(value = "eventHubName", required = true) private String eventHubName; - /** Creates an instance of EventHubEndpoint class. */ + /** + * Creates an instance of EventHubEndpoint class. + */ public EventHubEndpoint() { } + /** + * Get the type property: The type property. + * + * @return the type value. + */ + @Override + public EventListenerEndpointDiscriminator type() { + return this.type; + } + /** * Get the fullyQualifiedNamespace property: The fully qualified namespace name of the Event Hub resource. For * example, "example.servicebus.windows.net". - * + * * @return the fullyQualifiedNamespace value. */ public String fullyQualifiedNamespace() { @@ -47,7 +68,7 @@ public String fullyQualifiedNamespace() { /** * Set the fullyQualifiedNamespace property: The fully qualified namespace name of the Event Hub resource. For * example, "example.servicebus.windows.net". - * + * * @param fullyQualifiedNamespace the fullyQualifiedNamespace value to set. * @return the EventHubEndpoint object itself. */ @@ -58,7 +79,7 @@ public EventHubEndpoint withFullyQualifiedNamespace(String fullyQualifiedNamespa /** * Get the eventHubName property: The name of the Event Hub. - * + * * @return the eventHubName value. */ public String eventHubName() { @@ -67,7 +88,7 @@ public String eventHubName() { /** * Set the eventHubName property: The name of the Event Hub. - * + * * @param eventHubName the eventHubName value to set. * @return the EventHubEndpoint object itself. */ @@ -78,22 +99,20 @@ public EventHubEndpoint withEventHubName(String eventHubName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (fullyQualifiedNamespace() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property fullyQualifiedNamespace in model EventHubEndpoint")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property fullyQualifiedNamespace in model EventHubEndpoint")); } if (eventHubName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property eventHubName in model EventHubEndpoint")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property eventHubName in model EventHubEndpoint")); } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListener.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListener.java index 808b03a13fb2..eb799c3a23f8 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListener.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListener.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** A setting defines which kinds of events should be sent to which endpoint. */ +/** + * A setting defines which kinds of events should be sent to which endpoint. + */ @Fluent public final class EventListener { /* @@ -23,14 +25,16 @@ public final class EventListener { @JsonProperty(value = "endpoint", required = true) private EventListenerEndpoint endpoint; - /** Creates an instance of EventListener class. */ + /** + * Creates an instance of EventListener class. + */ public EventListener() { } /** * Get the filter property: A base class for event filter which determines whether an event should be sent to an * event listener. - * + * * @return the filter value. */ public EventListenerFilter filter() { @@ -40,7 +44,7 @@ public EventListenerFilter filter() { /** * Set the filter property: A base class for event filter which determines whether an event should be sent to an * event listener. - * + * * @param filter the filter value to set. * @return the EventListener object itself. */ @@ -51,7 +55,7 @@ public EventListener withFilter(EventListenerFilter filter) { /** * Get the endpoint property: An endpoint specifying where Web PubSub should send events to. - * + * * @return the endpoint value. */ public EventListenerEndpoint endpoint() { @@ -60,7 +64,7 @@ public EventListenerEndpoint endpoint() { /** * Set the endpoint property: An endpoint specifying where Web PubSub should send events to. - * + * * @param endpoint the endpoint value to set. * @return the EventListener object itself. */ @@ -71,21 +75,19 @@ public EventListener withEndpoint(EventListenerEndpoint endpoint) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (filter() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property filter in model EventListener")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property filter in model EventListener")); } else { filter().validate(); } if (endpoint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property endpoint in model EventListener")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property endpoint in model EventListener")); } else { endpoint().validate(); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpoint.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpoint.java index d143d0e5dc45..efcf1d95ad18 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpoint.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpoint.java @@ -5,27 +5,46 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** An endpoint specifying where Web PubSub should send events to. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type", - defaultImpl = EventListenerEndpoint.class) +/** + * An endpoint specifying where Web PubSub should send events to. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = EventListenerEndpoint.class, visible = true) @JsonTypeName("EventListenerEndpoint") -@JsonSubTypes({@JsonSubTypes.Type(name = "EventHub", value = EventHubEndpoint.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "EventHub", value = EventHubEndpoint.class) }) @Immutable public class EventListenerEndpoint { - /** Creates an instance of EventListenerEndpoint class. */ + /* + * The type property. + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private EventListenerEndpointDiscriminator type; + + /** + * Creates an instance of EventListenerEndpoint class. + */ public EventListenerEndpoint() { + this.type = EventListenerEndpointDiscriminator.fromString("EventListenerEndpoint"); + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + public EventListenerEndpointDiscriminator type() { + return this.type; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpointDiscriminator.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpointDiscriminator.java index 29d0c5734ac6..148aa50a82ba 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpointDiscriminator.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpointDiscriminator.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EventListenerEndpointDiscriminator. */ +/** + * Defines values for EventListenerEndpointDiscriminator. + */ public final class EventListenerEndpointDiscriminator extends ExpandableStringEnum { - /** Static value EventHub for EventListenerEndpointDiscriminator. */ + /** + * Static value EventHub for EventListenerEndpointDiscriminator. + */ public static final EventListenerEndpointDiscriminator EVENT_HUB = fromString("EventHub"); /** * Creates a new instance of EventListenerEndpointDiscriminator value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public EventListenerEndpointDiscriminator() { /** * Creates or finds a EventListenerEndpointDiscriminator from its string representation. - * + * * @param name a name to look for. * @return the corresponding EventListenerEndpointDiscriminator. */ @@ -35,7 +39,7 @@ public static EventListenerEndpointDiscriminator fromString(String name) { /** * Gets known EventListenerEndpointDiscriminator values. - * + * * @return known EventListenerEndpointDiscriminator values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilter.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilter.java index ce1ea931d7b8..c7d51d205d27 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilter.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilter.java @@ -5,27 +5,46 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A base class for event filter which determines whether an event should be sent to an event listener. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type", - defaultImpl = EventListenerFilter.class) +/** + * A base class for event filter which determines whether an event should be sent to an event listener. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = EventListenerFilter.class, visible = true) @JsonTypeName("EventListenerFilter") -@JsonSubTypes({@JsonSubTypes.Type(name = "EventName", value = EventNameFilter.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "EventName", value = EventNameFilter.class) }) @Immutable public class EventListenerFilter { - /** Creates an instance of EventListenerFilter class. */ + /* + * The type property. + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private EventListenerFilterDiscriminator type; + + /** + * Creates an instance of EventListenerFilter class. + */ public EventListenerFilter() { + this.type = EventListenerFilterDiscriminator.fromString("EventListenerFilter"); + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + public EventListenerFilterDiscriminator type() { + return this.type; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilterDiscriminator.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilterDiscriminator.java index 00e87528b846..11ce92e0ed22 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilterDiscriminator.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilterDiscriminator.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EventListenerFilterDiscriminator. */ +/** + * Defines values for EventListenerFilterDiscriminator. + */ public final class EventListenerFilterDiscriminator extends ExpandableStringEnum { - /** Static value EventName for EventListenerFilterDiscriminator. */ + /** + * Static value EventName for EventListenerFilterDiscriminator. + */ public static final EventListenerFilterDiscriminator EVENT_NAME = fromString("EventName"); /** * Creates a new instance of EventListenerFilterDiscriminator value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public EventListenerFilterDiscriminator() { /** * Creates or finds a EventListenerFilterDiscriminator from its string representation. - * + * * @param name a name to look for. * @return the corresponding EventListenerFilterDiscriminator. */ @@ -35,7 +39,7 @@ public static EventListenerFilterDiscriminator fromString(String name) { /** * Gets known EventListenerFilterDiscriminator values. - * + * * @return known EventListenerFilterDiscriminator values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventNameFilter.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventNameFilter.java index ac686ad60376..14b16a5e06c8 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventNameFilter.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventNameFilter.java @@ -6,18 +6,27 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Filter events by their name. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +/** + * Filter events by their name. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = EventNameFilter.class, visible = true) @JsonTypeName("EventName") @Fluent public final class EventNameFilter extends EventListenerFilter { /* - * Gets or sets a list of system events. Supported events: "connected" and "disconnected". Blocking event "connect" - * is not supported because it requires a response. + * The type property. + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private EventListenerFilterDiscriminator type = EventListenerFilterDiscriminator.EVENT_NAME; + + /* + * Gets or sets a list of system events. Supported events: "connected" and "disconnected". Blocking event "connect" is not supported because it requires a response. */ @JsonProperty(value = "systemEvents") private List systemEvents; @@ -25,21 +34,33 @@ public final class EventNameFilter extends EventListenerFilter { /* * Gets or sets a matching pattern for event names. * There are 3 kinds of patterns supported: - * 1. "*", it matches any event name - * 2. Combine multiple events with ",", for example "event1,event2", it matches events "event1" and "event2" - * 3. A single event name, for example, "event1", it matches "event1" + * 1. "*", it matches any event name + * 2. Combine multiple events with ",", for example "event1,event2", it matches events "event1" and "event2" + * 3. A single event name, for example, "event1", it matches "event1" */ @JsonProperty(value = "userEventPattern") private String userEventPattern; - /** Creates an instance of EventNameFilter class. */ + /** + * Creates an instance of EventNameFilter class. + */ public EventNameFilter() { } + /** + * Get the type property: The type property. + * + * @return the type value. + */ + @Override + public EventListenerFilterDiscriminator type() { + return this.type; + } + /** * Get the systemEvents property: Gets or sets a list of system events. Supported events: "connected" and * "disconnected". Blocking event "connect" is not supported because it requires a response. - * + * * @return the systemEvents value. */ public List systemEvents() { @@ -49,7 +70,7 @@ public List systemEvents() { /** * Set the systemEvents property: Gets or sets a list of system events. Supported events: "connected" and * "disconnected". Blocking event "connect" is not supported because it requires a response. - * + * * @param systemEvents the systemEvents value to set. * @return the EventNameFilter object itself. */ @@ -59,10 +80,12 @@ public EventNameFilter withSystemEvents(List systemEvents) { } /** - * Get the userEventPattern property: Gets or sets a matching pattern for event names. There are 3 kinds of patterns - * supported: 1. "*", it matches any event name 2. Combine multiple events with ",", for example "event1,event2", it - * matches events "event1" and "event2" 3. A single event name, for example, "event1", it matches "event1". - * + * Get the userEventPattern property: Gets or sets a matching pattern for event names. + * There are 3 kinds of patterns supported: + * 1. "*", it matches any event name + * 2. Combine multiple events with ",", for example "event1,event2", it matches events "event1" and "event2" + * 3. A single event name, for example, "event1", it matches "event1". + * * @return the userEventPattern value. */ public String userEventPattern() { @@ -70,10 +93,12 @@ public String userEventPattern() { } /** - * Set the userEventPattern property: Gets or sets a matching pattern for event names. There are 3 kinds of patterns - * supported: 1. "*", it matches any event name 2. Combine multiple events with ",", for example "event1,event2", it - * matches events "event1" and "event2" 3. A single event name, for example, "event1", it matches "event1". - * + * Set the userEventPattern property: Gets or sets a matching pattern for event names. + * There are 3 kinds of patterns supported: + * 1. "*", it matches any event name + * 2. Combine multiple events with ",", for example "event1,event2", it matches events "event1" and "event2" + * 3. A single event name, for example, "event1", it matches "event1". + * * @param userEventPattern the userEventPattern value to set. * @return the EventNameFilter object itself. */ @@ -84,7 +109,7 @@ public EventNameFilter withUserEventPattern(String userEventPattern) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/IpRule.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/IpRule.java index e968a9479154..74a11d73450f 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/IpRule.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/IpRule.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** An IP rule. */ +/** + * An IP rule. + */ @Fluent public final class IpRule { /* @@ -22,13 +24,15 @@ public final class IpRule { @JsonProperty(value = "action") private AclAction action; - /** Creates an instance of IpRule class. */ + /** + * Creates an instance of IpRule class. + */ public IpRule() { } /** * Get the value property: An IP or CIDR or ServiceTag. - * + * * @return the value value. */ public String value() { @@ -37,7 +41,7 @@ public String value() { /** * Set the value property: An IP or CIDR or ServiceTag. - * + * * @param value the value value to set. * @return the IpRule object itself. */ @@ -48,7 +52,7 @@ public IpRule withValue(String value) { /** * Get the action property: Azure Networking ACL Action. - * + * * @return the action value. */ public AclAction action() { @@ -57,7 +61,7 @@ public AclAction action() { /** * Set the action property: Azure Networking ACL Action. - * + * * @param action the action value to set. * @return the IpRule object itself. */ @@ -68,7 +72,7 @@ public IpRule withAction(AclAction action) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/KeyType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/KeyType.java index a65078f6e2a5..e1c8de4e682b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/KeyType.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/KeyType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of access key. */ +/** + * The type of access key. + */ public final class KeyType extends ExpandableStringEnum { - /** Static value Primary for KeyType. */ + /** + * Static value Primary for KeyType. + */ public static final KeyType PRIMARY = fromString("Primary"); - /** Static value Secondary for KeyType. */ + /** + * Static value Secondary for KeyType. + */ public static final KeyType SECONDARY = fromString("Secondary"); - /** Static value Salt for KeyType. */ + /** + * Static value Salt for KeyType. + */ public static final KeyType SALT = fromString("Salt"); /** * Creates a new instance of KeyType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public KeyType() { /** * Creates or finds a KeyType from its string representation. - * + * * @param name a name to look for. * @return the corresponding KeyType. */ @@ -41,7 +49,7 @@ public static KeyType fromString(String name) { /** * Gets known KeyType values. - * + * * @return known KeyType values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceCategory.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceCategory.java index 2c0a2f27c12f..99cae4a703c1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceCategory.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceCategory.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Live trace category configuration of a Microsoft.SignalRService resource. */ +/** + * Live trace category configuration of a Microsoft.SignalRService resource. + */ @Fluent public final class LiveTraceCategory { /* @@ -26,14 +28,17 @@ public final class LiveTraceCategory { @JsonProperty(value = "enabled") private String enabled; - /** Creates an instance of LiveTraceCategory class. */ + /** + * Creates an instance of LiveTraceCategory class. + */ public LiveTraceCategory() { } /** - * Get the name property: Gets or sets the live trace category's name. Available values: ConnectivityLogs, - * MessagingLogs. Case insensitive. - * + * Get the name property: Gets or sets the live trace category's name. + * Available values: ConnectivityLogs, MessagingLogs. + * Case insensitive. + * * @return the name value. */ public String name() { @@ -41,9 +46,10 @@ public String name() { } /** - * Set the name property: Gets or sets the live trace category's name. Available values: ConnectivityLogs, - * MessagingLogs. Case insensitive. - * + * Set the name property: Gets or sets the live trace category's name. + * Available values: ConnectivityLogs, MessagingLogs. + * Case insensitive. + * * @param name the name value to set. * @return the LiveTraceCategory object itself. */ @@ -53,9 +59,10 @@ public LiveTraceCategory withName(String name) { } /** - * Get the enabled property: Indicates whether or the live trace category is enabled. Available values: true, false. + * Get the enabled property: Indicates whether or the live trace category is enabled. + * Available values: true, false. * Case insensitive. - * + * * @return the enabled value. */ public String enabled() { @@ -63,9 +70,10 @@ public String enabled() { } /** - * Set the enabled property: Indicates whether or the live trace category is enabled. Available values: true, false. + * Set the enabled property: Indicates whether or the live trace category is enabled. + * Available values: true, false. * Case insensitive. - * + * * @param enabled the enabled value to set. * @return the LiveTraceCategory object itself. */ @@ -76,7 +84,7 @@ public LiveTraceCategory withEnabled(String enabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceConfiguration.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceConfiguration.java index c864aaa9a3d7..3130d19daa16 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceConfiguration.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LiveTraceConfiguration.java @@ -8,14 +8,15 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Live trace configuration of a Microsoft.SignalRService resource. */ +/** + * Live trace configuration of a Microsoft.SignalRService resource. + */ @Fluent public final class LiveTraceConfiguration { /* * Indicates whether or not enable live trace. * When it's set to true, live trace client can connect to the service. - * Otherwise, live trace client can't connect to the service, so that you are unable to receive any log, no matter - * what you configure in "categories". + * Otherwise, live trace client can't connect to the service, so that you are unable to receive any log, no matter what you configure in "categories". * Available values: true, false. * Case insensitive. */ @@ -28,15 +29,20 @@ public final class LiveTraceConfiguration { @JsonProperty(value = "categories") private List categories; - /** Creates an instance of LiveTraceConfiguration class. */ + /** + * Creates an instance of LiveTraceConfiguration class. + */ public LiveTraceConfiguration() { } /** - * Get the enabled property: Indicates whether or not enable live trace. When it's set to true, live trace client - * can connect to the service. Otherwise, live trace client can't connect to the service, so that you are unable to - * receive any log, no matter what you configure in "categories". Available values: true, false. Case insensitive. - * + * Get the enabled property: Indicates whether or not enable live trace. + * When it's set to true, live trace client can connect to the service. + * Otherwise, live trace client can't connect to the service, so that you are unable to receive any log, no matter + * what you configure in "categories". + * Available values: true, false. + * Case insensitive. + * * @return the enabled value. */ public String enabled() { @@ -44,10 +50,13 @@ public String enabled() { } /** - * Set the enabled property: Indicates whether or not enable live trace. When it's set to true, live trace client - * can connect to the service. Otherwise, live trace client can't connect to the service, so that you are unable to - * receive any log, no matter what you configure in "categories". Available values: true, false. Case insensitive. - * + * Set the enabled property: Indicates whether or not enable live trace. + * When it's set to true, live trace client can connect to the service. + * Otherwise, live trace client can't connect to the service, so that you are unable to receive any log, no matter + * what you configure in "categories". + * Available values: true, false. + * Case insensitive. + * * @param enabled the enabled value to set. * @return the LiveTraceConfiguration object itself. */ @@ -58,7 +67,7 @@ public LiveTraceConfiguration withEnabled(String enabled) { /** * Get the categories property: Gets or sets the list of category configurations. - * + * * @return the categories value. */ public List categories() { @@ -67,7 +76,7 @@ public List categories() { /** * Set the categories property: Gets or sets the list of category configurations. - * + * * @param categories the categories value to set. * @return the LiveTraceConfiguration object itself. */ @@ -78,7 +87,7 @@ public LiveTraceConfiguration withCategories(List categories) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LogSpecification.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LogSpecification.java index 1f715c0ad193..179676d9c210 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LogSpecification.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/LogSpecification.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifications of the Logs for Azure Monitoring. */ +/** + * Specifications of the Logs for Azure Monitoring. + */ @Fluent public final class LogSpecification { /* @@ -22,13 +24,15 @@ public final class LogSpecification { @JsonProperty(value = "displayName") private String displayName; - /** Creates an instance of LogSpecification class. */ + /** + * Creates an instance of LogSpecification class. + */ public LogSpecification() { } /** * Get the name property: Name of the log. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: Name of the log. - * + * * @param name the name value to set. * @return the LogSpecification object itself. */ @@ -48,7 +52,7 @@ public LogSpecification withName(String name) { /** * Get the displayName property: Localized friendly display name of the log. - * + * * @return the displayName value. */ public String displayName() { @@ -57,7 +61,7 @@ public String displayName() { /** * Set the displayName property: Localized friendly display name of the log. - * + * * @param displayName the displayName value to set. * @return the LogSpecification object itself. */ @@ -68,7 +72,7 @@ public LogSpecification withDisplayName(String displayName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentity.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentity.java index 7619ed8ca284..7ba3f8695e9b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentity.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentity.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** A class represent managed identities used for request and response. */ +/** + * A class represent managed identities used for request and response. + */ @Fluent public final class ManagedIdentity { /* @@ -39,13 +41,15 @@ public final class ManagedIdentity { @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; - /** Creates an instance of ManagedIdentity class. */ + /** + * Creates an instance of ManagedIdentity class. + */ public ManagedIdentity() { } /** * Get the type property: Represents the identity type: systemAssigned, userAssigned, None. - * + * * @return the type value. */ public ManagedIdentityType type() { @@ -54,7 +58,7 @@ public ManagedIdentityType type() { /** * Set the type property: Represents the identity type: systemAssigned, userAssigned, None. - * + * * @param type the type value to set. * @return the ManagedIdentity object itself. */ @@ -65,7 +69,7 @@ public ManagedIdentity withType(ManagedIdentityType type) { /** * Get the userAssignedIdentities property: Get or set the user assigned identities. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -74,19 +78,20 @@ public Map userAssignedIdentities() { /** * Set the userAssignedIdentities property: Get or set the user assigned identities. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedIdentity object itself. */ - public ManagedIdentity withUserAssignedIdentities( - Map userAssignedIdentities) { + public ManagedIdentity + withUserAssignedIdentities(Map userAssignedIdentities) { this.userAssignedIdentities = userAssignedIdentities; return this; } /** - * Get the principalId property: Get the principal id for the system assigned identity. Only be used in response. - * + * Get the principalId property: Get the principal id for the system assigned identity. + * Only be used in response. + * * @return the principalId value. */ public String principalId() { @@ -94,8 +99,9 @@ public String principalId() { } /** - * Get the tenantId property: Get the tenant id for the system assigned identity. Only be used in response. - * + * Get the tenantId property: Get the tenant id for the system assigned identity. + * Only be used in response. + * * @return the tenantId value. */ public String tenantId() { @@ -104,19 +110,16 @@ public String tenantId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (userAssignedIdentities() != null) { - userAssignedIdentities() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentitySettings.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentitySettings.java index 777089f1ad94..fa47f97b54da 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentitySettings.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentitySettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Managed identity settings for upstream. */ +/** + * Managed identity settings for upstream. + */ @Fluent public final class ManagedIdentitySettings { /* @@ -17,14 +19,16 @@ public final class ManagedIdentitySettings { @JsonProperty(value = "resource") private String resource; - /** Creates an instance of ManagedIdentitySettings class. */ + /** + * Creates an instance of ManagedIdentitySettings class. + */ public ManagedIdentitySettings() { } /** - * Get the resource property: The Resource indicating the App ID URI of the target resource. It also appears in the - * aud (audience) claim of the issued token. - * + * Get the resource property: The Resource indicating the App ID URI of the target resource. + * It also appears in the aud (audience) claim of the issued token. + * * @return the resource value. */ public String resource() { @@ -32,9 +36,9 @@ public String resource() { } /** - * Set the resource property: The Resource indicating the App ID URI of the target resource. It also appears in the - * aud (audience) claim of the issued token. - * + * Set the resource property: The Resource indicating the App ID URI of the target resource. + * It also appears in the aud (audience) claim of the issued token. + * * @param resource the resource value to set. * @return the ManagedIdentitySettings object itself. */ @@ -45,7 +49,7 @@ public ManagedIdentitySettings withResource(String resource) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentityType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentityType.java index a520079705e7..bc0e9fac0afc 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentityType.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ManagedIdentityType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Represents the identity type: systemAssigned, userAssigned, None. */ +/** + * Represents the identity type: systemAssigned, userAssigned, None. + */ public final class ManagedIdentityType extends ExpandableStringEnum { - /** Static value None for ManagedIdentityType. */ + /** + * Static value None for ManagedIdentityType. + */ public static final ManagedIdentityType NONE = fromString("None"); - /** Static value SystemAssigned for ManagedIdentityType. */ + /** + * Static value SystemAssigned for ManagedIdentityType. + */ public static final ManagedIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for ManagedIdentityType. */ + /** + * Static value UserAssigned for ManagedIdentityType. + */ public static final ManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** * Creates a new instance of ManagedIdentityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ManagedIdentityType() { /** * Creates or finds a ManagedIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedIdentityType. */ @@ -41,7 +49,7 @@ public static ManagedIdentityType fromString(String name) { /** * Gets known ManagedIdentityType values. - * + * * @return known ManagedIdentityType values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/MetricSpecification.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/MetricSpecification.java index 3d7e37d55a4d..57d4f0be475a 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/MetricSpecification.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/MetricSpecification.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Specifications of the Metrics for Azure Monitoring. */ +/** + * Specifications of the Metrics for Azure Monitoring. + */ @Fluent public final class MetricSpecification { /* @@ -42,8 +44,8 @@ public final class MetricSpecification { private String aggregationType; /* - * Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. - * Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear + * Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + * Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear * often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted. */ @JsonProperty(value = "fillGapWithZero") @@ -61,13 +63,15 @@ public final class MetricSpecification { @JsonProperty(value = "dimensions") private List dimensions; - /** Creates an instance of MetricSpecification class. */ + /** + * Creates an instance of MetricSpecification class. + */ public MetricSpecification() { } /** * Get the name property: Name of the metric. - * + * * @return the name value. */ public String name() { @@ -76,7 +80,7 @@ public String name() { /** * Set the name property: Name of the metric. - * + * * @param name the name value to set. * @return the MetricSpecification object itself. */ @@ -87,7 +91,7 @@ public MetricSpecification withName(String name) { /** * Get the displayName property: Localized friendly display name of the metric. - * + * * @return the displayName value. */ public String displayName() { @@ -96,7 +100,7 @@ public String displayName() { /** * Set the displayName property: Localized friendly display name of the metric. - * + * * @param displayName the displayName value to set. * @return the MetricSpecification object itself. */ @@ -107,7 +111,7 @@ public MetricSpecification withDisplayName(String displayName) { /** * Get the displayDescription property: Localized friendly description of the metric. - * + * * @return the displayDescription value. */ public String displayDescription() { @@ -116,7 +120,7 @@ public String displayDescription() { /** * Set the displayDescription property: Localized friendly description of the metric. - * + * * @param displayDescription the displayDescription value to set. * @return the MetricSpecification object itself. */ @@ -127,7 +131,7 @@ public MetricSpecification withDisplayDescription(String displayDescription) { /** * Get the unit property: The unit that makes sense for the metric. - * + * * @return the unit value. */ public String unit() { @@ -136,7 +140,7 @@ public String unit() { /** * Set the unit property: The unit that makes sense for the metric. - * + * * @param unit the unit value to set. * @return the MetricSpecification object itself. */ @@ -148,7 +152,7 @@ public MetricSpecification withUnit(String unit) { /** * Get the aggregationType property: Only provide one value for this field. Valid values: Average, Minimum, Maximum, * Total, Count. - * + * * @return the aggregationType value. */ public String aggregationType() { @@ -158,7 +162,7 @@ public String aggregationType() { /** * Set the aggregationType property: Only provide one value for this field. Valid values: Average, Minimum, Maximum, * Total, Count. - * + * * @param aggregationType the aggregationType value to set. * @return the MetricSpecification object itself. */ @@ -169,10 +173,10 @@ public MetricSpecification withAggregationType(String aggregationType) { /** * Get the fillGapWithZero property: Optional. If set to true, then zero will be returned for time duration where no - * metric is emitted/published. Ex. a metric that returns the number of times a particular error code was emitted. - * The error code may not appear often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods - * where nothing was emitted. - * + * metric is emitted/published. + * Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear + * often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted. + * * @return the fillGapWithZero value. */ public String fillGapWithZero() { @@ -181,10 +185,10 @@ public String fillGapWithZero() { /** * Set the fillGapWithZero property: Optional. If set to true, then zero will be returned for time duration where no - * metric is emitted/published. Ex. a metric that returns the number of times a particular error code was emitted. - * The error code may not appear often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods - * where nothing was emitted. - * + * metric is emitted/published. + * Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear + * often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted. + * * @param fillGapWithZero the fillGapWithZero value to set. * @return the MetricSpecification object itself. */ @@ -196,7 +200,7 @@ public MetricSpecification withFillGapWithZero(String fillGapWithZero) { /** * Get the category property: The name of the metric category that the metric belongs to. A metric can only belong * to a single category. - * + * * @return the category value. */ public String category() { @@ -206,7 +210,7 @@ public String category() { /** * Set the category property: The name of the metric category that the metric belongs to. A metric can only belong * to a single category. - * + * * @param category the category value to set. * @return the MetricSpecification object itself. */ @@ -217,7 +221,7 @@ public MetricSpecification withCategory(String category) { /** * Get the dimensions property: The dimensions of the metrics. - * + * * @return the dimensions value. */ public List dimensions() { @@ -226,7 +230,7 @@ public List dimensions() { /** * Set the dimensions property: The dimensions of the metrics. - * + * * @param dimensions the dimensions value to set. * @return the MetricSpecification object itself. */ @@ -237,7 +241,7 @@ public MetricSpecification withDimensions(List dimensions) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NameAvailability.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NameAvailability.java index 94c8dc4cf8ec..54f480e0f834 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NameAvailability.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NameAvailability.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.webpubsub.fluent.models.NameAvailabilityInner; -/** An immutable client-side representation of NameAvailability. */ +/** + * An immutable client-side representation of NameAvailability. + */ public interface NameAvailability { /** * Gets the nameAvailable property: Indicates whether the name is available or not. - * + * * @return the nameAvailable value. */ Boolean nameAvailable(); /** * Gets the reason property: The reason of the availability. Required if name is not available. - * + * * @return the reason value. */ String reason(); /** * Gets the message property: The message of the operation. - * + * * @return the message value. */ String message(); /** * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.NameAvailabilityInner object. - * + * * @return the inner object. */ NameAvailabilityInner innerModel(); 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 1112273c69aa..518252b6f305 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 @@ -8,12 +8,13 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Data POST-ed to the nameAvailability action. */ +/** + * Data POST-ed to the nameAvailability action. + */ @Fluent public final class NameAvailabilityParameters { /* - * The resource type. Can be "Microsoft.SignalRService/SignalR", "Microsoft.SignalRService/WebPubSub", - * "Microsoft.SignalRService/SignalR/replicas" or "Microsoft.SignalRService/WebPubSub/replicas" + * 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; @@ -24,7 +25,9 @@ public final class NameAvailabilityParameters { @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of NameAvailabilityParameters class. */ + /** + * Creates an instance of NameAvailabilityParameters class. + */ public NameAvailabilityParameters() { } @@ -32,7 +35,7 @@ public NameAvailabilityParameters() { * 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. */ public String type() { @@ -43,7 +46,7 @@ public String type() { * 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. */ @@ -54,7 +57,7 @@ public NameAvailabilityParameters withType(String type) { /** * Get the name property: The resource name to validate. e.g."my-resource-name". - * + * * @return the name value. */ public String name() { @@ -63,7 +66,7 @@ public String name() { /** * Set the name property: The resource name to validate. e.g."my-resource-name". - * + * * @param name the name value to set. * @return the NameAvailabilityParameters object itself. */ @@ -74,18 +77,18 @@ public NameAvailabilityParameters withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (type() == null) { - throw LOGGER - .logExceptionAsError( + throw LOGGER.atError() + .log( new IllegalArgumentException("Missing required property type in model NameAvailabilityParameters")); } if (name() == null) { - throw LOGGER - .logExceptionAsError( + throw LOGGER.atError() + .log( new IllegalArgumentException("Missing required property name in model NameAvailabilityParameters")); } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NetworkAcl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NetworkAcl.java index a4cecbcf7698..9dda3c9cad33 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NetworkAcl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/NetworkAcl.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Network ACL. */ +/** + * Network ACL. + */ @Fluent public class NetworkAcl { /* @@ -23,14 +25,16 @@ public class NetworkAcl { @JsonProperty(value = "deny") private List deny; - /** Creates an instance of NetworkAcl class. */ + /** + * Creates an instance of NetworkAcl class. + */ public NetworkAcl() { } /** * Get the allow property: Allowed request types. The value can be one or more of: ClientConnection, * ServerConnection, RESTAPI. - * + * * @return the allow value. */ public List allow() { @@ -40,7 +44,7 @@ public List allow() { /** * Set the allow property: Allowed request types. The value can be one or more of: ClientConnection, * ServerConnection, RESTAPI. - * + * * @param allow the allow value to set. * @return the NetworkAcl object itself. */ @@ -52,7 +56,7 @@ public NetworkAcl withAllow(List allow) { /** * Get the deny property: Denied request types. The value can be one or more of: ClientConnection, ServerConnection, * RESTAPI. - * + * * @return the deny value. */ public List deny() { @@ -62,7 +66,7 @@ public List deny() { /** * Set the deny property: Denied request types. The value can be one or more of: ClientConnection, ServerConnection, * RESTAPI. - * + * * @param deny the deny value to set. * @return the NetworkAcl object itself. */ @@ -73,7 +77,7 @@ public NetworkAcl withDeny(List deny) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Operation.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Operation.java index ff42de3760f6..a3c45ad7841a 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Operation.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Operation.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.webpubsub.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: Name of the operation with format: {provider}/{resource}/{operation}. - * + * * @return the name value. */ String name(); /** * Gets the isDataAction property: If the operation is a data action. (for data plane rbac). - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: The object that describes a operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -32,21 +34,21 @@ public interface Operation { /** * Gets the origin property: Optional. The intended executor of the operation; governs the display of the operation * in the RBAC UX and the audit logs UX. - * + * * @return the origin value. */ String origin(); /** * Gets the properties property: Extra Operation properties. - * + * * @return the properties value. */ OperationProperties properties(); /** * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationDisplay.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationDisplay.java index 85485cfb3df0..177622846879 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationDisplay.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The object that describes a operation. */ +/** + * The object that describes a operation. + */ @Fluent public final class OperationDisplay { /* @@ -34,13 +36,15 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: Friendly name of the resource provider. - * + * * @return the provider value. */ public String provider() { @@ -49,7 +53,7 @@ public String provider() { /** * Set the provider property: Friendly name of the resource provider. - * + * * @param provider the provider value to set. * @return the OperationDisplay object itself. */ @@ -60,7 +64,7 @@ public OperationDisplay withProvider(String provider) { /** * Get the resource property: Resource type on which the operation is performed. - * + * * @return the resource value. */ public String resource() { @@ -69,7 +73,7 @@ public String resource() { /** * Set the resource property: Resource type on which the operation is performed. - * + * * @param resource the resource value to set. * @return the OperationDisplay object itself. */ @@ -80,7 +84,7 @@ public OperationDisplay withResource(String resource) { /** * Get the operation property: The localized friendly name for the operation. - * + * * @return the operation value. */ public String operation() { @@ -89,7 +93,7 @@ public String operation() { /** * Set the operation property: The localized friendly name for the operation. - * + * * @param operation the operation value to set. * @return the OperationDisplay object itself. */ @@ -100,7 +104,7 @@ public OperationDisplay withOperation(String operation) { /** * Get the description property: The localized friendly description for the operation. - * + * * @return the description value. */ public String description() { @@ -109,7 +113,7 @@ public String description() { /** * Set the description property: The localized friendly description for the operation. - * + * * @param description the description value to set. * @return the OperationDisplay object itself. */ @@ -120,7 +124,7 @@ public OperationDisplay withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationList.java index 6353ab1d3ef5..f9b99ad81606 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Result of the request to list REST API operations. It contains a list of operations. */ +/** + * Result of the request to list REST API operations. It contains a list of operations. + */ @Fluent public final class OperationList { /* @@ -25,13 +27,15 @@ public final class OperationList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of OperationList class. */ + /** + * Creates an instance of OperationList class. + */ public OperationList() { } /** * Get the value property: List of operations supported by the resource provider. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of operations supported by the resource provider. - * + * * @param value the value value to set. * @return the OperationList object itself. */ @@ -50,9 +54,9 @@ public OperationList withValue(List value) { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -60,9 +64,9 @@ public String 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. - * + * 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 OperationList object itself. */ @@ -73,7 +77,7 @@ public OperationList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationProperties.java index 6fc7c704a717..a081550e66ce 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/OperationProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Extra Operation properties. */ +/** + * Extra Operation properties. + */ @Fluent public final class OperationProperties { /* @@ -16,13 +18,15 @@ public final class OperationProperties { @JsonProperty(value = "serviceSpecification") private ServiceSpecification serviceSpecification; - /** Creates an instance of OperationProperties class. */ + /** + * Creates an instance of OperationProperties class. + */ public OperationProperties() { } /** * Get the serviceSpecification property: An object that describes a specification. - * + * * @return the serviceSpecification value. */ public ServiceSpecification serviceSpecification() { @@ -31,7 +35,7 @@ public ServiceSpecification serviceSpecification() { /** * Set the serviceSpecification property: An object that describes a specification. - * + * * @param serviceSpecification the serviceSpecification value to set. * @return the OperationProperties object itself. */ @@ -42,7 +46,7 @@ public OperationProperties withServiceSpecification(ServiceSpecification service /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Operations.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Operations.java index fc85fac2d773..11e35ae019a6 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Operations.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Operations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @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 result of the request to list REST API operations as paginated response with {@link PagedIterable}. @@ -20,7 +22,7 @@ public interface Operations { /** * Lists all of the available REST API operations of the Microsoft.SignalRService provider. - * + * * @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. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpoint.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpoint.java index b2fffe71b2b7..ba834e74ce4d 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpoint.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpoint.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Private endpoint. */ +/** + * Private endpoint. + */ @Fluent public final class PrivateEndpoint { /* @@ -16,13 +18,15 @@ public final class PrivateEndpoint { @JsonProperty(value = "id") private String id; - /** Creates an instance of PrivateEndpoint class. */ + /** + * Creates an instance of PrivateEndpoint class. + */ public PrivateEndpoint() { } /** * Get the id property: Full qualified Id of the private endpoint. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: Full qualified Id of the private endpoint. - * + * * @param id the id value to set. * @return the PrivateEndpoint object itself. */ @@ -42,7 +46,7 @@ public PrivateEndpoint withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointAcl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointAcl.java index 51169813d6d6..73ea329913ca 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointAcl.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointAcl.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** ACL for a private endpoint. */ +/** + * ACL for a private endpoint. + */ @Fluent public final class PrivateEndpointAcl extends NetworkAcl { /* @@ -18,13 +20,15 @@ public final class PrivateEndpointAcl extends NetworkAcl { @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of PrivateEndpointAcl class. */ + /** + * Creates an instance of PrivateEndpointAcl class. + */ public PrivateEndpointAcl() { } /** * Get the name property: Name of the private endpoint connection. - * + * * @return the name value. */ public String name() { @@ -33,7 +37,7 @@ public String name() { /** * Set the name property: Name of the private endpoint connection. - * + * * @param name the name value to set. * @return the PrivateEndpointAcl object itself. */ @@ -42,14 +46,18 @@ public PrivateEndpointAcl withName(String name) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PrivateEndpointAcl withAllow(List allow) { super.withAllow(allow); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PrivateEndpointAcl withDeny(List deny) { super.withDeny(deny); @@ -58,16 +66,15 @@ public PrivateEndpointAcl withDeny(List deny) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model PrivateEndpointAcl")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model PrivateEndpointAcl")); } } 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 3191f8723a44..76dbcee3e139 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 @@ -8,67 +8,69 @@ import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner; import java.util.List; -/** An immutable client-side representation of PrivateEndpointConnection. */ +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ public interface PrivateEndpointConnection { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the privateEndpoint property: Private endpoint. - * + * * @return the privateEndpoint value. */ PrivateEndpoint privateEndpoint(); /** * Gets the groupIds property: Group IDs. - * + * * @return the groupIds value. */ List groupIds(); /** * Gets the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @return the privateLinkServiceConnectionState value. */ PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); /** * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner object. - * + * * @return the inner object. */ PrivateEndpointConnectionInner innerModel(); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointConnectionList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointConnectionList.java index 2392a94c20ed..a8110a5f38f3 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointConnectionList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateEndpointConnectionList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of private endpoint connections. */ +/** + * A list of private endpoint connections. + */ @Fluent public final class PrivateEndpointConnectionList { /* @@ -19,19 +21,20 @@ public final class PrivateEndpointConnectionList { private List value; /* - * Request URL that can be used to query next page of private endpoint connections. Returned when the total number - * of requested private endpoint connections exceed maximum page size. + * Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed maximum page size. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of PrivateEndpointConnectionList class. */ + /** + * Creates an instance of PrivateEndpointConnectionList class. + */ public PrivateEndpointConnectionList() { } /** * Get the value property: The list of the private endpoint connections. - * + * * @return the value value. */ public List value() { @@ -40,7 +43,7 @@ public List value() { /** * Set the value property: The list of the private endpoint connections. - * + * * @param value the value value to set. * @return the PrivateEndpointConnectionList object itself. */ @@ -52,7 +55,7 @@ public PrivateEndpointConnectionList withValue(List requiredMembers(); /** * Gets the requiredZoneNames property: Required private DNS zone names. - * + * * @return the requiredZoneNames value. */ List requiredZoneNames(); @@ -62,14 +64,14 @@ public interface PrivateLinkResource { /** * Gets the shareablePrivateLinkResourceTypes property: The list of resources that are onboarded to private link * service. - * + * * @return the shareablePrivateLinkResourceTypes value. */ List shareablePrivateLinkResourceTypes(); /** * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner object. - * + * * @return the inner object. */ PrivateLinkResourceInner innerModel(); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkResourceList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkResourceList.java index 0b11254b0d22..556418343996 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkResourceList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkResourceList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Contains a list of PrivateLinkResource and a possible link to query more results. */ +/** + * Contains a list of PrivateLinkResource and a possible link to query more results. + */ @Fluent public final class PrivateLinkResourceList { /* @@ -25,13 +27,15 @@ public final class PrivateLinkResourceList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of PrivateLinkResourceList class. */ + /** + * Creates an instance of PrivateLinkResourceList class. + */ public PrivateLinkResourceList() { } /** * Get the value property: List of PrivateLinkResource. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of PrivateLinkResource. - * + * * @param value the value value to set. * @return the PrivateLinkResourceList object itself. */ @@ -50,9 +54,9 @@ public PrivateLinkResourceList withValue(List value) { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -60,9 +64,9 @@ public String 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. - * + * 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 PrivateLinkResourceList object itself. */ @@ -73,7 +77,7 @@ public PrivateLinkResourceList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkServiceConnectionState.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkServiceConnectionState.java index 86f1a39afc89..a7abe53971aa 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkServiceConnectionState.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkServiceConnectionState.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Connection state of the private endpoint connection. */ +/** + * Connection state of the private endpoint connection. + */ @Fluent public final class PrivateLinkServiceConnectionState { /* @@ -28,14 +30,16 @@ public final class PrivateLinkServiceConnectionState { @JsonProperty(value = "actionsRequired") private String actionsRequired; - /** Creates an instance of PrivateLinkServiceConnectionState class. */ + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ public PrivateLinkServiceConnectionState() { } /** * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the * service. - * + * * @return the status value. */ public PrivateLinkServiceConnectionStatus status() { @@ -45,7 +49,7 @@ public PrivateLinkServiceConnectionStatus status() { /** * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the * service. - * + * * @param status the status value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -56,7 +60,7 @@ public PrivateLinkServiceConnectionState withStatus(PrivateLinkServiceConnection /** * Get the description property: The reason for approval/rejection of the connection. - * + * * @return the description value. */ public String description() { @@ -65,7 +69,7 @@ public String description() { /** * Set the description property: The reason for approval/rejection of the connection. - * + * * @param description the description value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -77,7 +81,7 @@ public PrivateLinkServiceConnectionState withDescription(String description) { /** * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on * the consumer. - * + * * @return the actionsRequired value. */ public String actionsRequired() { @@ -87,7 +91,7 @@ public String actionsRequired() { /** * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on * the consumer. - * + * * @param actionsRequired the actionsRequired value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -98,7 +102,7 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkServiceConnectionStatus.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkServiceConnectionStatus.java index f2ec5bd7f899..254a9bfa9375 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkServiceConnectionStatus.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/PrivateLinkServiceConnectionStatus.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ +/** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ public final class PrivateLinkServiceConnectionStatus extends ExpandableStringEnum { - /** Static value Pending for PrivateLinkServiceConnectionStatus. */ + /** + * Static value Pending for PrivateLinkServiceConnectionStatus. + */ public static final PrivateLinkServiceConnectionStatus PENDING = fromString("Pending"); - /** Static value Approved for PrivateLinkServiceConnectionStatus. */ + /** + * Static value Approved for PrivateLinkServiceConnectionStatus. + */ public static final PrivateLinkServiceConnectionStatus APPROVED = fromString("Approved"); - /** Static value Rejected for PrivateLinkServiceConnectionStatus. */ + /** + * Static value Rejected for PrivateLinkServiceConnectionStatus. + */ public static final PrivateLinkServiceConnectionStatus REJECTED = fromString("Rejected"); - /** Static value Disconnected for PrivateLinkServiceConnectionStatus. */ + /** + * Static value Disconnected for PrivateLinkServiceConnectionStatus. + */ public static final PrivateLinkServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); /** * Creates a new instance of PrivateLinkServiceConnectionStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public PrivateLinkServiceConnectionStatus() { /** * Creates or finds a PrivateLinkServiceConnectionStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateLinkServiceConnectionStatus. */ @@ -44,7 +54,7 @@ public static PrivateLinkServiceConnectionStatus fromString(String name) { /** * Gets known PrivateLinkServiceConnectionStatus values. - * + * * @return known PrivateLinkServiceConnectionStatus values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ProvisioningState.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ProvisioningState.java index 5a6a41c7b162..8a2388c5565f 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ProvisioningState.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ProvisioningState.java @@ -8,38 +8,58 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the resource. */ +/** + * Provisioning state of the resource. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Unknown for ProvisioningState. */ + /** + * Static value Unknown for ProvisioningState. + */ public static final ProvisioningState UNKNOWN = fromString("Unknown"); - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value Running for ProvisioningState. */ + /** + * Static value Running for ProvisioningState. + */ public static final ProvisioningState RUNNING = fromString("Running"); - /** Static value Creating for ProvisioningState. */ + /** + * Static value Creating for ProvisioningState. + */ public static final ProvisioningState CREATING = fromString("Creating"); - /** Static value Updating for ProvisioningState. */ + /** + * Static value Updating for ProvisioningState. + */ public static final ProvisioningState UPDATING = fromString("Updating"); - /** Static value Deleting for ProvisioningState. */ + /** + * Static value Deleting for ProvisioningState. + */ public static final ProvisioningState DELETING = fromString("Deleting"); - /** Static value Moving for ProvisioningState. */ + /** + * Static value Moving for ProvisioningState. + */ public static final ProvisioningState MOVING = fromString("Moving"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -48,7 +68,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -59,7 +79,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/RegenerateKeyParameters.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/RegenerateKeyParameters.java index 2d6fbac39093..74f1f80bdcc9 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/RegenerateKeyParameters.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/RegenerateKeyParameters.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Parameters describes the request to regenerate access keys. */ +/** + * Parameters describes the request to regenerate access keys. + */ @Fluent public final class RegenerateKeyParameters { /* @@ -16,13 +18,15 @@ public final class RegenerateKeyParameters { @JsonProperty(value = "keyType") private KeyType keyType; - /** Creates an instance of RegenerateKeyParameters class. */ + /** + * Creates an instance of RegenerateKeyParameters class. + */ public RegenerateKeyParameters() { } /** * Get the keyType property: The type of access key. - * + * * @return the keyType value. */ public KeyType keyType() { @@ -31,7 +35,7 @@ public KeyType keyType() { /** * Set the keyType property: The type of access key. - * + * * @param keyType the keyType value to set. * @return the RegenerateKeyParameters object itself. */ @@ -42,7 +46,7 @@ public RegenerateKeyParameters withKeyType(KeyType keyType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Replica.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Replica.java index 605e1c10330c..6b8cf899243f 100644 --- 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 @@ -10,127 +10,136 @@ import com.azure.resourcemanager.webpubsub.fluent.models.ReplicaInner; import java.util.Map; -/** An immutable client-side representation of Replica. */ +/** + * 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 regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. - * + * Gets the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. + * * @return the regionEndpointEnabled value. */ String regionEndpointEnabled(); /** - * Gets the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Gets the resourceStopped property: Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @return the resourceStopped value. */ String resourceStopped(); /** * 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 entirety of the Replica definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Replica definition stages. */ + /** + * The Replica definition stages. + */ interface DefinitionStages { - /** The first stage of the Replica definition. */ + /** + * The first stage of the Replica definition. + */ interface Blank extends WithLocation { } - /** The stage of the Replica definition allowing to specify location. */ + /** + * 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. */ @@ -138,18 +147,20 @@ interface WithLocation { /** * 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. */ + /** + * 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. @@ -161,72 +172,80 @@ interface WithParentResource { * 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, - DefinitionStages.WithRegionEndpointEnabled, - DefinitionStages.WithResourceStopped { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, + DefinitionStages.WithRegionEndpointEnabled, DefinitionStages.WithResourceStopped { /** * 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. */ + /** + * 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. */ + /** + * 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); } - /** The stage of the Replica definition allowing to specify regionEndpointEnabled. */ + /** + * The stage of the Replica definition allowing to specify regionEndpointEnabled. + */ interface WithRegionEndpointEnabled { /** * Specifies the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to - * "Enabled". When it's Disabled, new connections will not be routed to this endpoint, however existing - * connections will not be affected.. - * - * @param regionEndpointEnabled Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not - * be affected. + * "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections + * will not be affected.. + * + * @param regionEndpointEnabled Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections + * will not be affected. * @return the next definition stage. */ WithCreate withRegionEndpointEnabled(String regionEndpointEnabled); } - /** The stage of the Replica definition allowing to specify resourceStopped. */ + /** + * The stage of the Replica definition allowing to specify resourceStopped. + */ interface WithResourceStopped { /** - * Specifies the resourceStopped property: Stop or start the resource. Default to "false". When it's true, - * the data plane of the resource is shutdown. When it's false, the data plane of the resource is started.. - * - * @param resourceStopped Stop or start the resource. Default to "false". When it's true, the data plane of - * the resource is shutdown. When it's false, the data plane of the resource is started. + * Specifies the resourceStopped property: Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started.. + * + * @param resourceStopped Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. * @return the next definition stage. */ WithCreate withResourceStopped(String resourceStopped); @@ -235,80 +254,92 @@ interface WithResourceStopped { /** * 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, - UpdateStages.WithRegionEndpointEnabled, - UpdateStages.WithResourceStopped { + /** + * The template for Replica update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithRegionEndpointEnabled, + UpdateStages.WithResourceStopped { /** * 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. */ + /** + * The Replica update stages. + */ interface UpdateStages { - /** The stage of the Replica update allowing to specify tags. */ + /** + * 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. */ + /** + * 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); } - /** The stage of the Replica update allowing to specify regionEndpointEnabled. */ + /** + * The stage of the Replica update allowing to specify regionEndpointEnabled. + */ interface WithRegionEndpointEnabled { /** * Specifies the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to - * "Enabled". When it's Disabled, new connections will not be routed to this endpoint, however existing - * connections will not be affected.. - * - * @param regionEndpointEnabled Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not - * be affected. + * "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections + * will not be affected.. + * + * @param regionEndpointEnabled Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections + * will not be affected. * @return the next definition stage. */ Update withRegionEndpointEnabled(String regionEndpointEnabled); } - /** The stage of the Replica update allowing to specify resourceStopped. */ + /** + * The stage of the Replica update allowing to specify resourceStopped. + */ interface WithResourceStopped { /** - * Specifies the resourceStopped property: Stop or start the resource. Default to "false". When it's true, - * the data plane of the resource is shutdown. When it's false, the data plane of the resource is started.. - * - * @param resourceStopped Stop or start the resource. Default to "false". When it's true, the data plane of - * the resource is shutdown. When it's false, the data plane of the resource is started. + * Specifies the resourceStopped property: Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started.. + * + * @param resourceStopped Stop or start the resource. Default to "false". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. * @return the next definition stage. */ Update withResourceStopped(String resourceStopped); @@ -317,14 +348,14 @@ interface WithResourceStopped { /** * 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. */ @@ -332,7 +363,7 @@ interface WithResourceStopped { /** * 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. */ @@ -340,7 +371,7 @@ interface WithResourceStopped { /** * 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. 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 index 1ff57f8f91b9..50cc05fa4b83 100644 --- 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The ReplicaList model. */ +/** + * The ReplicaList model. + */ @Fluent public final class ReplicaList { /* @@ -25,13 +27,15 @@ public final class ReplicaList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of ReplicaList class. */ + /** + * Creates an instance of ReplicaList class. + */ public ReplicaList() { } /** * Get the value property: List of the replica. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of the replica. - * + * * @param value the value value to set. * @return the ReplicaList object itself. */ @@ -50,9 +54,9 @@ public ReplicaList withValue(List value) { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -60,9 +64,9 @@ public String 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. - * + * 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. */ @@ -73,7 +77,7 @@ public ReplicaList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogCategory.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogCategory.java index 5444de0dd8c2..7d9fab3653c2 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogCategory.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogCategory.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Resource log category configuration of a Microsoft.SignalRService resource. */ +/** + * Resource log category configuration of a Microsoft.SignalRService resource. + */ @Fluent public final class ResourceLogCategory { /* @@ -26,14 +28,17 @@ public final class ResourceLogCategory { @JsonProperty(value = "enabled") private String enabled; - /** Creates an instance of ResourceLogCategory class. */ + /** + * Creates an instance of ResourceLogCategory class. + */ public ResourceLogCategory() { } /** - * Get the name property: Gets or sets the resource log category's name. Available values: ConnectivityLogs, - * MessagingLogs. Case insensitive. - * + * Get the name property: Gets or sets the resource log category's name. + * Available values: ConnectivityLogs, MessagingLogs. + * Case insensitive. + * * @return the name value. */ public String name() { @@ -41,9 +46,10 @@ public String name() { } /** - * Set the name property: Gets or sets the resource log category's name. Available values: ConnectivityLogs, - * MessagingLogs. Case insensitive. - * + * Set the name property: Gets or sets the resource log category's name. + * Available values: ConnectivityLogs, MessagingLogs. + * Case insensitive. + * * @param name the name value to set. * @return the ResourceLogCategory object itself. */ @@ -53,9 +59,10 @@ public ResourceLogCategory withName(String name) { } /** - * Get the enabled property: Indicates whether or the resource log category is enabled. Available values: true, - * false. Case insensitive. - * + * Get the enabled property: Indicates whether or the resource log category is enabled. + * Available values: true, false. + * Case insensitive. + * * @return the enabled value. */ public String enabled() { @@ -63,9 +70,10 @@ public String enabled() { } /** - * Set the enabled property: Indicates whether or the resource log category is enabled. Available values: true, - * false. Case insensitive. - * + * Set the enabled property: Indicates whether or the resource log category is enabled. + * Available values: true, false. + * Case insensitive. + * * @param enabled the enabled value to set. * @return the ResourceLogCategory object itself. */ @@ -76,7 +84,7 @@ public ResourceLogCategory withEnabled(String enabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogConfiguration.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogConfiguration.java index 761cb73c22a7..0863f733759d 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogConfiguration.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceLogConfiguration.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Resource log configuration of a Microsoft.SignalRService resource. */ +/** + * Resource log configuration of a Microsoft.SignalRService resource. + */ @Fluent public final class ResourceLogConfiguration { /* @@ -17,13 +19,15 @@ public final class ResourceLogConfiguration { @JsonProperty(value = "categories") private List categories; - /** Creates an instance of ResourceLogConfiguration class. */ + /** + * Creates an instance of ResourceLogConfiguration class. + */ public ResourceLogConfiguration() { } /** * Get the categories property: Gets or sets the list of category configurations. - * + * * @return the categories value. */ public List categories() { @@ -32,7 +36,7 @@ public List categories() { /** * Set the categories property: Gets or sets the list of category configurations. - * + * * @param categories the categories value to set. * @return the ResourceLogConfiguration object itself. */ @@ -43,7 +47,7 @@ public ResourceLogConfiguration withCategories(List categor /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceReference.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceReference.java index 67335bf2c72c..10e6c970afbc 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceReference.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceReference.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Reference to a resource. */ +/** + * Reference to a resource. + */ @Fluent public final class ResourceReference { /* @@ -16,13 +18,15 @@ public final class ResourceReference { @JsonProperty(value = "id") private String id; - /** Creates an instance of ResourceReference class. */ + /** + * Creates an instance of ResourceReference class. + */ public ResourceReference() { } /** * Get the id property: Resource ID. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: Resource ID. - * + * * @param id the id value to set. * @return the ResourceReference object itself. */ @@ -42,7 +46,7 @@ public ResourceReference withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceSku.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceSku.java index 5f45056f0cd2..a4ccec09edae 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceSku.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceSku.java @@ -8,20 +8,22 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The billing information of the resource. */ +/** + * The billing information of the resource. + */ @Fluent public final class ResourceSku { /* * The name of the SKU. Required. - * - * Allowed values: Standard_S1, Free_F1, Premium_P1 + * + * Allowed values: Standard_S1, Free_F1, Premium_P1, Premium_P2 */ @JsonProperty(value = "name", required = true) private String name; /* - * Optional tier of this particular SKU. 'Standard' or 'Free'. - * + * Optional tier of this particular SKU. 'Standard' or 'Free'. + * * `Basic` is deprecated, use `Standard` instead. */ @JsonProperty(value = "tier") @@ -40,25 +42,29 @@ public final class ResourceSku { private String family; /* - * Optional, integer. The unit count of the resource. 1 by default. - * + * Optional, integer. The unit count of the resource. + * 1 for Free_F1/Standard_S1/Premium_P1, 100 for Premium_P2 by default. + * * If present, following values are allowed: - * Free: 1; - * Standard: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; - * Premium: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Free_F1: 1; + * Standard_S1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Premium_P1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Premium_P2: 100,200,300,400,500,600,700,800,900,1000; */ @JsonProperty(value = "capacity") private Integer capacity; - /** Creates an instance of ResourceSku class. */ + /** + * Creates an instance of ResourceSku class. + */ public ResourceSku() { } /** * Get the name property: The name of the SKU. Required. - * - *

Allowed values: Standard_S1, Free_F1, Premium_P1. - * + * + * Allowed values: Standard_S1, Free_F1, Premium_P1, Premium_P2. + * * @return the name value. */ public String name() { @@ -67,9 +73,9 @@ public String name() { /** * Set the name property: The name of the SKU. Required. - * - *

Allowed values: Standard_S1, Free_F1, Premium_P1. - * + * + * Allowed values: Standard_S1, Free_F1, Premium_P1, Premium_P2. + * * @param name the name value to set. * @return the ResourceSku object itself. */ @@ -80,9 +86,9 @@ public ResourceSku withName(String name) { /** * Get the tier property: Optional tier of this particular SKU. 'Standard' or 'Free'. - * - *

`Basic` is deprecated, use `Standard` instead. - * + * + * `Basic` is deprecated, use `Standard` instead. + * * @return the tier value. */ public WebPubSubSkuTier tier() { @@ -91,9 +97,9 @@ public WebPubSubSkuTier tier() { /** * Set the tier property: Optional tier of this particular SKU. 'Standard' or 'Free'. - * - *

`Basic` is deprecated, use `Standard` instead. - * + * + * `Basic` is deprecated, use `Standard` instead. + * * @param tier the tier value to set. * @return the ResourceSku object itself. */ @@ -104,7 +110,7 @@ public ResourceSku withTier(WebPubSubSkuTier tier) { /** * Get the size property: Not used. Retained for future use. - * + * * @return the size value. */ public String size() { @@ -113,7 +119,7 @@ public String size() { /** * Get the family property: Not used. Retained for future use. - * + * * @return the family value. */ public String family() { @@ -121,11 +127,15 @@ public String family() { } /** - * Get the capacity property: Optional, integer. The unit count of the resource. 1 by default. - * - *

If present, following values are allowed: Free: 1; Standard: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; - * Premium: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;. - * + * Get the capacity property: Optional, integer. The unit count of the resource. + * 1 for Free_F1/Standard_S1/Premium_P1, 100 for Premium_P2 by default. + * + * If present, following values are allowed: + * Free_F1: 1; + * Standard_S1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Premium_P1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Premium_P2: 100,200,300,400,500,600,700,800,900,1000;. + * * @return the capacity value. */ public Integer capacity() { @@ -133,11 +143,15 @@ public Integer capacity() { } /** - * Set the capacity property: Optional, integer. The unit count of the resource. 1 by default. - * - *

If present, following values are allowed: Free: 1; Standard: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; - * Premium: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;. - * + * Set the capacity property: Optional, integer. The unit count of the resource. + * 1 for Free_F1/Standard_S1/Premium_P1, 100 for Premium_P2 by default. + * + * If present, following values are allowed: + * Free_F1: 1; + * Standard_S1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Premium_P1: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100; + * Premium_P2: 100,200,300,400,500,600,700,800,900,1000;. + * * @param capacity the capacity value to set. * @return the ResourceSku object itself. */ @@ -148,14 +162,13 @@ public ResourceSku withCapacity(Integer capacity) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ResourceSku")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ResourceSku")); } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ScaleType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ScaleType.java index 0489de01400f..7f13e5796750 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ScaleType.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ScaleType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The scale type applicable to the sku. */ +/** + * The scale type applicable to the sku. + */ public final class ScaleType extends ExpandableStringEnum { - /** Static value None for ScaleType. */ + /** + * Static value None for ScaleType. + */ public static final ScaleType NONE = fromString("None"); - /** Static value Manual for ScaleType. */ + /** + * Static value Manual for ScaleType. + */ public static final ScaleType MANUAL = fromString("Manual"); - /** Static value Automatic for ScaleType. */ + /** + * Static value Automatic for ScaleType. + */ public static final ScaleType AUTOMATIC = fromString("Automatic"); /** * Creates a new instance of ScaleType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ScaleType() { /** * Creates or finds a ScaleType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScaleType. */ @@ -41,7 +49,7 @@ public static ScaleType fromString(String name) { /** * Gets known ScaleType values. - * + * * @return known ScaleType values. */ public static Collection values() { 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 index e17ceef78242..cd54e9914e0d 100644 --- 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 @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The kind of the service. */ +/** + * The kind of the service. + */ public final class ServiceKind extends ExpandableStringEnum { - /** Static value WebPubSub for ServiceKind. */ + /** + * Static value WebPubSub for ServiceKind. + */ public static final ServiceKind WEB_PUB_SUB = fromString("WebPubSub"); - /** Static value SocketIO for ServiceKind. */ + /** + * 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 @@ -27,7 +33,7 @@ public ServiceKind() { /** * Creates or finds a ServiceKind from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServiceKind. */ @@ -38,7 +44,7 @@ public static ServiceKind fromString(String name) { /** * Gets known ServiceKind values. - * + * * @return known ServiceKind values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ServiceSpecification.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ServiceSpecification.java index 16666540e9bb..998d68e57792 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ServiceSpecification.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ServiceSpecification.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An object that describes a specification. */ +/** + * An object that describes a specification. + */ @Fluent public final class ServiceSpecification { /* @@ -23,13 +25,15 @@ public final class ServiceSpecification { @JsonProperty(value = "logSpecifications") private List logSpecifications; - /** Creates an instance of ServiceSpecification class. */ + /** + * Creates an instance of ServiceSpecification class. + */ public ServiceSpecification() { } /** * Get the metricSpecifications property: Specifications of the Metrics for Azure Monitoring. - * + * * @return the metricSpecifications value. */ public List metricSpecifications() { @@ -38,7 +42,7 @@ public List metricSpecifications() { /** * Set the metricSpecifications property: Specifications of the Metrics for Azure Monitoring. - * + * * @param metricSpecifications the metricSpecifications value to set. * @return the ServiceSpecification object itself. */ @@ -49,7 +53,7 @@ public ServiceSpecification withMetricSpecifications(List m /** * Get the logSpecifications property: Specifications of the Logs for Azure Monitoring. - * + * * @return the logSpecifications value. */ public List logSpecifications() { @@ -58,7 +62,7 @@ public List logSpecifications() { /** * Set the logSpecifications property: Specifications of the Logs for Azure Monitoring. - * + * * @param logSpecifications the logSpecifications value to set. * @return the ServiceSpecification object itself. */ @@ -69,7 +73,7 @@ public ServiceSpecification withLogSpecifications(List logSpec /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ShareablePrivateLinkResourceProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ShareablePrivateLinkResourceProperties.java index cf3240cb9bfd..44cf6bf56146 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ShareablePrivateLinkResourceProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ShareablePrivateLinkResourceProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of a resource type that has been onboarded to private link service. */ +/** + * Describes the properties of a resource type that has been onboarded to private link service. + */ @Fluent public final class ShareablePrivateLinkResourceProperties { /* @@ -28,14 +30,16 @@ public final class ShareablePrivateLinkResourceProperties { @JsonProperty(value = "type") private String type; - /** Creates an instance of ShareablePrivateLinkResourceProperties class. */ + /** + * Creates an instance of ShareablePrivateLinkResourceProperties class. + */ public ShareablePrivateLinkResourceProperties() { } /** * Get the description property: The description of the resource type that has been onboarded to private link * service. - * + * * @return the description value. */ public String description() { @@ -45,7 +49,7 @@ public String description() { /** * Set the description property: The description of the resource type that has been onboarded to private link * service. - * + * * @param description the description value to set. * @return the ShareablePrivateLinkResourceProperties object itself. */ @@ -57,7 +61,7 @@ public ShareablePrivateLinkResourceProperties withDescription(String description /** * Get the groupId property: The resource provider group id for the resource that has been onboarded to private link * service. - * + * * @return the groupId value. */ public String groupId() { @@ -67,7 +71,7 @@ public String groupId() { /** * Set the groupId property: The resource provider group id for the resource that has been onboarded to private link * service. - * + * * @param groupId the groupId value to set. * @return the ShareablePrivateLinkResourceProperties object itself. */ @@ -79,7 +83,7 @@ public ShareablePrivateLinkResourceProperties withGroupId(String groupId) { /** * Get the type property: The resource provider type for the resource that has been onboarded to private link * service. - * + * * @return the type value. */ public String type() { @@ -89,7 +93,7 @@ public String type() { /** * Set the type property: The resource provider type for the resource that has been onboarded to private link * service. - * + * * @param type the type value to set. * @return the ShareablePrivateLinkResourceProperties object itself. */ @@ -100,7 +104,7 @@ public ShareablePrivateLinkResourceProperties withType(String type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ShareablePrivateLinkResourceType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ShareablePrivateLinkResourceType.java index 8059a7b041a5..c48c4410da68 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ShareablePrivateLinkResourceType.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ShareablePrivateLinkResourceType.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes a resource type that has been onboarded to private link service. */ +/** + * Describes a resource type that has been onboarded to private link service. + */ @Fluent public final class ShareablePrivateLinkResourceType { /* @@ -22,13 +24,15 @@ public final class ShareablePrivateLinkResourceType { @JsonProperty(value = "properties") private ShareablePrivateLinkResourceProperties properties; - /** Creates an instance of ShareablePrivateLinkResourceType class. */ + /** + * Creates an instance of ShareablePrivateLinkResourceType class. + */ public ShareablePrivateLinkResourceType() { } /** * Get the name property: The name of the resource type that has been onboarded to private link service. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: The name of the resource type that has been onboarded to private link service. - * + * * @param name the name value to set. * @return the ShareablePrivateLinkResourceType object itself. */ @@ -49,7 +53,7 @@ public ShareablePrivateLinkResourceType withName(String name) { /** * Get the properties property: Describes the properties of a resource type that has been onboarded to private link * service. - * + * * @return the properties value. */ public ShareablePrivateLinkResourceProperties properties() { @@ -59,7 +63,7 @@ public ShareablePrivateLinkResourceProperties properties() { /** * Set the properties property: Describes the properties of a resource type that has been onboarded to private link * service. - * + * * @param properties the properties value to set. * @return the ShareablePrivateLinkResourceType object itself. */ @@ -70,7 +74,7 @@ public ShareablePrivateLinkResourceType withProperties(ShareablePrivateLinkResou /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResource.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResource.java index d82fff67d2b1..5c01a93ffd48 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 @@ -8,53 +8,55 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; -/** An immutable client-side representation of SharedPrivateLinkResource. */ +/** + * An immutable client-side representation of SharedPrivateLinkResource. + */ public interface SharedPrivateLinkResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the groupId property: The group id from the provider of resource the shared private link resource is for. - * + * * @return the groupId value. */ String groupId(); /** * Gets the privateLinkResourceId property: The resource id of the resource the shared private link resource is for. - * + * * @return the privateLinkResourceId value. */ String privateLinkResourceId(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); @@ -62,109 +64,122 @@ public interface SharedPrivateLinkResource { /** * Gets the requestMessage property: The request message for requesting approval of the shared private link * resource. - * + * * @return the requestMessage value. */ String requestMessage(); /** * Gets the status property: Status of the shared private link resource. - * + * * @return the status value. */ SharedPrivateLinkResourceStatus status(); /** * 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.SharedPrivateLinkResourceInner object. - * + * * @return the inner object. */ SharedPrivateLinkResourceInner innerModel(); - /** The entirety of the SharedPrivateLinkResource definition. */ + /** + * The entirety of the SharedPrivateLinkResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The SharedPrivateLinkResource definition stages. */ + /** + * The SharedPrivateLinkResource definition stages. + */ interface DefinitionStages { - /** The first stage of the SharedPrivateLinkResource definition. */ + /** + * The first stage of the SharedPrivateLinkResource definition. + */ interface Blank extends WithParentResource { } - /** The stage of the SharedPrivateLinkResource definition allowing to specify parent resource. */ + /** + * The stage of the SharedPrivateLinkResource definition allowing to specify parent resource. + */ interface WithParentResource { /** - * Specifies resourceGroupName, resourceName. - * + * Specifies resourceGroupName, resourceName, replicaName. + * * @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. * @return the next definition stage. */ - WithCreate withExistingWebPubSub(String resourceGroupName, String resourceName); + WithCreate withExistingReplica(String resourceGroupName, String resourceName, String replicaName); } /** * The stage of the SharedPrivateLinkResource 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.WithGroupId, - DefinitionStages.WithPrivateLinkResourceId, - DefinitionStages.WithRequestMessage { + interface WithCreate extends DefinitionStages.WithGroupId, DefinitionStages.WithPrivateLinkResourceId, + DefinitionStages.WithRequestMessage { /** * Executes the create request. - * + * * @return the created resource. */ SharedPrivateLinkResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ SharedPrivateLinkResource create(Context context); } - /** The stage of the SharedPrivateLinkResource definition allowing to specify groupId. */ + /** + * The stage of the SharedPrivateLinkResource definition allowing to specify groupId. + */ interface WithGroupId { /** * Specifies the groupId property: The group id from the provider of resource the shared private link * resource is for. - * + * * @param groupId The group id from the provider of resource the shared private link resource is for. * @return the next definition stage. */ WithCreate withGroupId(String groupId); } - /** The stage of the SharedPrivateLinkResource definition allowing to specify privateLinkResourceId. */ + /** + * The stage of the SharedPrivateLinkResource definition allowing to specify privateLinkResourceId. + */ interface WithPrivateLinkResourceId { /** * Specifies the privateLinkResourceId property: The resource id of the resource the shared private link * resource is for. - * + * * @param privateLinkResourceId The resource id of the resource the shared private link resource is for. * @return the next definition stage. */ WithCreate withPrivateLinkResourceId(String privateLinkResourceId); } - /** The stage of the SharedPrivateLinkResource definition allowing to specify requestMessage. */ + /** + * The stage of the SharedPrivateLinkResource definition allowing to specify requestMessage. + */ interface WithRequestMessage { /** * Specifies the requestMessage property: The request message for requesting approval of the shared private * link resource. - * + * * @param requestMessage The request message for requesting approval of the shared private link resource. * @return the next definition stage. */ @@ -174,62 +189,72 @@ interface WithRequestMessage { /** * Begins update for the SharedPrivateLinkResource resource. - * + * * @return the stage of resource update. */ SharedPrivateLinkResource.Update update(); - /** The template for SharedPrivateLinkResource update. */ + /** + * The template for SharedPrivateLinkResource update. + */ interface Update extends UpdateStages.WithGroupId, UpdateStages.WithPrivateLinkResourceId, UpdateStages.WithRequestMessage { /** * Executes the update request. - * + * * @return the updated resource. */ SharedPrivateLinkResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ SharedPrivateLinkResource apply(Context context); } - /** The SharedPrivateLinkResource update stages. */ + /** + * The SharedPrivateLinkResource update stages. + */ interface UpdateStages { - /** The stage of the SharedPrivateLinkResource update allowing to specify groupId. */ + /** + * The stage of the SharedPrivateLinkResource update allowing to specify groupId. + */ interface WithGroupId { /** * Specifies the groupId property: The group id from the provider of resource the shared private link * resource is for. - * + * * @param groupId The group id from the provider of resource the shared private link resource is for. * @return the next definition stage. */ Update withGroupId(String groupId); } - /** The stage of the SharedPrivateLinkResource update allowing to specify privateLinkResourceId. */ + /** + * The stage of the SharedPrivateLinkResource update allowing to specify privateLinkResourceId. + */ interface WithPrivateLinkResourceId { /** * Specifies the privateLinkResourceId property: The resource id of the resource the shared private link * resource is for. - * + * * @param privateLinkResourceId The resource id of the resource the shared private link resource is for. * @return the next definition stage. */ Update withPrivateLinkResourceId(String privateLinkResourceId); } - /** The stage of the SharedPrivateLinkResource update allowing to specify requestMessage. */ + /** + * The stage of the SharedPrivateLinkResource update allowing to specify requestMessage. + */ interface WithRequestMessage { /** * Specifies the requestMessage property: The request message for requesting approval of the shared private * link resource. - * + * * @param requestMessage The request message for requesting approval of the shared private link resource. * @return the next definition stage. */ @@ -239,14 +264,14 @@ interface WithRequestMessage { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ SharedPrivateLinkResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResourceList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResourceList.java index 285564469460..eb73bcdbd785 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResourceList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResourceList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of shared private link resources. */ +/** + * A list of shared private link resources. + */ @Fluent public final class SharedPrivateLinkResourceList { /* @@ -19,19 +21,20 @@ public final class SharedPrivateLinkResourceList { private List value; /* - * Request URL that can be used to query next page of private endpoint connections. Returned when the total number - * of requested private endpoint connections exceed maximum page size. + * Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed maximum page size. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of SharedPrivateLinkResourceList class. */ + /** + * Creates an instance of SharedPrivateLinkResourceList class. + */ public SharedPrivateLinkResourceList() { } /** * Get the value property: The list of the shared private link resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +43,7 @@ public List value() { /** * Set the value property: The list of the shared private link resources. - * + * * @param value the value value to set. * @return the SharedPrivateLinkResourceList object itself. */ @@ -52,7 +55,7 @@ public SharedPrivateLinkResourceList withValue(List { - /** Static value Pending for SharedPrivateLinkResourceStatus. */ + /** + * Static value Pending for SharedPrivateLinkResourceStatus. + */ public static final SharedPrivateLinkResourceStatus PENDING = fromString("Pending"); - /** Static value Approved for SharedPrivateLinkResourceStatus. */ + /** + * Static value Approved for SharedPrivateLinkResourceStatus. + */ public static final SharedPrivateLinkResourceStatus APPROVED = fromString("Approved"); - /** Static value Rejected for SharedPrivateLinkResourceStatus. */ + /** + * Static value Rejected for SharedPrivateLinkResourceStatus. + */ public static final SharedPrivateLinkResourceStatus REJECTED = fromString("Rejected"); - /** Static value Disconnected for SharedPrivateLinkResourceStatus. */ + /** + * Static value Disconnected for SharedPrivateLinkResourceStatus. + */ public static final SharedPrivateLinkResourceStatus DISCONNECTED = fromString("Disconnected"); - /** Static value Timeout for SharedPrivateLinkResourceStatus. */ + /** + * Static value Timeout for SharedPrivateLinkResourceStatus. + */ public static final SharedPrivateLinkResourceStatus TIMEOUT = fromString("Timeout"); /** * Creates a new instance of SharedPrivateLinkResourceStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public SharedPrivateLinkResourceStatus() { /** * Creates or finds a SharedPrivateLinkResourceStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding SharedPrivateLinkResourceStatus. */ @@ -47,7 +59,7 @@ public static SharedPrivateLinkResourceStatus fromString(String name) { /** * Gets known SharedPrivateLinkResourceStatus values. - * + * * @return known SharedPrivateLinkResourceStatus values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsage.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsage.java index 043afa234fa6..96d73110dbd5 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsage.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsage.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.webpubsub.fluent.models.SignalRServiceUsageInner; -/** An immutable client-side representation of SignalRServiceUsage. */ +/** + * An immutable client-side representation of SignalRServiceUsage. + */ public interface SignalRServiceUsage { /** * Gets the id property: Fully qualified ARM resource id. - * + * * @return the id value. */ String id(); /** * Gets the currentValue property: Current value for the usage quota. - * + * * @return the currentValue value. */ Long currentValue(); @@ -25,14 +27,14 @@ public interface SignalRServiceUsage { /** * Gets the limit property: The maximum permitted value for the usage quota. If there is no limit, this value will * be -1. - * + * * @return the limit value. */ Long limit(); /** * Gets the name property: Localizable String object containing the name and a localized value. - * + * * @return the name value. */ SignalRServiceUsageName name(); @@ -40,14 +42,14 @@ public interface SignalRServiceUsage { /** * Gets the unit property: Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, * Percent, CountPerSecond, BytesPerSecond. - * + * * @return the unit value. */ String unit(); /** * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.SignalRServiceUsageInner object. - * + * * @return the inner object. */ SignalRServiceUsageInner innerModel(); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsageList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsageList.java index 717349f4dbf6..832319e086f8 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsageList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsageList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Object that includes an array of the resource usages and a possible link for next set. */ +/** + * Object that includes an array of the resource usages and a possible link for next set. + */ @Fluent public final class SignalRServiceUsageList { /* @@ -25,13 +27,15 @@ public final class SignalRServiceUsageList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of SignalRServiceUsageList class. */ + /** + * Creates an instance of SignalRServiceUsageList class. + */ public SignalRServiceUsageList() { } /** * Get the value property: List of the resource usages. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of the resource usages. - * + * * @param value the value value to set. * @return the SignalRServiceUsageList object itself. */ @@ -50,9 +54,9 @@ public SignalRServiceUsageList withValue(List value) { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -60,9 +64,9 @@ public String 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. - * + * 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 SignalRServiceUsageList object itself. */ @@ -73,7 +77,7 @@ public SignalRServiceUsageList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsageName.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsageName.java index 2ecf56041da7..4bc85075e309 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsageName.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SignalRServiceUsageName.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localizable String object containing the name and a localized value. */ +/** + * Localizable String object containing the name and a localized value. + */ @Fluent public final class SignalRServiceUsageName { /* @@ -22,13 +24,15 @@ public final class SignalRServiceUsageName { @JsonProperty(value = "localizedValue") private String localizedValue; - /** Creates an instance of SignalRServiceUsageName class. */ + /** + * Creates an instance of SignalRServiceUsageName class. + */ public SignalRServiceUsageName() { } /** * Get the value property: The identifier of the usage. - * + * * @return the value value. */ public String value() { @@ -37,7 +41,7 @@ public String value() { /** * Set the value property: The identifier of the usage. - * + * * @param value the value value to set. * @return the SignalRServiceUsageName object itself. */ @@ -48,7 +52,7 @@ public SignalRServiceUsageName withValue(String value) { /** * Get the localizedValue property: Localized name of the usage. - * + * * @return the localizedValue value. */ public String localizedValue() { @@ -57,7 +61,7 @@ public String localizedValue() { /** * Set the localizedValue property: Localized name of the usage. - * + * * @param localizedValue the localizedValue value to set. * @return the SignalRServiceUsageName object itself. */ @@ -68,7 +72,7 @@ public SignalRServiceUsageName withLocalizedValue(String localizedValue) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Sku.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Sku.java index 6bccc848777e..c528b08c4d7b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Sku.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Sku.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes an available sku.". */ +/** + * Describes an available sku.". + */ @Immutable public final class Sku { /* @@ -28,13 +30,15 @@ public final class Sku { @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY) private SkuCapacity capacity; - /** Creates an instance of Sku class. */ + /** + * Creates an instance of Sku class. + */ public Sku() { } /** * Get the resourceType property: The resource type that this object applies to. - * + * * @return the resourceType value. */ public String resourceType() { @@ -43,7 +47,7 @@ public String resourceType() { /** * Get the sku property: The billing information of the resource. - * + * * @return the sku value. */ public ResourceSku sku() { @@ -52,7 +56,7 @@ public ResourceSku sku() { /** * Get the capacity property: Describes scaling information of a sku. - * + * * @return the capacity value. */ public SkuCapacity capacity() { @@ -61,7 +65,7 @@ public SkuCapacity capacity() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuCapacity.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuCapacity.java index 35c6f457206c..804db42982f3 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuCapacity.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuCapacity.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes scaling information of a sku. */ +/** + * Describes scaling information of a sku. + */ @Immutable public final class SkuCapacity { /* @@ -41,13 +43,15 @@ public final class SkuCapacity { @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) private ScaleType scaleType; - /** Creates an instance of SkuCapacity class. */ + /** + * Creates an instance of SkuCapacity class. + */ public SkuCapacity() { } /** * Get the minimum property: The lowest permitted capacity for this resource. - * + * * @return the minimum value. */ public Integer minimum() { @@ -56,7 +60,7 @@ public Integer minimum() { /** * Get the maximum property: The highest permitted capacity for this resource. - * + * * @return the maximum value. */ public Integer maximum() { @@ -65,7 +69,7 @@ public Integer maximum() { /** * Get the defaultProperty property: The default capacity. - * + * * @return the defaultProperty value. */ public Integer defaultProperty() { @@ -74,7 +78,7 @@ public Integer defaultProperty() { /** * Get the allowedValues property: Allows capacity value list. - * + * * @return the allowedValues value. */ public List allowedValues() { @@ -83,7 +87,7 @@ public List allowedValues() { /** * Get the scaleType property: The scale type applicable to the sku. - * + * * @return the scaleType value. */ public ScaleType scaleType() { @@ -92,7 +96,7 @@ public ScaleType scaleType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuList.java index 43fe311e70ce..2968eedf65b5 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SkuList.java @@ -7,26 +7,28 @@ import com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner; import java.util.List; -/** An immutable client-side representation of SkuList. */ +/** + * An immutable client-side representation of SkuList. + */ public interface SkuList { /** * Gets the value property: The list of skus available for the resource. - * + * * @return the value value. */ List value(); /** - * Gets the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * Gets the nextLink property: The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + * * @return the nextLink value. */ String nextLink(); /** * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner object. - * + * * @return the inner object. */ SkuListInner innerModel(); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UpstreamAuthSettings.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UpstreamAuthSettings.java index 0d230110f47e..3c49cd96a059 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UpstreamAuthSettings.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UpstreamAuthSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Upstream auth settings. If not set, no auth is used for upstream messages. */ +/** + * Upstream auth settings. If not set, no auth is used for upstream messages. + */ @Fluent public final class UpstreamAuthSettings { /* @@ -22,13 +24,15 @@ public final class UpstreamAuthSettings { @JsonProperty(value = "managedIdentity") private ManagedIdentitySettings managedIdentity; - /** Creates an instance of UpstreamAuthSettings class. */ + /** + * Creates an instance of UpstreamAuthSettings class. + */ public UpstreamAuthSettings() { } /** * Get the type property: Upstream auth type enum. - * + * * @return the type value. */ public UpstreamAuthType type() { @@ -37,7 +41,7 @@ public UpstreamAuthType type() { /** * Set the type property: Upstream auth type enum. - * + * * @param type the type value to set. * @return the UpstreamAuthSettings object itself. */ @@ -48,7 +52,7 @@ public UpstreamAuthSettings withType(UpstreamAuthType type) { /** * Get the managedIdentity property: Managed identity settings for upstream. - * + * * @return the managedIdentity value. */ public ManagedIdentitySettings managedIdentity() { @@ -57,7 +61,7 @@ public ManagedIdentitySettings managedIdentity() { /** * Set the managedIdentity property: Managed identity settings for upstream. - * + * * @param managedIdentity the managedIdentity value to set. * @return the UpstreamAuthSettings object itself. */ @@ -68,7 +72,7 @@ public UpstreamAuthSettings withManagedIdentity(ManagedIdentitySettings managedI /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UpstreamAuthType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UpstreamAuthType.java index fbffbe55f8db..a521145f7e51 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UpstreamAuthType.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UpstreamAuthType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Upstream auth type enum. */ +/** + * Upstream auth type enum. + */ public final class UpstreamAuthType extends ExpandableStringEnum { - /** Static value None for UpstreamAuthType. */ + /** + * Static value None for UpstreamAuthType. + */ public static final UpstreamAuthType NONE = fromString("None"); - /** Static value ManagedIdentity for UpstreamAuthType. */ + /** + * Static value ManagedIdentity for UpstreamAuthType. + */ public static final UpstreamAuthType MANAGED_IDENTITY = fromString("ManagedIdentity"); /** * Creates a new instance of UpstreamAuthType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public UpstreamAuthType() { /** * Creates or finds a UpstreamAuthType from its string representation. - * + * * @param name a name to look for. * @return the corresponding UpstreamAuthType. */ @@ -38,7 +44,7 @@ public static UpstreamAuthType fromString(String name) { /** * Gets known UpstreamAuthType values. - * + * * @return known UpstreamAuthType values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Usages.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Usages.java index 7edee1218a36..a07a2eaf6050 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Usages.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Usages.java @@ -7,30 +7,32 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Usages. */ +/** + * Resource collection API of Usages. + */ public interface Usages { /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @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 object that includes an array of the resource usages and a possible link for next set as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ PagedIterable list(String location); /** * List resource usage quotas by location. - * + * * @param location the location like "eastus". * @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 object that includes an array of the resource usages and a possible link for next set as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ PagedIterable list(String location, Context context); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UserAssignedIdentityProperty.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UserAssignedIdentityProperty.java index 4ad41a3ee67f..19bafeaa7d08 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UserAssignedIdentityProperty.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/UserAssignedIdentityProperty.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of user assigned identity. */ +/** + * Properties of user assigned identity. + */ @Immutable public final class UserAssignedIdentityProperty { /* @@ -22,13 +24,15 @@ public final class UserAssignedIdentityProperty { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private String clientId; - /** Creates an instance of UserAssignedIdentityProperty class. */ + /** + * Creates an instance of UserAssignedIdentityProperty class. + */ public UserAssignedIdentityProperty() { } /** * Get the principalId property: Get the principal id for the user assigned identity. - * + * * @return the principalId value. */ public String principalId() { @@ -37,7 +41,7 @@ public String principalId() { /** * Get the clientId property: Get the client id for the user assigned identity. - * + * * @return the clientId value. */ public String clientId() { @@ -46,7 +50,7 @@ public String clientId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomCertificates.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomCertificates.java index 945b2224f804..891c027d963e 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WebPubSubCustomCertificates. */ +/** + * Resource collection API of WebPubSubCustomCertificates. + */ public interface WebPubSubCustomCertificates { /** * List all custom certificates. - * + * * @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. @@ -24,7 +26,7 @@ public interface WebPubSubCustomCertificates { /** * List all custom certificates. - * + * * @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. @@ -37,7 +39,7 @@ public interface WebPubSubCustomCertificates { /** * Get a custom certificate. - * + * * @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. @@ -47,12 +49,12 @@ public interface WebPubSubCustomCertificates { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a custom certificate along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String resourceName, String certificateName, Context context); + Response getWithResponse(String resourceGroupName, String resourceName, String certificateName, + Context context); /** * Get a custom certificate. - * + * * @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. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Delete a custom certificate. - * + * * @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. @@ -75,12 +77,12 @@ Response getWithResponse( * @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 certificateName, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String certificateName, + Context context); /** * Delete a custom certificate. - * + * * @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. @@ -92,7 +94,7 @@ Response deleteWithResponse( /** * Get a custom certificate. - * + * * @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. @@ -103,7 +105,7 @@ Response deleteWithResponse( /** * Get a custom certificate. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +117,7 @@ Response deleteWithResponse( /** * Delete a custom certificate. - * + * * @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. @@ -125,7 +127,7 @@ Response deleteWithResponse( /** * Delete a custom certificate. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +139,7 @@ Response deleteWithResponse( /** * Begins definition for a new CustomCertificate resource. - * + * * @param name resource name. * @return the first stage of the new CustomCertificate definition. */ 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 00a8614f4022..f64b95b5280c 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WebPubSubCustomDomains. */ +/** + * Resource collection API of WebPubSubCustomDomains. + */ public interface WebPubSubCustomDomains { /** * List all custom domains. - * + * * @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. @@ -24,7 +26,7 @@ public interface WebPubSubCustomDomains { /** * List all custom domains. - * + * * @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. @@ -37,7 +39,7 @@ public interface WebPubSubCustomDomains { /** * Get a custom domain. - * + * * @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. @@ -51,7 +53,7 @@ public interface WebPubSubCustomDomains { /** * Get a custom domain. - * + * * @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. @@ -64,7 +66,7 @@ public interface WebPubSubCustomDomains { /** * Delete a custom domain. - * + * * @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. @@ -76,7 +78,7 @@ public interface WebPubSubCustomDomains { /** * Delete a custom domain. - * + * * @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. @@ -89,7 +91,7 @@ public interface WebPubSubCustomDomains { /** * Get a custom domain. - * + * * @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. @@ -100,7 +102,7 @@ public interface WebPubSubCustomDomains { /** * Get a custom domain. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -112,7 +114,7 @@ public interface WebPubSubCustomDomains { /** * Delete a custom domain. - * + * * @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. @@ -122,7 +124,7 @@ public interface WebPubSubCustomDomains { /** * Delete a custom domain. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,7 +135,7 @@ public interface WebPubSubCustomDomains { /** * Begins definition for a new CustomDomain resource. - * + * * @param name resource name. * @return the first stage of the new CustomDomain definition. */ 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 ecfde43ea642..e7430d98d238 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 @@ -8,76 +8,83 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner; -/** An immutable client-side representation of WebPubSubHub. */ +/** + * An immutable client-side representation of WebPubSubHub. + */ public interface WebPubSubHub { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Properties of a hub. - * + * * @return the properties value. */ WebPubSubHubProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * 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.WebPubSubHubInner object. - * + * * @return the inner object. */ WebPubSubHubInner innerModel(); - /** The entirety of the WebPubSubHub definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the WebPubSubHub definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The WebPubSubHub definition stages. */ + /** + * The WebPubSubHub definition stages. + */ interface DefinitionStages { - /** The first stage of the WebPubSubHub definition. */ + /** + * The first stage of the WebPubSubHub definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WebPubSubHub definition allowing to specify parent resource. */ + /** + * The stage of the WebPubSubHub 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. @@ -85,11 +92,13 @@ interface WithParentResource { WithProperties withExistingWebPubSub(String resourceGroupName, String resourceName); } - /** The stage of the WebPubSubHub definition allowing to specify properties. */ + /** + * The stage of the WebPubSubHub definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Properties of a hub.. - * + * * @param properties Properties of a hub. * @return the next definition stage. */ @@ -103,14 +112,14 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ WebPubSubHub create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ @@ -120,36 +129,42 @@ interface WithCreate { /** * Begins update for the WebPubSubHub resource. - * + * * @return the stage of resource update. */ WebPubSubHub.Update update(); - /** The template for WebPubSubHub update. */ + /** + * The template for WebPubSubHub update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ WebPubSubHub apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WebPubSubHub apply(Context context); } - /** The WebPubSubHub update stages. */ + /** + * The WebPubSubHub update stages. + */ interface UpdateStages { - /** The stage of the WebPubSubHub update allowing to specify properties. */ + /** + * The stage of the WebPubSubHub update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Properties of a hub.. - * + * * @param properties Properties of a hub. * @return the next definition stage. */ @@ -159,14 +174,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WebPubSubHub refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java index 8b10a1a8e49c..e4115004083d 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Hub setting list. */ +/** + * Hub setting list. + */ @Fluent public final class WebPubSubHubList { /* @@ -25,13 +27,15 @@ public final class WebPubSubHubList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of WebPubSubHubList class. */ + /** + * Creates an instance of WebPubSubHubList class. + */ public WebPubSubHubList() { } /** * Get the value property: List of hub settings to this resource. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of hub settings to this resource. - * + * * @param value the value value to set. * @return the WebPubSubHubList object itself. */ @@ -50,9 +54,9 @@ public WebPubSubHubList withValue(List value) { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -61,7 +65,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubProperties.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubProperties.java index 880278dc85be..9206413ff180 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubProperties.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a hub. */ +/** + * Properties of a hub. + */ @Fluent public final class WebPubSubHubProperties { /* @@ -19,29 +21,34 @@ public final class WebPubSubHubProperties { /* * Event listener settings for forwarding your client events to listeners. - * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt - * the lifetime of clients. - * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of - * the array elements doesn't matter. + * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients. + * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter. * Maximum count of event listeners among all hubs is 10. */ @JsonProperty(value = "eventListeners") private List eventListeners; /* - * The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to - * "deny". + * The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny". */ @JsonProperty(value = "anonymousConnectPolicy") private String anonymousConnectPolicy; - /** Creates an instance of WebPubSubHubProperties class. */ + /* + * The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub. Valid range: 1 to 120. Default to 20 seconds. + */ + @JsonProperty(value = "webSocketKeepAliveIntervalInSeconds") + private Integer webSocketKeepAliveIntervalInSeconds; + + /** + * Creates an instance of WebPubSubHubProperties class. + */ public WebPubSubHubProperties() { } /** * Get the eventHandlers property: Event handler of a hub. - * + * * @return the eventHandlers value. */ public List eventHandlers() { @@ -50,7 +57,7 @@ public List eventHandlers() { /** * Set the eventHandlers property: Event handler of a hub. - * + * * @param eventHandlers the eventHandlers value to set. * @return the WebPubSubHubProperties object itself. */ @@ -60,11 +67,13 @@ public WebPubSubHubProperties withEventHandlers(List eventHandlers } /** - * Get the eventListeners property: Event listener settings for forwarding your client events to listeners. Event - * listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the - * lifetime of clients. One event can be sent to multiple listeners, as long as it matches the filters in those - * listeners. The order of the array elements doesn't matter. Maximum count of event listeners among all hubs is 10. - * + * Get the eventListeners property: Event listener settings for forwarding your client events to listeners. + * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt + * the lifetime of clients. + * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of + * the array elements doesn't matter. + * Maximum count of event listeners among all hubs is 10. + * * @return the eventListeners value. */ public List eventListeners() { @@ -72,11 +81,13 @@ public List eventListeners() { } /** - * Set the eventListeners property: Event listener settings for forwarding your client events to listeners. Event - * listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the - * lifetime of clients. One event can be sent to multiple listeners, as long as it matches the filters in those - * listeners. The order of the array elements doesn't matter. Maximum count of event listeners among all hubs is 10. - * + * Set the eventListeners property: Event listener settings for forwarding your client events to listeners. + * Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt + * the lifetime of clients. + * One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of + * the array elements doesn't matter. + * Maximum count of event listeners among all hubs is 10. + * * @param eventListeners the eventListeners value to set. * @return the WebPubSubHubProperties object itself. */ @@ -88,7 +99,7 @@ public WebPubSubHubProperties withEventListeners(List eventListen /** * Get the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for * this hub: "allow" or "deny". Default to "deny". - * + * * @return the anonymousConnectPolicy value. */ public String anonymousConnectPolicy() { @@ -98,7 +109,7 @@ public String anonymousConnectPolicy() { /** * Set the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for * this hub: "allow" or "deny". Default to "deny". - * + * * @param anonymousConnectPolicy the anonymousConnectPolicy value to set. * @return the WebPubSubHubProperties object itself. */ @@ -107,9 +118,31 @@ public WebPubSubHubProperties withAnonymousConnectPolicy(String anonymousConnect return this; } + /** + * Get the webSocketKeepAliveIntervalInSeconds property: The settings for configuring the WebSocket ping-pong + * interval in seconds for all clients in the hub. Valid range: 1 to 120. Default to 20 seconds. + * + * @return the webSocketKeepAliveIntervalInSeconds value. + */ + public Integer webSocketKeepAliveIntervalInSeconds() { + return this.webSocketKeepAliveIntervalInSeconds; + } + + /** + * Set the webSocketKeepAliveIntervalInSeconds property: The settings for configuring the WebSocket ping-pong + * interval in seconds for all clients in the hub. Valid range: 1 to 120. Default to 20 seconds. + * + * @param webSocketKeepAliveIntervalInSeconds the webSocketKeepAliveIntervalInSeconds value to set. + * @return the WebPubSubHubProperties object itself. + */ + public WebPubSubHubProperties withWebSocketKeepAliveIntervalInSeconds(Integer webSocketKeepAliveIntervalInSeconds) { + this.webSocketKeepAliveIntervalInSeconds = webSocketKeepAliveIntervalInSeconds; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubs.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubs.java index e927c8db3718..3895a797c3be 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WebPubSubHubs. */ +/** + * Resource collection API of WebPubSubHubs. + */ public interface WebPubSubHubs { /** * List hub settings. - * + * * @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. @@ -24,7 +26,7 @@ public interface WebPubSubHubs { /** * List hub settings. - * + * * @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. @@ -37,7 +39,7 @@ public interface WebPubSubHubs { /** * Get a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -47,12 +49,12 @@ public interface WebPubSubHubs { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a hub setting along with {@link Response}. */ - Response getWithResponse( - String hubName, String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String hubName, String resourceGroupName, String resourceName, + Context context); /** * Get a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -77,7 +79,7 @@ Response getWithResponse( /** * Delete a hub setting. - * + * * @param hubName The hub name. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -90,7 +92,7 @@ Response getWithResponse( /** * Get a hub setting. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,7 +103,7 @@ Response getWithResponse( /** * Get a hub setting. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,7 +115,7 @@ Response getWithResponse( /** * Delete a hub setting. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -123,7 +125,7 @@ Response getWithResponse( /** * Delete a hub setting. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse( /** * Begins definition for a new WebPubSubHub resource. - * + * * @param name resource name. * @return the first stage of the new WebPubSubHub definition. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubKeys.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubKeys.java index 0f5d45d9e984..ab5ea8831944 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubKeys.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubKeys.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubKeysInner; -/** An immutable client-side representation of WebPubSubKeys. */ +/** + * An immutable client-side representation of WebPubSubKeys. + */ public interface WebPubSubKeys { /** * Gets the primaryKey property: The primary access key. - * + * * @return the primaryKey value. */ String primaryKey(); /** * Gets the secondaryKey property: The secondary access key. - * + * * @return the secondaryKey value. */ String secondaryKey(); /** * Gets the primaryConnectionString property: Connection string constructed via the primaryKey. - * + * * @return the primaryConnectionString value. */ String primaryConnectionString(); /** * Gets the secondaryConnectionString property: Connection string constructed via the secondaryKey. - * + * * @return the secondaryConnectionString value. */ String secondaryConnectionString(); /** * Gets the inner com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubKeysInner object. - * + * * @return the inner object. */ WebPubSubKeysInner innerModel(); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubNetworkACLs.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubNetworkACLs.java index b6d379e45607..d69b05d99cdc 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubNetworkACLs.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubNetworkACLs.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Network ACLs for the resource. */ +/** + * Network ACLs for the resource. + */ @Fluent public final class WebPubSubNetworkACLs { /* @@ -35,13 +37,15 @@ public final class WebPubSubNetworkACLs { @JsonProperty(value = "ipRules") private List ipRules; - /** Creates an instance of WebPubSubNetworkACLs class. */ + /** + * Creates an instance of WebPubSubNetworkACLs class. + */ public WebPubSubNetworkACLs() { } /** * Get the defaultAction property: Azure Networking ACL Action. - * + * * @return the defaultAction value. */ public AclAction defaultAction() { @@ -50,7 +54,7 @@ public AclAction defaultAction() { /** * Set the defaultAction property: Azure Networking ACL Action. - * + * * @param defaultAction the defaultAction value to set. * @return the WebPubSubNetworkACLs object itself. */ @@ -61,7 +65,7 @@ public WebPubSubNetworkACLs withDefaultAction(AclAction defaultAction) { /** * Get the publicNetwork property: Network ACL. - * + * * @return the publicNetwork value. */ public NetworkAcl publicNetwork() { @@ -70,7 +74,7 @@ public NetworkAcl publicNetwork() { /** * Set the publicNetwork property: Network ACL. - * + * * @param publicNetwork the publicNetwork value to set. * @return the WebPubSubNetworkACLs object itself. */ @@ -81,7 +85,7 @@ public WebPubSubNetworkACLs withPublicNetwork(NetworkAcl publicNetwork) { /** * Get the privateEndpoints property: ACLs for requests from private endpoints. - * + * * @return the privateEndpoints value. */ public List privateEndpoints() { @@ -90,7 +94,7 @@ public List privateEndpoints() { /** * Set the privateEndpoints property: ACLs for requests from private endpoints. - * + * * @param privateEndpoints the privateEndpoints value to set. * @return the WebPubSubNetworkACLs object itself. */ @@ -101,7 +105,7 @@ public WebPubSubNetworkACLs withPrivateEndpoints(List privat /** * Get the ipRules property: IP rules for filtering public traffic. - * + * * @return the ipRules value. */ public List ipRules() { @@ -110,7 +114,7 @@ public List ipRules() { /** * Set the ipRules property: IP rules for filtering public traffic. - * + * * @param ipRules the ipRules value to set. * @return the WebPubSubNetworkACLs object itself. */ @@ -121,7 +125,7 @@ public WebPubSubNetworkACLs withIpRules(List ipRules) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateEndpointConnections.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubPrivateEndpointConnections.java index 1226b397c3a8..cf976e792cc1 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 @@ -9,11 +9,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner; -/** Resource collection API of WebPubSubPrivateEndpointConnections. */ +/** + * Resource collection API of WebPubSubPrivateEndpointConnections. + */ public interface WebPubSubPrivateEndpointConnections { /** * List private endpoint connections. - * + * * @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. @@ -25,7 +27,7 @@ public interface WebPubSubPrivateEndpointConnections { /** * List private endpoint connections. - * + * * @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. @@ -38,9 +40,9 @@ public interface WebPubSubPrivateEndpointConnections { /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -49,14 +51,14 @@ public interface WebPubSubPrivateEndpointConnections { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified private endpoint connection along with {@link Response}. */ - Response getWithResponse( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String privateEndpointConnectionName, String resourceGroupName, + String resourceName, Context context); /** * Get the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -68,9 +70,9 @@ Response getWithResponse( /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -80,18 +82,14 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection to an azure resource along with {@link Response}. */ - Response updateWithResponse( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters, - Context context); + Response updateWithResponse(String privateEndpointConnectionName, + String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters, Context context); /** * Update the state of specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -100,17 +98,14 @@ Response updateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection to an azure resource. */ - PrivateEndpointConnection update( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters); + PrivateEndpointConnection update(String privateEndpointConnectionName, String resourceGroupName, + String resourceName, PrivateEndpointConnectionInner parameters); /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -121,9 +116,9 @@ PrivateEndpointConnection update( /** * Delete the specified private endpoint connection. - * + * * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. 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 017eef6c9ba9..6fedd4d23dce 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 @@ -7,32 +7,34 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of WebPubSubPrivateLinkResources. */ +/** + * Resource collection API of WebPubSubPrivateLinkResources. + */ public interface WebPubSubPrivateLinkResources { /** * Get the private link resources that need to be created for a 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 private link resources that need to be created for a resource as paginated response with {@link - * PagedIterable}. + * @return the private link resources that need to be created for a resource as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName); /** * Get the private link resources that need to be created for a 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 private link resources that need to be created for a resource as paginated response with {@link - * PagedIterable}. + * @return the private link resources that need to be created for a resource as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName, Context context); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubReplicaSharedPrivateLinkResources.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubReplicaSharedPrivateLinkResources.java new file mode 100644 index 000000000000..2e00eb740585 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubReplicaSharedPrivateLinkResources.java @@ -0,0 +1,104 @@ +// 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 WebPubSubReplicaSharedPrivateLinkResources. + */ +public interface WebPubSubReplicaSharedPrivateLinkResources { + /** + * List shared private link resources. + * + * @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 a list of shared private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, String replicaName); + + /** + * List shared private link resources. + * + * @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 a list of shared private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, String replicaName, + Context context); + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String resourceName, + String replicaName, String sharedPrivateLinkResourceName, Context context); + + /** + * Get the specified shared private link 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 sharedPrivateLinkResourceName The name of the shared private link 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 specified shared private link resource. + */ + SharedPrivateLinkResource get(String resourceGroupName, String resourceName, String replicaName, + String sharedPrivateLinkResourceName); + + /** + * Get the specified shared private link resource. + * + * @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 specified shared private link resource along with {@link Response}. + */ + SharedPrivateLinkResource getById(String id); + + /** + * Get the specified shared private link resource. + * + * @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 specified shared private link resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new SharedPrivateLinkResource resource. + * + * @param name resource name. + * @return the first stage of the new SharedPrivateLinkResource definition. + */ + SharedPrivateLinkResource.DefinitionStages.Blank define(String name); +} 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 index 089f3f090f1a..d231b576eaaa 100644 --- 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WebPubSubReplicas. */ +/** + * 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. @@ -24,7 +26,7 @@ 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. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface WebPubSubReplicas { /** * 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. @@ -47,12 +49,12 @@ public interface WebPubSubReplicas { * @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); + 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. @@ -65,7 +67,7 @@ Response getWithResponse( /** * 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. @@ -75,12 +77,12 @@ Response getWithResponse( * @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); + 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. @@ -92,7 +94,7 @@ Response deleteWithResponse( /** * 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. @@ -104,7 +106,7 @@ Response deleteWithResponse( /** * 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. @@ -117,7 +119,7 @@ Response deleteWithResponse( /** * 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. @@ -128,7 +130,7 @@ Response deleteWithResponse( /** * 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. @@ -140,7 +142,7 @@ Response deleteWithResponse( /** * 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. @@ -150,7 +152,7 @@ Response deleteWithResponse( /** * 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. @@ -162,7 +164,7 @@ Response deleteWithResponse( /** * Begins definition for a new Replica resource. - * + * * @param name resource name. * @return the first stage of the new Replica definition. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubRequestType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubRequestType.java index 513d4ea85d99..744d39c4c39c 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubRequestType.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubRequestType.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The incoming request type to the service. */ +/** + * The incoming request type to the service. + */ public final class WebPubSubRequestType extends ExpandableStringEnum { - /** Static value ClientConnection for WebPubSubRequestType. */ + /** + * Static value ClientConnection for WebPubSubRequestType. + */ public static final WebPubSubRequestType CLIENT_CONNECTION = fromString("ClientConnection"); - /** Static value ServerConnection for WebPubSubRequestType. */ + /** + * Static value ServerConnection for WebPubSubRequestType. + */ public static final WebPubSubRequestType SERVER_CONNECTION = fromString("ServerConnection"); - /** Static value RESTAPI for WebPubSubRequestType. */ + /** + * Static value RESTAPI for WebPubSubRequestType. + */ public static final WebPubSubRequestType RESTAPI = fromString("RESTAPI"); - /** Static value Trace for WebPubSubRequestType. */ + /** + * Static value Trace for WebPubSubRequestType. + */ public static final WebPubSubRequestType TRACE = fromString("Trace"); /** * Creates a new instance of WebPubSubRequestType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public WebPubSubRequestType() { /** * Creates or finds a WebPubSubRequestType from its string representation. - * + * * @param name a name to look for. * @return the corresponding WebPubSubRequestType. */ @@ -44,7 +54,7 @@ public static WebPubSubRequestType fromString(String name) { /** * Gets known WebPubSubRequestType values. - * + * * @return known WebPubSubRequestType values. */ public static Collection values() { 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 bfd1e1ea83e7..36150aacf1f3 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 @@ -12,88 +12,90 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of WebPubSubResource. */ +/** + * An immutable client-side representation of WebPubSubResource. + */ public interface WebPubSubResource { /** * 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 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. - * + * * @return the identity value. */ ManagedIdentity identity(); /** * 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 externalIp property: The publicly accessible IP of the resource. - * + * * @return the externalIp value. */ String externalIp(); /** * Gets the hostname property: FQDN of the service instance. - * + * * @return the hostname value. */ String hostname(); @@ -101,7 +103,7 @@ public interface WebPubSubResource { /** * Gets the publicPort property: The publicly accessible port of the resource which is designed for browser/client * side usage. - * + * * @return the publicPort value. */ Integer publicPort(); @@ -109,156 +111,172 @@ public interface WebPubSubResource { /** * Gets the serverPort property: The publicly accessible port of the resource which is designed for customer server * side usage. - * + * * @return the serverPort value. */ Integer serverPort(); /** * Gets the version property: Version of the resource. Probably you need the same or higher version of client SDKs. - * + * * @return the version value. */ String version(); /** * Gets the privateEndpointConnections property: Private endpoint connections to the resource. - * + * * @return the privateEndpointConnections value. */ List privateEndpointConnections(); /** * Gets the sharedPrivateLinkResources property: The list of shared private link resources. - * + * * @return the sharedPrivateLinkResources value. */ List sharedPrivateLinkResources(); /** * Gets the tls property: TLS settings for the resource. - * + * * @return the tls value. */ WebPubSubTlsSettings tls(); /** * Gets the hostnamePrefix property: Deprecated. - * + * * @return the hostnamePrefix value. */ String hostnamePrefix(); /** * Gets the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService resource. - * + * * @return the liveTraceConfiguration value. */ LiveTraceConfiguration liveTraceConfiguration(); /** * Gets the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. - * + * * @return the resourceLogConfiguration value. */ ResourceLogConfiguration resourceLogConfiguration(); /** * Gets the networkACLs property: Network ACLs for the resource. - * + * * @return the networkACLs value. */ WebPubSubNetworkACLs networkACLs(); /** - * Gets the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's - * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what - * you set in network ACLs. - * + * Gets the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs. + * * @return the publicNetworkAccess value. */ String publicNetworkAccess(); /** - * Gets the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as - * true, connection with AccessKey=xxx won't work. - * + * Gets the disableLocalAuth property: DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. + * * @return the disableLocalAuth value. */ Boolean disableLocalAuth(); /** - * Gets the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with - * AuthType=aad won't work. - * + * Gets the disableAadAuth property: DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. + * * @return the disableAadAuth value. */ Boolean disableAadAuth(); /** - * Gets the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not be affected. + * Gets the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections will not be + * affected. * This property is replica specific. Disable the regional endpoint without replica is not allowed. - * + * * @return the regionEndpointEnabled value. */ String regionEndpointEnabled(); /** - * Gets the resourceStopped property: Stop or start the resource. Default to "false". When it's true, the data plane - * of the resource is shutdown. When it's false, the data plane of the resource is started. - * + * Gets the resourceStopped property: Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. + * * @return the resourceStopped value. */ String resourceStopped(); + /** + * Gets the socketIO property: SocketIO settings for the resource. + * + * @return the socketIO value. + */ + WebPubSubSocketIOSettings socketIO(); + /** * 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.WebPubSubResourceInner object. - * + * * @return the inner object. */ WebPubSubResourceInner innerModel(); - /** The entirety of the WebPubSubResource definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the WebPubSubResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The WebPubSubResource definition stages. */ + /** + * The WebPubSubResource definition stages. + */ interface DefinitionStages { - /** The first stage of the WebPubSubResource definition. */ + /** + * The first stage of the WebPubSubResource definition. + */ interface Blank extends WithLocation { } - /** The stage of the WebPubSubResource definition allowing to specify location. */ + /** + * The stage of the WebPubSubResource 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. */ @@ -266,18 +284,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the WebPubSubResource definition allowing to specify parent resource. */ + /** + * The stage of the WebPubSubResource definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -288,398 +308,478 @@ interface WithResourceGroup { * The stage of the WebPubSubResource 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, - DefinitionStages.WithKind, - DefinitionStages.WithIdentity, - DefinitionStages.WithTls, - DefinitionStages.WithLiveTraceConfiguration, - DefinitionStages.WithResourceLogConfiguration, - DefinitionStages.WithNetworkACLs, - DefinitionStages.WithPublicNetworkAccess, - DefinitionStages.WithDisableLocalAuth, - DefinitionStages.WithDisableAadAuth, - DefinitionStages.WithRegionEndpointEnabled, - DefinitionStages.WithResourceStopped { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku, DefinitionStages.WithKind, + DefinitionStages.WithIdentity, DefinitionStages.WithTls, DefinitionStages.WithLiveTraceConfiguration, + DefinitionStages.WithResourceLogConfiguration, DefinitionStages.WithNetworkACLs, + DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithDisableLocalAuth, + DefinitionStages.WithDisableAadAuth, DefinitionStages.WithRegionEndpointEnabled, + DefinitionStages.WithResourceStopped, DefinitionStages.WithSocketIO { /** * Executes the create request. - * + * * @return the created resource. */ WebPubSubResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WebPubSubResource create(Context context); } - /** The stage of the WebPubSubResource definition allowing to specify tags. */ + /** + * The stage of the WebPubSubResource 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 WebPubSubResource definition allowing to specify sku. */ + /** + * The stage of the WebPubSubResource 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); } - /** The stage of the WebPubSubResource definition allowing to specify kind. */ + /** + * 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. */ + /** + * The stage of the WebPubSubResource definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: A class represent managed identities used for request and response. - * + * * @param identity A class represent managed identities used for request and response. * @return the next definition stage. */ WithCreate withIdentity(ManagedIdentity identity); } - /** The stage of the WebPubSubResource definition allowing to specify tls. */ + /** + * The stage of the WebPubSubResource definition allowing to specify tls. + */ interface WithTls { /** * Specifies the tls property: TLS settings for the resource. - * + * * @param tls TLS settings for the resource. * @return the next definition stage. */ WithCreate withTls(WebPubSubTlsSettings tls); } - /** The stage of the WebPubSubResource definition allowing to specify liveTraceConfiguration. */ + /** + * The stage of the WebPubSubResource definition allowing to specify liveTraceConfiguration. + */ interface WithLiveTraceConfiguration { /** * Specifies the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService * resource.. - * + * * @param liveTraceConfiguration Live trace configuration of a Microsoft.SignalRService resource. * @return the next definition stage. */ WithCreate withLiveTraceConfiguration(LiveTraceConfiguration liveTraceConfiguration); } - /** The stage of the WebPubSubResource definition allowing to specify resourceLogConfiguration. */ + /** + * The stage of the WebPubSubResource definition allowing to specify resourceLogConfiguration. + */ interface WithResourceLogConfiguration { /** * Specifies the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService * resource.. - * + * * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. * @return the next definition stage. */ WithCreate withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration); } - /** The stage of the WebPubSubResource definition allowing to specify networkACLs. */ + /** + * The stage of the WebPubSubResource definition allowing to specify networkACLs. + */ interface WithNetworkACLs { /** * Specifies the networkACLs property: Network ACLs for the resource. - * + * * @param networkACLs Network ACLs for the resource. * @return the next definition stage. */ WithCreate withNetworkACLs(WebPubSubNetworkACLs networkACLs); } - /** The stage of the WebPubSubResource definition allowing to specify publicNetworkAccess. */ + /** + * The stage of the WebPubSubResource definition allowing to specify publicNetworkAccess. + */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: Enable or disable public network access. Default to - * "Enabled". When it's Enabled, network ACLs still apply. When it's Disabled, public network access is - * always disabled no matter what you set in network ACLs.. - * - * @param publicNetworkAccess Enable or disable public network access. Default to "Enabled". When it's - * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no - * matter what you set in network ACLs. + * "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs.. + * + * @param publicNetworkAccess Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs. * @return the next definition stage. */ WithCreate withPublicNetworkAccess(String publicNetworkAccess); } - /** The stage of the WebPubSubResource definition allowing to specify disableLocalAuth. */ + /** + * The stage of the WebPubSubResource definition allowing to specify disableLocalAuth. + */ interface WithDisableLocalAuth { /** - * Specifies the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey + * Specifies the disableLocalAuth property: DisableLocalAuth + * Enable or disable local auth with AccessKey * When set as true, connection with AccessKey=xxx won't work.. - * - * @param disableLocalAuth DisableLocalAuth Enable or disable local auth with AccessKey When set as true, - * connection with AccessKey=xxx won't work. + * + * @param disableLocalAuth DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. * @return the next definition stage. */ WithCreate withDisableLocalAuth(Boolean disableLocalAuth); } - /** The stage of the WebPubSubResource definition allowing to specify disableAadAuth. */ + /** + * The stage of the WebPubSubResource definition allowing to specify disableAadAuth. + */ interface WithDisableAadAuth { /** - * Specifies the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, - * connection with AuthType=aad won't work.. - * - * @param disableAadAuth DisableLocalAuth Enable or disable aad auth When set as true, connection with - * AuthType=aad won't work. + * Specifies the disableAadAuth property: DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work.. + * + * @param disableAadAuth DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. * @return the next definition stage. */ WithCreate withDisableAadAuth(Boolean disableAadAuth); } - /** The stage of the WebPubSubResource definition allowing to specify regionEndpointEnabled. */ + /** + * The stage of the WebPubSubResource definition allowing to specify regionEndpointEnabled. + */ interface WithRegionEndpointEnabled { /** * Specifies the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to - * "Enabled". When it's Disabled, new connections will not be routed to this endpoint, however existing - * connections will not be affected. This property is replica specific. Disable the regional endpoint - * without replica is not allowed.. - * - * @param regionEndpointEnabled Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not - * be affected. This property is replica specific. Disable the regional endpoint without replica is not - * allowed. + * "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections + * will not be affected. + * This property is replica specific. Disable the regional endpoint without replica is not allowed.. + * + * @param regionEndpointEnabled Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections + * will not be affected. + * This property is replica specific. Disable the regional endpoint without replica is not allowed. * @return the next definition stage. */ WithCreate withRegionEndpointEnabled(String regionEndpointEnabled); } - /** The stage of the WebPubSubResource definition allowing to specify resourceStopped. */ + /** + * The stage of the WebPubSubResource definition allowing to specify resourceStopped. + */ interface WithResourceStopped { /** - * Specifies the resourceStopped property: Stop or start the resource. Default to "false". When it's true, - * the data plane of the resource is shutdown. When it's false, the data plane of the resource is started.. - * - * @param resourceStopped Stop or start the resource. Default to "false". When it's true, the data plane of - * the resource is shutdown. When it's false, the data plane of the resource is started. + * Specifies the resourceStopped property: Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started.. + * + * @param resourceStopped Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. * @return the next definition stage. */ WithCreate withResourceStopped(String resourceStopped); } + + /** + * The stage of the WebPubSubResource definition allowing to specify socketIO. + */ + interface WithSocketIO { + /** + * Specifies the socketIO property: SocketIO settings for the resource. + * + * @param socketIO SocketIO settings for the resource. + * @return the next definition stage. + */ + WithCreate withSocketIO(WebPubSubSocketIOSettings socketIO); + } } /** * Begins update for the WebPubSubResource resource. - * + * * @return the stage of resource update. */ WebPubSubResource.Update update(); - /** The template for WebPubSubResource update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithSku, - UpdateStages.WithIdentity, - UpdateStages.WithTls, - UpdateStages.WithLiveTraceConfiguration, - UpdateStages.WithResourceLogConfiguration, - UpdateStages.WithNetworkACLs, - UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithDisableLocalAuth, - UpdateStages.WithDisableAadAuth, - UpdateStages.WithRegionEndpointEnabled, - UpdateStages.WithResourceStopped { + /** + * The template for WebPubSubResource update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity, + UpdateStages.WithTls, UpdateStages.WithLiveTraceConfiguration, UpdateStages.WithResourceLogConfiguration, + UpdateStages.WithNetworkACLs, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithDisableLocalAuth, + UpdateStages.WithDisableAadAuth, UpdateStages.WithRegionEndpointEnabled, UpdateStages.WithResourceStopped, + UpdateStages.WithSocketIO { /** * Executes the update request. - * + * * @return the updated resource. */ WebPubSubResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WebPubSubResource apply(Context context); } - /** The WebPubSubResource update stages. */ + /** + * The WebPubSubResource update stages. + */ interface UpdateStages { - /** The stage of the WebPubSubResource update allowing to specify tags. */ + /** + * The stage of the WebPubSubResource 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 WebPubSubResource update allowing to specify sku. */ + /** + * The stage of the WebPubSubResource 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); } - /** The stage of the WebPubSubResource update allowing to specify identity. */ + /** + * The stage of the WebPubSubResource update allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: A class represent managed identities used for request and response. - * + * * @param identity A class represent managed identities used for request and response. * @return the next definition stage. */ Update withIdentity(ManagedIdentity identity); } - /** The stage of the WebPubSubResource update allowing to specify tls. */ + /** + * The stage of the WebPubSubResource update allowing to specify tls. + */ interface WithTls { /** * Specifies the tls property: TLS settings for the resource. - * + * * @param tls TLS settings for the resource. * @return the next definition stage. */ Update withTls(WebPubSubTlsSettings tls); } - /** The stage of the WebPubSubResource update allowing to specify liveTraceConfiguration. */ + /** + * The stage of the WebPubSubResource update allowing to specify liveTraceConfiguration. + */ interface WithLiveTraceConfiguration { /** * Specifies the liveTraceConfiguration property: Live trace configuration of a Microsoft.SignalRService * resource.. - * + * * @param liveTraceConfiguration Live trace configuration of a Microsoft.SignalRService resource. * @return the next definition stage. */ Update withLiveTraceConfiguration(LiveTraceConfiguration liveTraceConfiguration); } - /** The stage of the WebPubSubResource update allowing to specify resourceLogConfiguration. */ + /** + * The stage of the WebPubSubResource update allowing to specify resourceLogConfiguration. + */ interface WithResourceLogConfiguration { /** * Specifies the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService * resource.. - * + * * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. * @return the next definition stage. */ Update withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration); } - /** The stage of the WebPubSubResource update allowing to specify networkACLs. */ + /** + * The stage of the WebPubSubResource update allowing to specify networkACLs. + */ interface WithNetworkACLs { /** * Specifies the networkACLs property: Network ACLs for the resource. - * + * * @param networkACLs Network ACLs for the resource. * @return the next definition stage. */ Update withNetworkACLs(WebPubSubNetworkACLs networkACLs); } - /** The stage of the WebPubSubResource update allowing to specify publicNetworkAccess. */ + /** + * The stage of the WebPubSubResource update allowing to specify publicNetworkAccess. + */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: Enable or disable public network access. Default to - * "Enabled". When it's Enabled, network ACLs still apply. When it's Disabled, public network access is - * always disabled no matter what you set in network ACLs.. - * - * @param publicNetworkAccess Enable or disable public network access. Default to "Enabled". When it's - * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no - * matter what you set in network ACLs. + * "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs.. + * + * @param publicNetworkAccess Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs. * @return the next definition stage. */ Update withPublicNetworkAccess(String publicNetworkAccess); } - /** The stage of the WebPubSubResource update allowing to specify disableLocalAuth. */ + /** + * The stage of the WebPubSubResource update allowing to specify disableLocalAuth. + */ interface WithDisableLocalAuth { /** - * Specifies the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey + * Specifies the disableLocalAuth property: DisableLocalAuth + * Enable or disable local auth with AccessKey * When set as true, connection with AccessKey=xxx won't work.. - * - * @param disableLocalAuth DisableLocalAuth Enable or disable local auth with AccessKey When set as true, - * connection with AccessKey=xxx won't work. + * + * @param disableLocalAuth DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. * @return the next definition stage. */ Update withDisableLocalAuth(Boolean disableLocalAuth); } - /** The stage of the WebPubSubResource update allowing to specify disableAadAuth. */ + /** + * The stage of the WebPubSubResource update allowing to specify disableAadAuth. + */ interface WithDisableAadAuth { /** - * Specifies the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, - * connection with AuthType=aad won't work.. - * - * @param disableAadAuth DisableLocalAuth Enable or disable aad auth When set as true, connection with - * AuthType=aad won't work. + * Specifies the disableAadAuth property: DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work.. + * + * @param disableAadAuth DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. * @return the next definition stage. */ Update withDisableAadAuth(Boolean disableAadAuth); } - /** The stage of the WebPubSubResource update allowing to specify regionEndpointEnabled. */ + /** + * The stage of the WebPubSubResource update allowing to specify regionEndpointEnabled. + */ interface WithRegionEndpointEnabled { /** * Specifies the regionEndpointEnabled property: Enable or disable the regional endpoint. Default to - * "Enabled". When it's Disabled, new connections will not be routed to this endpoint, however existing - * connections will not be affected. This property is replica specific. Disable the regional endpoint - * without replica is not allowed.. - * - * @param regionEndpointEnabled Enable or disable the regional endpoint. Default to "Enabled". When it's - * Disabled, new connections will not be routed to this endpoint, however existing connections will not - * be affected. This property is replica specific. Disable the regional endpoint without replica is not - * allowed. + * "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections + * will not be affected. + * This property is replica specific. Disable the regional endpoint without replica is not allowed.. + * + * @param regionEndpointEnabled Enable or disable the regional endpoint. Default to "Enabled". + * When it's Disabled, new connections will not be routed to this endpoint, however existing connections + * will not be affected. + * This property is replica specific. Disable the regional endpoint without replica is not allowed. * @return the next definition stage. */ Update withRegionEndpointEnabled(String regionEndpointEnabled); } - /** The stage of the WebPubSubResource update allowing to specify resourceStopped. */ + /** + * The stage of the WebPubSubResource update allowing to specify resourceStopped. + */ interface WithResourceStopped { /** - * Specifies the resourceStopped property: Stop or start the resource. Default to "false". When it's true, - * the data plane of the resource is shutdown. When it's false, the data plane of the resource is started.. - * - * @param resourceStopped Stop or start the resource. Default to "false". When it's true, the data plane of - * the resource is shutdown. When it's false, the data plane of the resource is started. + * Specifies the resourceStopped property: Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started.. + * + * @param resourceStopped Stop or start the resource. Default to "False". + * When it's true, the data plane of the resource is shutdown. + * When it's false, the data plane of the resource is started. * @return the next definition stage. */ Update withResourceStopped(String resourceStopped); } + + /** + * The stage of the WebPubSubResource update allowing to specify socketIO. + */ + interface WithSocketIO { + /** + * Specifies the socketIO property: SocketIO settings for the resource. + * + * @param socketIO SocketIO settings for the resource. + * @return the next definition stage. + */ + Update withSocketIO(WebPubSubSocketIOSettings socketIO); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WebPubSubResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -687,7 +787,7 @@ interface WithResourceStopped { /** * Get the access keys 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. @@ -698,7 +798,7 @@ interface WithResourceStopped { /** * Get the access keys of the resource. - * + * * @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 access keys of the resource. @@ -707,7 +807,7 @@ interface WithResourceStopped { /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. - * + * * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -718,7 +818,7 @@ interface WithResourceStopped { /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. - * + * * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -730,7 +830,7 @@ interface WithResourceStopped { /** * Operation to restart a resource. - * + * * @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. */ @@ -738,7 +838,7 @@ interface WithResourceStopped { /** * Operation to restart a 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. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubResourceList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubResourceList.java index b8968f71283c..53e216c85865 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubResourceList.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubResourceList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Object that includes an array of resources and a possible link for next set. */ +/** + * Object that includes an array of resources and a possible link for next set. + */ @Fluent public final class WebPubSubResourceList { /* @@ -25,13 +27,15 @@ public final class WebPubSubResourceList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of WebPubSubResourceList class. */ + /** + * Creates an instance of WebPubSubResourceList class. + */ public WebPubSubResourceList() { } /** * Get the value property: List of the resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: List of the resources. - * + * * @param value the value value to set. * @return the WebPubSubResourceList object itself. */ @@ -50,9 +54,9 @@ public WebPubSubResourceList withValue(List value) { } /** - * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's - * null for now, added for future use. - * + * 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() { @@ -60,9 +64,9 @@ public String 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. - * + * 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 WebPubSubResourceList object itself. */ @@ -73,7 +77,7 @@ public WebPubSubResourceList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSharedPrivateLinkResources.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSharedPrivateLinkResources.java index 8b24831eec09..c70d9ddc1de2 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 @@ -7,12 +7,15 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; -/** Resource collection API of WebPubSubSharedPrivateLinkResources. */ +/** + * Resource collection API of WebPubSubSharedPrivateLinkResources. + */ public interface WebPubSubSharedPrivateLinkResources { /** * List shared private link resources. - * + * * @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. @@ -24,7 +27,7 @@ public interface WebPubSubSharedPrivateLinkResources { /** * List shared private link resources. - * + * * @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. @@ -37,7 +40,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. The name is case insensitive. * @param resourceName The name of the resource. @@ -47,12 +50,12 @@ public interface WebPubSubSharedPrivateLinkResources { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified shared private link resource along with {@link Response}. */ - Response getWithResponse( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); + Response getWithResponse(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, Context context); /** * 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. The name is case insensitive. * @param resourceName The name of the resource. @@ -64,79 +67,58 @@ Response getWithResponse( SharedPrivateLinkResource get(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); /** - * Delete the specified shared private link resource. - * + * 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. 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. * @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 describes a Shared Private Link Resource. */ - void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); + SharedPrivateLinkResource createOrUpdate(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, SharedPrivateLinkResourceInner parameters); /** - * Delete the specified shared private link resource. - * + * 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. 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. * @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 describes a Shared Private Link Resource. */ - void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); - - /** - * Get the specified shared private link resource. - * - * @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 specified shared private link resource along with {@link Response}. - */ - SharedPrivateLinkResource getById(String id); - - /** - * Get the specified shared private link resource. - * - * @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 specified shared private link resource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); + SharedPrivateLinkResource createOrUpdate(String sharedPrivateLinkResourceName, String resourceGroupName, + String resourceName, SharedPrivateLinkResourceInner parameters, Context context); /** * Delete the specified shared private link resource. - * - * @param id the resource ID. + * + * @param sharedPrivateLinkResourceName The name of the shared private link 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. */ - void deleteById(String id); + void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); /** * Delete the specified shared private link resource. - * - * @param id the resource ID. + * + * @param sharedPrivateLinkResourceName The name of the shared private link 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. */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new SharedPrivateLinkResource resource. - * - * @param name resource name. - * @return the first stage of the new SharedPrivateLinkResource definition. - */ - SharedPrivateLinkResource.DefinitionStages.Blank define(String name); + void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSkuTier.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSkuTier.java index 8f5ac48c0299..e2db992fb1d1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSkuTier.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSkuTier.java @@ -10,25 +10,33 @@ /** * Optional tier of this particular SKU. 'Standard' or 'Free'. - * - *

`Basic` is deprecated, use `Standard` instead. + * + * `Basic` is deprecated, use `Standard` instead. */ public final class WebPubSubSkuTier extends ExpandableStringEnum { - /** Static value Free for WebPubSubSkuTier. */ + /** + * Static value Free for WebPubSubSkuTier. + */ public static final WebPubSubSkuTier FREE = fromString("Free"); - /** Static value Basic for WebPubSubSkuTier. */ + /** + * Static value Basic for WebPubSubSkuTier. + */ public static final WebPubSubSkuTier BASIC = fromString("Basic"); - /** Static value Standard for WebPubSubSkuTier. */ + /** + * Static value Standard for WebPubSubSkuTier. + */ public static final WebPubSubSkuTier STANDARD = fromString("Standard"); - /** Static value Premium for WebPubSubSkuTier. */ + /** + * Static value Premium for WebPubSubSkuTier. + */ public static final WebPubSubSkuTier PREMIUM = fromString("Premium"); /** * Creates a new instance of WebPubSubSkuTier value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -37,7 +45,7 @@ public WebPubSubSkuTier() { /** * Creates or finds a WebPubSubSkuTier from its string representation. - * + * * @param name a name to look for. * @return the corresponding WebPubSubSkuTier. */ @@ -48,7 +56,7 @@ public static WebPubSubSkuTier fromString(String name) { /** * Gets known WebPubSubSkuTier values. - * + * * @return known WebPubSubSkuTier values. */ public static Collection values() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSocketIOSettings.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSocketIOSettings.java new file mode 100644 index 000000000000..87937af7c79b --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubSocketIOSettings.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SocketIO settings for the resource. + */ +@Fluent +public final class WebPubSubSocketIOSettings { + /* + * The service mode of Web PubSub for Socket.IO. Values allowed: + * "Default": have your own backend Socket.IO server + * "Serverless": your application doesn't have a backend server + */ + @JsonProperty(value = "serviceMode") + private String serviceMode; + + /** + * Creates an instance of WebPubSubSocketIOSettings class. + */ + public WebPubSubSocketIOSettings() { + } + + /** + * Get the serviceMode property: The service mode of Web PubSub for Socket.IO. Values allowed: + * "Default": have your own backend Socket.IO server + * "Serverless": your application doesn't have a backend server. + * + * @return the serviceMode value. + */ + public String serviceMode() { + return this.serviceMode; + } + + /** + * Set the serviceMode property: The service mode of Web PubSub for Socket.IO. Values allowed: + * "Default": have your own backend Socket.IO server + * "Serverless": your application doesn't have a backend server. + * + * @param serviceMode the serviceMode value to set. + * @return the WebPubSubSocketIOSettings object itself. + */ + public WebPubSubSocketIOSettings withServiceMode(String serviceMode) { + this.serviceMode = serviceMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubTlsSettings.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubTlsSettings.java index e2ae13b43ab6..700dad16f36f 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 @@ -7,24 +7,27 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** TLS settings for the resource. */ +/** + * TLS settings for the resource. + */ @Fluent public final class WebPubSubTlsSettings { /* - * Request client certificate during TLS handshake if enabled. Not supported for free tier. Any input will be - * ignored for free tier. + * 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; - /** Creates an instance of WebPubSubTlsSettings class. */ + /** + * Creates an instance of WebPubSubTlsSettings class. + */ public WebPubSubTlsSettings() { } /** * 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. */ public Boolean clientCertEnabled() { @@ -34,7 +37,7 @@ public Boolean clientCertEnabled() { /** * 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. */ @@ -45,7 +48,7 @@ public WebPubSubTlsSettings withClientCertEnabled(Boolean clientCertEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubs.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubs.java index 33a978d84a9b..4b9ab6a4f4e4 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WebPubSubs. */ +/** + * Resource collection API of WebPubSubs. + */ public interface WebPubSubs { /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the operation. * @param context The context to associate with this operation. @@ -21,12 +23,12 @@ public interface WebPubSubs { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to check name availability along with {@link Response}. */ - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters parameters, Context context); + Response checkNameAvailabilityWithResponse(String location, NameAvailabilityParameters parameters, + Context context); /** * Checks that the resource name is valid and is not already in use. - * + * * @param location the region. * @param parameters Parameters supplied to the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,54 +40,54 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a subscription. - * + * * @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 object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(); /** * Handles requests to list all resources in a subscription. - * + * * @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 object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(Context context); /** * Handles requests to list all resources in a resource group. - * + * * @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. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** * Handles requests to list all resources in a resource group. - * + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return object that includes an array of resources and a possible link for next set as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Get the resource and its properties. - * + * * @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. @@ -94,12 +96,12 @@ Response checkNameAvailabilityWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource and its properties along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); /** * Get the resource and its properties. - * + * * @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. @@ -111,7 +113,7 @@ Response getByResourceGroupWithResponse( /** * Operation to delete a 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. @@ -122,7 +124,7 @@ Response getByResourceGroupWithResponse( /** * Operation to delete a 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. @@ -134,7 +136,7 @@ Response getByResourceGroupWithResponse( /** * Get the access keys of the 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. @@ -147,7 +149,7 @@ Response getByResourceGroupWithResponse( /** * Get the access keys of the 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. @@ -159,7 +161,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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -172,7 +174,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. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. @@ -182,12 +184,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represents the access keys of the resource. */ - WebPubSubKeys regenerateKey( - String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context); + 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. @@ -197,12 +199,12 @@ WebPubSubKeys regenerateKey( * @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); + 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. @@ -215,7 +217,7 @@ Response listReplicaSkusWithResponse( /** * Operation to restart a 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. @@ -226,7 +228,7 @@ Response listReplicaSkusWithResponse( /** * Operation to restart a 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. @@ -238,7 +240,7 @@ Response listReplicaSkusWithResponse( /** * List all available skus of the 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. @@ -251,7 +253,7 @@ Response listReplicaSkusWithResponse( /** * List all available skus of the 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. @@ -263,7 +265,7 @@ Response listReplicaSkusWithResponse( /** * Get the resource 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. @@ -274,7 +276,7 @@ Response listReplicaSkusWithResponse( /** * Get the resource 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. @@ -286,7 +288,7 @@ Response listReplicaSkusWithResponse( /** * Operation to delete a resource. - * + * * @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. @@ -296,7 +298,7 @@ Response listReplicaSkusWithResponse( /** * Operation to delete a resource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,7 +309,7 @@ Response listReplicaSkusWithResponse( /** * Begins definition for a new WebPubSubResource resource. - * + * * @param name resource name. * @return the first stage of the new WebPubSubResource definition. */ diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/package-info.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/package-info.java index 5be5da631d42..1f41781aff62 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/package-info.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for WebPubSubManagementClient. REST API for Azure WebPubSub Service. */ +/** + * Package containing the data models for WebPubSubManagementClient. + * REST API for Azure WebPubSub Service. + */ package com.azure.resourcemanager.webpubsub.models; diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/package-info.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/package-info.java index 83328ae08b55..d22092066c69 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/package-info.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for WebPubSubManagementClient. REST API for Azure WebPubSub Service. */ +/** + * Package containing the classes for WebPubSubManagementClient. + * REST API for Azure WebPubSub Service. + */ package com.azure.resourcemanager.webpubsub; diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/module-info.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/module-info.java index 905d64b8e63a..f4fba8a115a1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/module-info.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.webpubsub { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.webpubsub; exports com.azure.resourcemanager.webpubsub.fluent; exports com.azure.resourcemanager.webpubsub.fluent.models; exports com.azure.resourcemanager.webpubsub.models; - - opens com.azure.resourcemanager.webpubsub.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.webpubsub.models to - com.azure.core, - com.fasterxml.jackson.databind; -} + opens com.azure.resourcemanager.webpubsub.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.webpubsub.models to com.azure.core, com.fasterxml.jackson.databind; +} \ No newline at end of file diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-webpubsub/proxy-config.json b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-webpubsub/proxy-config.json index 567511ff05a9..aa9e045c1ef9 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-webpubsub/proxy-config.json +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-webpubsub/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.webpubsub.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubsClientImpl$WebPubSubsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubCustomCertificatesClientImpl$WebPubSubCustomCertificatesService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubCustomDomainsClientImpl$WebPubSubCustomDomainsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubHubsClientImpl$WebPubSubHubsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateEndpointConnectionsClientImpl$WebPubSubPrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateLinkResourcesClientImpl$WebPubSubPrivateLinkResourcesService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubReplicasClientImpl$WebPubSubReplicasService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubSharedPrivateLinkResourcesClientImpl$WebPubSubSharedPrivateLinkResourcesService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.webpubsub.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubsClientImpl$WebPubSubsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubCustomCertificatesClientImpl$WebPubSubCustomCertificatesService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubCustomDomainsClientImpl$WebPubSubCustomDomainsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubHubsClientImpl$WebPubSubHubsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateEndpointConnectionsClientImpl$WebPubSubPrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateLinkResourcesClientImpl$WebPubSubPrivateLinkResourcesService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubReplicasClientImpl$WebPubSubReplicasService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubReplicaSharedPrivateLinkResourcesClientImpl$WebPubSubReplicaSharedPrivateLinkResourcesService" ], [ "com.azure.resourcemanager.webpubsub.implementation.WebPubSubSharedPrivateLinkResourcesClientImpl$WebPubSubSharedPrivateLinkResourcesService" ] ] \ No newline at end of file diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-webpubsub/reflect-config.json b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-webpubsub/reflect-config.json index 66341328070b..d4333be0803e 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-webpubsub/reflect-config.json +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-webpubsub/reflect-config.json @@ -158,6 +158,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.webpubsub.models.WebPubSubSocketIOSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.webpubsub.models.ManagedIdentity", "allDeclaredConstructors" : true, @@ -304,22 +309,22 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner", + "name" : "com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceList", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.webpubsub.models.Sku", + "name" : "com.azure.resourcemanager.webpubsub.fluent.models.SkuListInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.webpubsub.models.SkuCapacity", + "name" : "com.azure.resourcemanager.webpubsub.models.Sku", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceList", + "name" : "com.azure.resourcemanager.webpubsub.models.SkuCapacity", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true 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 69c76c54bfa7..468ad8fc22c3 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/Operations_List.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void operationsList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { 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 31fb8f61e3db..0931af388a0d 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for Usages List. */ +/** + * Samples for Usages List. + */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/Usages_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/Usages_List.json */ /** * Sample code: Usages_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void usagesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { 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 05e5858c970e..2b8770dad037 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 @@ -6,23 +6,22 @@ import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters; -/** Samples for WebPubSub CheckNameAvailability. */ +/** + * Samples for WebPubSub CheckNameAvailability. + */ public final class WebPubSubCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_CheckNameAvailability.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_CheckNameAvailability.json */ /** * Sample code: WebPubSub_CheckNameAvailability. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCheckNameAvailability(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() - .checkNameAvailabilityWithResponse( - "eastus", - new NameAvailabilityParameters() - .withType("Microsoft.SignalRService/WebPubSub") + manager.webPubSubs() + .checkNameAvailabilityWithResponse("eastus", + new NameAvailabilityParameters().withType("Microsoft.SignalRService/WebPubSub") .withName("myWebPubSubService"), com.azure.core.util.Context.NONE); } 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 7e0f1b857020..fc13f8ea6038 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 @@ -16,24 +16,26 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSocketIOSettings; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for WebPubSub CreateOrUpdate. */ +/** + * Samples for WebPubSub CreateOrUpdate. + */ public final class WebPubSubCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_CreateOrUpdate.json */ /** * Sample code: WebPubSub_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() + manager.webPubSubs() .define("myWebPubSubService") .withRegion("eastus") .withExistingResourceGroup("myResourceGroup") @@ -42,25 +44,18 @@ public static void webPubSubCreateOrUpdate(com.azure.resourcemanager.webpubsub.W .withKind(ServiceKind.WEB_PUB_SUB) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("false") - .withCategories( - Arrays.asList(new LiveTraceCategory().withName("ConnectivityLogs").withEnabled("true")))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) - .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) + .withLiveTraceConfiguration(new LiveTraceConfiguration().withEnabled("false") + .withCategories( + Arrays.asList(new LiveTraceCategory().withName("ConnectivityLogs").withEnabled("true")))) + .withNetworkACLs(new WebPubSubNetworkACLs().withDefaultAction(AclAction.DENY) + .withPublicNetwork(new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) + .withPrivateEndpoints(Arrays + .asList(new PrivateEndpointAcl().withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) + .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) .withPublicNetworkAccess("Enabled") .withDisableLocalAuth(false) .withDisableAadAuth(false) + .withSocketIO(new WebPubSubSocketIOSettings().withServiceMode("Serverless")) .create(); } 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 92ec6b21926b..303620061ec9 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubCustomCertificates CreateOrUpdate. */ +/** + * Samples for WebPubSubCustomCertificates CreateOrUpdate. + */ public final class WebPubSubCustomCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomCertificates_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_CreateOrUpdate.json */ /** * Sample code: WebPubSubCustomCertificates_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubCustomCertificatesCreateOrUpdate( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomCertificates() + public static void + webPubSubCustomCertificatesCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubCustomCertificates() .define("myCert") .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") .withKeyVaultBaseUri("https://myvault.keyvault.azure.net/") 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 e2c4aee1cbf8..0c759c44bff1 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubCustomCertificates Delete. */ +/** + * Samples for WebPubSubCustomCertificates Delete. + */ public final class WebPubSubCustomCertificatesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomCertificates_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_Delete.json */ /** * Sample code: WebPubSubCustomCertificates_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomCertificatesDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomCertificates() + manager.webPubSubCustomCertificates() .deleteWithResponse("myResourceGroup", "myWebPubSubService", "myCert", com.azure.core.util.Context.NONE); } } 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 fafd95096fa0..a26fa4b6b0b6 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubCustomCertificates Get. */ +/** + * Samples for WebPubSubCustomCertificates Get. + */ public final class WebPubSubCustomCertificatesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomCertificates_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_Get.json */ /** * Sample code: WebPubSubCustomCertificates_Get. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomCertificatesGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomCertificates() + manager.webPubSubCustomCertificates() .getWithResponse("myResourceGroup", "myWebPubSubService", "myCert", com.azure.core.util.Context.NONE); } } 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 a87b0cbaf229..2d906bcff5d9 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubCustomCertificates List. */ +/** + * Samples for WebPubSubCustomCertificates List. + */ public final class WebPubSubCustomCertificatesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomCertificates_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomCertificates_List.json */ /** * Sample code: WebPubSubCustomCertificates_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomCertificatesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomCertificates() + manager.webPubSubCustomCertificates() .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/WebPubSubCustomDomainsCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsCreateOrUpdateSamples.java index 6d556c69717d..cec6f3a3875e 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 @@ -6,27 +6,26 @@ import com.azure.resourcemanager.webpubsub.models.ResourceReference; -/** Samples for WebPubSubCustomDomains CreateOrUpdate. */ +/** + * Samples for WebPubSubCustomDomains CreateOrUpdate. + */ public final class WebPubSubCustomDomainsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomDomains_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_CreateOrUpdate.json */ /** * Sample code: WebPubSubCustomDomains_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubCustomDomainsCreateOrUpdate( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomDomains() + public static void + webPubSubCustomDomainsCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubCustomDomains() .define("myDomain") .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") .withDomainName("example.com") - .withCustomCertificate( - new ResourceReference() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert")) + .withCustomCertificate(new ResourceReference().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/customCertificates/myCert")) .create(); } } 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 ba80605e237a..8cc575297047 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubCustomDomains Delete. */ +/** + * Samples for WebPubSubCustomDomains Delete. + */ public final class WebPubSubCustomDomainsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomDomains_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_Delete.json */ /** * Sample code: WebPubSubCustomDomains_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomDomainsDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomDomains() + manager.webPubSubCustomDomains() .delete("myResourceGroup", "myWebPubSubService", "example", com.azure.core.util.Context.NONE); } } 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 44198af28c17..93b240f04762 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubCustomDomains Get. */ +/** + * Samples for WebPubSubCustomDomains Get. + */ public final class WebPubSubCustomDomainsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomDomains_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_Get.json */ /** * Sample code: WebPubSubCustomDomains_Get. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomDomainsGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomDomains() + manager.webPubSubCustomDomains() .getWithResponse("myResourceGroup", "myWebPubSubService", "example", com.azure.core.util.Context.NONE); } } 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 d810eb8a14ae..42083679c935 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubCustomDomains List. */ +/** + * Samples for WebPubSubCustomDomains List. + */ public final class WebPubSubCustomDomainsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubCustomDomains_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubCustomDomains_List.json */ /** * Sample code: WebPubSubCustomDomains_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubCustomDomainsList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubCustomDomains() + manager.webPubSubCustomDomains() .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/WebPubSubDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubDeleteSamples.java index 3befe778aeee..bf3c77d93f26 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSub Delete. */ +/** + * Samples for WebPubSub Delete. + */ public final class WebPubSubDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Delete.json */ /** * Sample code: WebPubSub_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { 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 ca72135659e5..29abe41edb4f 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSub GetByResourceGroup. */ +/** + * Samples for WebPubSub GetByResourceGroup. + */ public final class WebPubSubGetByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Get.json */ /** * Sample code: WebPubSub_Get. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() + manager.webPubSubs() .getByResourceGroupWithResponse("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 bbf5745b7c70..37c9b9304d6a 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 @@ -14,47 +14,35 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties; import java.util.Arrays; -/** Samples for WebPubSubHubs CreateOrUpdate. */ +/** + * Samples for WebPubSubHubs CreateOrUpdate. + */ public final class WebPubSubHubsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubHubs_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_CreateOrUpdate.json */ /** * Sample code: WebPubSubHubs_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubHubsCreateOrUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubHubs() + manager.webPubSubHubs() .define("exampleHub") .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers( - Arrays - .asList( - new EventHandler() - .withUrlTemplate("http://host.com") - .withUserEventPattern("*") - .withSystemEvents(Arrays.asList("connect", "connected")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings().withResource("abc"))))) - .withEventListeners( - Arrays - .asList( - new EventListener() - .withFilter( - new EventNameFilter() - .withSystemEvents(Arrays.asList("connected", "disconnected")) - .withUserEventPattern("*")) - .withEndpoint( - new EventHubEndpoint() - .withFullyQualifiedNamespace("example.servicebus.windows.net") - .withEventHubName("eventHubName1")))) - .withAnonymousConnectPolicy("allow")) + .withProperties(new WebPubSubHubProperties() + .withEventHandlers(Arrays.asList(new EventHandler().withUrlTemplate("http://host.com") + .withUserEventPattern("*") + .withSystemEvents(Arrays.asList("connect", "connected")) + .withAuth(new UpstreamAuthSettings().withType(UpstreamAuthType.MANAGED_IDENTITY) + .withManagedIdentity(new ManagedIdentitySettings().withResource("abc"))))) + .withEventListeners(Arrays.asList(new EventListener() + .withFilter(new EventNameFilter().withSystemEvents(Arrays.asList("connected", "disconnected")) + .withUserEventPattern("*")) + .withEndpoint(new EventHubEndpoint().withFullyQualifiedNamespace("example.servicebus.windows.net") + .withEventHubName("eventHubName1")))) + .withAnonymousConnectPolicy("allow") + .withWebSocketKeepAliveIntervalInSeconds(50)) .create(); } } 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 b41d5040199d..ffff75abc9cd 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubHubs Delete. */ +/** + * Samples for WebPubSubHubs Delete. + */ public final class WebPubSubHubsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubHubs_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_Delete.json */ /** * Sample code: WebPubSubHubs_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubHubsDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubHubs() + manager.webPubSubHubs() .delete("exampleHub", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 1925fb1fa38f..5f974ffab2f6 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubHubs Get. */ +/** + * Samples for WebPubSubHubs Get. + */ public final class WebPubSubHubsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubHubs_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_Get.json */ /** * Sample code: WebPubSubHubs_Get. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubHubsGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubHubs() + manager.webPubSubHubs() .getWithResponse("exampleHub", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 7f441bf2f043..8f14b3fdcd38 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubHubs List. */ +/** + * Samples for WebPubSubHubs List. + */ public final class WebPubSubHubsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubHubs_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubHubs_List.json */ /** * Sample code: WebPubSubHubs_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubHubsList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { 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 a4fb3cd123e7..858c0160f81c 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSub ListByResourceGroup. */ +/** + * Samples for WebPubSub ListByResourceGroup. + */ public final class WebPubSubListByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListByResourceGroup.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListByResourceGroup.json */ /** * Sample code: WebPubSub_ListByResourceGroup. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubListByResourceGroup(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { 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 040a02d3ad40..8e213c5b0e75 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSub ListKeys. */ +/** + * Samples for WebPubSub ListKeys. + */ public final class WebPubSubListKeysSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListKeys.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListKeys.json */ /** * Sample code: WebPubSub_ListKeys. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubListKeys(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() + manager.webPubSubs() .listKeysWithResponse("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 index caa3efb6d336..73609828f1c8 100644 --- 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSub ListReplicaSkus. */ +/** + * Samples for WebPubSub ListReplicaSkus. + */ public final class WebPubSubListReplicaSkusSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListReplicaSkus.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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); + 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 b776d709d664..70eb3dcb15e4 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSub List. */ +/** + * Samples for WebPubSub List. + */ public final class WebPubSubListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListBySubscription.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListBySubscription.json */ /** * Sample code: WebPubSub_ListBySubscription. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubListBySubscription(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { 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 b812bb0a79d7..c9e41e224ba5 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSub ListSkus. */ +/** + * Samples for WebPubSub ListSkus. + */ public final class WebPubSubListSkusSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_ListSkus.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_ListSkus.json */ /** * Sample code: WebPubSub_ListSkus. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubListSkus(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() + manager.webPubSubs() .listSkusWithResponse("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 798fb8384b0f..90bc7c499b9a 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 @@ -4,24 +4,22 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubPrivateEndpointConnections Delete. */ +/** + * Samples for WebPubSubPrivateEndpointConnections Delete. + */ public final class WebPubSubPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_Delete.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubPrivateEndpointConnectionsDelete( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateEndpointConnections() - .delete( - "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", - "myResourceGroup", - "myWebPubSubService", + public static void + webPubSubPrivateEndpointConnectionsDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubPrivateEndpointConnections() + .delete("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 c333c52ba2b2..33c4b2523ec0 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 @@ -4,24 +4,22 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubPrivateEndpointConnections Get. */ +/** + * Samples for WebPubSubPrivateEndpointConnections Get. + */ public final class WebPubSubPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_Get.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Get. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubPrivateEndpointConnectionsGet( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateEndpointConnections() - .getWithResponse( - "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", - "myResourceGroup", - "myWebPubSubService", - com.azure.core.util.Context.NONE); + public static void + webPubSubPrivateEndpointConnectionsGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubPrivateEndpointConnections() + .getWithResponse("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", + "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 6de5d4b63408..3c42990edb93 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubPrivateEndpointConnections List. */ +/** + * Samples for WebPubSubPrivateEndpointConnections List. + */ public final class WebPubSubPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateEndpointConnections_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_List.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_List. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubPrivateEndpointConnectionsList( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateEndpointConnections() + public static void + webPubSubPrivateEndpointConnectionsList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubPrivateEndpointConnections() .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/WebPubSubPrivateEndpointConnectionsUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateSamples.java index 3df8c679fc0c..c3498fff8aad 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 @@ -9,29 +9,26 @@ import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus; -/** Samples for WebPubSubPrivateEndpointConnections Update. */ +/** + * Samples for WebPubSubPrivateEndpointConnections Update. + */ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateEndpointConnections_Update.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Update. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubPrivateEndpointConnectionsUpdate( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateEndpointConnections() - .updateWithResponse( - "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", - "myResourceGroup", + public static void + webPubSubPrivateEndpointConnectionsUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubPrivateEndpointConnections() + .updateWithResponse("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "myWebPubSubService", - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint()) + new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) + new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.APPROVED) .withActionsRequired("None")), com.azure.core.util.Context.NONE); } 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 ae5fcd2edbd2..3122b786be61 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubPrivateLinkResources List. */ +/** + * Samples for WebPubSubPrivateLinkResources List. + */ public final class WebPubSubPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubPrivateLinkResources_List.json */ /** * Sample code: WebPubSubPrivateLinkResources_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubPrivateLinkResourcesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubPrivateLinkResources() + manager.webPubSubPrivateLinkResources() .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/WebPubSubRegenerateKeySamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRegenerateKeySamples.java index 970aff497dc6..b0c0050a78dc 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 @@ -7,23 +7,21 @@ import com.azure.resourcemanager.webpubsub.models.KeyType; import com.azure.resourcemanager.webpubsub.models.RegenerateKeyParameters; -/** Samples for WebPubSub RegenerateKey. */ +/** + * Samples for WebPubSub RegenerateKey. + */ public final class WebPubSubRegenerateKeySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_RegenerateKey.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_RegenerateKey.json */ /** * Sample code: WebPubSub_RegenerateKey. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubRegenerateKey(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubs() - .regenerateKey( - "myResourceGroup", - "myWebPubSubService", - new RegenerateKeyParameters().withKeyType(KeyType.PRIMARY), - com.azure.core.util.Context.NONE); + manager.webPubSubs() + .regenerateKey("myResourceGroup", "myWebPubSubService", + new RegenerateKeyParameters().withKeyType(KeyType.PRIMARY), com.azure.core.util.Context.NONE); } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..9c3e2da95f61 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// 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 WebPubSubReplicaSharedPrivateLinkResources CreateOrUpdate. + */ +public final class WebPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_CreateOrUpdate.json + */ + /** + * Sample code: WebPubSubReplicaSharedPrivateLinkResources_CreateOrUpdate. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void webPubSubReplicaSharedPrivateLinkResourcesCreateOrUpdate( + com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubReplicaSharedPrivateLinkResources() + .define("upstream") + .withExistingReplica("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus") + .withGroupId("sites") + .withPrivateLinkResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp") + .withRequestMessage("Please approve") + .create(); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesGetSamples.java new file mode 100644 index 000000000000..f125b47f403e --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesGetSamples.java @@ -0,0 +1,25 @@ +// 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 WebPubSubReplicaSharedPrivateLinkResources Get. + */ +public final class WebPubSubReplicaSharedPrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_Get.json + */ + /** + * Sample code: WebPubSubReplicaSharedPrivateLinkResources_Get. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void + webPubSubReplicaSharedPrivateLinkResourcesGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubReplicaSharedPrivateLinkResources() + .getWithResponse("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", "upstream", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesListSamples.java new file mode 100644 index 000000000000..c80a91dc2eee --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicaSharedPrivateLinkResourcesListSamples.java @@ -0,0 +1,25 @@ +// 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 WebPubSubReplicaSharedPrivateLinkResources List. + */ +public final class WebPubSubReplicaSharedPrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicaSharedPrivateLinkResources_List.json + */ + /** + * Sample code: WebPubSubReplicaSharedPrivateLinkResources_List. + * + * @param manager Entry point to WebPubSubManager. + */ + public static void + webPubSubReplicaSharedPrivateLinkResourcesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubReplicaSharedPrivateLinkResources() + .list("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/WebPubSubReplicasCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasCreateOrUpdateSamples.java index 30adb1053b16..0821877c91c7 100644 --- 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 @@ -9,19 +9,20 @@ import java.util.HashMap; import java.util.Map; -/** Samples for WebPubSubReplicas CreateOrUpdate. */ +/** + * Samples for WebPubSubReplicas CreateOrUpdate. + */ public final class WebPubSubReplicasCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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() + manager.webPubSubReplicas() .define("myWebPubSubService-eastus") .withRegion("eastus") .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") 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 index cdce275a2109..8f99969de556 100644 --- 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubReplicas Delete. */ +/** + * Samples for WebPubSubReplicas Delete. + */ public final class WebPubSubReplicasDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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); + 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 index 182beb84bf39..b6691ae18630 100644 --- 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubReplicas Get. */ +/** + * Samples for WebPubSubReplicas Get. + */ public final class WebPubSubReplicasGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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); + 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 index a89750dcf8f6..861e5c8a24ad 100644 --- 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubReplicas List. */ +/** + * Samples for WebPubSubReplicas List. + */ public final class WebPubSubReplicasListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubReplicas_List.json */ /** * Sample code: WebPubSubReplicas_List. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubReplicasList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { 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 index 69280b8ad23b..7c06e2f0bfab 100644 --- 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubReplicas Restart. */ +/** + * Samples for WebPubSubReplicas Restart. + */ public final class WebPubSubReplicasRestartSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_Restart.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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); + 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 index d2a2b136d41e..27a83db8d4ca 100644 --- 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 @@ -10,28 +10,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for WebPubSubReplicas Update. */ +/** + * Samples for WebPubSubReplicas Update. + */ public final class WebPubSubReplicasUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubReplicas_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/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() + Replica resource = manager.webPubSubReplicas() + .getWithResponse("myResourceGroup", "myWebPubSubService", "myWebPubSubService-eastus", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("key1", "fakeTokenPlaceholder")) .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) .withResourceStopped("false") 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 6378e2b1855b..205e9dc0e3bd 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSub Restart. */ +/** + * Samples for WebPubSub Restart. + */ public final class WebPubSubRestartSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_Restart.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Restart.json */ /** * Sample code: WebPubSub_Restart. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubRestart(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { 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 f8185418b925..5b9a888db890 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 @@ -4,26 +4,27 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. */ +import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; + +/** + * Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. + */ public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_CreateOrUpdate. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubSharedPrivateLinkResourcesCreateOrUpdate( com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubSharedPrivateLinkResources() - .define("upstream") - .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") - .withGroupId("sites") - .withPrivateLinkResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp") - .withRequestMessage("Please approve") - .create(); + manager.webPubSubSharedPrivateLinkResources() + .createOrUpdate("upstream", "myResourceGroup", "myWebPubSubService", new SharedPrivateLinkResourceInner() + .withGroupId("sites") + .withPrivateLinkResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp") + .withRequestMessage("Please approve"), com.azure.core.util.Context.NONE); } } 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 92b1b3e4e197..b45578b18786 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubSharedPrivateLinkResources Delete. */ +/** + * Samples for WebPubSubSharedPrivateLinkResources Delete. + */ public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_Delete.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Delete. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubSharedPrivateLinkResourcesDelete( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubSharedPrivateLinkResources() + public static void + webPubSubSharedPrivateLinkResourcesDelete(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubSharedPrivateLinkResources() .delete("upstream", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 499437cdc8fa..e17cfdfca9ad 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubSharedPrivateLinkResources Get. */ +/** + * Samples for WebPubSubSharedPrivateLinkResources Get. + */ public final class WebPubSubSharedPrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_Get.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Get. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubSharedPrivateLinkResourcesGet( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubSharedPrivateLinkResources() + public static void + webPubSubSharedPrivateLinkResourcesGet(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubSharedPrivateLinkResources() .getWithResponse("upstream", "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE); } } 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 dc349c90d5cd..d2627f117520 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.webpubsub.generated; -/** Samples for WebPubSubSharedPrivateLinkResources List. */ +/** + * Samples for WebPubSubSharedPrivateLinkResources List. + */ public final class WebPubSubSharedPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSubSharedPrivateLinkResources_List.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_List. - * + * * @param manager Entry point to WebPubSubManager. */ - public static void webPubSubSharedPrivateLinkResourcesList( - com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - manager - .webPubSubSharedPrivateLinkResources() + public static void + webPubSubSharedPrivateLinkResourcesList(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { + manager.webPubSubSharedPrivateLinkResources() .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/WebPubSubUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubUpdateSamples.java index fbecb1a08ec6..fc678f8612b9 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 @@ -16,53 +16,45 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; import com.azure.resourcemanager.webpubsub.models.WebPubSubResource; import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; +import com.azure.resourcemanager.webpubsub.models.WebPubSubSocketIOSettings; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for WebPubSub Update. */ +/** + * Samples for WebPubSub Update. + */ public final class WebPubSubUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2023-08-01-preview/examples/WebPubSub_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2024-03-01/examples/WebPubSub_Update.json */ /** * Sample code: WebPubSub_Update. - * + * * @param manager Entry point to WebPubSubManager. */ public static void webPubSubUpdate(com.azure.resourcemanager.webpubsub.WebPubSubManager manager) { - WebPubSubResource resource = - manager - .webPubSubs() - .getByResourceGroupWithResponse( - "myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + WebPubSubResource resource = manager.webPubSubs() + .getByResourceGroupWithResponse("myResourceGroup", "myWebPubSubService", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("key1", "fakeTokenPlaceholder")) .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("false") - .withCategories( - Arrays.asList(new LiveTraceCategory().withName("ConnectivityLogs").withEnabled("true")))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) - .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) + .withLiveTraceConfiguration(new LiveTraceConfiguration().withEnabled("false") + .withCategories( + Arrays.asList(new LiveTraceCategory().withName("ConnectivityLogs").withEnabled("true")))) + .withNetworkACLs(new WebPubSubNetworkACLs().withDefaultAction(AclAction.DENY) + .withPublicNetwork(new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) + .withPrivateEndpoints(Arrays + .asList(new PrivateEndpointAcl().withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) + .withName("mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) .withPublicNetworkAccess("Enabled") .withDisableLocalAuth(false) .withDisableAadAuth(false) + .withSocketIO(new WebPubSubSocketIOSettings().withServiceMode("Serverless")) .apply(); } 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 dabbd06d7f0f..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\":\"Succeeded\",\"domainName\":\"ibyqunyowxwlmdj\",\"customCertificate\":{\"id\":\"vfgbvfvpdboda\"}},\"id\":\"zsjqlh\",\"name\":\"rribd\",\"type\":\"ibqipqkg\"}") - .toObject(CustomDomainInner.class); - Assertions.assertEquals("ibyqunyowxwlmdj", model.domainName()); - Assertions.assertEquals("vfgbvfvpdboda", model.customCertificate().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainInner model = - new CustomDomainInner() - .withDomainName("ibyqunyowxwlmdj") - .withCustomCertificate(new ResourceReference().withId("vfgbvfvpdboda")); - model = BinaryData.fromObject(model).toObject(CustomDomainInner.class); - Assertions.assertEquals("ibyqunyowxwlmdj", model.domainName()); - Assertions.assertEquals("vfgbvfvpdboda", 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 d978f5c2a151..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/CustomDomainListTests.java +++ /dev/null @@ -1,49 +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 com.azure.resourcemanager.webpubsub.models.ResourceReference; -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\":\"Deleting\",\"domainName\":\"xggicccnxqhuexmk\",\"customCertificate\":{\"id\":\"lstvlzywe\"}},\"id\":\"zrncsdt\",\"name\":\"lusiy\",\"type\":\"bsfgytguslfea\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"domainName\":\"gq\",\"customCertificate\":{\"id\":\"yhejhzisxgfp\"}},\"id\":\"olppvksrpqvujz\",\"name\":\"aehtwd\",\"type\":\"r\"},{\"properties\":{\"provisioningState\":\"Moving\",\"domainName\":\"wib\",\"customCertificate\":{\"id\":\"cdl\"}},\"id\":\"shfwpracstwity\",\"name\":\"hevxcced\",\"type\":\"pnmdyodnwzxltjcv\"}],\"nextLink\":\"ltiugcxnavv\"}") - .toObject(CustomDomainList.class); - Assertions.assertEquals("xggicccnxqhuexmk", model.value().get(0).domainName()); - Assertions.assertEquals("lstvlzywe", model.value().get(0).customCertificate().id()); - Assertions.assertEquals("ltiugcxnavv", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainList model = - new CustomDomainList() - .withValue( - Arrays - .asList( - new CustomDomainInner() - .withDomainName("xggicccnxqhuexmk") - .withCustomCertificate(new ResourceReference().withId("lstvlzywe")), - new CustomDomainInner() - .withDomainName("gq") - .withCustomCertificate(new ResourceReference().withId("yhejhzisxgfp")), - new CustomDomainInner() - .withDomainName("wib") - .withCustomCertificate(new ResourceReference().withId("cdl")))) - .withNextLink("ltiugcxnavv"); - model = BinaryData.fromObject(model).toObject(CustomDomainList.class); - Assertions.assertEquals("xggicccnxqhuexmk", model.value().get(0).domainName()); - Assertions.assertEquals("lstvlzywe", model.value().get(0).customCertificate().id()); - Assertions.assertEquals("ltiugcxnavv", 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 d6554a2e4de3..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\":\"Deleting\",\"domainName\":\"ndzwmkrefa\",\"customCertificate\":{\"id\":\"jorwkqnyhgbij\"}}") - .toObject(CustomDomainProperties.class); - Assertions.assertEquals("ndzwmkrefa", model.domainName()); - Assertions.assertEquals("jorwkqnyhgbij", model.customCertificate().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomainProperties model = - new CustomDomainProperties() - .withDomainName("ndzwmkrefa") - .withCustomCertificate(new ResourceReference().withId("jorwkqnyhgbij")); - model = BinaryData.fromObject(model).toObject(CustomDomainProperties.class); - Assertions.assertEquals("ndzwmkrefa", model.domainName()); - Assertions.assertEquals("jorwkqnyhgbij", 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 14450f9f5de6..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\":\"alhbx\",\"displayName\":\"e\",\"internalName\":\"zzvdudgwds\",\"toBeExportedForShoebox\":true}") - .toObject(Dimension.class); - Assertions.assertEquals("alhbx", model.name()); - Assertions.assertEquals("e", model.displayName()); - Assertions.assertEquals("zzvdudgwds", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dimension model = - new Dimension() - .withName("alhbx") - .withDisplayName("e") - .withInternalName("zzvdudgwds") - .withToBeExportedForShoebox(true); - model = BinaryData.fromObject(model).toObject(Dimension.class); - Assertions.assertEquals("alhbx", model.name()); - Assertions.assertEquals("e", model.displayName()); - Assertions.assertEquals("zzvdudgwds", 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 cbb9a9f8f284..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\":\"qncygupkvi\",\"userEventPattern\":\"dscwxqupevzhf\",\"systemEvents\":[\"txhojujb\",\"pelmcuvhixbjxyf\",\"n\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{\"resource\":\"lsttpkiwkkbnuj\"}}}") - .toObject(EventHandler.class); - Assertions.assertEquals("qncygupkvi", model.urlTemplate()); - Assertions.assertEquals("dscwxqupevzhf", model.userEventPattern()); - Assertions.assertEquals("txhojujb", model.systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.auth().type()); - Assertions.assertEquals("lsttpkiwkkbnuj", model.auth().managedIdentity().resource()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHandler model = - new EventHandler() - .withUrlTemplate("qncygupkvi") - .withUserEventPattern("dscwxqupevzhf") - .withSystemEvents(Arrays.asList("txhojujb", "pelmcuvhixbjxyf", "n")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings().withResource("lsttpkiwkkbnuj"))); - model = BinaryData.fromObject(model).toObject(EventHandler.class); - Assertions.assertEquals("qncygupkvi", model.urlTemplate()); - Assertions.assertEquals("dscwxqupevzhf", model.userEventPattern()); - Assertions.assertEquals("txhojujb", model.systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.auth().type()); - Assertions.assertEquals("lsttpkiwkkbnuj", 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 bd57ca9b3e3b..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventHubEndpointTests.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.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\":\"uxrkjp\",\"eventHubName\":\"dwxf\"}") - .toObject(EventHubEndpoint.class); - Assertions.assertEquals("uxrkjp", model.fullyQualifiedNamespace()); - Assertions.assertEquals("dwxf", model.eventHubName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHubEndpoint model = new EventHubEndpoint().withFullyQualifiedNamespace("uxrkjp").withEventHubName("dwxf"); - model = BinaryData.fromObject(model).toObject(EventHubEndpoint.class); - Assertions.assertEquals("uxrkjp", model.fullyQualifiedNamespace()); - Assertions.assertEquals("dwxf", 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 fb98fcaa0981..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/EventNameFilterTests.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.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\":[\"ivwzjbhyzs\",\"jrkambtrnegvmnv\",\"q\",\"qvldspastjbkkd\"],\"userEventPattern\":\"lves\"}") - .toObject(EventNameFilter.class); - Assertions.assertEquals("ivwzjbhyzs", model.systemEvents().get(0)); - Assertions.assertEquals("lves", model.userEventPattern()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventNameFilter model = - new EventNameFilter() - .withSystemEvents(Arrays.asList("ivwzjbhyzs", "jrkambtrnegvmnv", "q", "qvldspastjbkkd")) - .withUserEventPattern("lves"); - model = BinaryData.fromObject(model).toObject(EventNameFilter.class); - Assertions.assertEquals("ivwzjbhyzs", model.systemEvents().get(0)); - Assertions.assertEquals("lves", model.userEventPattern()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/IpRuleTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/IpRuleTests.java deleted file mode 100644 index fac723e6442b..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/IpRuleTests.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.AclAction; -import com.azure.resourcemanager.webpubsub.models.IpRule; -import org.junit.jupiter.api.Assertions; - -public final class IpRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpRule model = BinaryData.fromString("{\"value\":\"wvogvbbejdc\",\"action\":\"Allow\"}").toObject(IpRule.class); - Assertions.assertEquals("wvogvbbejdc", model.value()); - Assertions.assertEquals(AclAction.ALLOW, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpRule model = new IpRule().withValue("wvogvbbejdc").withAction(AclAction.ALLOW); - model = BinaryData.fromObject(model).toObject(IpRule.class); - Assertions.assertEquals("wvogvbbejdc", model.value()); - Assertions.assertEquals(AclAction.ALLOW, model.action()); - } -} 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 52eb4aa10b97..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LiveTraceCategoryTests.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.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\":\"puqujmqlgkfbtn\",\"enabled\":\"aongbj\"}") - .toObject(LiveTraceCategory.class); - Assertions.assertEquals("puqujmqlgkfbtn", model.name()); - Assertions.assertEquals("aongbj", model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LiveTraceCategory model = new LiveTraceCategory().withName("puqujmqlgkfbtn").withEnabled("aongbj"); - model = BinaryData.fromObject(model).toObject(LiveTraceCategory.class); - Assertions.assertEquals("puqujmqlgkfbtn", model.name()); - Assertions.assertEquals("aongbj", 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 205dfa08a6f5..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/LiveTraceConfigurationTests.java +++ /dev/null @@ -1,43 +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\":\"cormr\",\"categories\":[{\"name\":\"vcofudfl\",\"enabled\":\"gj\"},{\"name\":\"gdknnqv\",\"enabled\":\"znqntoru\"},{\"name\":\"gsahmkycgrauw\",\"enabled\":\"etaebu\"},{\"name\":\"vdmovsmzlxwabm\",\"enabled\":\"efkifr\"}]}") - .toObject(LiveTraceConfiguration.class); - Assertions.assertEquals("cormr", model.enabled()); - Assertions.assertEquals("vcofudfl", model.categories().get(0).name()); - Assertions.assertEquals("gj", model.categories().get(0).enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LiveTraceConfiguration model = - new LiveTraceConfiguration() - .withEnabled("cormr") - .withCategories( - Arrays - .asList( - new LiveTraceCategory().withName("vcofudfl").withEnabled("gj"), - new LiveTraceCategory().withName("gdknnqv").withEnabled("znqntoru"), - new LiveTraceCategory().withName("gsahmkycgrauw").withEnabled("etaebu"), - new LiveTraceCategory().withName("vdmovsmzlxwabm").withEnabled("efkifr"))); - model = BinaryData.fromObject(model).toObject(LiveTraceConfiguration.class); - Assertions.assertEquals("cormr", model.enabled()); - Assertions.assertEquals("vcofudfl", model.categories().get(0).name()); - Assertions.assertEquals("gj", 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 0a3856f3f872..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\":\"twmcynpwlb\",\"displayName\":\"pgacftadehxnlty\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("twmcynpwlb", model.name()); - Assertions.assertEquals("pgacftadehxnlty", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = new LogSpecification().withName("twmcynpwlb").withDisplayName("pgacftadehxnlty"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("twmcynpwlb", model.name()); - Assertions.assertEquals("pgacftadehxnlty", 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 20e1a445ca75..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\":\"fpncurdo\"}").toObject(ManagedIdentitySettings.class); - Assertions.assertEquals("fpncurdo", model.resource()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentitySettings model = new ManagedIdentitySettings().withResource("fpncurdo"); - model = BinaryData.fromObject(model).toObject(ManagedIdentitySettings.class); - Assertions.assertEquals("fpncurdo", 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 aa9112747e40..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ManagedIdentityTests.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.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\":\"SystemAssigned\",\"userAssignedIdentities\":{\"u\":{\"principalId\":\"ufgmjzrwrdg\",\"clientId\":\"wae\"},\"fozbhdmsmlmzqhof\":{\"principalId\":\"kopbminrf\",\"clientId\":\"oyuhhziui\"}},\"principalId\":\"maequiahxicslfa\",\"tenantId\":\"z\"}") - .toObject(ManagedIdentity.class); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentity model = - new ManagedIdentity() - .withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "u", - new UserAssignedIdentityProperty(), - "fozbhdmsmlmzqhof", - new UserAssignedIdentityProperty())); - model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @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 bf99fbb0329c..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/MetricSpecificationTests.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.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\":\"cgyncocpecf\",\"displayName\":\"mcoo\",\"displayDescription\":\"xlzevgbmqjqabcy\",\"unit\":\"ivkwlzuvccfwnfnb\",\"aggregationType\":\"fionl\",\"fillGapWithZero\":\"x\",\"category\":\"qgtz\",\"dimensions\":[{\"name\":\"qbqqwxr\",\"displayName\":\"eallnwsubisnj\",\"internalName\":\"pmng\",\"toBeExportedForShoebox\":false},{\"name\":\"xaqwoochcbonqv\",\"displayName\":\"vlrxnjeaseiph\",\"internalName\":\"f\",\"toBeExportedForShoebox\":false},{\"name\":\"yyien\",\"displayName\":\"dlwtgrhpdj\",\"internalName\":\"umasxazjpq\",\"toBeExportedForShoebox\":false}]}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("cgyncocpecf", model.name()); - Assertions.assertEquals("mcoo", model.displayName()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.displayDescription()); - Assertions.assertEquals("ivkwlzuvccfwnfnb", model.unit()); - Assertions.assertEquals("fionl", model.aggregationType()); - Assertions.assertEquals("x", model.fillGapWithZero()); - Assertions.assertEquals("qgtz", model.category()); - Assertions.assertEquals("qbqqwxr", model.dimensions().get(0).name()); - Assertions.assertEquals("eallnwsubisnj", model.dimensions().get(0).displayName()); - Assertions.assertEquals("pmng", 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("cgyncocpecf") - .withDisplayName("mcoo") - .withDisplayDescription("xlzevgbmqjqabcy") - .withUnit("ivkwlzuvccfwnfnb") - .withAggregationType("fionl") - .withFillGapWithZero("x") - .withCategory("qgtz") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("qbqqwxr") - .withDisplayName("eallnwsubisnj") - .withInternalName("pmng") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("xaqwoochcbonqv") - .withDisplayName("vlrxnjeaseiph") - .withInternalName("f") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("yyien") - .withDisplayName("dlwtgrhpdj") - .withInternalName("umasxazjpq") - .withToBeExportedForShoebox(false))); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("cgyncocpecf", model.name()); - Assertions.assertEquals("mcoo", model.displayName()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.displayDescription()); - Assertions.assertEquals("ivkwlzuvccfwnfnb", model.unit()); - Assertions.assertEquals("fionl", model.aggregationType()); - Assertions.assertEquals("x", model.fillGapWithZero()); - Assertions.assertEquals("qgtz", model.category()); - Assertions.assertEquals("qbqqwxr", model.dimensions().get(0).name()); - Assertions.assertEquals("eallnwsubisnj", model.dimensions().get(0).displayName()); - Assertions.assertEquals("pmng", 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 fffcd01edcc5..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\":\"dejbavo\",\"message\":\"zdmohctbqvu\"}") - .toObject(NameAvailabilityInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("dejbavo", model.reason()); - Assertions.assertEquals("zdmohctbqvu", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityInner model = - new NameAvailabilityInner().withNameAvailable(true).withReason("dejbavo").withMessage("zdmohctbqvu"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("dejbavo", model.reason()); - Assertions.assertEquals("zdmohctbqvu", 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 c182dd458f5c..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NameAvailabilityParametersTests.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.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\":\"sop\",\"name\":\"usue\"}").toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("sop", model.type()); - Assertions.assertEquals("usue", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityParameters model = new NameAvailabilityParameters().withType("sop").withName("usue"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("sop", model.type()); - Assertions.assertEquals("usue", 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 a1344e21c95f..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/NetworkAclTests.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.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\":[\"ClientConnection\"],\"deny\":[\"Trace\"]}").toObject(NetworkAcl.class); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.deny().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkAcl model = - new NetworkAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)) - .withDeny(Arrays.asList(WebPubSubRequestType.TRACE)); - model = BinaryData.fromObject(model).toObject(NetworkAcl.class); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, 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 f923286cac6e..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\":\"ozkrwfndiodjpslw\",\"resource\":\"dpvwryoqpsoaccta\",\"operation\":\"kljla\",\"description\":\"cr\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("ozkrwfndiodjpslw", model.provider()); - Assertions.assertEquals("dpvwryoqpsoaccta", model.resource()); - Assertions.assertEquals("kljla", model.operation()); - Assertions.assertEquals("cr", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("ozkrwfndiodjpslw") - .withResource("dpvwryoqpsoaccta") - .withOperation("kljla") - .withDescription("cr"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("ozkrwfndiodjpslw", model.provider()); - Assertions.assertEquals("dpvwryoqpsoaccta", model.resource()); - Assertions.assertEquals("kljla", model.operation()); - Assertions.assertEquals("cr", 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 76ba49299e90..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationInnerTests.java +++ /dev/null @@ -1,140 +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.Dimension; -import com.azure.resourcemanager.webpubsub.models.LogSpecification; -import com.azure.resourcemanager.webpubsub.models.MetricSpecification; -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\":\"fcqhsmyurkd\",\"isDataAction\":false,\"display\":{\"provider\":\"ekuksjtx\",\"resource\":\"cdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"kknryrtihf\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"zvgnwzs\",\"displayName\":\"glzufc\",\"displayDescription\":\"kohdbiha\",\"unit\":\"fhfcb\",\"aggregationType\":\"s\",\"fillGapWithZero\":\"ithxqhabifpi\",\"category\":\"wczbys\",\"dimensions\":[{}]},{\"name\":\"x\",\"displayName\":\"ivyqniwbybrkxvd\",\"displayDescription\":\"jgrtfwvukxga\",\"unit\":\"ccsnhsjc\",\"aggregationType\":\"ejhkry\",\"fillGapWithZero\":\"napczwlokjy\",\"category\":\"kkvnipjox\",\"dimensions\":[{},{}]}],\"logSpecifications\":[{\"name\":\"ejspodmail\",\"displayName\":\"deh\"},{\"name\":\"wyahuxinpmqnja\",\"displayName\":\"ixjsprozvcputeg\"},{\"name\":\"wmfdatscmdvpjhul\",\"displayName\":\"uvm\"}]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("fcqhsmyurkd", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("ekuksjtx", model.display().provider()); - Assertions.assertEquals("cdm", model.display().resource()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.display().operation()); - Assertions.assertEquals("lhmwhfpmrqobm", model.display().description()); - Assertions.assertEquals("kknryrtihf", model.origin()); - Assertions - .assertEquals("zvgnwzs", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "glzufc", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "kohdbiha", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals("fhfcb", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "s", model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "ithxqhabifpi", - model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals("wczbys", model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals("ejspodmail", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals("deh", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withName("fcqhsmyurkd") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("ekuksjtx") - .withResource("cdm") - .withOperation("rcryuanzwuxzdxta") - .withDescription("lhmwhfpmrqobm")) - .withOrigin("kknryrtihf") - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("zvgnwzs") - .withDisplayName("glzufc") - .withDisplayDescription("kohdbiha") - .withUnit("fhfcb") - .withAggregationType("s") - .withFillGapWithZero("ithxqhabifpi") - .withCategory("wczbys") - .withDimensions(Arrays.asList(new Dimension())), - new MetricSpecification() - .withName("x") - .withDisplayName("ivyqniwbybrkxvd") - .withDisplayDescription("jgrtfwvukxga") - .withUnit("ccsnhsjc") - .withAggregationType("ejhkry") - .withFillGapWithZero("napczwlokjy") - .withCategory("kkvnipjox") - .withDimensions(Arrays.asList(new Dimension(), new Dimension())))) - .withLogSpecifications( - Arrays - .asList( - new LogSpecification().withName("ejspodmail").withDisplayName("deh"), - new LogSpecification() - .withName("wyahuxinpmqnja") - .withDisplayName("ixjsprozvcputeg"), - new LogSpecification() - .withName("wmfdatscmdvpjhul") - .withDisplayName("uvm"))))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("fcqhsmyurkd", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("ekuksjtx", model.display().provider()); - Assertions.assertEquals("cdm", model.display().resource()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.display().operation()); - Assertions.assertEquals("lhmwhfpmrqobm", model.display().description()); - Assertions.assertEquals("kknryrtihf", model.origin()); - Assertions - .assertEquals("zvgnwzs", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "glzufc", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "kohdbiha", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals("fhfcb", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "s", model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "ithxqhabifpi", - model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals("wczbys", model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals("ejspodmail", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals("deh", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - } -} 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 158da4add520..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationListTests.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.OperationInner; -import com.azure.resourcemanager.webpubsub.models.LogSpecification; -import com.azure.resourcemanager.webpubsub.models.MetricSpecification; -import com.azure.resourcemanager.webpubsub.models.OperationDisplay; -import com.azure.resourcemanager.webpubsub.models.OperationList; -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 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\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{}]}}},{\"name\":\"qijgkd\",\"isDataAction\":true,\"display\":{\"provider\":\"lobcufpdznrbtcq\",\"resource\":\"nq\",\"operation\":\"hqgnufooojywif\",\"description\":\"esaagdfm\"},\"origin\":\"zlhjxrifkwmrvkt\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{}],\"logSpecifications\":[{},{}]}}},{\"name\":\"pa\",\"isDataAction\":false,\"display\":{\"provider\":\"s\",\"resource\":\"cmpoyfdkfogkny\",\"operation\":\"ofjdde\",\"description\":\"rd\"},\"origin\":\"pewnw\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{},{}]}}}],\"nextLink\":\"lusarh\"}") - .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("lusarh", 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() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays.asList(new MetricSpecification(), new MetricSpecification())) - .withLogSpecifications( - Arrays.asList(new LogSpecification(), new LogSpecification())))), - new OperationInner() - .withName("qijgkd") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("lobcufpdznrbtcq") - .withResource("nq") - .withOperation("hqgnufooojywif") - .withDescription("esaagdfm")) - .withOrigin("zlhjxrifkwmrvkt") - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications(Arrays.asList(new MetricSpecification())) - .withLogSpecifications( - Arrays.asList(new LogSpecification(), new LogSpecification())))), - new OperationInner() - .withName("pa") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("s") - .withResource("cmpoyfdkfogkny") - .withOperation("ofjdde") - .withDescription("rd")) - .withOrigin("pewnw") - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays.asList(new MetricSpecification(), new MetricSpecification())) - .withLogSpecifications( - Arrays - .asList( - new LogSpecification(), - new LogSpecification(), - new LogSpecification())))))) - .withNextLink("lusarh"); - 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("lusarh", 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 3120707bc3d7..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,204 +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.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\":\"dosyg\",\"displayName\":\"paojakhmsbzjh\",\"displayDescription\":\"zevdphlx\",\"unit\":\"lthqtrgqjbp\",\"aggregationType\":\"fsinzgvfcjrwzoxx\",\"fillGapWithZero\":\"felluwfzitonpe\",\"category\":\"pjkjlxofpdv\",\"dimensions\":[{\"name\":\"xypininmayhuybbk\",\"displayName\":\"depoog\",\"internalName\":\"uvamiheognarxzxt\",\"toBeExportedForShoebox\":false},{\"name\":\"usivye\",\"displayName\":\"ciqihnhung\",\"internalName\":\"jzrnf\",\"toBeExportedForShoebox\":true},{\"name\":\"ispe\",\"displayName\":\"tzfkufubl\",\"internalName\":\"fxqeof\",\"toBeExportedForShoebox\":false},{\"name\":\"jhqjbasvmsmjqul\",\"displayName\":\"sntnbybkzgcw\",\"internalName\":\"clxxwrljdo\",\"toBeExportedForShoebox\":true}]},{\"name\":\"qvkoc\",\"displayName\":\"jdkwtnhxbnjb\",\"displayDescription\":\"sqrglssainq\",\"unit\":\"wnzlljfmppeeb\",\"aggregationType\":\"gxsabkyq\",\"fillGapWithZero\":\"ujitcjcz\",\"category\":\"evndh\",\"dimensions\":[{\"name\":\"d\",\"displayName\":\"p\",\"internalName\":\"bdkvwrwjf\",\"toBeExportedForShoebox\":false},{\"name\":\"hutje\",\"displayName\":\"mrldhu\",\"internalName\":\"zzd\",\"toBeExportedForShoebox\":true},{\"name\":\"hocdgeab\",\"displayName\":\"phut\",\"internalName\":\"ndv\",\"toBeExportedForShoebox\":true}]},{\"name\":\"wyiftyhxhur\",\"displayName\":\"ftyxolniw\",\"displayDescription\":\"cukjf\",\"unit\":\"iawxklry\",\"aggregationType\":\"wckbasyypnd\",\"fillGapWithZero\":\"sgcbac\",\"category\":\"ejk\",\"dimensions\":[{\"name\":\"qgoulznd\",\"displayName\":\"kwy\",\"internalName\":\"gfgibm\",\"toBeExportedForShoebox\":false},{\"name\":\"keqsrxybzqqedq\",\"displayName\":\"bciqfouflm\",\"internalName\":\"kzsmodm\",\"toBeExportedForShoebox\":false},{\"name\":\"gpbkwtmut\",\"displayName\":\"qktapspwgcuert\",\"internalName\":\"kdosvqw\",\"toBeExportedForShoebox\":true},{\"name\":\"gbbjfddgmbmbe\",\"displayName\":\"pbhtqqrolfpfpsa\",\"internalName\":\"bquxigjy\",\"toBeExportedForShoebox\":true}]}],\"logSpecifications\":[{\"name\":\"yfhrtxilnerkujy\",\"displayName\":\"l\"},{\"name\":\"uvfqawrlyxwj\",\"displayName\":\"prbnwbxgjvtbv\"},{\"name\":\"sszdnru\",\"displayName\":\"guhmuouqfpr\"},{\"name\":\"wbnguitnwui\",\"displayName\":\"a\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("dosyg", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("paojakhmsbzjh", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("zevdphlx", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("lthqtrgqjbp", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "fsinzgvfcjrwzoxx", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "felluwfzitonpe", model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("pjkjlxofpdv", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "xypininmayhuybbk", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions - .assertEquals( - "depoog", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals( - "uvamiheognarxzxt", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals( - false, - model - .serviceSpecification() - .metricSpecifications() - .get(0) - .dimensions() - .get(0) - .toBeExportedForShoebox()); - Assertions.assertEquals("yfhrtxilnerkujy", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("l", 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("dosyg") - .withDisplayName("paojakhmsbzjh") - .withDisplayDescription("zevdphlx") - .withUnit("lthqtrgqjbp") - .withAggregationType("fsinzgvfcjrwzoxx") - .withFillGapWithZero("felluwfzitonpe") - .withCategory("pjkjlxofpdv") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("xypininmayhuybbk") - .withDisplayName("depoog") - .withInternalName("uvamiheognarxzxt") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("usivye") - .withDisplayName("ciqihnhung") - .withInternalName("jzrnf") - .withToBeExportedForShoebox(true), - new Dimension() - .withName("ispe") - .withDisplayName("tzfkufubl") - .withInternalName("fxqeof") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("jhqjbasvmsmjqul") - .withDisplayName("sntnbybkzgcw") - .withInternalName("clxxwrljdo") - .withToBeExportedForShoebox(true))), - new MetricSpecification() - .withName("qvkoc") - .withDisplayName("jdkwtnhxbnjb") - .withDisplayDescription("sqrglssainq") - .withUnit("wnzlljfmppeeb") - .withAggregationType("gxsabkyq") - .withFillGapWithZero("ujitcjcz") - .withCategory("evndh") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("d") - .withDisplayName("p") - .withInternalName("bdkvwrwjf") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("hutje") - .withDisplayName("mrldhu") - .withInternalName("zzd") - .withToBeExportedForShoebox(true), - new Dimension() - .withName("hocdgeab") - .withDisplayName("phut") - .withInternalName("ndv") - .withToBeExportedForShoebox(true))), - new MetricSpecification() - .withName("wyiftyhxhur") - .withDisplayName("ftyxolniw") - .withDisplayDescription("cukjf") - .withUnit("iawxklry") - .withAggregationType("wckbasyypnd") - .withFillGapWithZero("sgcbac") - .withCategory("ejk") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("qgoulznd") - .withDisplayName("kwy") - .withInternalName("gfgibm") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("keqsrxybzqqedq") - .withDisplayName("bciqfouflm") - .withInternalName("kzsmodm") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("gpbkwtmut") - .withDisplayName("qktapspwgcuert") - .withInternalName("kdosvqw") - .withToBeExportedForShoebox(true), - new Dimension() - .withName("gbbjfddgmbmbe") - .withDisplayName("pbhtqqrolfpfpsa") - .withInternalName("bquxigjy") - .withToBeExportedForShoebox(true))))) - .withLogSpecifications( - Arrays - .asList( - new LogSpecification().withName("yfhrtxilnerkujy").withDisplayName("l"), - new LogSpecification().withName("uvfqawrlyxwj").withDisplayName("prbnwbxgjvtbv"), - new LogSpecification().withName("sszdnru").withDisplayName("guhmuouqfpr"), - new LogSpecification().withName("wbnguitnwui").withDisplayName("a")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("dosyg", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("paojakhmsbzjh", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("zevdphlx", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("lthqtrgqjbp", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "fsinzgvfcjrwzoxx", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "felluwfzitonpe", model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("pjkjlxofpdv", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "xypininmayhuybbk", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions - .assertEquals( - "depoog", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals( - "uvamiheognarxzxt", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals( - false, - model - .serviceSpecification() - .metricSpecifications() - .get(0) - .dimensions() - .get(0) - .toBeExportedForShoebox()); - Assertions.assertEquals("yfhrtxilnerkujy", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("l", 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 bd28e7ae5be8..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/OperationsListMockTests.java +++ /dev/null @@ -1,151 +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\":\"jlxr\",\"isDataAction\":true,\"display\":{\"provider\":\"apeewchpxlkt\",\"resource\":\"uziycsl\",\"operation\":\"ufuztcktyhjtq\",\"description\":\"cgzulwmmrqzzr\"},\"origin\":\"vpglydz\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"ev\",\"displayName\":\"epr\",\"displayDescription\":\"t\",\"unit\":\"ytp\",\"aggregationType\":\"mov\",\"fillGapWithZero\":\"fvaawzqa\",\"category\":\"lgzurig\",\"dimensions\":[{}]},{\"name\":\"xndticokpvzmlqtm\",\"displayName\":\"gxobfirclnp\",\"displayDescription\":\"iayz\",\"unit\":\"ykhyawfvjlboxqvk\",\"aggregationType\":\"mxho\",\"fillGapWithZero\":\"ynhdwdigum\",\"category\":\"raauzzpt\",\"dimensions\":[{},{}]}],\"logSpecifications\":[{\"name\":\"zhezwwvaiq\",\"displayName\":\"vv\"},{\"name\":\"nk\",\"displayName\":\"hqyikvy\"}]}}}]}"; - - 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("jlxr", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("apeewchpxlkt", response.iterator().next().display().provider()); - Assertions.assertEquals("uziycsl", response.iterator().next().display().resource()); - Assertions.assertEquals("ufuztcktyhjtq", response.iterator().next().display().operation()); - Assertions.assertEquals("cgzulwmmrqzzr", response.iterator().next().display().description()); - Assertions.assertEquals("vpglydz", response.iterator().next().origin()); - Assertions - .assertEquals( - "ev", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "epr", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayName()); - Assertions - .assertEquals( - "t", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayDescription()); - Assertions - .assertEquals( - "ytp", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "mov", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .aggregationType()); - Assertions - .assertEquals( - "fvaawzqa", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .fillGapWithZero()); - Assertions - .assertEquals( - "lgzurig", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .category()); - Assertions - .assertEquals( - "zhezwwvaiq", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "vv", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .displayName()); - } -} 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 3249f40cbf0c..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointAclTests.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.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\":\"oakgtdlmkkzev\",\"allow\":[\"Trace\",\"Trace\",\"ServerConnection\"],\"deny\":[\"ServerConnection\",\"RESTAPI\",\"RESTAPI\"]}") - .toObject(PrivateEndpointAcl.class); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.SERVER_CONNECTION, model.deny().get(0)); - Assertions.assertEquals("oakgtdlmkkzev", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointAcl model = - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.TRACE, - WebPubSubRequestType.TRACE, - WebPubSubRequestType.SERVER_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.RESTAPI)) - .withName("oakgtdlmkkzev"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointAcl.class); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.SERVER_CONNECTION, model.deny().get(0)); - Assertions.assertEquals("oakgtdlmkkzev", 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 1d5f77a7963b..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\":\"Failed\",\"privateEndpoint\":{\"id\":\"qbrqubpaxhexiili\"},\"groupIds\":[\"tiirqtdqoa\",\"oruzfgsquyfxrxx\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"amxjezwlw\",\"actionsRequired\":\"xuqlcvydypat\"}},\"id\":\"oa\",\"name\":\"jkniodko\",\"type\":\"ebwnujhe\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("qbrqubpaxhexiili", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("amxjezwlw", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("xuqlcvydypat", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("qbrqubpaxhexiili")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("amxjezwlw") - .withActionsRequired("xuqlcvydypat")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("qbrqubpaxhexiili", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("amxjezwlw", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("xuqlcvydypat", 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 b087b0a0b6b6..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateEndpointConnectionListTests.java +++ /dev/null @@ -1,66 +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.PrivateEndpointConnectionList; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionStatus; -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\":\"Moving\",\"privateEndpoint\":{\"id\":\"knfd\"},\"groupIds\":[\"jchrdgoihxumw\",\"ton\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"udfdlwgg\",\"actionsRequired\":\"sb\"}},\"id\":\"ovvtgseinqfiu\",\"name\":\"x\",\"type\":\"knpirgnepttwq\"},{\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"cdm\"},\"groupIds\":[\"ojlpijnkrxf\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ratiz\",\"actionsRequired\":\"onasxifto\"}},\"id\":\"yzhftwesgogczh\",\"name\":\"nnxk\",\"type\":\"lgnyhmo\"}],\"nextLink\":\"xkk\"}") - .toObject(PrivateEndpointConnectionList.class); - Assertions.assertEquals("knfd", model.value().get(0).privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("udfdlwgg", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("sb", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("xkk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionList model = - new PrivateEndpointConnectionList() - .withValue( - Arrays - .asList( - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("knfd")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("udfdlwgg") - .withActionsRequired("sb")), - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("cdm")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("ratiz") - .withActionsRequired("onasxifto")))) - .withNextLink("xkk"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionList.class); - Assertions.assertEquals("knfd", model.value().get(0).privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("udfdlwgg", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("sb", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("xkk", 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 70d9de8db755..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\":\"Creating\",\"privateEndpoint\":{\"id\":\"dkcrodt\"},\"groupIds\":[\"fw\",\"lfltka\",\"jvefkdlfoakggkfp\",\"gaowpulpqblylsyx\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"jervtia\",\"actionsRequired\":\"sdszue\"}}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("dkcrodt", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jervtia", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("sdszue", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint().withId("dkcrodt")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.PENDING) - .withDescription("jervtia") - .withActionsRequired("sdszue")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("dkcrodt", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jervtia", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("sdszue", 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 6d97c77e977c..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\":\"sbzkf\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("sbzkf", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("sbzkf"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("sbzkf", 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 1aff5463ac75..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourceInnerTests.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.fluent.models.PrivateLinkResourceInner; -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 PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"f\",\"requiredMembers\":[\"omtbghhavgrvkff\",\"vjzhpjbib\",\"jmfxumvf\",\"luyovwxnbkfezzx\"],\"requiredZoneNames\":[\"hwzdgirujbz\",\"omvzzbtd\",\"qvpn\"],\"shareablePrivateLinkResourceTypes\":[{\"name\":\"viylwdshfssnrbgy\",\"properties\":{\"description\":\"ymsgaojfmwnc\",\"groupId\":\"mrfhirctymox\",\"type\":\"tpipiwyczuhx\"}},{\"name\":\"pqjlihhyusps\",\"properties\":{\"description\":\"dvlmfwdgzxul\",\"groupId\":\"vpa\",\"type\":\"sreuzvxurisjnh\"}},{\"name\":\"txifqj\",\"properties\":{\"description\":\"mrhublwpc\",\"groupId\":\"utr\",\"type\":\"upauut\"}}]},\"id\":\"oqh\",\"name\":\"hej\",\"type\":\"g\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("f", model.groupId()); - Assertions.assertEquals("omtbghhavgrvkff", model.requiredMembers().get(0)); - Assertions.assertEquals("hwzdgirujbz", model.requiredZoneNames().get(0)); - Assertions.assertEquals("viylwdshfssnrbgy", model.shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals("ymsgaojfmwnc", model.shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions - .assertEquals("mrfhirctymox", model.shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions.assertEquals("tpipiwyczuhx", model.shareablePrivateLinkResourceTypes().get(0).properties().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = - new PrivateLinkResourceInner() - .withGroupId("f") - .withRequiredMembers(Arrays.asList("omtbghhavgrvkff", "vjzhpjbib", "jmfxumvf", "luyovwxnbkfezzx")) - .withRequiredZoneNames(Arrays.asList("hwzdgirujbz", "omvzzbtd", "qvpn")) - .withShareablePrivateLinkResourceTypes( - Arrays - .asList( - new ShareablePrivateLinkResourceType() - .withName("viylwdshfssnrbgy") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("ymsgaojfmwnc") - .withGroupId("mrfhirctymox") - .withType("tpipiwyczuhx")), - new ShareablePrivateLinkResourceType() - .withName("pqjlihhyusps") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("dvlmfwdgzxul") - .withGroupId("vpa") - .withType("sreuzvxurisjnh")), - new ShareablePrivateLinkResourceType() - .withName("txifqj") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("mrhublwpc") - .withGroupId("utr") - .withType("upauut")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("f", model.groupId()); - Assertions.assertEquals("omtbghhavgrvkff", model.requiredMembers().get(0)); - Assertions.assertEquals("hwzdgirujbz", model.requiredZoneNames().get(0)); - Assertions.assertEquals("viylwdshfssnrbgy", model.shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals("ymsgaojfmwnc", model.shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions - .assertEquals("mrfhirctymox", model.shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions.assertEquals("tpipiwyczuhx", model.shareablePrivateLinkResourceTypes().get(0).properties().type()); - } -} 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 cb6ec1a90ea0..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourceListTests.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.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.webpubsub.models.PrivateLinkResourceList; -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 PrivateLinkResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"gh\",\"requiredMembers\":[\"dhqxvcx\",\"frpdsofbshrns\",\"buswdvzyy\"],\"requiredZoneNames\":[\"nu\",\"vj\"],\"shareablePrivateLinkResourceTypes\":[{\"name\":\"f\",\"properties\":{}}]},\"id\":\"opqgikyzirtxdyux\",\"name\":\"ejnt\",\"type\":\"sewgioilqukr\"}],\"nextLink\":\"xtqmieoxor\"}") - .toObject(PrivateLinkResourceList.class); - Assertions.assertEquals("gh", model.value().get(0).groupId()); - Assertions.assertEquals("dhqxvcx", model.value().get(0).requiredMembers().get(0)); - Assertions.assertEquals("nu", model.value().get(0).requiredZoneNames().get(0)); - Assertions.assertEquals("f", model.value().get(0).shareablePrivateLinkResourceTypes().get(0).name()); - Assertions.assertEquals("xtqmieoxor", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceList model = - new PrivateLinkResourceList() - .withValue( - Arrays - .asList( - new PrivateLinkResourceInner() - .withGroupId("gh") - .withRequiredMembers(Arrays.asList("dhqxvcx", "frpdsofbshrns", "buswdvzyy")) - .withRequiredZoneNames(Arrays.asList("nu", "vj")) - .withShareablePrivateLinkResourceTypes( - Arrays - .asList( - new ShareablePrivateLinkResourceType() - .withName("f") - .withProperties(new ShareablePrivateLinkResourceProperties()))))) - .withNextLink("xtqmieoxor"); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceList.class); - Assertions.assertEquals("gh", model.value().get(0).groupId()); - Assertions.assertEquals("dhqxvcx", model.value().get(0).requiredMembers().get(0)); - Assertions.assertEquals("nu", model.value().get(0).requiredZoneNames().get(0)); - Assertions.assertEquals("f", model.value().get(0).shareablePrivateLinkResourceTypes().get(0).name()); - Assertions.assertEquals("xtqmieoxor", 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 b2c2b3a9c0c8..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/PrivateLinkResourcePropertiesTests.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.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\":\"pnfqntcyp\",\"requiredMembers\":[\"vfoimwksli\"],\"requiredZoneNames\":[\"zjxvydfcea\"],\"shareablePrivateLinkResourceTypes\":[{\"name\":\"vygdyft\",\"properties\":{\"description\":\"twnawjslbiwkojgc\",\"groupId\":\"tsf\",\"type\":\"nbaeqphchqn\"}},{\"name\":\"rpxeh\",\"properties\":{\"description\":\"ykqgaifmvik\",\"groupId\":\"ydv\",\"type\":\"bejdznxcv\"}},{\"name\":\"rhnj\",\"properties\":{\"description\":\"lvtno\",\"groupId\":\"fzg\",\"type\":\"jdftuljltd\"}}]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("pnfqntcyp", model.groupId()); - Assertions.assertEquals("vfoimwksli", model.requiredMembers().get(0)); - Assertions.assertEquals("zjxvydfcea", model.requiredZoneNames().get(0)); - Assertions.assertEquals("vygdyft", model.shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals( - "twnawjslbiwkojgc", model.shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions.assertEquals("tsf", model.shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions.assertEquals("nbaeqphchqn", model.shareablePrivateLinkResourceTypes().get(0).properties().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties() - .withGroupId("pnfqntcyp") - .withRequiredMembers(Arrays.asList("vfoimwksli")) - .withRequiredZoneNames(Arrays.asList("zjxvydfcea")) - .withShareablePrivateLinkResourceTypes( - Arrays - .asList( - new ShareablePrivateLinkResourceType() - .withName("vygdyft") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("twnawjslbiwkojgc") - .withGroupId("tsf") - .withType("nbaeqphchqn")), - new ShareablePrivateLinkResourceType() - .withName("rpxeh") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("ykqgaifmvik") - .withGroupId("ydv") - .withType("bejdznxcv")), - new ShareablePrivateLinkResourceType() - .withName("rhnj") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("lvtno") - .withGroupId("fzg") - .withType("jdftuljltd")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("pnfqntcyp", model.groupId()); - Assertions.assertEquals("vfoimwksli", model.requiredMembers().get(0)); - Assertions.assertEquals("zjxvydfcea", model.requiredZoneNames().get(0)); - Assertions.assertEquals("vygdyft", model.shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals( - "twnawjslbiwkojgc", model.shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions.assertEquals("tsf", model.shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions.assertEquals("nbaeqphchqn", 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 77cf029398f9..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\":\"v\",\"actionsRequired\":\"qi\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("v", model.description()); - Assertions.assertEquals("qi", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("v") - .withActionsRequired("qi"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("v", model.description()); - Assertions.assertEquals("qi", model.actionsRequired()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ReplicaInnerTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ReplicaInnerTests.java deleted file mode 100644 index 6fc5ea5fe76c..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,62 +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.ReplicaInner; -import com.azure.resourcemanager.webpubsub.models.ResourceSku; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaInner model = - BinaryData - .fromString( - "{\"sku\":{\"name\":\"icc\",\"tier\":\"Basic\",\"size\":\"scjfnyns\",\"family\":\"ujiz\",\"capacity\":1473813191},\"properties\":{\"provisioningState\":\"Updating\",\"regionEndpointEnabled\":\"byowbblgyavutp\",\"resourceStopped\":\"joxoism\"},\"location\":\"sbpimlq\",\"tags\":{\"qzdwlvwlyoup\":\"xkcgxxlxsffgcvi\",\"kfm\":\"gfbkjubdyh\",\"ktlahbqa\":\"nsgowzfttst\"},\"id\":\"tx\",\"name\":\"gzukxitmm\",\"type\":\"tg\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("sbpimlq", model.location()); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.tags().get("qzdwlvwlyoup")); - Assertions.assertEquals("icc", model.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals(1473813191, model.sku().capacity()); - Assertions.assertEquals("byowbblgyavutp", model.regionEndpointEnabled()); - Assertions.assertEquals("joxoism", model.resourceStopped()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaInner model = - new ReplicaInner() - .withLocation("sbpimlq") - .withTags(mapOf("qzdwlvwlyoup", "xkcgxxlxsffgcvi", "kfm", "gfbkjubdyh", "ktlahbqa", "nsgowzfttst")) - .withSku(new ResourceSku().withName("icc").withTier(WebPubSubSkuTier.BASIC).withCapacity(1473813191)) - .withRegionEndpointEnabled("byowbblgyavutp") - .withResourceStopped("joxoism"); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("sbpimlq", model.location()); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.tags().get("qzdwlvwlyoup")); - Assertions.assertEquals("icc", model.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals(1473813191, model.sku().capacity()); - Assertions.assertEquals("byowbblgyavutp", model.regionEndpointEnabled()); - Assertions.assertEquals("joxoism", model.resourceStopped()); - } - - // Use "Map.of" if available - @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/ReplicaListTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ReplicaListTests.java deleted file mode 100644 index cbf04ff74398..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ReplicaListTests.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.ReplicaInner; -import com.azure.resourcemanager.webpubsub.models.ReplicaList; -import com.azure.resourcemanager.webpubsub.models.ResourceSku; -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 ReplicaListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaList model = - BinaryData - .fromString( - "{\"value\":[{\"sku\":{\"name\":\"fnhtbaxkgxyw\",\"tier\":\"Basic\",\"size\":\"yklyhpluodpvruud\",\"family\":\"zibt\",\"capacity\":1721626377},\"properties\":{\"provisioningState\":\"Creating\",\"regionEndpointEnabled\":\"stvdxeclz\",\"resourceStopped\":\"qbcvhzlhplod\"},\"location\":\"dlwwqfbumlkxt\",\"tags\":{\"rtawcoezb\":\"fsmlmbtxhwgfw\",\"kqfqjbvl\":\"hubskhudygooo\",\"zf\":\"orfmluiqt\",\"ryeu\":\"vyvnqqyb\"},\"id\":\"yjkqabqgzslesjcb\",\"name\":\"ernntiewdjcvbquw\",\"type\":\"behwagohb\"},{\"sku\":{\"name\":\"fkmr\",\"tier\":\"Premium\",\"size\":\"vhmxtdrjfu\",\"family\":\"coebjvewzcj\",\"capacity\":96469803},\"properties\":{\"provisioningState\":\"Succeeded\",\"regionEndpointEnabled\":\"guaadraufactkahz\",\"resourceStopped\":\"ajjziuxxpshne\"},\"location\":\"ulfgslqu\",\"tags\":{\"o\":\"dlenrdsutujbazpj\",\"uvwpklvxwmyg\":\"minyflnorwm\",\"hiszepnnbjcrxgib\":\"xpgpq\"},\"id\":\"daxconfozauorsuk\",\"name\":\"kwbqplhlvnuu\",\"type\":\"pzlrphw\"},{\"sku\":{\"name\":\"oldweyuqdu\",\"tier\":\"Basic\",\"size\":\"nrwrbiork\",\"family\":\"lywjhh\",\"capacity\":1472152819},\"properties\":{\"provisioningState\":\"Failed\",\"regionEndpointEnabled\":\"ivfomiloxgg\",\"resourceStopped\":\"fi\"},\"location\":\"dieuzaofj\",\"tags\":{\"ubiipuipwoqonma\":\"cyyysfgdot\"},\"id\":\"jeknizshq\",\"name\":\"cimpevfg\",\"type\":\"b\"}],\"nextLink\":\"rilbywdx\"}") - .toObject(ReplicaList.class); - Assertions.assertEquals("dlwwqfbumlkxt", model.value().get(0).location()); - Assertions.assertEquals("fsmlmbtxhwgfw", model.value().get(0).tags().get("rtawcoezb")); - Assertions.assertEquals("fnhtbaxkgxyw", model.value().get(0).sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals(1721626377, model.value().get(0).sku().capacity()); - Assertions.assertEquals("stvdxeclz", model.value().get(0).regionEndpointEnabled()); - Assertions.assertEquals("qbcvhzlhplod", model.value().get(0).resourceStopped()); - Assertions.assertEquals("rilbywdx", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaList model = - new ReplicaList() - .withValue( - Arrays - .asList( - new ReplicaInner() - .withLocation("dlwwqfbumlkxt") - .withTags( - mapOf( - "rtawcoezb", - "fsmlmbtxhwgfw", - "kqfqjbvl", - "hubskhudygooo", - "zf", - "orfmluiqt", - "ryeu", - "vyvnqqyb")) - .withSku( - new ResourceSku() - .withName("fnhtbaxkgxyw") - .withTier(WebPubSubSkuTier.BASIC) - .withCapacity(1721626377)) - .withRegionEndpointEnabled("stvdxeclz") - .withResourceStopped("qbcvhzlhplod"), - new ReplicaInner() - .withLocation("ulfgslqu") - .withTags( - mapOf( - "o", - "dlenrdsutujbazpj", - "uvwpklvxwmyg", - "minyflnorwm", - "hiszepnnbjcrxgib", - "xpgpq")) - .withSku( - new ResourceSku() - .withName("fkmr") - .withTier(WebPubSubSkuTier.PREMIUM) - .withCapacity(96469803)) - .withRegionEndpointEnabled("guaadraufactkahz") - .withResourceStopped("ajjziuxxpshne"), - new ReplicaInner() - .withLocation("dieuzaofj") - .withTags(mapOf("ubiipuipwoqonma", "cyyysfgdot")) - .withSku( - new ResourceSku() - .withName("oldweyuqdu") - .withTier(WebPubSubSkuTier.BASIC) - .withCapacity(1472152819)) - .withRegionEndpointEnabled("ivfomiloxgg") - .withResourceStopped("fi"))) - .withNextLink("rilbywdx"); - model = BinaryData.fromObject(model).toObject(ReplicaList.class); - Assertions.assertEquals("dlwwqfbumlkxt", model.value().get(0).location()); - Assertions.assertEquals("fsmlmbtxhwgfw", model.value().get(0).tags().get("rtawcoezb")); - Assertions.assertEquals("fnhtbaxkgxyw", model.value().get(0).sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals(1721626377, model.value().get(0).sku().capacity()); - Assertions.assertEquals("stvdxeclz", model.value().get(0).regionEndpointEnabled()); - Assertions.assertEquals("qbcvhzlhplod", model.value().get(0).resourceStopped()); - Assertions.assertEquals("rilbywdx", model.nextLink()); - } - - // Use "Map.of" if available - @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/ReplicaPropertiesTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ReplicaPropertiesTests.java deleted file mode 100644 index 205134ea78a9..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ReplicaPropertiesTests.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.fluent.models.ReplicaProperties; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Updating\",\"regionEndpointEnabled\":\"hrnxrxc\",\"resourceStopped\":\"uisavokq\"}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("hrnxrxc", model.regionEndpointEnabled()); - Assertions.assertEquals("uisavokq", model.resourceStopped()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaProperties model = - new ReplicaProperties().withRegionEndpointEnabled("hrnxrxc").withResourceStopped("uisavokq"); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("hrnxrxc", model.regionEndpointEnabled()); - Assertions.assertEquals("uisavokq", model.resourceStopped()); - } -} 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 762119bd7e0c..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceLogCategoryTests.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.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\":\"z\",\"enabled\":\"mrv\"}").toObject(ResourceLogCategory.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("mrv", model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceLogCategory model = new ResourceLogCategory().withName("z").withEnabled("mrv"); - model = BinaryData.fromObject(model).toObject(ResourceLogCategory.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("mrv", 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 4ace0fec6b0f..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceLogConfigurationTests.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.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\":\"jitcjedftwwaez\",\"enabled\":\"jvdcpzfoqouic\"},{\"name\":\"xarzgszufoxciq\",\"enabled\":\"idoamciodhkha\"},{\"name\":\"khnzbonlw\",\"enabled\":\"oegokdwbwh\"}]}") - .toObject(ResourceLogConfiguration.class); - Assertions.assertEquals("jitcjedftwwaez", model.categories().get(0).name()); - Assertions.assertEquals("jvdcpzfoqouic", 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("jitcjedftwwaez").withEnabled("jvdcpzfoqouic"), - new ResourceLogCategory().withName("xarzgszufoxciq").withEnabled("idoamciodhkha"), - new ResourceLogCategory().withName("khnzbonlw").withEnabled("oegokdwbwh"))); - model = BinaryData.fromObject(model).toObject(ResourceLogConfiguration.class); - Assertions.assertEquals("jitcjedftwwaez", model.categories().get(0).name()); - Assertions.assertEquals("jvdcpzfoqouic", 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 73b4922a9f51..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceReferenceTests.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.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\":\"ivfxzsjabibsyst\"}").toObject(ResourceReference.class); - Assertions.assertEquals("ivfxzsjabibsyst", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceReference model = new ResourceReference().withId("ivfxzsjabibsyst"); - model = BinaryData.fromObject(model).toObject(ResourceReference.class); - Assertions.assertEquals("ivfxzsjabibsyst", 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 a330a432f7f9..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ResourceSkuTests.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.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\":\"wo\",\"tier\":\"Basic\",\"size\":\"shrtdtkcnqxwb\",\"family\":\"kulpiujwaasi\",\"capacity\":172575084}") - .toObject(ResourceSku.class); - Assertions.assertEquals("wo", model.name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, model.tier()); - Assertions.assertEquals(172575084, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceSku model = new ResourceSku().withName("wo").withTier(WebPubSubSkuTier.BASIC).withCapacity(172575084); - model = BinaryData.fromObject(model).toObject(ResourceSku.class); - Assertions.assertEquals("wo", model.name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, model.tier()); - Assertions.assertEquals(172575084, 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 e1fd159df66a..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,143 +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.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\":\"izuckyfihrfidfvz\",\"displayName\":\"zuhtymwisdkfthwx\",\"displayDescription\":\"t\",\"unit\":\"waopvkmijcmmxd\",\"aggregationType\":\"fufsrpymzi\",\"fillGapWithZero\":\"sezcxtb\",\"category\":\"gfycc\",\"dimensions\":[{\"name\":\"mdwzjeiachboo\",\"displayName\":\"lnrosfqp\",\"internalName\":\"ehzzvypyqrim\",\"toBeExportedForShoebox\":true},{\"name\":\"vswjdk\",\"displayName\":\"soodqxhcrmnoh\",\"internalName\":\"ckwhds\",\"toBeExportedForShoebox\":true}]},{\"name\":\"yip\",\"displayName\":\"sqwpgrjb\",\"displayDescription\":\"orcjxvsnby\",\"unit\":\"abnmocpcyshu\",\"aggregationType\":\"afbljjgpbtoqcjmk\",\"fillGapWithZero\":\"a\",\"category\":\"qidtqajzyu\",\"dimensions\":[{\"name\":\"dj\",\"displayName\":\"lkhbz\",\"internalName\":\"epgzgqexz\",\"toBeExportedForShoebox\":false},{\"name\":\"scpai\",\"displayName\":\"hhbcsglummajtjao\",\"internalName\":\"obnbdxkqpxokaj\",\"toBeExportedForShoebox\":false},{\"name\":\"imexgstxgcpodgma\",\"displayName\":\"r\",\"internalName\":\"djwzrlov\",\"toBeExportedForShoebox\":true}]},{\"name\":\"hijco\",\"displayName\":\"ctbzaq\",\"displayDescription\":\"sycbkbfk\",\"unit\":\"kdkexxp\",\"aggregationType\":\"fmxa\",\"fillGapWithZero\":\"fjpgddtocjjxhvp\",\"category\":\"uexhdzx\",\"dimensions\":[{\"name\":\"ojnxqbzvdd\",\"displayName\":\"wndeicbtwnp\",\"internalName\":\"oqvuhr\",\"toBeExportedForShoebox\":false},{\"name\":\"cyddglmjthjqk\",\"displayName\":\"yeicxmqciwqvhk\",\"internalName\":\"xuigdtopbobj\",\"toBeExportedForShoebox\":false},{\"name\":\"e\",\"displayName\":\"a\",\"internalName\":\"uhrzayvvt\",\"toBeExportedForShoebox\":false},{\"name\":\"f\",\"displayName\":\"otkftutqxlngx\",\"internalName\":\"fgugnxkrxdqmid\",\"toBeExportedForShoebox\":false}]}],\"logSpecifications\":[{\"name\":\"qdrabhjybigehoqf\",\"displayName\":\"wska\"},{\"name\":\"ktzlcuiywg\",\"displayName\":\"wgndrvynhzgpp\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("izuckyfihrfidfvz", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("t", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("waopvkmijcmmxd", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("fufsrpymzi", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("sezcxtb", model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("gfycc", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("mdwzjeiachboo", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("lnrosfqp", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("ehzzvypyqrim", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("qdrabhjybigehoqf", model.logSpecifications().get(0).name()); - Assertions.assertEquals("wska", 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("izuckyfihrfidfvz") - .withDisplayName("zuhtymwisdkfthwx") - .withDisplayDescription("t") - .withUnit("waopvkmijcmmxd") - .withAggregationType("fufsrpymzi") - .withFillGapWithZero("sezcxtb") - .withCategory("gfycc") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("mdwzjeiachboo") - .withDisplayName("lnrosfqp") - .withInternalName("ehzzvypyqrim") - .withToBeExportedForShoebox(true), - new Dimension() - .withName("vswjdk") - .withDisplayName("soodqxhcrmnoh") - .withInternalName("ckwhds") - .withToBeExportedForShoebox(true))), - new MetricSpecification() - .withName("yip") - .withDisplayName("sqwpgrjb") - .withDisplayDescription("orcjxvsnby") - .withUnit("abnmocpcyshu") - .withAggregationType("afbljjgpbtoqcjmk") - .withFillGapWithZero("a") - .withCategory("qidtqajzyu") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("dj") - .withDisplayName("lkhbz") - .withInternalName("epgzgqexz") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("scpai") - .withDisplayName("hhbcsglummajtjao") - .withInternalName("obnbdxkqpxokaj") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("imexgstxgcpodgma") - .withDisplayName("r") - .withInternalName("djwzrlov") - .withToBeExportedForShoebox(true))), - new MetricSpecification() - .withName("hijco") - .withDisplayName("ctbzaq") - .withDisplayDescription("sycbkbfk") - .withUnit("kdkexxp") - .withAggregationType("fmxa") - .withFillGapWithZero("fjpgddtocjjxhvp") - .withCategory("uexhdzx") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("ojnxqbzvdd") - .withDisplayName("wndeicbtwnp") - .withInternalName("oqvuhr") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("cyddglmjthjqk") - .withDisplayName("yeicxmqciwqvhk") - .withInternalName("xuigdtopbobj") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("e") - .withDisplayName("a") - .withInternalName("uhrzayvvt") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("f") - .withDisplayName("otkftutqxlngx") - .withInternalName("fgugnxkrxdqmid") - .withToBeExportedForShoebox(false))))) - .withLogSpecifications( - Arrays - .asList( - new LogSpecification().withName("qdrabhjybigehoqf").withDisplayName("wska"), - new LogSpecification().withName("ktzlcuiywg").withDisplayName("wgndrvynhzgpp"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("izuckyfihrfidfvz", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("t", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("waopvkmijcmmxd", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("fufsrpymzi", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("sezcxtb", model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("gfycc", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("mdwzjeiachboo", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("lnrosfqp", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("ehzzvypyqrim", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("qdrabhjybigehoqf", model.logSpecifications().get(0).name()); - Assertions.assertEquals("wska", 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 c1d18fd2a9ff..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\":\"kwcf\",\"groupId\":\"ljyxgtczhe\",\"type\":\"bsdshmkxmaehvbbx\"}") - .toObject(ShareablePrivateLinkResourceProperties.class); - Assertions.assertEquals("kwcf", model.description()); - Assertions.assertEquals("ljyxgtczhe", model.groupId()); - Assertions.assertEquals("bsdshmkxmaehvbbx", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShareablePrivateLinkResourceProperties model = - new ShareablePrivateLinkResourceProperties() - .withDescription("kwcf") - .withGroupId("ljyxgtczhe") - .withType("bsdshmkxmaehvbbx"); - model = BinaryData.fromObject(model).toObject(ShareablePrivateLinkResourceProperties.class); - Assertions.assertEquals("kwcf", model.description()); - Assertions.assertEquals("ljyxgtczhe", model.groupId()); - Assertions.assertEquals("bsdshmkxmaehvbbx", 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 f0d5c42d37f7..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\":\"eamtmcz\",\"properties\":{\"description\":\"ejwcwwqiok\",\"groupId\":\"sx\",\"type\":\"jmsvpkjp\"}}") - .toObject(ShareablePrivateLinkResourceType.class); - Assertions.assertEquals("eamtmcz", model.name()); - Assertions.assertEquals("ejwcwwqiok", model.properties().description()); - Assertions.assertEquals("sx", model.properties().groupId()); - Assertions.assertEquals("jmsvpkjp", model.properties().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShareablePrivateLinkResourceType model = - new ShareablePrivateLinkResourceType() - .withName("eamtmcz") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("ejwcwwqiok") - .withGroupId("sx") - .withType("jmsvpkjp")); - model = BinaryData.fromObject(model).toObject(ShareablePrivateLinkResourceType.class); - Assertions.assertEquals("eamtmcz", model.name()); - Assertions.assertEquals("ejwcwwqiok", model.properties().description()); - Assertions.assertEquals("sx", model.properties().groupId()); - Assertions.assertEquals("jmsvpkjp", 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 739b902bac85..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\":\"invkjjxdxrbuu\",\"privateLinkResourceId\":\"zclewyhmlw\",\"provisioningState\":\"Creating\",\"requestMessage\":\"zpof\",\"status\":\"Timeout\"},\"id\":\"wyfzqwhxxbuyqa\",\"name\":\"zfeqztppri\",\"type\":\"lxorjaltolmncws\"}") - .toObject(SharedPrivateLinkResourceInner.class); - Assertions.assertEquals("invkjjxdxrbuu", model.groupId()); - Assertions.assertEquals("zclewyhmlw", model.privateLinkResourceId()); - Assertions.assertEquals("zpof", model.requestMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceInner model = - new SharedPrivateLinkResourceInner() - .withGroupId("invkjjxdxrbuu") - .withPrivateLinkResourceId("zclewyhmlw") - .withRequestMessage("zpof"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceInner.class); - Assertions.assertEquals("invkjjxdxrbuu", model.groupId()); - Assertions.assertEquals("zclewyhmlw", model.privateLinkResourceId()); - Assertions.assertEquals("zpof", 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 0a463bbdb4ef..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SharedPrivateLinkResourceListTests.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.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\":\"msgeivsiykzk\",\"privateLinkResourceId\":\"ncj\",\"provisioningState\":\"Creating\",\"requestMessage\":\"bzo\",\"status\":\"Timeout\"},\"id\":\"lapzwyrp\",\"name\":\"ogtqxepnylbf\",\"type\":\"ajlyjtlvofqzhv\"}],\"nextLink\":\"ibyfmo\"}") - .toObject(SharedPrivateLinkResourceList.class); - Assertions.assertEquals("msgeivsiykzk", model.value().get(0).groupId()); - Assertions.assertEquals("ncj", model.value().get(0).privateLinkResourceId()); - Assertions.assertEquals("bzo", model.value().get(0).requestMessage()); - Assertions.assertEquals("ibyfmo", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceList model = - new SharedPrivateLinkResourceList() - .withValue( - Arrays - .asList( - new SharedPrivateLinkResourceInner() - .withGroupId("msgeivsiykzk") - .withPrivateLinkResourceId("ncj") - .withRequestMessage("bzo"))) - .withNextLink("ibyfmo"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceList.class); - Assertions.assertEquals("msgeivsiykzk", model.value().get(0).groupId()); - Assertions.assertEquals("ncj", model.value().get(0).privateLinkResourceId()); - Assertions.assertEquals("bzo", model.value().get(0).requestMessage()); - Assertions.assertEquals("ibyfmo", 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 925edbbe9ce8..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\":\"bqwcsdbnwdcf\",\"privateLinkResourceId\":\"ucqdpfuvglsb\",\"provisioningState\":\"Canceled\",\"requestMessage\":\"nvxbvt\",\"status\":\"Disconnected\"}") - .toObject(SharedPrivateLinkResourceProperties.class); - Assertions.assertEquals("bqwcsdbnwdcf", model.groupId()); - Assertions.assertEquals("ucqdpfuvglsb", model.privateLinkResourceId()); - Assertions.assertEquals("nvxbvt", model.requestMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceProperties model = - new SharedPrivateLinkResourceProperties() - .withGroupId("bqwcsdbnwdcf") - .withPrivateLinkResourceId("ucqdpfuvglsb") - .withRequestMessage("nvxbvt"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperties.class); - Assertions.assertEquals("bqwcsdbnwdcf", model.groupId()); - Assertions.assertEquals("ucqdpfuvglsb", model.privateLinkResourceId()); - Assertions.assertEquals("nvxbvt", 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 278a92e40c29..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\":\"vyvdcs\",\"currentValue\":6235593202680912824,\"limit\":7516654710743281273,\"name\":{\"value\":\"ectehf\",\"localizedValue\":\"scjeypv\"},\"unit\":\"zrkgqhcjrefovg\"}") - .toObject(SignalRServiceUsageInner.class); - Assertions.assertEquals("vyvdcs", model.id()); - Assertions.assertEquals(6235593202680912824L, model.currentValue()); - Assertions.assertEquals(7516654710743281273L, model.limit()); - Assertions.assertEquals("ectehf", model.name().value()); - Assertions.assertEquals("scjeypv", model.name().localizedValue()); - Assertions.assertEquals("zrkgqhcjrefovg", model.unit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SignalRServiceUsageInner model = - new SignalRServiceUsageInner() - .withId("vyvdcs") - .withCurrentValue(6235593202680912824L) - .withLimit(7516654710743281273L) - .withName(new SignalRServiceUsageName().withValue("ectehf").withLocalizedValue("scjeypv")) - .withUnit("zrkgqhcjrefovg"); - model = BinaryData.fromObject(model).toObject(SignalRServiceUsageInner.class); - Assertions.assertEquals("vyvdcs", model.id()); - Assertions.assertEquals(6235593202680912824L, model.currentValue()); - Assertions.assertEquals(7516654710743281273L, model.limit()); - Assertions.assertEquals("ectehf", model.name().value()); - Assertions.assertEquals("scjeypv", model.name().localizedValue()); - Assertions.assertEquals("zrkgqhcjrefovg", 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 e6c2af7afef4..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/SignalRServiceUsageListTests.java +++ /dev/null @@ -1,57 +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\":\"ndnvo\",\"currentValue\":4292877192766299113,\"limit\":3293446474919179561,\"name\":{\"value\":\"kcglhslaz\",\"localizedValue\":\"yggdtjixh\"},\"unit\":\"uofqwe\"}],\"nextLink\":\"hmenevfyexfwhybc\"}") - .toObject(SignalRServiceUsageList.class); - Assertions.assertEquals("ndnvo", model.value().get(0).id()); - Assertions.assertEquals(4292877192766299113L, model.value().get(0).currentValue()); - Assertions.assertEquals(3293446474919179561L, model.value().get(0).limit()); - Assertions.assertEquals("kcglhslaz", model.value().get(0).name().value()); - Assertions.assertEquals("yggdtjixh", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("uofqwe", model.value().get(0).unit()); - Assertions.assertEquals("hmenevfyexfwhybc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SignalRServiceUsageList model = - new SignalRServiceUsageList() - .withValue( - Arrays - .asList( - new SignalRServiceUsageInner() - .withId("ndnvo") - .withCurrentValue(4292877192766299113L) - .withLimit(3293446474919179561L) - .withName( - new SignalRServiceUsageName() - .withValue("kcglhslaz") - .withLocalizedValue("yggdtjixh")) - .withUnit("uofqwe"))) - .withNextLink("hmenevfyexfwhybc"); - model = BinaryData.fromObject(model).toObject(SignalRServiceUsageList.class); - Assertions.assertEquals("ndnvo", model.value().get(0).id()); - Assertions.assertEquals(4292877192766299113L, model.value().get(0).currentValue()); - Assertions.assertEquals(3293446474919179561L, model.value().get(0).limit()); - Assertions.assertEquals("kcglhslaz", model.value().get(0).name().value()); - Assertions.assertEquals("yggdtjixh", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("uofqwe", model.value().get(0).unit()); - Assertions.assertEquals("hmenevfyexfwhybc", 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 f1b27ad4a5b2..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\":\"qsl\",\"localizedValue\":\"yvxyqjp\"}") - .toObject(SignalRServiceUsageName.class); - Assertions.assertEquals("qsl", model.value()); - Assertions.assertEquals("yvxyqjp", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SignalRServiceUsageName model = new SignalRServiceUsageName().withValue("qsl").withLocalizedValue("yvxyqjp"); - model = BinaryData.fromObject(model).toObject(SignalRServiceUsageName.class); - Assertions.assertEquals("qsl", model.value()); - Assertions.assertEquals("yvxyqjp", 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 166ec89439f1..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\":1644309968,\"maximum\":1360898265,\"default\":587819302,\"allowedValues\":[986861935,79492990],\"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 f12a1820763d..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\":\"azivjlfrqttbajl\",\"sku\":{\"name\":\"tnwxy\",\"tier\":\"Premium\",\"size\":\"dkqqfkuvscxkd\",\"family\":\"igovi\",\"capacity\":483872150},\"capacity\":{\"minimum\":1905790619,\"maximum\":577604583,\"default\":125599476,\"allowedValues\":[181073134,1156335456],\"scaleType\":\"Automatic\"}},{\"resourceType\":\"oorb\",\"sku\":{\"name\":\"oybfhjxakvvj\",\"tier\":\"Premium\",\"size\":\"r\",\"family\":\"lmywwtkgkxnyed\",\"capacity\":823284571},\"capacity\":{\"minimum\":110774994,\"maximum\":335467427,\"default\":1232794646,\"allowedValues\":[359778244,1032623883,1862616033],\"scaleType\":\"Manual\"}},{\"resourceType\":\"uwhcjyxccybv\",\"sku\":{\"name\":\"yakk\",\"tier\":\"Free\",\"size\":\"xgwjplmagstcyoh\",\"family\":\"kyrk\",\"capacity\":293927715},\"capacity\":{\"minimum\":863803765,\"maximum\":2131502112,\"default\":2107096986,\"allowedValues\":[1552096962,1662791957],\"scaleType\":\"Manual\"}},{\"resourceType\":\"baiyhddviaceg\",\"sku\":{\"name\":\"m\",\"tier\":\"Standard\",\"size\":\"mvmemfnczd\",\"family\":\"vbalxlllc\",\"capacity\":984375294},\"capacity\":{\"minimum\":1202481467,\"maximum\":1253836101,\"default\":2090447937,\"allowedValues\":[846959750],\"scaleType\":\"Automatic\"}}],\"nextLink\":\"uvsj\"}") - .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 9e9185e8513f..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\":\"wsmystuluqypf\",\"sku\":{\"name\":\"lerchpq\",\"tier\":\"Free\",\"size\":\"jbabwidf\",\"family\":\"sspuunnoxyhkx\",\"capacity\":1867309112},\"capacity\":{\"minimum\":219828682,\"maximum\":1280530722,\"default\":1330535763,\"allowedValues\":[1962921409,569330196,235411748,1037485333],\"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 5b178d301d02..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\":\"ManagedIdentity\",\"managedIdentity\":{\"resource\":\"y\"}}") - .toObject(UpstreamAuthSettings.class); - Assertions.assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.type()); - Assertions.assertEquals("y", model.managedIdentity().resource()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpstreamAuthSettings model = - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings().withResource("y")); - model = BinaryData.fromObject(model).toObject(UpstreamAuthSettings.class); - Assertions.assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.type()); - Assertions.assertEquals("y", 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 60164e2a5368..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\":\"gxffmshkwf\",\"currentValue\":5532145602583785308,\"limit\":4896026110116528239,\"name\":{\"value\":\"dby\",\"localizedValue\":\"izqaclnapxbiyg\"},\"unit\":\"gjkn\"}]}"; - - 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("ctctbrxkjz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gxffmshkwf", response.iterator().next().id()); - Assertions.assertEquals(5532145602583785308L, response.iterator().next().currentValue()); - Assertions.assertEquals(4896026110116528239L, response.iterator().next().limit()); - Assertions.assertEquals("dby", response.iterator().next().name().value()); - Assertions.assertEquals("izqaclnapxbiyg", response.iterator().next().name().localizedValue()); - Assertions.assertEquals("gjkn", 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 93512e88dae8..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\":\"yylhalnswhccsp\",\"clientId\":\"aivwitqscywu\"}") - .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 3a4173fb8cf3..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("quhuxylrj", "m", "ygjbmzyospspsh", 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 e77cfb0eb154..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteMockTests.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 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("hr", "mqgjsxvpq", "bfrmbodthsqqgvri", 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 b1f1a25f9ea7..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\":\"Canceled\",\"domainName\":\"dzvkfvxcnqmxq\",\"customCertificate\":{\"id\":\"wokmvkhlggd\"}},\"id\":\"em\",\"name\":\"qkzszuwiwtglxxh\",\"type\":\"jfpgpicrmn\"}"; - - 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("ik", "mhha", "wjrmzvuporqzd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dzvkfvxcnqmxq", response.domainName()); - Assertions.assertEquals("wokmvkhlggd", 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 2613814fcafc..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\":\"pzvuqdflvo\",\"customCertificate\":{\"id\":\"yp\"}},\"id\":\"ubcpzgpxti\",\"name\":\"hjknidibg\",\"type\":\"jxgpnrhgovfg\"}]}"; - - 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("munjdxvglnkvx", "xpaglqivbgkc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pzvuqdflvo", response.iterator().next().domainName()); - Assertions.assertEquals("yp", 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 c6367cc8a7b4..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubInnerTests.java +++ /dev/null @@ -1,99 +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.EventListenerEndpoint; -import com.azure.resourcemanager.webpubsub.models.EventListenerFilter; -import com.azure.resourcemanager.webpubsub.models.ManagedIdentitySettings; -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 WebPubSubHubInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubHubInner model = - BinaryData - .fromString( - "{\"properties\":{\"eventHandlers\":[{\"urlTemplate\":\"zh\",\"userEventPattern\":\"kj\",\"systemEvents\":[\"vqqaatjinrvgo\",\"pmfi\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{\"resource\":\"ioolvrwxkvtkkgll\"}}},{\"urlTemplate\":\"wjygvjayvblmhvk\",\"userEventPattern\":\"hbxvvyhgsopbyrqu\",\"systemEvents\":[\"xuvw\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{\"resource\":\"mctlpdngitv\"}}},{\"urlTemplate\":\"bmhrixkwmyijejv\",\"userEventPattern\":\"rh\",\"systemEvents\":[\"aixexccbdreaxh\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{\"resource\":\"vqahqkghtpwi\"}}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"jsvfycxzbfvoowv\"},\"id\":\"mtg\",\"name\":\"qp\",\"type\":\"y\"}") - .toObject(WebPubSubHubInner.class); - Assertions.assertEquals("zh", model.properties().eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("kj", model.properties().eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("vqqaatjinrvgo", model.properties().eventHandlers().get(0).systemEvents().get(0)); - Assertions - .assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.properties().eventHandlers().get(0).auth().type()); - Assertions - .assertEquals( - "ioolvrwxkvtkkgll", model.properties().eventHandlers().get(0).auth().managedIdentity().resource()); - Assertions.assertEquals("jsvfycxzbfvoowv", 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("zh") - .withUserEventPattern("kj") - .withSystemEvents(Arrays.asList("vqqaatjinrvgo", "pmfi")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity( - new ManagedIdentitySettings().withResource("ioolvrwxkvtkkgll"))), - new EventHandler() - .withUrlTemplate("wjygvjayvblmhvk") - .withUserEventPattern("hbxvvyhgsopbyrqu") - .withSystemEvents(Arrays.asList("xuvw")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity( - new ManagedIdentitySettings().withResource("mctlpdngitv"))), - new EventHandler() - .withUrlTemplate("bmhrixkwmyijejv") - .withUserEventPattern("rh") - .withSystemEvents(Arrays.asList("aixexccbdreaxh")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity( - new ManagedIdentitySettings().withResource("vqahqkghtpwi"))))) - .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("jsvfycxzbfvoowv")); - model = BinaryData.fromObject(model).toObject(WebPubSubHubInner.class); - Assertions.assertEquals("zh", model.properties().eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("kj", model.properties().eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("vqqaatjinrvgo", model.properties().eventHandlers().get(0).systemEvents().get(0)); - Assertions - .assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.properties().eventHandlers().get(0).auth().type()); - Assertions - .assertEquals( - "ioolvrwxkvtkkgll", model.properties().eventHandlers().get(0).auth().managedIdentity().resource()); - Assertions.assertEquals("jsvfycxzbfvoowv", 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 78e9554264c7..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubListTests.java +++ /dev/null @@ -1,149 +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.EventListenerEndpoint; -import com.azure.resourcemanager.webpubsub.models.EventListenerFilter; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthSettings; -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\":[{\"urlTemplate\":\"jpvkvpbjxbkzbzkd\",\"userEventPattern\":\"cjabudurgkakmo\",\"systemEvents\":[\"jjklff\",\"mouwqlgzrfzeey\"],\"auth\":{}},{\"urlTemplate\":\"izikayuhq\",\"userEventPattern\":\"jbsybbqw\",\"systemEvents\":[\"ldgmfpgvmpip\"],\"auth\":{}},{\"urlTemplate\":\"ltha\",\"userEventPattern\":\"x\",\"systemEvents\":[\"wutwbdsre\",\"pdrhne\",\"yowqkdwytisibir\"],\"auth\":{}},{\"urlTemplate\":\"pikpz\",\"userEventPattern\":\"ejzanlfz\",\"systemEvents\":[\"vrmbzono\"],\"auth\":{}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"q\"},\"id\":\"rgz\",\"name\":\"frl\",\"type\":\"zszrnwoiindfpw\"},{\"properties\":{\"eventHandlers\":[{\"urlTemplate\":\"lwbtlhf\",\"userEventPattern\":\"jcdh\",\"systemEvents\":[\"jvfbgofelja\",\"rqmq\",\"ldvriiiojnalghfk\",\"tvsexsowuel\"],\"auth\":{}},{\"urlTemplate\":\"hhahhxvrhmzkwpjg\",\"userEventPattern\":\"spughftqsxhq\",\"systemEvents\":[\"xukndxdigr\"],\"auth\":{}},{\"urlTemplate\":\"uufzdmsyqtfihw\",\"userEventPattern\":\"otzi\",\"systemEvents\":[\"mvpp\",\"o\",\"zqzudph\",\"amvdkfwynwcvtbv\"],\"auth\":{}},{\"urlTemplate\":\"yhmtnvyqiat\",\"userEventPattern\":\"wp\",\"systemEvents\":[\"wzcjaesgvvsccy\"],\"auth\":{}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"fhwygzlvdnkfxus\"},\"id\":\"dwzrmuh\",\"name\":\"pfcqdp\",\"type\":\"qxqvpsvuoymgc\"},{\"properties\":{\"eventHandlers\":[{\"urlTemplate\":\"vezrypqlmfeo\",\"userEventPattern\":\"rqwky\",\"systemEvents\":[\"bopgxedkowepbqp\"],\"auth\":{}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"wccsnjvcdwxlpqek\"},\"id\":\"nkhtjsyingw\",\"name\":\"qatmtdhtmdvy\",\"type\":\"gikdgsz\"}],\"nextLink\":\"kbir\"}") - .toObject(WebPubSubHubList.class); - Assertions - .assertEquals("jpvkvpbjxbkzbzkd", model.value().get(0).properties().eventHandlers().get(0).urlTemplate()); - Assertions - .assertEquals( - "cjabudurgkakmo", model.value().get(0).properties().eventHandlers().get(0).userEventPattern()); - Assertions - .assertEquals("jjklff", model.value().get(0).properties().eventHandlers().get(0).systemEvents().get(0)); - Assertions.assertEquals("q", 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( - new EventHandler() - .withUrlTemplate("jpvkvpbjxbkzbzkd") - .withUserEventPattern("cjabudurgkakmo") - .withSystemEvents(Arrays.asList("jjklff", "mouwqlgzrfzeey")) - .withAuth(new UpstreamAuthSettings()), - new EventHandler() - .withUrlTemplate("izikayuhq") - .withUserEventPattern("jbsybbqw") - .withSystemEvents(Arrays.asList("ldgmfpgvmpip")) - .withAuth(new UpstreamAuthSettings()), - new EventHandler() - .withUrlTemplate("ltha") - .withUserEventPattern("x") - .withSystemEvents( - Arrays.asList("wutwbdsre", "pdrhne", "yowqkdwytisibir")) - .withAuth(new UpstreamAuthSettings()), - new EventHandler() - .withUrlTemplate("pikpz") - .withUserEventPattern("ejzanlfz") - .withSystemEvents(Arrays.asList("vrmbzono")) - .withAuth(new UpstreamAuthSettings()))) - .withEventListeners( - Arrays - .asList( - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()))) - .withAnonymousConnectPolicy("q")), - new WebPubSubHubInner() - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers( - Arrays - .asList( - new EventHandler() - .withUrlTemplate("lwbtlhf") - .withUserEventPattern("jcdh") - .withSystemEvents( - Arrays - .asList( - "jvfbgofelja", - "rqmq", - "ldvriiiojnalghfk", - "tvsexsowuel")) - .withAuth(new UpstreamAuthSettings()), - new EventHandler() - .withUrlTemplate("hhahhxvrhmzkwpjg") - .withUserEventPattern("spughftqsxhq") - .withSystemEvents(Arrays.asList("xukndxdigr")) - .withAuth(new UpstreamAuthSettings()), - new EventHandler() - .withUrlTemplate("uufzdmsyqtfihw") - .withUserEventPattern("otzi") - .withSystemEvents( - Arrays.asList("mvpp", "o", "zqzudph", "amvdkfwynwcvtbv")) - .withAuth(new UpstreamAuthSettings()), - new EventHandler() - .withUrlTemplate("yhmtnvyqiat") - .withUserEventPattern("wp") - .withSystemEvents(Arrays.asList("wzcjaesgvvsccy")) - .withAuth(new UpstreamAuthSettings()))) - .withEventListeners( - Arrays - .asList( - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()))) - .withAnonymousConnectPolicy("fhwygzlvdnkfxus")), - new WebPubSubHubInner() - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers( - Arrays - .asList( - new EventHandler() - .withUrlTemplate("vezrypqlmfeo") - .withUserEventPattern("rqwky") - .withSystemEvents(Arrays.asList("bopgxedkowepbqp")) - .withAuth(new UpstreamAuthSettings()))) - .withEventListeners( - Arrays - .asList( - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()), - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()))) - .withAnonymousConnectPolicy("wccsnjvcdwxlpqek")))); - model = BinaryData.fromObject(model).toObject(WebPubSubHubList.class); - Assertions - .assertEquals("jpvkvpbjxbkzbzkd", model.value().get(0).properties().eventHandlers().get(0).urlTemplate()); - Assertions - .assertEquals( - "cjabudurgkakmo", model.value().get(0).properties().eventHandlers().get(0).userEventPattern()); - Assertions - .assertEquals("jjklff", model.value().get(0).properties().eventHandlers().get(0).systemEvents().get(0)); - Assertions.assertEquals("q", 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 d9187e039408..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubPropertiesTests.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.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.ManagedIdentitySettings; -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\":\"ronzmyhgfip\",\"userEventPattern\":\"xkmcwaekrrjre\",\"systemEvents\":[\"tsgumhj\"],\"auth\":{\"type\":\"None\",\"managedIdentity\":{\"resource\":\"wslolbqp\"}}},{\"urlTemplate\":\"uzlm\",\"userEventPattern\":\"elfk\",\"systemEvents\":[\"lcrpw\",\"xeznoi\",\"brnjwmw\",\"pn\"],\"auth\":{\"type\":\"None\",\"managedIdentity\":{\"resource\":\"joqkagfhsxt\"}}},{\"urlTemplate\":\"augzxnfaazpxdtn\",\"userEventPattern\":\"mkqjj\",\"systemEvents\":[\"envrkpyouaibrebq\",\"aysjkixqtnqttez\"],\"auth\":{\"type\":\"None\",\"managedIdentity\":{\"resource\":\"akpjpqqmtedlt\"}}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"hyeozphvwau\"}") - .toObject(WebPubSubHubProperties.class); - Assertions.assertEquals("ronzmyhgfip", model.eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("xkmcwaekrrjre", model.eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("tsgumhj", model.eventHandlers().get(0).systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.NONE, model.eventHandlers().get(0).auth().type()); - Assertions.assertEquals("wslolbqp", model.eventHandlers().get(0).auth().managedIdentity().resource()); - Assertions.assertEquals("hyeozphvwau", model.anonymousConnectPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubHubProperties model = - new WebPubSubHubProperties() - .withEventHandlers( - Arrays - .asList( - new EventHandler() - .withUrlTemplate("ronzmyhgfip") - .withUserEventPattern("xkmcwaekrrjre") - .withSystemEvents(Arrays.asList("tsgumhj")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.NONE) - .withManagedIdentity(new ManagedIdentitySettings().withResource("wslolbqp"))), - new EventHandler() - .withUrlTemplate("uzlm") - .withUserEventPattern("elfk") - .withSystemEvents(Arrays.asList("lcrpw", "xeznoi", "brnjwmw", "pn")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.NONE) - .withManagedIdentity( - new ManagedIdentitySettings().withResource("joqkagfhsxt"))), - new EventHandler() - .withUrlTemplate("augzxnfaazpxdtn") - .withUserEventPattern("mkqjj") - .withSystemEvents(Arrays.asList("envrkpyouaibrebq", "aysjkixqtnqttez")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.NONE) - .withManagedIdentity( - new ManagedIdentitySettings().withResource("akpjpqqmtedlt"))))) - .withEventListeners( - Arrays - .asList( - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()))) - .withAnonymousConnectPolicy("hyeozphvwau"); - model = BinaryData.fromObject(model).toObject(WebPubSubHubProperties.class); - Assertions.assertEquals("ronzmyhgfip", model.eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("xkmcwaekrrjre", model.eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("tsgumhj", model.eventHandlers().get(0).systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.NONE, model.eventHandlers().get(0).auth().type()); - Assertions.assertEquals("wslolbqp", model.eventHandlers().get(0).auth().managedIdentity().resource()); - Assertions.assertEquals("hyeozphvwau", 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 cd03fdbef7fc..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,137 +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.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.ManagedIdentitySettings; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthSettings; -import com.azure.resourcemanager.webpubsub.models.UpstreamAuthType; -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\":[{\"urlTemplate\":\"itgueiookjbs\",\"userEventPattern\":\"rtdtpdelq\",\"systemEvents\":[\"lmotoebnfxofvcj\",\"gdirazf\"],\"auth\":{\"type\":\"None\",\"managedIdentity\":{}}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"dujtmvcope\"},\"id\":\"m\",\"name\":\"urbuhhlkyqltq\",\"type\":\"rogtuwkf\"}"; - - 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("n") - .withExistingWebPubSub("ixjawrtm", "fjmyccxlzhco") - .withProperties( - new WebPubSubHubProperties() - .withEventHandlers( - Arrays - .asList( - new EventHandler() - .withUrlTemplate("nekhenlusfnrdtj") - .withUserEventPattern("xrdcqtj") - .withSystemEvents(Arrays.asList("ttgepuslvyjtcv")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.NONE) - .withManagedIdentity(new ManagedIdentitySettings())), - new EventHandler() - .withUrlTemplate("iziesfuughtuq") - .withUserEventPattern("cjxeygt") - .withSystemEvents(Arrays.asList("uicbuewmrsw")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings())), - new EventHandler() - .withUrlTemplate("zrhwp") - .withUserEventPattern("xjbaqehgpdohzjq") - .withSystemEvents(Arrays.asList("coi", "e")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings())), - new EventHandler() - .withUrlTemplate("wfepbnwgfmx") - .withUserEventPattern("cgbjbgdlfgt") - .withSystemEvents(Arrays.asList("naquflq", "ctqhamzjrwdk")) - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.NONE) - .withManagedIdentity(new ManagedIdentitySettings())))) - .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()), - new EventListener() - .withFilter(new EventListenerFilter()) - .withEndpoint(new EventListenerEndpoint()))) - .withAnonymousConnectPolicy("zi")) - .create(); - - Assertions.assertEquals("itgueiookjbs", response.properties().eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("rtdtpdelq", response.properties().eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("lmotoebnfxofvcj", response.properties().eventHandlers().get(0).systemEvents().get(0)); - Assertions.assertEquals(UpstreamAuthType.NONE, response.properties().eventHandlers().get(0).auth().type()); - Assertions.assertEquals("dujtmvcope", 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 0a2085d2207a..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("rmlmuowo", "bauiropi", "nszonwpngaj", 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 67e5ea1d9076..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetWithResponseMockTests.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.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.UpstreamAuthType; -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\":[{\"urlTemplate\":\"wrsnewmozqvbu\",\"userEventPattern\":\"ma\",\"systemEvents\":[\"ycxhxzgaztta\",\"o\",\"dvmfqhppub\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{}}},{\"urlTemplate\":\"dfgkmtdh\",\"userEventPattern\":\"ngb\",\"systemEvents\":[\"uahokq\",\"obkauxofsh\",\"phwpnulaiywzej\"],\"auth\":{\"type\":\"None\",\"managedIdentity\":{}}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"jpllndnpdwrpq\"},\"id\":\"gfugsnnfhyet\",\"name\":\"fypococtfjgti\",\"type\":\"rjvzuyt\"}"; - - 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("jqirwrw", "ooxf", "i", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wrsnewmozqvbu", response.properties().eventHandlers().get(0).urlTemplate()); - Assertions.assertEquals("ma", response.properties().eventHandlers().get(0).userEventPattern()); - Assertions.assertEquals("ycxhxzgaztta", response.properties().eventHandlers().get(0).systemEvents().get(0)); - Assertions - .assertEquals( - UpstreamAuthType.MANAGED_IDENTITY, response.properties().eventHandlers().get(0).auth().type()); - Assertions.assertEquals("jpllndnpdwrpq", 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 1a9b1522e3ed..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListMockTests.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.UpstreamAuthType; -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\":[{\"urlTemplate\":\"vsg\",\"userEventPattern\":\"ohqfzizv\",\"systemEvents\":[\"mk\",\"svth\",\"wpztekovmribia\",\"tgplucfota\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{}}},{\"urlTemplate\":\"nykzcugswvxwlm\",\"userEventPattern\":\"wmvtxnjm\",\"systemEvents\":[\"uqudtcvclxyn\",\"dkvgfabuiyjibuzp\",\"dugneiknp\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{}}},{\"urlTemplate\":\"iuqhibtozipqwj\",\"userEventPattern\":\"mur\",\"systemEvents\":[\"g\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{}}},{\"urlTemplate\":\"vqylkmqpzoyhl\",\"userEventPattern\":\"cgwgcloxoebqinji\",\"systemEvents\":[\"jfujq\",\"afcba\"],\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{}}}],\"eventListeners\":[{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}},{\"filter\":{\"type\":\"EventListenerFilter\"},\"endpoint\":{\"type\":\"EventListenerEndpoint\"}}],\"anonymousConnectPolicy\":\"iyjwpfilkmkkho\"},\"id\":\"dndviauogp\",\"name\":\"uartvti\",\"type\":\"kyefchnmnahmnxhk\"}]}"; - - 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("bakclacjfrnxous", "au", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vsg", response.iterator().next().properties().eventHandlers().get(0).urlTemplate()); - Assertions - .assertEquals( - "ohqfzizv", response.iterator().next().properties().eventHandlers().get(0).userEventPattern()); - Assertions - .assertEquals("mk", response.iterator().next().properties().eventHandlers().get(0).systemEvents().get(0)); - Assertions - .assertEquals( - UpstreamAuthType.MANAGED_IDENTITY, - response.iterator().next().properties().eventHandlers().get(0).auth().type()); - Assertions.assertEquals("iyjwpfilkmkkho", 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 72091d0f7bd5..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubNetworkACLsTests.java +++ /dev/null @@ -1,91 +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.IpRule; -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\":\"Deny\",\"publicNetwork\":{\"allow\":[\"ClientConnection\"],\"deny\":[\"RESTAPI\",\"ClientConnection\",\"ClientConnection\"]},\"privateEndpoints\":[{\"name\":\"yzkoowtlmngu\",\"allow\":[\"ClientConnection\",\"ServerConnection\"],\"deny\":[\"RESTAPI\",\"Trace\",\"ServerConnection\",\"RESTAPI\"]},{\"name\":\"ximerqfobwyznk\",\"allow\":[\"ServerConnection\",\"ClientConnection\"],\"deny\":[\"Trace\",\"ServerConnection\",\"RESTAPI\",\"ClientConnection\"]}],\"ipRules\":[{\"value\":\"r\",\"action\":\"Deny\"}]}") - .toObject(WebPubSubNetworkACLs.class); - Assertions.assertEquals(AclAction.DENY, model.defaultAction()); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.publicNetwork().deny().get(0)); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.privateEndpoints().get(0).allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("yzkoowtlmngu", model.privateEndpoints().get(0).name()); - Assertions.assertEquals("r", model.ipRules().get(0).value()); - Assertions.assertEquals(AclAction.DENY, model.ipRules().get(0).action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubNetworkACLs model = - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.CLIENT_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.SERVER_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.TRACE, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.RESTAPI)) - .withName("yzkoowtlmngu"), - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.CLIENT_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.TRACE, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.CLIENT_CONNECTION)) - .withName("ximerqfobwyznk"))) - .withIpRules(Arrays.asList(new IpRule().withValue("r").withAction(AclAction.DENY))); - model = BinaryData.fromObject(model).toObject(WebPubSubNetworkACLs.class); - Assertions.assertEquals(AclAction.DENY, model.defaultAction()); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.publicNetwork().deny().get(0)); - Assertions.assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.privateEndpoints().get(0).allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("yzkoowtlmngu", model.privateEndpoints().get(0).name()); - Assertions.assertEquals("r", model.ipRules().get(0).value()); - Assertions.assertEquals(AclAction.DENY, model.ipRules().get(0).action()); - } -} 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 cadc9c3b4848..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("ytxzvtznapxbanno", "voxczytpr", "nwvroevytlyokrr", 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 c84e0960b8ba..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\":\"Failed\",\"privateEndpoint\":{\"id\":\"ntsj\"},\"groupIds\":[\"sxypruuu\",\"bnchrsziz\",\"yuel\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"nb\",\"actionsRequired\":\"yggagflnlgmt\"}},\"id\":\"ahzjmucftb\",\"name\":\"r\",\"type\":\"lrohkpig\"}"; - - 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("nlaxpunjqikcz", "vitac", "xmfcsserxhtv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ntsj", response.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("nb", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("yggagflnlgmt", 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 528409be4365..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListMockTests.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.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\":\"Failed\",\"privateEndpoint\":{\"id\":\"usqogsfikayia\"},\"groupIds\":[\"arujt\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"zyjq\",\"actionsRequired\":\"vwkpqh\"}},\"id\":\"enuygbq\",\"name\":\"qqekewvnqvcdlgu\",\"type\":\"ucmfdj\"}]}"; - - 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("djk", "sysidfvclglxnf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("usqogsfikayia", response.iterator().next().privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("zyjq", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals("vwkpqh", 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 4207875385d0..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\":\"Moving\",\"privateEndpoint\":{\"id\":\"vhhtklnvnaf\"},\"groupIds\":[\"yfedevjbo\",\"lcqxypokk\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"cymczngn\",\"actionsRequired\":\"xxewu\"}},\"id\":\"nvudbchaqdtvqecr\",\"name\":\"ct\",\"type\":\"xxdtddmflh\"}"; - - 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( - "fusuckzmkwklsno", - "axmqeqal", - "hjnhgwydyynfsvk", - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("anarfdlpukhpyrne")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("cnpqwteht") - .withActionsRequired("vrh")), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vhhtklnvnaf", response.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.DISCONNECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("cymczngn", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("xxewu", 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 8e3e6760b529..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateLinkResourcesListMockTests.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.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\":\"klobdxnazpmk\",\"requiredMembers\":[\"vevfxz\"],\"requiredZoneNames\":[\"hbzxli\",\"hrdd\",\"tfgxqbawpcb\",\"nzqcy\"],\"shareablePrivateLinkResourceTypes\":[{\"name\":\"qofyuicdhzbdy\",\"properties\":{\"description\":\"gbdvibidmhmwff\",\"groupId\":\"fmuvapckccr\",\"type\":\"weyoxoy\"}},{\"name\":\"k\",\"properties\":{\"description\":\"immoiroqboshbrag\",\"groupId\":\"yyrmfsvbp\",\"type\":\"bopfppdbwnup\"}},{\"name\":\"hxkumasjcaacfdmm\",\"properties\":{\"description\":\"g\",\"groupId\":\"hqepvufhbzehewh\",\"type\":\"hnl\"}}]},\"id\":\"nbldxeaclgschori\",\"name\":\"krsrrmoucs\",\"type\":\"fldpuviyfc\"}]}"; - - 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("o", "uxvnsasbcrymodi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("klobdxnazpmk", response.iterator().next().groupId()); - Assertions.assertEquals("vevfxz", response.iterator().next().requiredMembers().get(0)); - Assertions.assertEquals("hbzxli", response.iterator().next().requiredZoneNames().get(0)); - Assertions - .assertEquals( - "qofyuicdhzbdy", response.iterator().next().shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals( - "gbdvibidmhmwff", - response.iterator().next().shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions - .assertEquals( - "fmuvapckccr", - response.iterator().next().shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions - .assertEquals( - "weyoxoy", response.iterator().next().shareablePrivateLinkResourceTypes().get(0).properties().type()); - } -} 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 e4011c660915..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPropertiesTests.java +++ /dev/null @@ -1,140 +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.IpRule; -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\":\"Updating\",\"externalIP\":\"yuq\",\"hostName\":\"pqlpq\",\"publicPort\":1951399012,\"serverPort\":1475911208,\"version\":\"gbdbutauv\",\"privateEndpointConnections\":[{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpoint\":{\"id\":\"mhykojoxafnndl\"},\"groupIds\":[\"hkoymkcdyhbp\",\"kpw\",\"reqnovvqfov\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"suwsyrsnds\",\"actionsRequired\":\"g\"}},\"id\":\"gvraeaen\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"provisioningState\":\"Running\",\"privateEndpoint\":{\"id\":\"cewiipfpub\"},\"groupIds\":[\"wwiftohqkvpuv\",\"sgplsakn\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"n\",\"actionsRequired\":\"ph\"}},\"id\":\"pxodlqiyntorzih\",\"name\":\"eosjswsr\",\"type\":\"slyzrpzbchckqq\"},{\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"ysuiizynkedya\"},\"groupIds\":[\"yhqmibzyhwi\",\"smypyynpc\",\"pumnz\",\"mwzn\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"nsorgjhxbldt\",\"actionsRequired\":\"wrlkdmtn\"}},\"id\":\"ok\",\"name\":\"tllxdyhgsyocogj\",\"type\":\"tdtbnnhadooc\"},{\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"hnvpamqgxq\"},\"groupIds\":[\"zikywgg\",\"kallatmel\",\"uipiccjzk\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"vc\",\"actionsRequired\":\"y\"}},\"id\":\"yrnxxmueedn\",\"name\":\"rdvstkwqqtch\",\"type\":\"alm\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"aayg\",\"privateLinkResourceId\":\"v\",\"provisioningState\":\"Moving\",\"requestMessage\":\"iohgwxrtfud\",\"status\":\"Disconnected\"},\"id\":\"gyqagvrvmnpkuk\",\"name\":\"himdbl\",\"type\":\"gwimfn\"},{\"properties\":{\"groupId\":\"fjxwmsz\",\"privateLinkResourceId\":\"kfoqreyfkzikfj\",\"provisioningState\":\"Canceled\",\"requestMessage\":\"a\",\"status\":\"Timeout\"},\"id\":\"czelpcirel\",\"name\":\"feaenwab\",\"type\":\"atklddxbjhwuaa\"},{\"properties\":{\"groupId\":\"zjosp\",\"privateLinkResourceId\":\"youlp\",\"provisioningState\":\"Creating\",\"requestMessage\":\"ag\",\"status\":\"Disconnected\"},\"id\":\"mjwosytx\",\"name\":\"tcs\",\"type\":\"fcktqumiekke\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"ly\",\"liveTraceConfiguration\":{\"enabled\":\"dgqggebdu\",\"categories\":[{\"name\":\"eqidbqfatpx\",\"enabled\":\"rxcyjmoad\"}]},\"resourceLogConfiguration\":{\"categories\":[{\"name\":\"m\",\"enabled\":\"dmjsjqb\"}]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"publicNetwork\":{\"allow\":[\"Trace\"],\"deny\":[\"ClientConnection\"]},\"privateEndpoints\":[{\"name\":\"uhpkxkgymar\",\"allow\":[\"ClientConnection\"],\"deny\":[\"RESTAPI\",\"ServerConnection\",\"RESTAPI\",\"ServerConnection\"]},{\"name\":\"hky\",\"allow\":[\"RESTAPI\",\"ClientConnection\",\"Trace\"],\"deny\":[\"Trace\",\"ClientConnection\",\"RESTAPI\"]}],\"ipRules\":[{\"value\":\"zqalkrmnjijpx\",\"action\":\"Allow\"},{\"value\":\"udfnbyxba\",\"action\":\"Allow\"},{\"value\":\"yvayffimrzr\",\"action\":\"Allow\"},{\"value\":\"ogs\",\"action\":\"Allow\"}]},\"publicNetworkAccess\":\"vfdnwnwmewzsyyce\",\"disableLocalAuth\":true,\"disableAadAuth\":false,\"regionEndpointEnabled\":\"judpfrxt\",\"resourceStopped\":\"hzv\"}") - .toObject(WebPubSubProperties.class); - Assertions.assertEquals(false, model.tls().clientCertEnabled()); - Assertions.assertEquals("dgqggebdu", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("eqidbqfatpx", model.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("rxcyjmoad", model.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("m", model.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("dmjsjqb", model.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.DENY, model.networkACLs().defaultAction()); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.networkACLs().publicNetwork().allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.networkACLs().publicNetwork().deny().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.CLIENT_CONNECTION, model.networkACLs().privateEndpoints().get(0).allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.RESTAPI, model.networkACLs().privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("uhpkxkgymar", model.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("zqalkrmnjijpx", model.networkACLs().ipRules().get(0).value()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().ipRules().get(0).action()); - Assertions.assertEquals("vfdnwnwmewzsyyce", model.publicNetworkAccess()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(false, model.disableAadAuth()); - Assertions.assertEquals("judpfrxt", model.regionEndpointEnabled()); - Assertions.assertEquals("hzv", model.resourceStopped()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubProperties model = - new WebPubSubProperties() - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("dgqggebdu") - .withCategories( - Arrays.asList(new LiveTraceCategory().withName("eqidbqfatpx").withEnabled("rxcyjmoad")))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories(Arrays.asList(new ResourceLogCategory().withName("m").withEnabled("dmjsjqb")))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.TRACE)) - .withDeny(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.SERVER_CONNECTION)) - .withName("uhpkxkgymar"), - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.TRACE)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.TRACE, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.RESTAPI)) - .withName("hky"))) - .withIpRules( - Arrays - .asList( - new IpRule().withValue("zqalkrmnjijpx").withAction(AclAction.ALLOW), - new IpRule().withValue("udfnbyxba").withAction(AclAction.ALLOW), - new IpRule().withValue("yvayffimrzr").withAction(AclAction.ALLOW), - new IpRule().withValue("ogs").withAction(AclAction.ALLOW)))) - .withPublicNetworkAccess("vfdnwnwmewzsyyce") - .withDisableLocalAuth(true) - .withDisableAadAuth(false) - .withRegionEndpointEnabled("judpfrxt") - .withResourceStopped("hzv"); - model = BinaryData.fromObject(model).toObject(WebPubSubProperties.class); - Assertions.assertEquals(false, model.tls().clientCertEnabled()); - Assertions.assertEquals("dgqggebdu", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("eqidbqfatpx", model.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("rxcyjmoad", model.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("m", model.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("dmjsjqb", model.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.DENY, model.networkACLs().defaultAction()); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.networkACLs().publicNetwork().allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.CLIENT_CONNECTION, model.networkACLs().publicNetwork().deny().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.CLIENT_CONNECTION, model.networkACLs().privateEndpoints().get(0).allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.RESTAPI, model.networkACLs().privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("uhpkxkgymar", model.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("zqalkrmnjijpx", model.networkACLs().ipRules().get(0).value()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().ipRules().get(0).action()); - Assertions.assertEquals("vfdnwnwmewzsyyce", model.publicNetworkAccess()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(false, model.disableAadAuth()); - Assertions.assertEquals("judpfrxt", model.regionEndpointEnabled()); - Assertions.assertEquals("hzv", model.resourceStopped()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasCreateOrUpdateMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasCreateOrUpdateMockTests.java deleted file mode 100644 index b2c605d44155..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasCreateOrUpdateMockTests.java +++ /dev/null @@ -1,98 +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.Replica; -import com.azure.resourcemanager.webpubsub.models.ResourceSku; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -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 WebPubSubReplicasCreateOrUpdateMockTests { - @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\":\"ltxdwhmozu\",\"tier\":\"Standard\",\"size\":\"ln\",\"family\":\"nj\",\"capacity\":1586632226},\"properties\":{\"provisioningState\":\"Succeeded\",\"regionEndpointEnabled\":\"pymwamxqzragp\",\"resourceStopped\":\"phtvdu\"},\"location\":\"jvlej\",\"tags\":{\"updwv\":\"srlzknmzlan\",\"mqrhvthl\":\"phcnzqtpj\",\"xetlgydlhqv\":\"iwdcxsmlzzhzd\"},\"id\":\"n\",\"name\":\"pxy\",\"type\":\"afiqgeaarbgjekg\"}"; - - 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)); - - Replica response = - manager - .webPubSubReplicas() - .define("psfxsf") - .withRegion("lfojuidjp") - .withExistingWebPubSub("y", "izrzb") - .withTags(mapOf("je", "jucejikzoeovvtz", "zkdbqzolx", "jklntikyj", "pcrrk", "zvhqjwtrhtgvg")) - .withSku(new ResourceSku().withName("tl").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(764099622)) - .withRegionEndpointEnabled("mjm") - .withResourceStopped("wyzgiblkuj") - .create(); - - Assertions.assertEquals("jvlej", response.location()); - Assertions.assertEquals("srlzknmzlan", response.tags().get("updwv")); - Assertions.assertEquals("ltxdwhmozu", response.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals(1586632226, response.sku().capacity()); - Assertions.assertEquals("pymwamxqzragp", response.regionEndpointEnabled()); - Assertions.assertEquals("phtvdu", response.resourceStopped()); - } - - // Use "Map.of" if available - @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/WebPubSubReplicasDeleteWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasDeleteWithResponseMockTests.java deleted file mode 100644 index fcf4e477564d..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasDeleteWithResponseMockTests.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 WebPubSubReplicasDeleteWithResponseMockTests { - @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 - .webPubSubReplicas() - .deleteWithResponse("attcju", "plrvkmjcwmjvlg", "ggcvk", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasGetWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasGetWithResponseMockTests.java deleted file mode 100644 index b4b963a548de..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasGetWithResponseMockTests.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.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.Replica; -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 WebPubSubReplicasGetWithResponseMockTests { - @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 = - "{\"sku\":{\"name\":\"vtrrmhwrbfdpyflu\",\"tier\":\"Premium\",\"size\":\"glrocuy\",\"family\":\"whhmemhooc\",\"capacity\":769753365},\"properties\":{\"provisioningState\":\"Moving\",\"regionEndpointEnabled\":\"emc\",\"resourceStopped\":\"kmmykyujxsglh\"},\"location\":\"rryejylmbkzudnig\",\"tags\":{\"wlpxuzzjg\":\"hotj\",\"qotoihiqakydiwfb\":\"refqy\",\"spodaqax\":\"kwpzdqtvh\",\"jfulbmoic\":\"ipietgbe\"},\"id\":\"dlpnfpubn\",\"name\":\"nbatzvi\",\"type\":\"sowsaael\"}"; - - 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)); - - Replica response = - manager - .webPubSubReplicas() - .getWithResponse("nsjlpjrtws", "hv", "uic", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rryejylmbkzudnig", response.location()); - Assertions.assertEquals("hotj", response.tags().get("wlpxuzzjg")); - Assertions.assertEquals("vtrrmhwrbfdpyflu", response.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals(769753365, response.sku().capacity()); - Assertions.assertEquals("emc", response.regionEndpointEnabled()); - Assertions.assertEquals("kmmykyujxsglh", response.resourceStopped()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasListMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasListMockTests.java deleted file mode 100644 index c4402b7dffc7..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubReplicasListMockTests.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.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.Replica; -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 WebPubSubReplicasListMockTests { - @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\":\"b\",\"tier\":\"Basic\",\"size\":\"fs\",\"family\":\"wlkjxn\",\"capacity\":979302562},\"properties\":{\"provisioningState\":\"Deleting\",\"regionEndpointEnabled\":\"tmhqykiz\",\"resourceStopped\":\"ksaoafcluqvox\"},\"location\":\"cjimryvwgcwwpbmz\",\"tags\":{\"bvopwndyqle\":\"sydsxwefohe\",\"lowkxxpvb\":\"llklmtk\"},\"id\":\"dfjmzsyzfhotlh\",\"name\":\"k\",\"type\":\"yych\"}]}"; - - 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.webPubSubReplicas().list("abeolhbhlvbm", "uqibsxtkcu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cjimryvwgcwwpbmz", response.iterator().next().location()); - Assertions.assertEquals("sydsxwefohe", response.iterator().next().tags().get("bvopwndyqle")); - Assertions.assertEquals("b", response.iterator().next().sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals(979302562, response.iterator().next().sku().capacity()); - Assertions.assertEquals("tmhqykiz", response.iterator().next().regionEndpointEnabled()); - Assertions.assertEquals("ksaoafcluqvox", response.iterator().next().resourceStopped()); - } -} 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 ed775c88e42b..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubResourceInnerTests.java +++ /dev/null @@ -1,217 +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.IpRule; -import com.azure.resourcemanager.webpubsub.models.LiveTraceCategory; -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.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.ResourceSku; -import com.azure.resourcemanager.webpubsub.models.ServiceKind; -import com.azure.resourcemanager.webpubsub.models.UserAssignedIdentityProperty; -import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -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\":\"uvjfdxxive\",\"tier\":\"Free\",\"size\":\"qaqtdoqmcbxvwvxy\",\"family\":\"qbhsfxobl\",\"capacity\":97190015},\"properties\":{\"provisioningState\":\"Updating\",\"externalIP\":\"ewwwfbkrvrnsv\",\"hostName\":\"q\",\"publicPort\":925506689,\"serverPort\":392993819,\"version\":\"sbfov\",\"privateEndpointConnections\":[{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpoint\":{\"id\":\"hsqfsubcgjbirxbp\"},\"groupIds\":[\"rfbjf\",\"twss\",\"t\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"zbexilzznfqqnvw\",\"actionsRequired\":\"qtaruoujmkcjhwq\"}},\"id\":\"jrybnwjewgdrjer\",\"name\":\"naenqpehindo\",\"type\":\"gmifthnzd\"},{\"properties\":{\"provisioningState\":\"Moving\",\"privateEndpoint\":{\"id\":\"ayqigynduhav\"},\"groupIds\":[\"kthumaqolbgycdui\",\"r\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"mvaolps\",\"actionsRequired\":\"qlfmmdnbb\"}},\"id\":\"zpswiydmc\",\"name\":\"yhz\",\"type\":\"xssadbzmnvdf\"},{\"properties\":{\"provisioningState\":\"Moving\",\"privateEndpoint\":{\"id\":\"dvxzbncblylpst\"},\"groupIds\":[\"hxsrzdzucersc\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"vfiwjmygtdss\",\"actionsRequired\":\"wtmwerio\"}},\"id\":\"pyqs\",\"name\":\"mwabnetshhszhedp\",\"type\":\"vwiwubmwmbesld\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"tppjflcx\",\"privateLinkResourceId\":\"gaokonzmnsikv\",\"provisioningState\":\"Succeeded\",\"requestMessage\":\"eqqkdltfzxm\",\"status\":\"Timeout\"},\"id\":\"gureodkwobdag\",\"name\":\"tibqdxbxwakb\",\"type\":\"gqxndlkzgxhuripl\"},{\"properties\":{\"groupId\":\"odxun\",\"privateLinkResourceId\":\"bebxmubyyntwl\",\"provisioningState\":\"Succeeded\",\"requestMessage\":\"koievseo\",\"status\":\"Approved\"},\"id\":\"l\",\"name\":\"tmuwlauwzi\",\"type\":\"xbmp\"}],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"u\",\"liveTraceConfiguration\":{\"enabled\":\"vpbttd\",\"categories\":[{\"name\":\"p\",\"enabled\":\"ebmnzbtbhjpglk\"},{\"name\":\"ohdneuel\",\"enabled\":\"hsd\"},{\"name\":\"t\",\"enabled\":\"fikdowwqu\"},{\"name\":\"xzxcl\",\"enabled\":\"thhqzonosggbh\"}]},\"resourceLogConfiguration\":{\"categories\":[{\"name\":\"dsjnka\",\"enabled\":\"utiiswacf\"},{\"name\":\"dkzzewkfvhqcrail\",\"enabled\":\"n\"}]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"publicNetwork\":{\"allow\":[\"RESTAPI\",\"RESTAPI\",\"ClientConnection\",\"Trace\"],\"deny\":[\"Trace\",\"Trace\"]},\"privateEndpoints\":[{\"name\":\"xsaga\",\"allow\":[\"Trace\",\"ClientConnection\",\"ClientConnection\"],\"deny\":[\"RESTAPI\",\"ServerConnection\",\"ServerConnection\"]},{\"name\":\"edgfbcvkcvq\",\"allow\":[\"ServerConnection\",\"RESTAPI\",\"ClientConnection\",\"RESTAPI\"],\"deny\":[\"ServerConnection\",\"Trace\",\"ClientConnection\"]},{\"name\":\"ood\",\"allow\":[\"Trace\",\"Trace\"],\"deny\":[\"RESTAPI\",\"RESTAPI\",\"ServerConnection\"]},{\"name\":\"cjwvn\",\"allow\":[\"ClientConnection\"],\"deny\":[\"ClientConnection\",\"ServerConnection\",\"Trace\"]}],\"ipRules\":[{\"value\":\"lpmutwuoegrpkhj\",\"action\":\"Allow\"},{\"value\":\"qsluicp\",\"action\":\"Allow\"},{\"value\":\"zzlvmbmpaxmodfv\",\"action\":\"Allow\"}]},\"publicNetworkAccess\":\"wsbpfvm\",\"disableLocalAuth\":false,\"disableAadAuth\":false,\"regionEndpointEnabled\":\"uyfta\",\"resourceStopped\":\"cpwi\"},\"kind\":\"WebPubSub\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"v\":{\"principalId\":\"exkpzksmondjmq\",\"clientId\":\"vypomgkopkwho\"}},\"principalId\":\"jqg\",\"tenantId\":\"smocmbq\"},\"location\":\"vmkcx\",\"tags\":{\"yat\":\"pvhelxprg\",\"ejrjxgciqibrho\":\"dckcbc\",\"bahwfl\":\"xsdqrhzoymibmrqy\"},\"id\":\"szdtmhrkwof\",\"name\":\"yvoqa\",\"type\":\"piexpbtgiw\"}") - .toObject(WebPubSubResourceInner.class); - Assertions.assertEquals("vmkcx", model.location()); - Assertions.assertEquals("pvhelxprg", model.tags().get("yat")); - Assertions.assertEquals("uvjfdxxive", model.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.FREE, model.sku().tier()); - Assertions.assertEquals(97190015, model.sku().capacity()); - Assertions.assertEquals(ServiceKind.WEB_PUB_SUB, model.kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals(true, model.tls().clientCertEnabled()); - Assertions.assertEquals("vpbttd", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("p", model.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("ebmnzbtbhjpglk", model.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("dsjnka", model.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("utiiswacf", model.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().defaultAction()); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.networkACLs().publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.networkACLs().publicNetwork().deny().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.TRACE, model.networkACLs().privateEndpoints().get(0).allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.RESTAPI, model.networkACLs().privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("xsaga", model.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("lpmutwuoegrpkhj", model.networkACLs().ipRules().get(0).value()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().ipRules().get(0).action()); - Assertions.assertEquals("wsbpfvm", model.publicNetworkAccess()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(false, model.disableAadAuth()); - Assertions.assertEquals("uyfta", model.regionEndpointEnabled()); - Assertions.assertEquals("cpwi", model.resourceStopped()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubResourceInner model = - new WebPubSubResourceInner() - .withLocation("vmkcx") - .withTags(mapOf("yat", "pvhelxprg", "ejrjxgciqibrho", "dckcbc", "bahwfl", "xsdqrhzoymibmrqy")) - .withSku( - new ResourceSku().withName("uvjfdxxive").withTier(WebPubSubSkuTier.FREE).withCapacity(97190015)) - .withKind(ServiceKind.WEB_PUB_SUB) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("v", new UserAssignedIdentityProperty()))) - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(true)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("vpbttd") - .withCategories( - Arrays - .asList( - new LiveTraceCategory().withName("p").withEnabled("ebmnzbtbhjpglk"), - new LiveTraceCategory().withName("ohdneuel").withEnabled("hsd"), - new LiveTraceCategory().withName("t").withEnabled("fikdowwqu"), - new LiveTraceCategory().withName("xzxcl").withEnabled("thhqzonosggbh")))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories( - Arrays - .asList( - new ResourceLogCategory().withName("dsjnka").withEnabled("utiiswacf"), - new ResourceLogCategory().withName("dkzzewkfvhqcrail").withEnabled("n")))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.ALLOW) - .withPublicNetwork( - new NetworkAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.TRACE)) - .withDeny(Arrays.asList(WebPubSubRequestType.TRACE, WebPubSubRequestType.TRACE))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.TRACE, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.CLIENT_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.SERVER_CONNECTION)) - .withName("xsaga"), - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.RESTAPI)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.TRACE, - WebPubSubRequestType.CLIENT_CONNECTION)) - .withName("edgfbcvkcvq"), - new PrivateEndpointAcl() - .withAllow( - Arrays.asList(WebPubSubRequestType.TRACE, WebPubSubRequestType.TRACE)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.SERVER_CONNECTION)) - .withName("ood"), - new PrivateEndpointAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.TRACE)) - .withName("cjwvn"))) - .withIpRules( - Arrays - .asList( - new IpRule().withValue("lpmutwuoegrpkhj").withAction(AclAction.ALLOW), - new IpRule().withValue("qsluicp").withAction(AclAction.ALLOW), - new IpRule().withValue("zzlvmbmpaxmodfv").withAction(AclAction.ALLOW)))) - .withPublicNetworkAccess("wsbpfvm") - .withDisableLocalAuth(false) - .withDisableAadAuth(false) - .withRegionEndpointEnabled("uyfta") - .withResourceStopped("cpwi"); - model = BinaryData.fromObject(model).toObject(WebPubSubResourceInner.class); - Assertions.assertEquals("vmkcx", model.location()); - Assertions.assertEquals("pvhelxprg", model.tags().get("yat")); - Assertions.assertEquals("uvjfdxxive", model.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.FREE, model.sku().tier()); - Assertions.assertEquals(97190015, model.sku().capacity()); - Assertions.assertEquals(ServiceKind.WEB_PUB_SUB, model.kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals(true, model.tls().clientCertEnabled()); - Assertions.assertEquals("vpbttd", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("p", model.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("ebmnzbtbhjpglk", model.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("dsjnka", model.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("utiiswacf", model.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().defaultAction()); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, model.networkACLs().publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, model.networkACLs().publicNetwork().deny().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.TRACE, model.networkACLs().privateEndpoints().get(0).allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.RESTAPI, model.networkACLs().privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("xsaga", model.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("lpmutwuoegrpkhj", model.networkACLs().ipRules().get(0).value()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().ipRules().get(0).action()); - Assertions.assertEquals("wsbpfvm", model.publicNetworkAccess()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(false, model.disableAadAuth()); - Assertions.assertEquals("uyfta", model.regionEndpointEnabled()); - Assertions.assertEquals("cpwi", model.resourceStopped()); - } - - // Use "Map.of" if available - @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 dbb4a9a26c11..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubResourceListTests.java +++ /dev/null @@ -1,342 +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.IpRule; -import com.azure.resourcemanager.webpubsub.models.LiveTraceCategory; -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.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.ResourceSku; -import com.azure.resourcemanager.webpubsub.models.ServiceKind; -import com.azure.resourcemanager.webpubsub.models.UserAssignedIdentityProperty; -import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -import com.azure.resourcemanager.webpubsub.models.WebPubSubResourceList; -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 WebPubSubResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebPubSubResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"sku\":{\"name\":\"tpngjcrcczsqpjh\",\"tier\":\"Free\",\"size\":\"jvnysounqe\",\"family\":\"noae\",\"capacity\":1901274446},\"properties\":{\"provisioningState\":\"Deleting\",\"externalIP\":\"trpmo\",\"hostName\":\"mcmatuokthfuiu\",\"publicPort\":1445775245,\"serverPort\":680550088,\"version\":\"pk\",\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"uozmyzydagfua\",\"name\":\"bezy\",\"type\":\"uokktwhrdxwz\"},{\"properties\":{},\"id\":\"sm\",\"name\":\"surex\",\"type\":\"moryocfsfksym\"},{\"properties\":{},\"id\":\"stkiiuxhqyud\",\"name\":\"o\",\"type\":\"rq\"},{\"properties\":{},\"id\":\"oczvy\",\"name\":\"fqrvkdvjsllrmvvd\",\"type\":\"watkpnpulexxb\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"ruwiqzbqjvsov\",\"privateLinkResourceId\":\"yokacspkw\"},\"id\":\"zdobpxjmflbvvnch\",\"name\":\"kcciwwzjuqkhr\",\"type\":\"ajiwkuo\"},{\"properties\":{\"groupId\":\"skghsauuimj\",\"privateLinkResourceId\":\"vxieduugidyj\"},\"id\":\"f\",\"name\":\"y\",\"type\":\"osvexcsonpclhoc\"},{\"properties\":{\"groupId\":\"slkevle\",\"privateLinkResourceId\":\"gz\"},\"id\":\"u\",\"name\":\"fmvfaxkffeiit\",\"type\":\"lvmezyvshxmzsbbz\"},{\"properties\":{\"groupId\":\"gigr\",\"privateLinkResourceId\":\"wburvjxxjnspydpt\"},\"id\":\"enkouknvudw\",\"name\":\"iukbldngkpoci\",\"type\":\"azyxoegukg\"}],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"cgygev\",\"liveTraceConfiguration\":{\"enabled\":\"typmrbpizcdrqjsd\",\"categories\":[{},{},{},{}]},\"resourceLogConfiguration\":{\"categories\":[{},{},{},{}]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"publicNetwork\":{\"allow\":[\"RESTAPI\",\"ClientConnection\",\"RESTAPI\"],\"deny\":[\"Trace\"]},\"privateEndpoints\":[{\"name\":\"jttgzf\"},{\"name\":\"ishc\"},{\"name\":\"khaj\"}],\"ipRules\":[{},{},{},{}]},\"publicNetworkAccess\":\"a\",\"disableLocalAuth\":false,\"disableAadAuth\":true,\"regionEndpointEnabled\":\"alpbuxwgipwhon\",\"resourceStopped\":\"kgshwa\"},\"kind\":\"SocketIO\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"zlsico\":{\"principalId\":\"eputtmrywnuzoqf\",\"clientId\":\"yqzrnkcqvyxlw\"},\"hheunmmqhgyx\":{\"principalId\":\"qqn\",\"clientId\":\"lryav\"},\"zf\":{\"principalId\":\"onocukok\",\"clientId\":\"axuconuq\"}},\"principalId\":\"eyp\",\"tenantId\":\"rmjmwvvjektc\"},\"location\":\"enhwlrs\",\"tags\":{\"qdqgbi\":\"zpwv\",\"fcivfsnkym\":\"ylihkaetckt\",\"jf\":\"ctq\",\"fuwutttxf\":\"ebrjcxe\"},\"id\":\"jrbirphxepcyv\",\"name\":\"hfnljkyq\",\"type\":\"j\"},{\"sku\":{\"name\":\"ujqgidok\",\"tier\":\"Standard\",\"size\":\"yoxgvcltbgsnc\",\"family\":\"kjeszz\",\"capacity\":1537141479},\"properties\":{\"provisioningState\":\"Running\",\"externalIP\":\"fvgxbfsmxneh\",\"hostName\":\"vecxgodebfqkk\",\"publicPort\":1961052031,\"serverPort\":1171229778,\"version\":\"gr\",\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"lfbxzpuzycisp\",\"name\":\"qzahmgkbrp\",\"type\":\"y\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"nuqqkpikadrgvt\",\"privateLinkResourceId\":\"agnb\"},\"id\":\"nhijggmebfsi\",\"name\":\"rbu\",\"type\":\"rcvpnazzmhjrunmp\"},{\"properties\":{\"groupId\":\"tdbhrbnla\",\"privateLinkResourceId\":\"kx\"},\"id\":\"skpbhenbtkcxywn\",\"name\":\"tnrsyn\",\"type\":\"qidybyx\"},{\"properties\":{\"groupId\":\"fclhaaxdbabphlwr\",\"privateLinkResourceId\":\"lfktsths\"},\"id\":\"ocmnyyazttbtwwrq\",\"name\":\"uedck\",\"type\":\"ywbiexzfeyueax\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"wbhqwal\",\"liveTraceConfiguration\":{\"enabled\":\"yoxa\",\"categories\":[{},{},{}]},\"resourceLogConfiguration\":{\"categories\":[{},{}]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"publicNetwork\":{\"allow\":[\"Trace\",\"ClientConnection\",\"RESTAPI\"],\"deny\":[\"ClientConnection\",\"ServerConnection\",\"ServerConnection\",\"ServerConnection\"]},\"privateEndpoints\":[{\"name\":\"djswztsdbp\"}],\"ipRules\":[{},{},{}]},\"publicNetworkAccess\":\"txhp\",\"disableLocalAuth\":false,\"disableAadAuth\":false,\"regionEndpointEnabled\":\"zabglcuhxwt\",\"resourceStopped\":\"yqiklbbovplwzb\"},\"kind\":\"WebPubSub\",\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"mg\":{\"principalId\":\"vmkfssxqu\",\"clientId\":\"fpl\"},\"wzbaiue\":{\"principalId\":\"nkjzkdeslpvlop\",\"clientId\":\"yighxpk\"}},\"principalId\":\"a\",\"tenantId\":\"nyqupedeojnabck\"},\"location\":\"mtxpsiebtfh\",\"tags\":{\"qmhjjdhtld\":\"sapskr\"},\"id\":\"kyzxuutk\",\"name\":\"cwscwsvlx\",\"type\":\"togt\"},{\"sku\":{\"name\":\"upqsx\",\"tier\":\"Premium\",\"size\":\"cykvceo\",\"family\":\"ilovnot\",\"capacity\":1073138726},\"properties\":{\"provisioningState\":\"Moving\",\"externalIP\":\"bkc\",\"hostName\":\"dhbt\",\"publicPort\":1907592616,\"serverPort\":1754671531,\"version\":\"pnvjtoqnermclf\",\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"xus\",\"name\":\"rpabg\",\"type\":\"epsbjtazqu\"},{\"properties\":{},\"id\":\"wpmueefj\",\"name\":\"wfqkquj\",\"type\":\"dsuyonobgla\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"tcc\",\"privateLinkResourceId\":\"g\"},\"id\":\"dxyt\",\"name\":\"moyrxvwfudwpz\",\"type\":\"txhdzh\"},{\"properties\":{\"groupId\":\"qj\",\"privateLinkResourceId\":\"hckfrlhrx\"},\"id\":\"kyv\",\"name\":\"ycanuzbpzkafku\",\"type\":\"b\"},{\"properties\":{\"groupId\":\"nwbmeh\",\"privateLinkResourceId\":\"seyvj\"},\"id\":\"rts\",\"name\":\"hspkdeemao\",\"type\":\"mx\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"melmqkrha\",\"liveTraceConfiguration\":{\"enabled\":\"juahaquhcdhmdual\",\"categories\":[{},{},{}]},\"resourceLogConfiguration\":{\"categories\":[{},{}]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"publicNetwork\":{\"allow\":[\"ServerConnection\"],\"deny\":[\"ClientConnection\"]},\"privateEndpoints\":[{\"name\":\"pv\"},{\"name\":\"omzlfmi\"}],\"ipRules\":[{}]},\"publicNetworkAccess\":\"nbbelda\",\"disableLocalAuth\":true,\"disableAadAuth\":false,\"regionEndpointEnabled\":\"io\",\"resourceStopped\":\"qhakauhashsf\"},\"kind\":\"WebPubSub\",\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"ecivyh\":{\"principalId\":\"ugicjooxdjebw\",\"clientId\":\"cwwfvovbvme\"}},\"principalId\":\"euojgjrwju\",\"tenantId\":\"otwmcdyt\"},\"location\":\"wit\",\"tags\":{\"hniskxfbkpyc\":\"jawgqwg\"},\"id\":\"klwndnhjdauwhv\",\"name\":\"l\",\"type\":\"zbtd\"},{\"sku\":{\"name\":\"ujznb\",\"tier\":\"Free\",\"size\":\"uwprzql\",\"family\":\"ualupjmkh\",\"capacity\":1026184790},\"properties\":{\"provisioningState\":\"Unknown\",\"externalIP\":\"wsrtjriplrbpbe\",\"hostName\":\"ghfg\",\"publicPort\":107282315,\"serverPort\":658652165,\"version\":\"zvlvqhjkbegib\",\"privateEndpointConnections\":[{\"properties\":{},\"id\":\"ebwwaloayqc\",\"name\":\"wrtz\",\"type\":\"uzgwyzmhtx\"},{\"properties\":{},\"id\":\"mtsavjcbpwxqp\",\"name\":\"rknftguvriuhprwm\",\"type\":\"yvxqtayriwwroy\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"rmcqiby\",\"privateLinkResourceId\":\"nojvknmefqsg\"},\"id\":\"ah\",\"name\":\"pjyzhpv\",\"type\":\"qzcjrvxdj\"},{\"properties\":{\"groupId\":\"mwlxk\",\"privateLinkResourceId\":\"ug\"},\"id\":\"zovawjvz\",\"name\":\"nluthnnp\",\"type\":\"nxipeil\"},{\"properties\":{\"groupId\":\"zuaejxd\",\"privateLinkResourceId\":\"ltskzbbtd\"},\"id\":\"mv\",\"name\":\"ekg\",\"type\":\"wozuhkf\"},{\"properties\":{\"groupId\":\"sjyofdx\",\"privateLinkResourceId\":\"uusdttouwa\"},\"id\":\"ekqvkeln\",\"name\":\"mvb\",\"type\":\"wyjsflhhcaalnjix\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"wjo\",\"liveTraceConfiguration\":{\"enabled\":\"cslyjpk\",\"categories\":[{},{},{}]},\"resourceLogConfiguration\":{\"categories\":[{},{},{}]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"publicNetwork\":{\"allow\":[\"RESTAPI\",\"ServerConnection\"],\"deny\":[\"RESTAPI\"]},\"privateEndpoints\":[{\"name\":\"o\"},{\"name\":\"hb\"},{\"name\":\"xknalaulppg\"}],\"ipRules\":[{},{},{},{}]},\"publicNetworkAccess\":\"napnyiropuhpigv\",\"disableLocalAuth\":true,\"disableAadAuth\":true,\"regionEndpointEnabled\":\"git\",\"resourceStopped\":\"edjvcslynqw\"},\"kind\":\"SocketIO\",\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"pfqbuaceopzf\":{\"principalId\":\"ktrmgucnapkt\",\"clientId\":\"ellwptfdy\"}},\"principalId\":\"hhuao\",\"tenantId\":\"pcqeqx\"},\"location\":\"z\",\"tags\":{\"dmoizpostmg\":\"zxctobgb\",\"rmfqjhhkxbpvj\":\"cfbu\"},\"id\":\"mjh\",\"name\":\"xjyngudivk\",\"type\":\"tswb\"}],\"nextLink\":\"zvszj\"}") - .toObject(WebPubSubResourceList.class); - Assertions.assertEquals("enhwlrs", model.value().get(0).location()); - Assertions.assertEquals("zpwv", model.value().get(0).tags().get("qdqgbi")); - Assertions.assertEquals("tpngjcrcczsqpjh", model.value().get(0).sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals(1901274446, model.value().get(0).sku().capacity()); - Assertions.assertEquals(ServiceKind.SOCKET_IO, model.value().get(0).kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals(true, model.value().get(0).tls().clientCertEnabled()); - Assertions.assertEquals("typmrbpizcdrqjsd", model.value().get(0).liveTraceConfiguration().enabled()); - Assertions.assertEquals(AclAction.ALLOW, model.value().get(0).networkACLs().defaultAction()); - Assertions - .assertEquals( - WebPubSubRequestType.RESTAPI, model.value().get(0).networkACLs().publicNetwork().allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.TRACE, model.value().get(0).networkACLs().publicNetwork().deny().get(0)); - Assertions.assertEquals("jttgzf", model.value().get(0).networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("a", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals(false, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(true, model.value().get(0).disableAadAuth()); - Assertions.assertEquals("alpbuxwgipwhon", model.value().get(0).regionEndpointEnabled()); - Assertions.assertEquals("kgshwa", model.value().get(0).resourceStopped()); - Assertions.assertEquals("zvszj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebPubSubResourceList model = - new WebPubSubResourceList() - .withValue( - Arrays - .asList( - new WebPubSubResourceInner() - .withLocation("enhwlrs") - .withTags( - mapOf( - "qdqgbi", - "zpwv", - "fcivfsnkym", - "ylihkaetckt", - "jf", - "ctq", - "fuwutttxf", - "ebrjcxe")) - .withSku( - new ResourceSku() - .withName("tpngjcrcczsqpjh") - .withTier(WebPubSubSkuTier.FREE) - .withCapacity(1901274446)) - .withKind(ServiceKind.SOCKET_IO) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "zlsico", - new UserAssignedIdentityProperty(), - "hheunmmqhgyx", - new UserAssignedIdentityProperty(), - "zf", - new UserAssignedIdentityProperty()))) - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(true)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("typmrbpizcdrqjsd") - .withCategories( - Arrays - .asList( - new LiveTraceCategory(), - new LiveTraceCategory(), - new LiveTraceCategory(), - new LiveTraceCategory()))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories( - Arrays - .asList( - new ResourceLogCategory(), - new ResourceLogCategory(), - new ResourceLogCategory(), - new ResourceLogCategory()))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.ALLOW) - .withPublicNetwork( - new NetworkAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.RESTAPI)) - .withDeny(Arrays.asList(WebPubSubRequestType.TRACE))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl().withName("jttgzf"), - new PrivateEndpointAcl().withName("ishc"), - new PrivateEndpointAcl().withName("khaj"))) - .withIpRules( - Arrays.asList(new IpRule(), new IpRule(), new IpRule(), new IpRule()))) - .withPublicNetworkAccess("a") - .withDisableLocalAuth(false) - .withDisableAadAuth(true) - .withRegionEndpointEnabled("alpbuxwgipwhon") - .withResourceStopped("kgshwa"), - new WebPubSubResourceInner() - .withLocation("mtxpsiebtfh") - .withTags(mapOf("qmhjjdhtld", "sapskr")) - .withSku( - new ResourceSku() - .withName("ujqgidok") - .withTier(WebPubSubSkuTier.STANDARD) - .withCapacity(1537141479)) - .withKind(ServiceKind.WEB_PUB_SUB) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.NONE) - .withUserAssignedIdentities( - mapOf( - "mg", - new UserAssignedIdentityProperty(), - "wzbaiue", - new UserAssignedIdentityProperty()))) - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("yoxa") - .withCategories( - Arrays - .asList( - new LiveTraceCategory(), - new LiveTraceCategory(), - new LiveTraceCategory()))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories( - Arrays.asList(new ResourceLogCategory(), new ResourceLogCategory()))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.TRACE, - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.RESTAPI)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.SERVER_CONNECTION))) - .withPrivateEndpoints( - Arrays.asList(new PrivateEndpointAcl().withName("djswztsdbp"))) - .withIpRules(Arrays.asList(new IpRule(), new IpRule(), new IpRule()))) - .withPublicNetworkAccess("txhp") - .withDisableLocalAuth(false) - .withDisableAadAuth(false) - .withRegionEndpointEnabled("zabglcuhxwt") - .withResourceStopped("yqiklbbovplwzb"), - new WebPubSubResourceInner() - .withLocation("wit") - .withTags(mapOf("hniskxfbkpyc", "jawgqwg")) - .withSku( - new ResourceSku() - .withName("upqsx") - .withTier(WebPubSubSkuTier.PREMIUM) - .withCapacity(1073138726)) - .withKind(ServiceKind.WEB_PUB_SUB) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("ecivyh", new UserAssignedIdentityProperty()))) - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("juahaquhcdhmdual") - .withCategories( - Arrays - .asList( - new LiveTraceCategory(), - new LiveTraceCategory(), - new LiveTraceCategory()))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories( - Arrays.asList(new ResourceLogCategory(), new ResourceLogCategory()))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl() - .withAllow(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION)) - .withDeny(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl().withName("pv"), - new PrivateEndpointAcl().withName("omzlfmi"))) - .withIpRules(Arrays.asList(new IpRule()))) - .withPublicNetworkAccess("nbbelda") - .withDisableLocalAuth(true) - .withDisableAadAuth(false) - .withRegionEndpointEnabled("io") - .withResourceStopped("qhakauhashsf"), - new WebPubSubResourceInner() - .withLocation("z") - .withTags(mapOf("dmoizpostmg", "zxctobgb", "rmfqjhhkxbpvj", "cfbu")) - .withSku( - new ResourceSku() - .withName("ujznb") - .withTier(WebPubSubSkuTier.FREE) - .withCapacity(1026184790)) - .withKind(ServiceKind.SOCKET_IO) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("pfqbuaceopzf", new UserAssignedIdentityProperty()))) - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("cslyjpk") - .withCategories( - Arrays - .asList( - new LiveTraceCategory(), - new LiveTraceCategory(), - new LiveTraceCategory()))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories( - Arrays - .asList( - new ResourceLogCategory(), - new ResourceLogCategory(), - new ResourceLogCategory()))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.SERVER_CONNECTION)) - .withDeny(Arrays.asList(WebPubSubRequestType.RESTAPI))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl().withName("o"), - new PrivateEndpointAcl().withName("hb"), - new PrivateEndpointAcl().withName("xknalaulppg"))) - .withIpRules( - Arrays.asList(new IpRule(), new IpRule(), new IpRule(), new IpRule()))) - .withPublicNetworkAccess("napnyiropuhpigv") - .withDisableLocalAuth(true) - .withDisableAadAuth(true) - .withRegionEndpointEnabled("git") - .withResourceStopped("edjvcslynqw"))) - .withNextLink("zvszj"); - model = BinaryData.fromObject(model).toObject(WebPubSubResourceList.class); - Assertions.assertEquals("enhwlrs", model.value().get(0).location()); - Assertions.assertEquals("zpwv", model.value().get(0).tags().get("qdqgbi")); - Assertions.assertEquals("tpngjcrcczsqpjh", model.value().get(0).sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals(1901274446, model.value().get(0).sku().capacity()); - Assertions.assertEquals(ServiceKind.SOCKET_IO, model.value().get(0).kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals(true, model.value().get(0).tls().clientCertEnabled()); - Assertions.assertEquals("typmrbpizcdrqjsd", model.value().get(0).liveTraceConfiguration().enabled()); - Assertions.assertEquals(AclAction.ALLOW, model.value().get(0).networkACLs().defaultAction()); - Assertions - .assertEquals( - WebPubSubRequestType.RESTAPI, model.value().get(0).networkACLs().publicNetwork().allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.TRACE, model.value().get(0).networkACLs().publicNetwork().deny().get(0)); - Assertions.assertEquals("jttgzf", model.value().get(0).networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("a", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals(false, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(true, model.value().get(0).disableAadAuth()); - Assertions.assertEquals("alpbuxwgipwhon", model.value().get(0).regionEndpointEnabled()); - Assertions.assertEquals("kgshwa", model.value().get(0).resourceStopped()); - Assertions.assertEquals("zvszj", model.nextLink()); - } - - // Use "Map.of" if available - @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 bb2377fd5ae0..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\":\"fdv\",\"privateLinkResourceId\":\"vhb\",\"provisioningState\":\"Succeeded\",\"requestMessage\":\"xt\",\"status\":\"Approved\"},\"id\":\"qthe\",\"name\":\"n\",\"type\":\"naoyank\"}"; - - 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("xfbvfb") - .withExistingWebPubSub("dy", "rhpw") - .withGroupId("ddei") - .withPrivateLinkResourceId("awzovgkk") - .withRequestMessage("kjcjcaztbwsnsqow") - .create(); - - Assertions.assertEquals("fdv", response.groupId()); - Assertions.assertEquals("vhb", response.privateLinkResourceId()); - Assertions.assertEquals("xt", 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 089e097d1b53..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("gzhxog", "ggsvoujkxibdaf", "rkmdyom", 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 1358c56a9542..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\":\"lsrhmpqvwwskond\",\"privateLinkResourceId\":\"brwimuvqejosovyr\",\"provisioningState\":\"Running\",\"requestMessage\":\"esi\",\"status\":\"Disconnected\"},\"id\":\"ljqobbpihehcecyb\",\"name\":\"rqbrjbbmpxdlvyk\",\"type\":\"rexcrseqwjksghu\"}"; - - 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("skw", "qjjyslurl", "shhkvpedw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lsrhmpqvwwskond", response.groupId()); - Assertions.assertEquals("brwimuvqejosovyr", response.privateLinkResourceId()); - Assertions.assertEquals("esi", 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 5b2527152a86..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListMockTests.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.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\":\"jirwgdnqzbrfk\",\"privateLinkResourceId\":\"pzhz\",\"provisioningState\":\"Running\",\"requestMessage\":\"jcitdigsxcdglj\",\"status\":\"Timeout\"},\"id\":\"ua\",\"name\":\"htomflrytswfp\",\"type\":\"mdgycxn\"}]}"; - - 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("klbyulidwcw", "mzegjon", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jirwgdnqzbrfk", response.iterator().next().groupId()); - Assertions.assertEquals("pzhz", response.iterator().next().privateLinkResourceId()); - Assertions.assertEquals("jcitdigsxcdglj", 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 357e690d5949..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\":true,\"reason\":\"ekrsgs\",\"message\":\"dhuzqgnjdgk\"}"; - - 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( - "auy", - new NameAvailabilityParameters().withType("vluwmncsttij").withName("y"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("ekrsgs", response.reason()); - Assertions.assertEquals("dhuzqgnjdgk", 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 456908e6cda8..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,233 +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.IpRule; -import com.azure.resourcemanager.webpubsub.models.LiveTraceCategory; -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.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.ResourceSku; -import com.azure.resourcemanager.webpubsub.models.ServiceKind; -import com.azure.resourcemanager.webpubsub.models.UserAssignedIdentityProperty; -import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -import com.azure.resourcemanager.webpubsub.models.WebPubSubResource; -import com.azure.resourcemanager.webpubsub.models.WebPubSubSkuTier; -import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; -import java.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\":\"gak\",\"tier\":\"Standard\",\"size\":\"rcmjdmspofapvuh\",\"family\":\"lniofrzgbzje\",\"capacity\":434322588},\"properties\":{\"provisioningState\":\"Succeeded\",\"externalIP\":\"l\",\"hostName\":\"bcuiiz\",\"publicPort\":1363158856,\"serverPort\":140033236,\"version\":\"nsnvpd\",\"privateEndpointConnections\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"privateEndpoint\":{},\"groupIds\":[\"z\",\"kiwbuqnyoph\"],\"privateLinkServiceConnectionState\":{}},\"id\":\"l\",\"name\":\"gcrpfbcun\",\"type\":\"zzcezelfwyfwlw\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"tnpsihclaf\",\"privateLinkResourceId\":\"va\",\"provisioningState\":\"Succeeded\",\"requestMessage\":\"rsqqwztcm\",\"status\":\"Timeout\"},\"id\":\"hcxwaxfewzjk\",\"name\":\"exfdeqvhpsylk\",\"type\":\"shk\"},{\"properties\":{\"groupId\":\"f\",\"privateLinkResourceId\":\"bmxzjrgywwpg\",\"provisioningState\":\"Deleting\",\"requestMessage\":\"ptfujgicgaaoept\",\"status\":\"Disconnected\"},\"id\":\"tdewemxswvruu\",\"name\":\"zzjgehkfki\",\"type\":\"rtixokff\"},{\"properties\":{\"groupId\":\"inljqepqwhixmo\",\"privateLinkResourceId\":\"stshiy\",\"provisioningState\":\"Canceled\",\"requestMessage\":\"lfcldu\",\"status\":\"Rejected\"},\"id\":\"rds\",\"name\":\"uwc\",\"type\":\"b\"}],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"mninwjizcilng\",\"liveTraceConfiguration\":{\"enabled\":\"h\",\"categories\":[{\"name\":\"bxqmu\",\"enabled\":\"xlxqzvn\"},{\"name\":\"sbycucrwnamikz\",\"enabled\":\"rqbsmswziq\"},{\"name\":\"uhok\",\"enabled\":\"uswhvhczznvfbycj\"}]},\"resourceLogConfiguration\":{\"categories\":[{\"name\":\"i\",\"enabled\":\"vumwmxqh\"},{\"name\":\"vnoamldseha\",\"enabled\":\"djh\"},{\"name\":\"lzok\",\"enabled\":\"ox\"}]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"publicNetwork\":{\"allow\":[\"ServerConnection\"],\"deny\":[\"RESTAPI\",\"ClientConnection\"]},\"privateEndpoints\":[{\"name\":\"atftgzpnpbsw\",\"allow\":[\"RESTAPI\",\"ServerConnection\",\"Trace\"],\"deny\":[\"Trace\",\"ClientConnection\",\"RESTAPI\"]},{\"name\":\"zihmipgawtxxpky\",\"allow\":[\"ServerConnection\",\"RESTAPI\",\"ServerConnection\",\"RESTAPI\"],\"deny\":[\"Trace\",\"RESTAPI\"]},{\"name\":\"mpcycilrmcaykgg\",\"allow\":[\"Trace\"],\"deny\":[\"RESTAPI\"]},{\"name\":\"ksxwpnd\",\"allow\":[\"ServerConnection\",\"ServerConnection\",\"ClientConnection\"],\"deny\":[\"RESTAPI\",\"ServerConnection\"]}],\"ipRules\":[{\"value\":\"jaosrxuzv\",\"action\":\"Deny\"},{\"value\":\"tcqiosmg\",\"action\":\"Allow\"}]},\"publicNetworkAccess\":\"gxq\",\"disableLocalAuth\":true,\"disableAadAuth\":false,\"regionEndpointEnabled\":\"tlaprltzkatb\",\"resourceStopped\":\"mznnbsoqeqalarvl\"},\"kind\":\"WebPubSub\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"zqavbpdqmjx\":{\"principalId\":\"bwln\",\"clientId\":\"hyreeu\"},\"yuojqtobaxk\":{\"principalId\":\"yzglgo\",\"clientId\":\"tlmj\"},\"njqhdenxa\":{\"principalId\":\"ytunlbfjkwr\",\"clientId\":\"nkqbhsyrq\"},\"wtqabpxuckp\":{\"principalId\":\"kpak\",\"clientId\":\"ifmjnn\"}},\"principalId\":\"qoweyirdhl\",\"tenantId\":\"ngwflqqmpizruwn\"},\"location\":\"xpxiwfcngjs\",\"tags\":{\"kv\":\"iixtmkzj\"},\"id\":\"irhgfgrwsdp\",\"name\":\"ra\",\"type\":\"zvzbglbyv\"}"; - - 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("yhsgz") - .withRegion("iqbi") - .withExistingResourceGroup("ojeevy") - .withTags(mapOf("bcblemb", "mwwinhehfqpofv", "ihebwtsw", "kbwvqvxkdiv")) - .withSku( - new ResourceSku().withName("zbgomfgbeg").withTier(WebPubSubSkuTier.BASIC).withCapacity(196754757)) - .withKind(ServiceKind.WEB_PUB_SUB) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "qscazuawxtz", - new UserAssignedIdentityProperty(), - "lvgsgzwywakoih", - new UserAssignedIdentityProperty(), - "mv", - new UserAssignedIdentityProperty(), - "gsxgnxfyqon", - new UserAssignedIdentityProperty()))) - .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("piljhahzvech") - .withCategories( - Arrays - .asList( - new LiveTraceCategory().withName("wieholewjwiu").withEnabled("wefqsfapaqtferr"), - new LiveTraceCategory().withName("ex").withEnabled("mfxapjwogqqno"), - new LiveTraceCategory().withName("udcdabtqwpwyawb").withEnabled("sqbuc")))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories( - Arrays - .asList( - new ResourceLogCategory().withName("exaoguya").withEnabled("ids"), - new ResourceLogCategory().withName("ultxijjumfq").withEnabled("z"), - new ResourceLogCategory().withName("qnmcjngzqdqx").withEnabled("jw"), - new ResourceLogCategory().withName("yfu").withEnabled("zsvtuikzhajqgl")))) - .withNetworkACLs( - new WebPubSubNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl() - .withAllow( - Arrays.asList(WebPubSubRequestType.RESTAPI, WebPubSubRequestType.SERVER_CONNECTION)) - .withDeny(Arrays.asList(WebPubSubRequestType.SERVER_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.SERVER_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.CLIENT_CONNECTION)) - .withName("zrdpsovwxznptgoe"), - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.TRACE)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.RESTAPI, - WebPubSubRequestType.SERVER_CONNECTION, - WebPubSubRequestType.RESTAPI)) - .withName("vf"), - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - WebPubSubRequestType.TRACE, WebPubSubRequestType.CLIENT_CONNECTION)) - .withDeny( - Arrays - .asList( - WebPubSubRequestType.CLIENT_CONNECTION, - WebPubSubRequestType.TRACE, - WebPubSubRequestType.SERVER_CONNECTION)) - .withName("s"))) - .withIpRules( - Arrays - .asList( - new IpRule().withValue("aabzmif").withAction(AclAction.DENY), - new IpRule().withValue("nmmaxrizkzob").withAction(AclAction.ALLOW), - new IpRule().withValue("lhslnelxieixyn").withAction(AclAction.ALLOW), - new IpRule().withValue("cwcrojphs").withAction(AclAction.DENY)))) - .withPublicNetworkAccess("wjutifdwfmv") - .withDisableLocalAuth(false) - .withDisableAadAuth(false) - .withRegionEndpointEnabled("bttzhraglkafhonq") - .withResourceStopped("jeick") - .create(); - - Assertions.assertEquals("xpxiwfcngjs", response.location()); - Assertions.assertEquals("iixtmkzj", response.tags().get("kv")); - Assertions.assertEquals("gak", response.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals(434322588, response.sku().capacity()); - Assertions.assertEquals(ServiceKind.WEB_PUB_SUB, response.kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals(true, response.tls().clientCertEnabled()); - Assertions.assertEquals("h", response.liveTraceConfiguration().enabled()); - Assertions.assertEquals("bxqmu", response.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("xlxqzvn", response.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("i", response.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("vumwmxqh", response.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.ALLOW, response.networkACLs().defaultAction()); - Assertions - .assertEquals( - WebPubSubRequestType.SERVER_CONNECTION, response.networkACLs().publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.RESTAPI, response.networkACLs().publicNetwork().deny().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.RESTAPI, response.networkACLs().privateEndpoints().get(0).allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.TRACE, response.networkACLs().privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("atftgzpnpbsw", response.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("jaosrxuzv", response.networkACLs().ipRules().get(0).value()); - Assertions.assertEquals(AclAction.DENY, response.networkACLs().ipRules().get(0).action()); - Assertions.assertEquals("gxq", response.publicNetworkAccess()); - Assertions.assertEquals(true, response.disableLocalAuth()); - Assertions.assertEquals(false, response.disableAadAuth()); - Assertions.assertEquals("tlaprltzkatb", response.regionEndpointEnabled()); - Assertions.assertEquals("mznnbsoqeqalarvl", response.resourceStopped()); - } - - // Use "Map.of" if available - @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 7fb4884e264d..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("qyrxp", "lcgqlsismj", 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 358128bf384e..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,106 +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.ServiceKind; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -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\":\"kk\",\"tier\":\"Standard\",\"size\":\"rtkgdojbmxvavref\",\"family\":\"esvecuijpx\",\"capacity\":214563643},\"properties\":{\"provisioningState\":\"Running\",\"externalIP\":\"tujwsawdd\",\"hostName\":\"babxvitit\",\"publicPort\":1297733750,\"serverPort\":1671083084,\"version\":\"avoxtfg\",\"privateEndpointConnections\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"privateEndpoint\":{},\"groupIds\":[\"pypqtgsfj\",\"cbslhhx\",\"db\"],\"privateLinkServiceConnectionState\":{}},\"id\":\"d\",\"name\":\"tnsi\",\"type\":\"ud\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"es\",\"privateLinkResourceId\":\"kdlpa\",\"provisioningState\":\"Failed\",\"requestMessage\":\"x\",\"status\":\"Rejected\"},\"id\":\"cfxwmdbox\",\"name\":\"fgsftufqob\",\"type\":\"jln\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"kknhxkizvytnrzv\",\"liveTraceConfiguration\":{\"enabled\":\"r\",\"categories\":[{\"name\":\"anokqgu\",\"enabled\":\"jqnv\"},{\"name\":\"oylaxxul\",\"enabled\":\"isdos\"},{\"name\":\"b\",\"enabled\":\"vgjrwhr\"},{\"name\":\"ycy\",\"enabled\":\"c\"}]},\"resourceLogConfiguration\":{\"categories\":[{\"name\":\"knfnwmbtmvpdv\",\"enabled\":\"httz\"},{\"name\":\"fedxihchrphkm\",\"enabled\":\"jdqnsdfzpbgt\"},{\"name\":\"ylkdghrje\",\"enabled\":\"tl\"},{\"name\":\"ez\",\"enabled\":\"hokvbwnh\"}]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"publicNetwork\":{\"allow\":[\"ServerConnection\",\"RESTAPI\",\"ServerConnection\",\"Trace\"],\"deny\":[\"Trace\",\"Trace\"]},\"privateEndpoints\":[{\"name\":\"e\",\"allow\":[\"ServerConnection\",\"ServerConnection\"],\"deny\":[\"Trace\"]}],\"ipRules\":[{\"value\":\"sheafid\",\"action\":\"Deny\"},{\"value\":\"sr\",\"action\":\"Allow\"},{\"value\":\"ssjhoiftxfkf\",\"action\":\"Allow\"}]},\"publicNetworkAccess\":\"rhptilluc\",\"disableLocalAuth\":true,\"disableAadAuth\":false,\"regionEndpointEnabled\":\"q\",\"resourceStopped\":\"mcwsldrizetpwb\"},\"kind\":\"WebPubSub\",\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"oylhjlmuoyxprimr\":{\"principalId\":\"bqzmizaka\",\"clientId\":\"nkjpdnjzha\"},\"vasylwxdzau\":{\"principalId\":\"pteecjme\",\"clientId\":\"ls\"}},\"principalId\":\"eoohguufuzboyj\",\"tenantId\":\"hwtzolb\"},\"location\":\"mwmdxmebwjscjpa\",\"tags\":{\"yijddtvqcttad\":\"veabfqxnmwmqtib\",\"zaapmudqmeqwi\":\"jaeukmrsieekpn\"},\"id\":\"pibudqwyxebeybpm\",\"name\":\"znrtffyaqit\",\"type\":\"hheioqaqhvseuf\"}"; - - 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("ktp", "ymerteeammxq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mwmdxmebwjscjpa", response.location()); - Assertions.assertEquals("veabfqxnmwmqtib", response.tags().get("yijddtvqcttad")); - Assertions.assertEquals("kk", response.sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals(214563643, response.sku().capacity()); - Assertions.assertEquals(ServiceKind.WEB_PUB_SUB, response.kind()); - Assertions.assertEquals(ManagedIdentityType.NONE, response.identity().type()); - Assertions.assertEquals(false, response.tls().clientCertEnabled()); - Assertions.assertEquals("r", response.liveTraceConfiguration().enabled()); - Assertions.assertEquals("anokqgu", response.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("jqnv", response.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("knfnwmbtmvpdv", response.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("httz", response.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.ALLOW, response.networkACLs().defaultAction()); - Assertions - .assertEquals( - WebPubSubRequestType.SERVER_CONNECTION, response.networkACLs().publicNetwork().allow().get(0)); - Assertions.assertEquals(WebPubSubRequestType.TRACE, response.networkACLs().publicNetwork().deny().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.SERVER_CONNECTION, - response.networkACLs().privateEndpoints().get(0).allow().get(0)); - Assertions - .assertEquals(WebPubSubRequestType.TRACE, response.networkACLs().privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("e", response.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("sheafid", response.networkACLs().ipRules().get(0).value()); - Assertions.assertEquals(AclAction.DENY, response.networkACLs().ipRules().get(0).action()); - Assertions.assertEquals("rhptilluc", response.publicNetworkAccess()); - Assertions.assertEquals(true, response.disableLocalAuth()); - Assertions.assertEquals(false, response.disableAadAuth()); - Assertions.assertEquals("q", response.regionEndpointEnabled()); - Assertions.assertEquals("mcwsldrizetpwb", response.resourceStopped()); - } -} 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 b27881297e05..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListByResourceGroupMockTests.java +++ /dev/null @@ -1,116 +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.ServiceKind; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -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\":\"alhsnvkc\",\"tier\":\"Basic\",\"size\":\"rpoaimlnwi\",\"family\":\"omylwea\",\"capacity\":803907952},\"properties\":{\"provisioningState\":\"Unknown\",\"externalIP\":\"hwwn\",\"hostName\":\"hlf\",\"publicPort\":2083074901,\"serverPort\":408867451,\"version\":\"wahfbousnfepgfew\",\"privateEndpointConnections\":[{\"properties\":{\"provisioningState\":\"Failed\",\"privateEndpoint\":{},\"groupIds\":[\"xykxhdj\"],\"privateLinkServiceConnectionState\":{}},\"id\":\"mmbcxfhbcp\",\"name\":\"rxvxcjzh\",\"type\":\"izxfpxt\"},{\"properties\":{\"provisioningState\":\"Unknown\",\"privateEndpoint\":{},\"groupIds\":[\"ftjuh\",\"qaz\"],\"privateLinkServiceConnectionState\":{}},\"id\":\"gg\",\"name\":\"wpijrajci\",\"type\":\"m\"},{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpoint\":{},\"groupIds\":[\"wrxgkneuvy\",\"nzqodfvpg\"],\"privateLinkServiceConnectionState\":{}},\"id\":\"xgsg\",\"name\":\"p\",\"type\":\"gzdjtxvzf\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"gaqvlgafcqusrd\",\"privateLinkResourceId\":\"etnwsdtutnw\",\"provisioningState\":\"Deleting\",\"requestMessage\":\"cvuzhyrmewipmve\",\"status\":\"Rejected\"},\"id\":\"kuqgsjjxundxgket\",\"name\":\"zhhzjhfjmhvvmu\",\"type\":\"gpmuneqsxvmhfbuz\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"as\",\"liveTraceConfiguration\":{\"enabled\":\"dyp\",\"categories\":[{\"name\":\"emslynsqyrp\",\"enabled\":\"obrltt\"}]},\"resourceLogConfiguration\":{\"categories\":[{\"name\":\"ygqdnfwqzdz\",\"enabled\":\"ilaxhn\"},{\"name\":\"qlyvijo\",\"enabled\":\"iv\"}]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"publicNetwork\":{\"allow\":[\"ServerConnection\",\"RESTAPI\"],\"deny\":[\"RESTAPI\",\"ClientConnection\",\"ServerConnection\",\"RESTAPI\"]},\"privateEndpoints\":[{\"name\":\"pwpgclrci\",\"allow\":[\"Trace\",\"ClientConnection\"],\"deny\":[\"ClientConnection\",\"RESTAPI\"]},{\"name\":\"nxpmyyefrpmpdnq\",\"allow\":[\"Trace\"],\"deny\":[\"ClientConnection\"]}],\"ipRules\":[{\"value\":\"mbnpqf\",\"action\":\"Allow\"}]},\"publicNetworkAccess\":\"kzmegnitgvkxlz\",\"disableLocalAuth\":false,\"disableAadAuth\":false,\"regionEndpointEnabled\":\"gcealzxwh\",\"resourceStopped\":\"nsymoyqhlwigd\"},\"kind\":\"SocketIO\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"kjsqzhzbezkgi\":{\"principalId\":\"fajuwas\",\"clientId\":\"daeyygux\"},\"wa\":{\"principalId\":\"idxas\",\"clientId\":\"ddyvvjskgfmo\"}},\"principalId\":\"qgatjeaahhvjhhn\",\"tenantId\":\"zybbj\"},\"location\":\"dj\",\"tags\":{\"dnlj\":\"xkyxvxevblbj\",\"aulx\":\"age\"},\"id\":\"nsmjbnkppxynen\",\"name\":\"svxeizzgwklnsr\",\"type\":\"ffeycx\"}]}"; - - 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("jwltlwtjjgu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dj", response.iterator().next().location()); - Assertions.assertEquals("xkyxvxevblbj", response.iterator().next().tags().get("dnlj")); - Assertions.assertEquals("alhsnvkc", response.iterator().next().sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals(803907952, response.iterator().next().sku().capacity()); - Assertions.assertEquals(ServiceKind.SOCKET_IO, response.iterator().next().kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(false, response.iterator().next().tls().clientCertEnabled()); - Assertions.assertEquals("dyp", response.iterator().next().liveTraceConfiguration().enabled()); - Assertions - .assertEquals( - "emslynsqyrp", response.iterator().next().liveTraceConfiguration().categories().get(0).name()); - Assertions - .assertEquals("obrltt", response.iterator().next().liveTraceConfiguration().categories().get(0).enabled()); - Assertions - .assertEquals( - "ygqdnfwqzdz", response.iterator().next().resourceLogConfiguration().categories().get(0).name()); - Assertions - .assertEquals( - "ilaxhn", response.iterator().next().resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.DENY, response.iterator().next().networkACLs().defaultAction()); - Assertions - .assertEquals( - WebPubSubRequestType.SERVER_CONNECTION, - response.iterator().next().networkACLs().publicNetwork().allow().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.RESTAPI, response.iterator().next().networkACLs().publicNetwork().deny().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.TRACE, - response.iterator().next().networkACLs().privateEndpoints().get(0).allow().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.CLIENT_CONNECTION, - response.iterator().next().networkACLs().privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("pwpgclrci", response.iterator().next().networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("mbnpqf", response.iterator().next().networkACLs().ipRules().get(0).value()); - Assertions.assertEquals(AclAction.ALLOW, response.iterator().next().networkACLs().ipRules().get(0).action()); - Assertions.assertEquals("kzmegnitgvkxlz", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals(false, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(false, response.iterator().next().disableAadAuth()); - Assertions.assertEquals("gcealzxwh", response.iterator().next().regionEndpointEnabled()); - Assertions.assertEquals("nsymoyqhlwigd", response.iterator().next().resourceStopped()); - } -} 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 4afdbdb80fb6..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListMockTests.java +++ /dev/null @@ -1,112 +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.ServiceKind; -import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; -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\":\"scliq\",\"tier\":\"Basic\",\"size\":\"xnkomtkubo\",\"family\":\"pnvdxz\",\"capacity\":685064266},\"properties\":{\"provisioningState\":\"Moving\",\"externalIP\":\"b\",\"hostName\":\"vqagtltdhlf\",\"publicPort\":610400917,\"serverPort\":347567134,\"version\":\"kvgtrdcn\",\"privateEndpointConnections\":[{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpoint\":{},\"groupIds\":[\"brn\"],\"privateLinkServiceConnectionState\":{}},\"id\":\"xmprafwg\",\"name\":\"khocxvdfffwaf\",\"type\":\"roud\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"vehhrvkbunzozu\",\"privateLinkResourceId\":\"hcxgkmoyx\",\"provisioningState\":\"Failed\",\"requestMessage\":\"ibhmfdn\",\"status\":\"Timeout\"},\"id\":\"vfvfcj\",\"name\":\"aeoisrvh\",\"type\":\"gorf\"},{\"properties\":{\"groupId\":\"kiscvwmzhwpl\",\"privateLinkResourceId\":\"faxvxil\",\"provisioningState\":\"Canceled\",\"requestMessage\":\"nhnzeyqxt\",\"status\":\"Rejected\"},\"id\":\"qlqhycavodg\",\"name\":\"xdbeesmieknl\",\"type\":\"ariaawi\"}],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"wqfbylyrfgiagt\",\"liveTraceConfiguration\":{\"enabled\":\"ocqwogfnzjvus\",\"categories\":[{\"name\":\"mozuxylfsb\",\"enabled\":\"adpysownbt\"}]},\"resourceLogConfiguration\":{\"categories\":[{\"name\":\"rj\",\"enabled\":\"to\"}]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"publicNetwork\":{\"allow\":[\"ServerConnection\",\"RESTAPI\",\"Trace\",\"ClientConnection\"],\"deny\":[\"Trace\"]},\"privateEndpoints\":[{\"name\":\"qdhcu\",\"allow\":[\"ServerConnection\"],\"deny\":[\"Trace\",\"RESTAPI\"]},{\"name\":\"hihihlhzdsqtzbsr\",\"allow\":[\"ServerConnection\"],\"deny\":[\"RESTAPI\"]},{\"name\":\"fgmvecactxmwo\",\"allow\":[\"ServerConnection\"],\"deny\":[\"RESTAPI\",\"Trace\",\"RESTAPI\",\"RESTAPI\"]},{\"name\":\"vekqvgqo\",\"allow\":[\"RESTAPI\",\"ServerConnection\",\"ClientConnection\"],\"deny\":[\"ServerConnection\"]}],\"ipRules\":[{\"value\":\"qikfxcv\",\"action\":\"Deny\"},{\"value\":\"phuagrttikteusq\",\"action\":\"Deny\"},{\"value\":\"yklxubyjaffmmfbl\",\"action\":\"Allow\"}]},\"publicNetworkAccess\":\"ubgq\",\"disableLocalAuth\":false,\"disableAadAuth\":false,\"regionEndpointEnabled\":\"metttwgd\",\"resourceStopped\":\"qxihhrmooi\"},\"kind\":\"SocketIO\",\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"jcjbt\":{\"principalId\":\"tcxapzhyrpetogeb\",\"clientId\":\"xslhvnhlabrqnkk\"}},\"principalId\":\"aehvvibrxjjstoq\",\"tenantId\":\"it\"},\"location\":\"xztmo\",\"tags\":{\"qxzhem\":\"lftidgfcwqmpim\"},\"id\":\"yhohujswtwkozzwc\",\"name\":\"lkb\",\"type\":\"wpfaj\"}]}"; - - 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("xztmo", response.iterator().next().location()); - Assertions.assertEquals("lftidgfcwqmpim", response.iterator().next().tags().get("qxzhem")); - Assertions.assertEquals("scliq", response.iterator().next().sku().name()); - Assertions.assertEquals(WebPubSubSkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals(685064266, response.iterator().next().sku().capacity()); - Assertions.assertEquals(ServiceKind.SOCKET_IO, response.iterator().next().kind()); - Assertions.assertEquals(ManagedIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals(true, response.iterator().next().tls().clientCertEnabled()); - Assertions.assertEquals("ocqwogfnzjvus", response.iterator().next().liveTraceConfiguration().enabled()); - Assertions - .assertEquals("mozuxylfsb", response.iterator().next().liveTraceConfiguration().categories().get(0).name()); - Assertions - .assertEquals( - "adpysownbt", response.iterator().next().liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("rj", response.iterator().next().resourceLogConfiguration().categories().get(0).name()); - Assertions - .assertEquals("to", response.iterator().next().resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals(AclAction.DENY, response.iterator().next().networkACLs().defaultAction()); - Assertions - .assertEquals( - WebPubSubRequestType.SERVER_CONNECTION, - response.iterator().next().networkACLs().publicNetwork().allow().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.TRACE, response.iterator().next().networkACLs().publicNetwork().deny().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.SERVER_CONNECTION, - response.iterator().next().networkACLs().privateEndpoints().get(0).allow().get(0)); - Assertions - .assertEquals( - WebPubSubRequestType.TRACE, - response.iterator().next().networkACLs().privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("qdhcu", response.iterator().next().networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("qikfxcv", response.iterator().next().networkACLs().ipRules().get(0).value()); - Assertions.assertEquals(AclAction.DENY, response.iterator().next().networkACLs().ipRules().get(0).action()); - Assertions.assertEquals("ubgq", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals(false, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(false, response.iterator().next().disableAadAuth()); - Assertions.assertEquals("metttwgd", response.iterator().next().regionEndpointEnabled()); - Assertions.assertEquals("qxihhrmooi", response.iterator().next().resourceStopped()); - } -} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListReplicaSkusWithResponseMockTests.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListReplicaSkusWithResponseMockTests.java deleted file mode 100644 index 56fa44b7066e..000000000000 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/test/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubsListReplicaSkusWithResponseMockTests.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 WebPubSubsListReplicaSkusWithResponseMockTests { - @Test - public void testListReplicaSkusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"jeamurv\",\"sku\":{\"name\":\"lovuana\",\"tier\":\"Standard\",\"size\":\"lpmjerb\",\"family\":\"elvidizozsdbccx\",\"capacity\":325656680},\"capacity\":{\"minimum\":1408228263,\"maximum\":204760337,\"default\":258073184,\"allowedValues\":[1054212324,1666658010,961140040,19355637],\"scaleType\":\"None\"}},{\"resourceType\":\"v\",\"sku\":{\"name\":\"jctzenkei\",\"tier\":\"Standard\",\"size\":\"mkdasv\",\"family\":\"yhbxcudchxgs\",\"capacity\":77592298},\"capacity\":{\"minimum\":82172099,\"maximum\":1200485317,\"default\":821548341,\"allowedValues\":[1198748738,2116230034,998979559,447073477],\"scaleType\":\"Manual\"}},{\"resourceType\":\"fovvacqpbtuodxes\",\"sku\":{\"name\":\"bbelawumuaslzk\",\"tier\":\"Standard\",\"size\":\"oycqucwy\",\"family\":\"hnomdrkywuh\",\"capacity\":1524678464},\"capacity\":{\"minimum\":888405116,\"maximum\":382004958,\"default\":1702145471,\"allowedValues\":[1188948288,1618607662,1291593702,1640023676],\"scaleType\":\"Manual\"}},{\"resourceType\":\"iexzsrzpge\",\"sku\":{\"name\":\"tybbwwpgda\",\"tier\":\"Premium\",\"size\":\"yvlixqnrk\",\"family\":\"kjibnxmysuxswqrn\",\"capacity\":790882759},\"capacity\":{\"minimum\":134024740,\"maximum\":1177215499,\"default\":169879542,\"allowedValues\":[607334150,246018660,496912008,382801077],\"scaleType\":\"None\"}}],\"nextLink\":\"yufmhruncuwmq\"}"; - - 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() - .listReplicaSkusWithResponse("cof", "zehtdhgb", "k", com.azure.core.util.Context.NONE) - .getValue(); - } -} 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 2a00346699ea..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\":\"hrqbnjjrcg\",\"sku\":{\"name\":\"ydcwboxjumv\",\"tier\":\"Basic\",\"size\":\"ihrraiouaub\",\"family\":\"tloqxfuojrn\",\"capacity\":1614609688},\"capacity\":{\"minimum\":193344927,\"maximum\":2039990607,\"default\":1842642996,\"allowedValues\":[243616363,231724213,1776866664,1431120696],\"scaleType\":\"None\"}},{\"resourceType\":\"yjdfqwmky\",\"sku\":{\"name\":\"ufdvruz\",\"tier\":\"Standard\",\"size\":\"j\",\"family\":\"ctfnmdxotng\",\"capacity\":1293168350},\"capacity\":{\"minimum\":222223496,\"maximum\":2136201648,\"default\":1242659668,\"allowedValues\":[1233581087,692345701],\"scaleType\":\"Manual\"}}],\"nextLink\":\"absnmfpp\"}"; - - 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("pkcdqzhlct", "dunqnd", com.azure.core.util.Context.NONE) - .getValue(); - } -}